SDK Configuration
createVaultkitClient accepts a VaultkitConfig object. Use it to control authentication, timeouts, retries, logging, and the way dynamic vaults are generated.
Required properties
Always provide these three values when creating a client:About static vs. dynamic vaults:
- Use
vaultIdif you have a pre-configured vault in the Vaultkit dashboard.- Use
featureMappingIdto generate vaults on demand. Vaultkit will create a per-user vault the first timeconnect()is called.
Optional properties
Fine-tune behavior with these optional settings:Example: Interactive flow (recommended)
This is the typical flow for apps with user-facing UIs. Users select features and authenticate providers through the SDK UI components, then you create a client with the resulting vault.Example: Programmatic flow (advanced)
Use this only when you need to dynamically provision vaults server-side without user interaction.Example: Backend/Internal agent (no UI)
For internal services and scheduled jobs, use pre-configured vaults without any UI components:Inspecting the client
createVaultkitClient returns a small API:
vaultkit.tools– Getter that exposes the array of Vaultkit tools afterconnect()succeeds.await vaultkit.connect()– Resolves the correct vault and fetches tools. It also handles dynamic provisioning whenfeatureMappingIdis present.await vaultkit.disconnect()– Clears in-memory tool state. Call this infinallyblocks to avoid leaking resources.
connect() once during startup.