nvoken
DocumentationTypeScript SDK

Reference

TypeScript SDK

Use the 0.32 facade for Agents, Turns, Conversations, MemorySpaces, streaming, recovery, and exact HTTP access.

npm install @deepnoodle/nvoken@^0.32.0

Client reads NVOKEN_BASE_URL and NVOKEN_API_KEY, or accepts them explicitly:

import { Client } from "@deepnoodle/nvoken";
 
const client = new Client({
  baseUrl: process.env.NVOKEN_BASE_URL,
  apiKey: process.env.NVOKEN_API_KEY,
});

Create and load Agents

const agent = await client.agents.create({
  key: "support",
  name: "Support",
  instructions: "Be concise and helpful.",
  model: "anthropic/claude-sonnet-5",
});
 
const sameAgent = await client.agent("support");
const exactAgent = await client.agents.getById(agent.id);

Use ownedBy for tenant- or user-owned Agent namespaces. The awaited key lookup fails immediately when the Agent is absent or invisible.

Choose the amount of waiting

  • start() accepts work and returns a recoverable Turn handle.
  • run() waits for a terminal result.
  • text() waits and requires a text result.
const turn = await agent.start("Summarize this issue.", {
  tenant: "acme",
  user: "alice",
});
 
for await (const update of turn.updates()) {
  console.log(update.snapshot.status, update.snapshot.text);
}

Bind continuity before running

const chat = agent.conversation({
  tenant: "acme",
  key: "ticket-483",
  owner: "tenant",
  memory: { scope: "tenant", namespace: "support" },
});
 
console.log(await chat.text("Continue from the previous request."));

This binds host-selected coordinates in local code; it does not create a different server-side Agent. The Conversation owns transcript continuity only.

Recover by Turn ID

const recovered = client.turn("019b0a13-2c74-7a91-8f3d-5b1e0c6d4a28", {
  tenant: "acme",
  user: "alice",
});
 
const result = await recovered.result({ timeoutMs: 30_000 });

The timeout stops local waiting, not remote execution.

Use inline behavior

const classifier = client.inline({
  instructions: "Classify the request.",
  model: "anthropic/claude-sonnet-5",
});
 
const result = await classifier.run("I was charged twice.", {
  tenant: "acme",
});

Drop to the exact API

client.raw() exposes the generated transport and exact OpenAPI names. Use it for management, inspection, and control operations that should stay visibly wire-shaped. The facade and raw client share authentication and retry behavior.

The same release is available for Go, Python, Rust, and the CLI:

go get github.com/deepnoodle-ai/nvoken/sdk/go@v0.32.0
python -m pip install 'nvoken==0.32.0'
cargo add nvoken@0.32.0