The examples/ directory is organized into several functional categories to help you find specific implementation patterns:
Agents
Covers ReAct patterns, orchestration, memory, and multi-agent composition (A2A).
agents/: ReAct patterns and orchestration.ace_basic/: Minimal ACE usage.ace_react/: ACE layered onto ReAct.native_agent_session/: Tool-calling with persisted sessions.a2a_composition/: Multi-agent orchestration.
Long-Context and RLM (Replay Language Model)
Focuses on RLM modules, context policies (full, checkpointed, adaptive), and budget management.
rlm/: Basic live RLM run.rlm_context_policy/: Comparing replay policies.rlm_subrlm_budgets/: Deterministic budget demos.rlm_oolong/: Benchmarking on OOLONG tasks.rlm_oolong_gepa/: Optimizing and restoring adaptive RLM agents.
Modules
Demonstrates core DSPy-Go building blocks.
parallel/: Concurrent batch processing.refine/: Iterative answer improvement.xml_adapter/: XML structured output.multimodal/: Image and text workflows.
Tools and Integrations
Focuses on how agents interact with external tools.
smart_tool_registry/: Intelligent tool selection.tool_chaining/: Sequential pipelines.tool_composition/: Composite tools.mcp_optimizer/: MCP-backed optimization.
Research and Miscellaneous
Experimental or lower-level implementations.
others/gepa/, others/mipro/, others/simba/: Lower-level optimization examples.multi_chain_comparison/: Comparing reasoning strategies.