How abhishekmodi11/agentwere_hackathon works
First Responder is a sandboxed on-call agent that investigates a deployment alert, verifies a regression with independent evidence, authorizes a bounded rollback, and checks measured recovery. The principal flow runs from alert intake through orchestration and the policy gateway to sandbox tools, with operator approval or emergency stop where needed. JSONL audit events support live monitoring, replay, and postmortems; the dashboard also presents recovery proof and incident history. The README documents these links; sampled source additionally shows gateway authorization/execution and model evidence handling, but several core modules were not excerpted.
Main entry points: gateway.py Policy gateway · orchestrator.py Incident orchestrator · trace.py JSONL audit trace · approvals.py Approval queue
Components 24
Intake and control
- Alert intake
src/firstresponder/intake.py - FastAPI service
src/firstresponder/main.py - Emergency stop
src/firstresponder/killswitch.py
Investigation
- Incident orchestrator
src/firstresponder/orchestrator.py - Groq model client
src/firstresponder/llm/groq_client.py - Evidence compaction
src/firstresponder/llm/evidence.py - Run budget
src/firstresponder/budget.py
Policy and execution
- Policy gateway
src/firstresponder/gateway.py - Action policy
src/firstresponder/policy.py - Tool contracts
src/firstresponder/schemas/tool_args.py - Evidence sanitizer
src/firstresponder/sanitizer.py - Sandbox tool registry
src/firstresponder/tools/__init__.py - Rollback tool
src/firstresponder/tools/rollback.py - Approval queue
src/firstresponder/approvals.py
Audit and reporting
- JSONL audit trace
src/firstresponder/trace.py - Postmortem and notification
src/firstresponder/reporter.py - Live event monitor
src/firstresponder/monitor.py
Operator experience
- Incident dashboard
ui/src/main.tsx - Incident replay model
ui/src/incident.ts - Terminal trace monitor
scripts/watch.py
Other components
- Sandbox alerter
sandbox/alerter/alerter.py - Demo service
sandbox/demo-service/app.py - Operator
- Groq API
Connections 31
- Sandbox alerter → Alert intake: sends alert
README.md - Alert intake → Incident orchestrator: starts investigation
README.md - FastAPI service → Alert intake: routes intake
README.md - Incident orchestrator → Groq model client: requests proposals
README.md - Groq model client → Groq API: calls model
README.md - Incident orchestrator → Evidence compaction: compacts evidence
src/firstresponder/orchestrator.py - Groq model client → Run budget: accounts usage
src/firstresponder/llm/groq_client.py - Incident orchestrator → Policy gateway: requests tools
README.md - Policy gateway → Action policy: evaluates action
src/firstresponder/gateway.py - Policy gateway → Tool contracts: validates arguments
src/firstresponder/gateway.py - Policy gateway → Evidence sanitizer: sanitizes results
src/firstresponder/gateway.py - Policy gateway → Sandbox tool registry: dispatches tools
src/firstresponder/gateway.py - Sandbox tool registry → Demo service: reads evidence
README.md - Policy gateway → Approval queue: requests decision
README.md - Operator → Approval queue: approves action
README.md - Approval queue → Policy gateway: returns decision
README.md - Policy gateway → Rollback tool: dispatches rollback
README.md - Rollback tool → Demo service: executes rollback
src/firstresponder/tools/rollback.py - Incident orchestrator → Demo service: checks recovery
README.md - Incident orchestrator → JSONL audit trace: records decisions
README.md - Policy gateway → JSONL audit trace: records actions
README.md - Approval queue → JSONL audit trace: records decisions
README.md - FastAPI service → Emergency stop: handles stop
src/firstresponder/main.py - Operator → Emergency stop: requests stop
README.md - FastAPI service → Live event monitor: streams events
src/firstresponder/main.py - JSONL audit trace → Live event monitor: supplies events
README.md - Live event monitor → Incident dashboard: streams to browser
README.md - JSONL audit trace → Terminal trace monitor: replays trace
README.md - Incident dashboard → Incident replay model: summarizes incidents
ui/src/main.tsx - JSONL audit trace → Postmortem and notification: feeds postmortem
README.md - Postmortem and notification → Operator: presents report
README.md