Node.js client for the Actx0 platform.
npm install @actx0/nctx0import { knowledge } from "@actx0/nctx0";
const client = knowledge({
accessKey: "your-access-key",
workspaceId: "your-workspace-id",
});
const docs = await client.list();Or use the full client when you need multiple API areas:
import { Nctx0Client } from "@actx0/nctx0";
const client = new Nctx0Client({
accessKey: "your-access-key",
workspaceId: "your-workspace-id",
});
await client.health();
await client.knowledge.list();Fill in ACCESS_KEY, WORKSPACE_ID, and (for chat examples) OPENROUTER_KEY in the example files, then:
npx tsx examples/01_me.ts
npx tsx examples/02_docs.ts
npx tsx examples/03_agents.ts
npx tsx examples/04_prompts.ts
npx tsx examples/07_sessions.tsInteractive assistants (also need indexed docs from 02_docs.ts):
npx tsx examples/05_messages_list.ts
npx tsx examples/05_messages_search.ts
npx tsx examples/06_memories_list.ts
npx tsx examples/06_memories_search.tsnpm install
npm run typecheck
npm test
npm run buildTests start a local mock API server automatically. To run against your own local Actx0 server:
NCTX0_BASE_URL=http://127.0.0.1:8000 npm test