How tracer-cloud/opensre works
OpenSRE is a self-hosted SRE agent for investigating CI/CD failures and preparing fixes for review. The documented terminal workflow starts at the CLI, continues in the interactive shell or a headless agent turn, and uses configured models and integrations to investigate and act. Distinct product areas also include session and memory context, task planning, CI repair, and reliability telemetry. The graph uses README claims and the supplied source index/excerpts; several internal links are omitted where sampled code does not establish the caller or data flow.
Main entry points: harness.py Agent harness · interactive_shell/controller.py Interactive shell · lifecycle/controller.py Gateway lifecycle · app.py CLI
Components 21
User entrypoints
- CLI
surfaces/cli/app.py - Interactive shell
surfaces/interactive_shell/controller.py - Headless agent turn
core/agent_harness/turns/headless_agent.py
Agent runtime
- Agent harness
core/agent_harness/harness.py - Turn orchestration
core/agent_harness/turns/orchestrator.py - Tool execution
core/tool/execution.py - Task plans
core/agent_harness/task_plan/plan.py - Session goals
core/agent_harness/session_goal/goal.py - Prompt assembly
core/agent_harness/prompts/action/assemble.py - Session state
core/agent_harness/session/session_core.py - Memory domain
core/domain/memory/store.py
Reliability investigation
- GitHub CI repair
integrations/github/tools/ci_repair_loop/storage.py - Knowledge sources
core/domain/knowledge/access.py - CI reliability telemetry
core/telemetry/investigation.py
Models and integrations
- LLM clients
core/llm/transports/sdk/llm_clients.py - Service integrations
integrations/config_models.py
Gateway and telemetry
- Gateway lifecycle
gateway/core/lifecycle/controller.py - Gateway prompt intake
gateway/core/prompt_intake/jobs.py - Gateway event storage
gateway/core/storage/events/repository.py - Remote context sync
infrastructure/filestorage/engine.py
Other components
- Engineer
Connections 21
- Engineer → CLI: runs
- CLI → Interactive shell: opens shell
- Engineer → Headless agent turn: submits prompt
- Interactive shell → Turn orchestration: queues turns
surfaces/interactive_shell/controller.py - Headless agent turn → Agent harness: runs agent
- Turn orchestration → Agent harness: dispatches turn
- Agent harness → Prompt assembly: assembles prompt
- Agent harness → LLM clients: requests model
- Agent harness → Tool execution: uses tools
- Agent harness → Session state: uses session
- Agent harness → Task plans: plans work
- Agent harness → Session goals: tracks goals
- Session state → Memory domain: uses memory
- Tool execution → Service integrations: invokes services
- Agent harness → GitHub CI repair: investigates failures
- Agent harness → Knowledge sources: reads context
- Agent harness → CI reliability telemetry: analyzes reliability
- Engineer → Gateway lifecycle: uses managed gateway
- Gateway lifecycle → Gateway prompt intake: hosts intake
gateway/core/lifecycle/controller.py - Gateway lifecycle → Gateway event storage: serves transport events
- Interactive shell → Remote context sync: syncs context
infrastructure/filestorage/engine.py