SDK overview
Embed the Neox agent runtime in your application. Apache-2.0.
What it is
The agent runtime the Neox client uses, packaged as an embeddable TypeScript module, @neoxlabs/sdk. The source is in OpenNeox under Apache-2.0.
It provides the agent run loop: call the model, call tools, observe, iterate to completion. It does not include Neox's product-level tasks, memory or checkpoints.
Install
The npm package is not published yet. Build from source:
git clone https://github.com/neoxlabs/OpenNeox
cd OpenNeox
npm ci && npm run build:packages
npx tsx packages/sdk/examples/06-mock.ts # offline example, no API keyTo use it in your own project, pack a tarball from the SDK folder and install it as a local file:
cd packages/sdk && npm pack # writes neoxlabs-sdk-2.7.0.tgz
cd /path/to/your-app
npm install /path/to/neoxlabs-sdk-2.7.0.tgz zodimport { Agent } from '@neoxlabs/sdk';
const agent = new Agent({ model: 'claude-sonnet-4-6' });
console.log((await agent.run('hello')).text);Connect a model
Either one works:
- Your own key: set one of
ANTHROPIC_API_KEY/OPENAI_API_KEY/DEEPSEEK_API_KEY/KIMI_API_KEY. The SDK detects it and calls the provider directly. - Neox Platform: one
sk-neox-key for DeepSeek, GLM, Kimi, Qwen, GPT and more, billed per use. See Quickstart · Neox Platform.
Scope
| Included | Not included |
|---|---|
| The run loop (call tools → observe → converge) with a step cap | Checkpoints / rollback (product layer) |
| Zod-defined tools with type inference | MCP mounting (builtinTools.mcp() throws) |
Built-in file and command tools (builtinTools.fs / shell) | Web fetch / search (builtinTools.web() throws) |
Streaming events plus stream().result() | Locking for one Session shared across processes |
| Multi-turn Session (fork, persist, resume) | |
| Multi-provider, BYOK, permission modes, sub-agents, offline mock |
Contents
- Quickstart: install, run, stream, connect a model
- Use cases: run the bundled examples by scenario
- Core concepts: loop, events, stop reasons, permission modes
- Defining tools: Zod schemas, built-in tools, errors, danger flags
- Cookbook: complete examples
- API reference: every export and type
Prerequisites
- Node.js 20+
- Git and npm (to build from source)
- A model API key or a Neox Platform key. The offline mock needs neither.

