Skip to main content
The SDK exports types for every request/response. All of them ship in the bundled .d.ts.
Most sub-client methods are not yet typed at the return, and the snippets in this section show the wire shape rather than the declared shape. Measured on the shipped package: 129 of the 241 methods across the 32 resource clients have no explicit Promise<T> annotation, so TypeScript infers unknown (or {}) from the HTTP layer.The bodies documented on each sub-client page are what the API really returns — but a snippet like const app = await naive.apps.create(…); app.id will not compile until you name the shape yourself:
Where a method is annotated (users.*, accountKits.*, connections.connected, llm.chat, plans.*, toolkits.list, the whole durable-runtime and brain surface) the declared type is authoritative. This gap is in the SDK, not in these pages; it is recorded here once rather than repeated on every page.

The flat resource API

ScopedClient (returned by naive.forUser(id)) and the Naive root class are also exported as values.

The durable runtime and the brain

The matching values:

Errors

NaiveError.code is typed string, not NaiveErrorCode. Narrowing the property would make every existing e.code === "some_other_code" comparison a compile error in customer code and break every new NaiveError(status, someString, …) call. The closed union ships beside it, with isNaiveErrorCode() as the runtime narrowing. See Governance.

Agent tools

In-agent

Types for code running inside an agent live in a different package — @usenaive-sdk/runtime: AgentHandle, CreateAgentOptions, AgentEnv, WorkspaceEntry, Teammate, AgentMemorySlot, and the Brain* input/outcome types.