Everything the CLI can do, typed
The agent loop stays in the binary. The SDK gives you a clean Go surface over it — and over the control protocol most wrappers never reach.
In-process tools // tools
The agent calls your Go functions during a run. No server to deploy. Untyped, or typed with schema inferred from a struct.
Permission callbacks // can_use_tool
Decide allow / deny for every tool call, in Go, while the turn is paused. Deny actually blocks it.
Hook callbacks // PreToolUse
Run Go logic before a tool fires — observe it, rewrite its input, or block it outright.
Inline subagents // agents
Define subagents from Go — no files on disk. The main agent delegates to them through the Task tool.
Interactive sessions // client
One long-running process, many turns, full memory. Token-level streaming and interrupt-with-ack included.
One-shot runs // runner
Plain, JSON, or streaming — with cost, session id, tokens, and turns parsed for you. Resume across processes.
Claims you can re-run
Every capability has an integration test that asserts the effect against the real binary — a denied tool that doesn't write, a skill whose marker appears only when loaded, a subagent whose prompt reaches the answer.
live-binary integration tests passing — plus >90% unit coverage on every package.
- ✓Deny blocks. can_use_tool denial leaves the file uncreated, not just the callback fired.
- ✓Skills filter. A local skill's marker appears when allowed and vanishes when the allowlist omits it.
- ✓Subagents run. A token that exists only in the subagent's prompt reaches the final answer.
- ✓Resume continues. A second process recalls a codeword from the first session.
- ✓Tools execute. The Go handler runs and its result shapes the reply.