Skip to content
Agent SDK · Open source

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 key

To 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 zod
import { 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

IncludedNot included
The run loop (call tools → observe → converge) with a step capCheckpoints / rollback (product layer)
Zod-defined tools with type inferenceMCP 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

  1. Quickstart: install, run, stream, connect a model
  2. Use cases: run the bundled examples by scenario
  3. Core concepts: loop, events, stop reasons, permission modes
  4. Defining tools: Zod schemas, built-in tools, errors, danger flags
  5. Cookbook: complete examples
  6. 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.