Skip to main content
An agent is an LLM-driven capability registered alongside tools. You author it against one uniform contract — the Agent ABC — and the manifest loads it the same way it loads a tool module.

The Agent contract

The whole agent shape is owned once by the contract: the Agent ABC with its default stream and drain behaviour, the neutral spec descriptors, and a typed event vocabulary. The skeleton adds no agent implementation of its own — it surfaces the contract in its own namespace and registers agents against the app. You register an agent with a decorator that also names it. The skeleton synthesizes the agent’s JSON run tool from its declared input model, so an agent is callable exactly like any other tool:

Streaming events

An agent run streams a typed sequence of StreamEvents rather than returning a single blob. The vocabulary covers message deltas and finals, reasoning steps, tool-call and tool-result steps, structured finals, interrupt finals, and run usage. The event producers — the projection over the agent runtime’s updates and messages — live in the agents runtime; a client renders the frames as they arrive. Run an agent and watch its stream from the CLI:

Authored agents

Beyond code-defined agents, you can author an agent as a saved spec that rides the versioning spine — a preset that bakes the agent’s preset-bakeable fields. Authored agents version and roll back exactly like presets, so an agent’s configuration evolves without breaking its callers.

Composition

An agent can drive other agents as sub-agents and chain multi-step work. That compositional side — sub-agents and the ready-made set — is its own pillar: deep agents. See the author-an-agent guide for the full authoring path and the Python SDK reference for the Agent ABC and the StreamEvent types.