Docs
Read the SDK
reference.
The full reference lives in the GitHub README — single source of truth, versioned with the code. Jump to a topic below.
01
Quick Start
Install the package, create your first agent, send a prompt, and read the result. Five minutes from zero to a working agent.
02
Custom Tools
Define tools with defineTool, validate inputs with Codable schemas, and let the model call them mid-conversation.
03
MCP Integration
Wire in Model Context Protocol servers over stdio, SSE, HTTP, or in-process. Tools and resources auto-discovered.
04
Hooks
Intercept tool calls before and after execution. Add audit logs, permission checks, telemetry, retries — without touching tool code.
05
Skills
5 built-in skills (Commit, Review, Simplify, Debug, Test) plus custom skill registration. Package reusable agent behaviors.
06
Sessions
Persist conversation state across runs. Resume an agent where it left off — across processes, devices, or days.
07
Self-Evolution
Auto-extract experience from sessions, evolve skills based on usage signals, and run background review pipelines with IntelligentCurator.
08
HTTP Server
Expose any Agent as a REST + SSE service with run tracking, concurrency limits, and authentication.
09
Sub-Agents & Teams
Spawn child agents, manage teams with shared task lists, and coordinate via inter-agent messaging.
10
Cost & Trace
Built-in CostTracker for token/cost budgeting, TraceRecorder for JSONL execution observability.
11
Runtime Event Layer
Subscribe to 18 typed events via EventBus — session lifecycle, agent progress, tool execution, LLM cost tracking, and token streaming. Bridge to SSE for HTTP API.
12
Output Formatting
Format SDK message streams for terminal or JSON output. TerminalOutputHandler and JSONOutputHandler for programmatic consumption.