Skip to content

Examples

All maintained examples live under examples/pydantic/.

They are intentionally arranged from smallest surface to broadest runtime.

Example Ladder

Example What it demonstrates
static_agent.py smallest possible run_acp(agent=...) integration
factory_agent.py session-aware factory plus session-local model selection
providers.py host-owned models, modes, config options, plan state, and approval metadata
approvals.py native deferred approval flow
bridges.py bridge builder, prepare-tools modes, history processors, and MCP metadata
host_context.py ClientHostContext and ACP client-backed file/terminal access
strong_agent.py full workspace coding-agent integration with Codex-backed models
strong_agent_v2.py alternative workspace agent using a conventional provider model
  1. Minimal Agent
  2. Session-aware Factory
  3. Provider-backed Session State
  4. Workspace Agent

Running The Examples

Minimal examples:

uv run python -m examples.pydantic.static_agent
uv run python -m examples.pydantic.factory_agent
uv run python -m examples.pydantic.providers

Full workspace agent:

uv run python -m examples.pydantic.strong_agent

That example expects a local Codex login.