How hchju777/deepagent-template works
This is a read-only operations-monitoring agent for digital-twin service stacks. People can submit symptoms for interactive intake, while scheduled patrol checks can open cases automatically; both feed the shared investigation engine, which gathers evidence, forms and verifies causal verdicts, then produces reports for human action. The HTTP API is a separate case-and-events surface, and fleet rollups and feedback labels are distinct capabilities. Relationships for unsampled subsystems are included only where the README documents them; source excerpts also show API routing and report-model responsibilities.
Main entry points: daemon.py Patrol daemon · cases.py Case repository · app.py HTTP API · worker.py Investigation worker
Components 26
Entry surfaces
- CLI
src/__main__.py - HTTP API
src/api/app.py - Configuration
src/config/loader.py
Case investigation
- Symptom intake
src/application/intake.py - Investigation worker
src/application/worker.py - Investigation graph
src/application/graph.py - Investigation stages
src/application/nodes.py - Evidence subagents
src/application/subagents.py - Read-only adapters
src/infrastructure - Topology knowledge
src/knowledge/topology.py
Monitoring and patrol
- Patrol daemon
src/patrol/daemon.py - Checks and probes
src/patrol/probes.py - Rule judge
src/patrol/rules.py - Finding gate
src/patrol/gate.py
Domain and persistence
- Case models
src/domain/case.py - Case repository
src/domain/cases.py - Mongo persistence
src/infrastructure/mongo_store.py - Event service
src/application/events.py
Reporting and learning
- Feedback labels
src/application/labels.py - Report model
src/domain/report_model.py - Report renderers
src/presentation/report.py - HTML renderer
src/presentation/report_html.py - Fleet aggregation
src/fleet/run.py - Fleet report
src/presentation/fleet_report.py
Other components
- Operator
- API client
Connections 29
- Operator → CLI: invokes
- Operator → Patrol daemon: starts patrol
- API client → HTTP API: calls
src/api/app.py - CLI → Symptom intake: submits symptoms
src/__main__.py - HTTP API → Symptom intake: submits cases
src/api/routes_cases.py - Symptom intake → Case repository: opens case
src/application/intake.py - Patrol daemon → Checks and probes: schedules checks
src/patrol/daemon.py - Checks and probes → Rule judge: evaluates
- Patrol daemon → Finding gate: admits findings
src/patrol/daemon.py - Finding gate → Case repository: opens case
- Patrol daemon → Investigation worker: runs worker
src/patrol/daemon.py - Investigation worker → Investigation graph: investigates
src/application/worker.py - Investigation graph → Investigation stages: dispatches stages
- Investigation stages → Evidence subagents: delegates evidence
src/application/nodes.py - Evidence subagents → Read-only adapters: reads targets
- Investigation stages → Topology knowledge: uses topology
src/application/nodes.py - Investigation worker → Case repository: claims cases
src/application/worker.py - Case repository → Case models: stores records
src/domain/cases.py - Case repository → Mongo persistence: persists cases
src/infrastructure/mongo_store.py - Investigation worker → Event service: publishes events
src/application/worker.py - HTTP API → Event service: reads events
src/api/routes_reads.py - HTTP API → Report model: builds report data
src/api/routes_reads.py - Report model → Report renderers: renders markdown
src/presentation/report.py - Report model → HTML renderer: renders HTML
src/presentation/report_html.py - Operator → Feedback labels: supplies actual cause
- Patrol daemon → Fleet aggregation: runs fleet rollup
src/patrol/daemon.py - Fleet aggregation → Fleet report: produces report
src/fleet/run.py - CLI → Configuration: loads configuration
src/__main__.py - Configuration → Patrol daemon: configures patrol
src/patrol/daemon.py