How rainyzhou2/sreagentharness works
go-sre-harness is a cognitive SRE agent runtime with a desktop and REST/SSE clients. A user submits a goal through the API; the durable kernel runs recoverable reasoning and tool steps, applies policy and approvals, and commits auditable results. Major supporting capabilities include conversation state, flows, long-term memory, evaluation/evolution, event delivery, and a separate Works control plane. The README documents the main runtime relationships; some subsystem links are therefore documented at a high level rather than verified from sampled implementation calls.
Main entry points: worker.go Durable step worker · api REST and SSE API · engine.go Work engine assembly · service.go Evaluation and replay
Components 26
Clients
- Desktop client
desktop/app.go - REST and SSE API
internal/api
Agent runtime
- Durable step worker
internal/kernel/worker.go - Reasoning and context
internal/cognitive - Model gateway
internal/gateway - Risk and approvals
internal/policy - SRE tools
internal/tools - Action runtime
internal/action/runtime.go
Agent capabilities
- Flow execution
internal/flow/engine.go - Long-term memory
internal/memory/retriever.go - Evaluation and replay
internal/eval/service.go - Reasoning quality
internal/reasoning/score.go - Postmortems
internal/postmortem/postmortem.go
Works control plane
- Works API
internal/workapi/api.go - Work orchestration
internal/orchestration/orchestrator.go - Work engine assembly
internal/workengine/engine.go - World state
internal/world/world.go - Work templates
internal/work/template.go - SRE integrations
plugins/sre/ai_infra.go - SRE work extension
plugins/srework/srework.go
State and delivery
- PostgreSQL
internal/store/pg/store.go - Local SQLite store
internal/localstore/store.go - Event log
internal/eventlog/eventlog.go - Event relay
internal/relay/relay.go - JetStream
internal/eventbus/nats.go
Other components
- SRE user
Connections 26
- SRE user → Desktop client: submits goals
README.md - Desktop client → REST and SSE API: uses REST/SSE
README.md - SRE user → REST and SSE API: submits goals
README.md - REST and SSE API → Durable step worker: dispatches runs
README.md - Durable step worker → Reasoning and context: assembles context
README.md - Durable step worker → Model gateway: requests models
README.md - Durable step worker → SRE tools: dispatches calls
README.md - Durable step worker → Risk and approvals: checks risk
README.md - Durable step worker → PostgreSQL: commits state
README.md - Durable step worker → Flow execution: runs flow steps
README.md - Durable step worker → Long-term memory: retrieves context
README.md - Evaluation and replay → Durable step worker: replays runs
README.md - Evaluation and replay → SRE user: gates evolution
README.md - Reasoning quality → Reasoning and context: scores reasoning
- Postmortems → Durable step worker: analyzes runs
- REST and SSE API → Works API: exposes Works
README.md - Work engine assembly → Work orchestration: assembles control plane
README.md - Work engine assembly → Work templates: loads templates
- Work engine assembly → SRE work extension: registers extension
- Work engine assembly → SRE integrations: loads plugins
- Work orchestration → World state: uses world state
- REST and SSE API → Local SQLite store: serves local runtime
README.md - Durable step worker → Event log: records events
README.md - Event log → Event relay: tails events
README.md - Event relay → JetStream: publishes events
README.md - JetStream → REST and SSE API: delivers SSE events
README.md