Skip to main content
The SDK is five published packages with clean boundaries. Every one is live on npm today.
Which package do I install? @usenaive-sdk/server. It re-exports every export of @usenaive-sdk/node (literally export * from "@usenaive-sdk/node") and adds provisioning, so there is nothing in node that is not also in server. @usenaive-sdk/node is not deprecated and is not going away — if you already import it, nothing breaks, and the two share one Naive class hierarchy. Every page in this section imports from @usenaive-sdk/server.

Two roots on one object

new Naive({ apiKey }) gives you the flat resource API — the surface this SDK has always published. createClient<typeof config>({ apiKey }) gives you the same object plus the durable-runtime and brain surface, typed by your own naive.config.ts:
NaiveClient extends Naive, so adopting it costs nothing: one credential, one host, one transport, and every method you already call keeps its name and its URL. Without a config, naive.teams.<name> does not typecheck — use the always-present string twin naive.team("support"), which behaves identically at runtime. See Teams & the durable runtime for what is wired today and what deliberately refuses.

Scoped clients — no polymorphic args

Top-level data-plane calls act on your default user:
naive.forUser(id) returns the full surface bound to a specific tenant user:
There is no userId | {args} overloading — vault.put(key, value) always means (key, value). The scope is fixed by which client you got the sub-client from.

Projects

A project is the scope between the organization and its account kits and child projects (tenant users). naive.forProject(id) returns that project’s control plane, and .forChild(childId) the data plane inside it:
Every organization has a default project, so naive.forUser(id), naive.users and naive.accountKits are unchanged and mean the same thing inside it — naive.forUser(id) and naive.forProject("default").forChild(id) return the identical ScopedClient.

Control plane vs data plane

  • Control planenaive.projects, naive.organization, naive.users, naive.accountKits, naive.plans, naive.toolkits, and forUser(id).provision / agent profile management. Organization scope, root client only; naive.forProject(id) narrows the kit + child-project half of it to one project.
  • Data plane — 39 sub-clients on naive.forUser(id) / forProject(p).forChild(id).
Four sub-clients exist only on forUser(id), not on the root client: payments, wallet, browser, profile. naive.payments is undefined at runtime — reach them as naive.forUser(id).payments. The other 35 are on both.
The 35 available on both the root (default user) and on forUser(id): cards · phone · trading · email · verification · formation · domains · social · connections · vault · logs · sessions · approvals · images · video · search · clips · llm · audio · apps · compute · queue · mobile · database · storage · functions · auth · seo · aeo · cron · jobs · memory · brain · billing · webhooks The build primitives operate on a fullstack app’s managed backend — naive.apps.create({ name, type: "fullstack" }) first, then naive.database / naive.storage / naive.functions / naive.auth (own project), or naive.forUser(id).database for an end-user’s project.

Agent Profiles

forUser(id).provision(template) instantiates a governed agent profile for a tenant — its identity, card, comms, and policy as one unit — and returns an AgentProfile:
Run the agent wherever you like — pull op.tools() into your own runtime, or use one of the two hosted runtimes:
  • runtime.durable() — the current runtime. Declared in naive.config.ts and driven through naive.teams.
  • naive.runtime("pool").start(op.id, { goal }) — the frozen legacy orchestration runtime, below.
Deprecated — naive.runtime(pool) and the legacy orchestration runtime. RuntimeHandle (runtime(pool).start / .startSystem) drives the frozen legacy runtime, which accepts no new capabilities. Its routes keep answering and nothing is removed.Use instead: declare runtime.durable() on a team({ lead, agents }) in naive.config.ts and drive it through naive.teams. There is no sunset date — the surface is frozen, not scheduled for removal.
Governance is constant on every path (the governance gateway).
Earlier revisions of this page — and of the SDK’s own doc comments — called the legacy pool “Naïve-hosted microVMs”. The implementation is ECS-on-EC2 containers with EBS volumes (stated at packages/server/src/runtime.ts). The word was a documentation defect; it is corrected here and at the source.

When to use the SDK vs CLI vs MCP

  • SDK — embedding Naive in your multi-tenant SaaS backend.
  • CLI — you, a developer, using Naive from a terminal (acts on your default user).
  • MCP — handing tools to an MCP-native agent (Claude, Cursor).
The SDK is server-only in v1 (API keys are server secrets).