Credentials, identity, and storage

Replace the SDK's default credential, identity, and persistence providers with custom implementations suited to your deployment environment.

The Convai Unity SDK ships with production-ready defaults for credentials, end-user identity, and session persistence. Each system is backed by a well-defined interface you can implement and register when the defaults do not fit your deployment.

When to use custom providers

  • CI / secrets management — API key must not be stored in ConvaiSettings.asset; it comes from an environment variable or a secrets vault.

  • Auth-backed identity — your application has its own user system (OAuth, Steam, custom LMS), and you want Convai's long-term memory and MAU (Monthly Active User) tracking tied to your user IDs.

  • Cloud save or custom storage — session data must persist to a cloud backend, encrypted storage, or a non-PlayerPrefs store.

All three providers are registered by subclassing ConvaiManager and overriding CreateRuntimeBuilder(). This means you create a new C# class that inherits from ConvaiManager, add it as a component to the same GameObject where ConvaiManager currently sits, and remove the original. The exception: identity and metadata providers can also be set via direct setters on ConvaiManager, which requires no subclassing and is simpler when you do not need to change any other settings.

Next steps

Custom credential providerCustom identity providerCustom persistence providerPersonal access token

Last updated

Was this helpful?