Skip to content

Examples

Examples are executable files; this page is their index. Run them from the repository root after installing the development dependencies:

python3 -m pip install -e './coactra[all,dev,agent-gateway]'
python3 examples/offline_sre_agent.py
python3 examples/projects/resolution_memory/app.py
python3 examples/projects/research_workspace/app.py
python3 examples/projects/approval_routing/app.py

Public examples

Path Demonstrates
examples/offline_sre_agent.py Offline agent composition and streaming
examples/projects/resolution_memory/app.py Explicit memory writes and recall
examples/projects/research_workspace/app.py Scoped ephemeral files, handoff, and capability metadata
examples/projects/approval_routing/app.py Policy-gated peer routing

Acceptance smoke scripts

These scripts exercise adapter seams for the release gate. They are useful as small references, but inspect runtime wiring rather than acting as the primary application API:

Path Demonstrates
examples/acceptance/bring_existing_model.py Host-supplied model
examples/acceptance/bring_existing_memory_workspace.py External memory and workspace adapters
examples/acceptance/attach_mcp_toolset.py Additive MCP toolset attachment

make test-examples runs every example listed above and checks meaningful output markers. Provider-backed live behavior remains environment- and credential-gated. The workspace sample is intentionally ephemeral; use open_workspace without ephemeral=True and provide a stable base_dir when files must survive a process.