How It Works
TheIdentityResolver maps (platform, platform_user_id) pairs to a single canonical_user_id. This canonical ID is then used for memory scoping, so all platforms share the same memory store.
Quick Example
IdentityResolver Protocol
Any identity resolver must implement:SQLiteIdentityResolver
The built-in implementation uses SQLite for persistence:str
default:"./identity.db"
Path to the SQLite database file. Created automatically.
PlatformIdentity
Theget_identities() method returns PlatformIdentity objects:
Integration with BaseInterface
Passidentity_resolver when creating any interface:
resolver.resolve(platform, platform_user_id) before creating the agent session. If a canonical ID is found, it’s used as the user_id for memory and session scoping.
Integration with serve()
When usingserve() for multi-interface deployments, pass the resolver once and it propagates to all interfaces: