Skip to main content
The examples/ directory contains runnable demos for every major feature. Each example includes a NotImplementedError placeholder - replace it with your LLM of choice.

Core Examples

ExampleWhat it demonstrates
basic_agent.pyMinimal agent with a single tool
streaming_agent.pyAgentTool sub-agent streaming with real-time event bubbling
multi_agent.pySequentialAgent pipeline (researcher -> writer)
parallel_agent.pyParallelAgent running 3 research agents concurrently
loop_agent.pyLoopAgent with writer/reviewer iterative refinement
transfer_agent.pyAgent handoff via make_transfer_tool (triage -> specialists)
planner_agent.pyPlanReActPlanner with structured chain-of-thought
memory_agent.pyPersistent memory with InMemoryMemoryStore
structured_output.pyTyped Pydantic output via output_schema
human_in_the_loop.pyInteractive ask_human tool for user input
task_orchestration.pyTaskPlanner with managed task board
mcp_agent.pyMCP tool server integration
langfuse_tracing.pyLangfuse tracing integration
a2a_server.pyA2A protocol server endpoint
# Run any example (after replacing the NotImplementedError with your LLM)
uv run python examples/basic_agent.py

Composer Examples

YAML-based agent composition examples in examples/composer/:
ExampleWhat it demonstrates
composer/simple/Single agent, minimal YAML config
composer/pipeline/Sequential researcher -> writer pipeline with tools
composer/loop/Draft/review loop with exit_loop termination
composer/transfer/Triage agent with transfer routing to specialists
composer/a2a-server/A2A endpoint with Dockerfile for deployment
# Run a composer example
uv run python examples/composer/simple/run.py

# Run the A2A server example
uv run python examples/composer/a2a-server/run.py