Skip to main content

SDK Quickstart

1. Install dependencies

2. Provide Vaultkit credentials

Create environment variables for the required credentials: your Vaultkit API key and the end-user ID. The vault ID is optional—use it only if you have a static vault; otherwise, use dynamic vaults via feature mappings.

3. Wrap your page with VaultkitProvider

The provider shares feature, authentication, and vault state across every child component. The SDK connects to Vaultkit automatically using the defaults (no configuration needed).

4. Let users pick features and connect providers

Before the UI renders anything meaningful, create at least one Feature in the Vaultkit dashboard (Dashboard → Feature Mappings). Each feature bundles the providers and tools the end user can opt into. For example:
  • Feature: “Email assistant”
  • Description: “Monitor and help manage your inbox”
  • Providers: Gmail, Outlook
  • Permissions / Scopes: create, read, update, delete
Once the feature is saved, FeatureSelect surfaces it to end users, and AuthComponent automatically lists the OAuth buttons for the configured providers.
Important: If no feature exists in the dashboard, FeatureSelect renders an empty list and AuthComponent has nothing to authenticate. Always seed the dashboard first—either manually or by script—before wiring these components into your app.
Note: FeatureSelect and AuthComponent assume they are rendered inside a VaultkitProvider. If you want standalone components that manage their own provider, import FeatureSelection or VaultkitAuthComponent instead.

5. Connect your agent

Once users have selected features and authenticated providers, use createVaultkitClient to connect your agent:
Pass vaultkit.tools to your LLM runtime (Vercel AI SDK, LangChain, etc.) to enable tool calling. For more details, see SDK Configuration.