Reference / SDKs
Start here
How-to guides
Reference
SDKs
The SDKs embed the same Rust engine that runs in a fleet, so an agent behaves
the same in your app and on the platform. They are thin wrappers over one
shared core; every SDK passes the conformance suite in spec/conformance.
| Language | Package | README | Example |
|---|---|---|---|
| Python | sdks/python (native module, built with maturin; needs Rust) |
sdks/python | examples/python-app |
| Node.js | sdks/node (napi-rs) |
sdks/node | examples/node-app |
| Go | sdks/go (cgo over a static library) |
sdks/go | examples/go-app |
| Rust | the agen-sdk-core and agen-engine crates (the core the other SDKs wrap) |
engine | engine/crates/agen-sdk-core/tests |
What every SDK offers:
- An agent from code (instructions, model, provider, tools) or from a bundle directory.
- Tools written in the host language; side-effecting unless marked read-only, with the same effect ledger as the fleet.
- Streaming text, cancellation, and an approval callback for
askpermissions (default: deny). - Memory: one agent object is one conversation; a store (
sqlite:...) keeps sessions across restarts. - Models and budgets: fallback models, routing models with cost tiers (per
agent and per run), reasoning effort, OpenRouter settings, compaction
(
contextTokens) andmaxTokensPerRun; see Models and providers. A router’sbudgetTierapplies to deployed agents only (the Hub tracks daily spend). - With
bundle, the bundle’s own settings are used: options passed next to it are refused.
Callbacks (tools, approvals, events) run on one dispatcher thread per agent,
in order: return quickly and hand slow work to another thread. Calling run
from inside a callback is rejected.