All templates
Multi-tenant & B2B

Multi-Tenant Agent Starter

The foundation for any B2B product where each of your customers needs their own autonomous agent with real-world capabilities — isolated credentials, scoped sessions, per-tenant billing, and a human-in-the-loop approvals queue baked in.

Read the docs

The agent prompt

Copy this into Cursor, Claude Code, or any Naïve-connected agent. It describes exactly what to build and which primitives to wire together.

Prompt
Build me a multi-tenant agent starter on Naive.

Every one of my customers should get their own scoped, autonomous agent with real-world capabilities and full isolation.

Use these Naive primitives:
- users + account-kits: create a tenant user per customer and control which primitives they can use
- vault: store each tenant's credentials encrypted
- sessions: issue short-lived, scoped MCP sessions so an agent only acts within one tenant
- approvals: route sensitive actions through a human-in-the-loop queue
- billing: meter and bill per tenant

Set up clean per-tenant scoping from day one. Read the docs at https://usenaive.ai/docs and start with: npm i -g naive && naive login

What it builds

Per-tenant isolation

Every end-user is a tenant user with their own scoped credentials and logs.

AccountKits

Toggle which primitives each customer can use and gate sensitive actions.

Scoped MCP sessions

Issue short-lived nv_sess_* tokens so agents act only within a tenant.

Human-in-the-loop

Sensitive actions land in an approvals queue before they execute.

Primitives used

usersaccount-kitsvaultsessionsbillingapprovals

How it's built

  • naive users / account-kits — provision and configure each tenant
  • naive vault — encrypted per-user credential store
  • naive sessions — scoped, TTL-limited agent sessions

Start building

Install the CLI, copy the prompt, and let your agent wire it up.

$ npm i -g naive && naive login