How-to guides
Each how-to here solves one concrete problem. They assume you already understand the basics (read the Tutorials first) and they don’t try to teach concepts (see Explanation for that).
Building agents
Section titled “Building agents”- Equip an agent with tools — pick capabilities and assign them.
- Give an agent web access —
web_fetch, network policies, allowlists. - Define agents as files — version-controllable agent definitions in Markdown, TOML, or YAML.
- Use AGENTS.md for project instructions — inject project-level context into the system prompt.
- Customize a harness — create your own harness as a starting point for many agents.
- Migrate between LLM providers — swap OpenAI ↔ Anthropic ↔ Gemini without rewriting agents.
Running agents
Section titled “Running agents”- Stream events with the SDK — consume the SSE stream from Python, with reconnection and event filtering.
- Consume events via raw SSE — when you don’t want the SDK: curl, EventSource, or any HTTP client.
- Handle errors and cancel turns — graceful failure paths, turn cancellation, retries.
- Orchestrate multi-agent pipelines — chain sessions together.
Packaging and distribution
Section titled “Packaging and distribution”- Package an agent skill — author a SKILL.md, bundle scripts and references.
- Publish a skill to the registry — share skills across agents.
- Publish an agent as a Slack app — deploy an agent to a Slack workspace.
Operating
Section titled “Operating”- Automate with the CLI — scripting against the CLI with
jq. - Deploy with Docker Compose — bring up the full platform.
- Enforce a budget — cap token spend per agent, session, or organization.