How narfect/muninn works
Muninn is an incident-response copilot: responders open an alert, compare cold and memory-grounded warm triage, review a cited brief, then resolve the incident so its outcome is retained for future recall. The architecture separates browser workflows, HTTP/API handling, incident and triage services, reasoning and memory, and persistence/authentication. The README documents dashboards, role-based access, and optional Groq, Hindsight, and Supabase paths. Some runtime wiring is unsampled, so links for those documented capabilities cite the README rather than implying unobserved calls.
Main entry points: routes.py API handlers · server.py HTTP server · metrics.py MTTR and learning metrics · agent.py Triage agent
Components 24
Responder experience
- Muninn web app
static/app.js - Account interface
static/auth.js - Insights dashboard
static/socviz.js
HTTP and workflows
- HTTP server
backend/server.py - Request router
backend/router.py - API handlers
backend/api/routes.py - Incident workflows
backend/services/incidents.py - Triage workflow
backend/services/triage.py - MTTR and learning metrics
backend/services/metrics.py
Triage and memory
- Triage agent
backend/llm/agent.py - Reasoner backends
backend/llm/client.py - Memory selection
backend/memory/base.py - Memory retrieval
backend/memory/retrieval.py - Local memory store
backend/memory/local_store.py - Hindsight memory store
backend/memory/hindsight_store.py
State and identity
- SQLite incident store
backend/db.py - Unified authentication
backend/services/auth_unified.py - Local authentication
backend/services/auth.py - Supabase authentication
backend/services/supabase_auth.py
External backends
- Hindsight client
backend/memory/hindsight_client.py - Supabase transport
backend/services/supabase_client.py - Groq API
- Supabase services
Other components
- On-call responder
Connections 27
- On-call responder → Muninn web app: uses
README.md - Muninn web app → HTTP server: calls API
README.md - Account interface → HTTP server: authenticates
README.md - Insights dashboard → HTTP server: loads insights
README.md - HTTP server → Request router: dispatches requests
backend/server.py - Request router → API handlers: routes requests
backend/router.py - API handlers → Unified authentication: handles account actions
backend/api/routes.py - API handlers → Incident workflows: handles incident actions
README.md - API handlers → Triage workflow: runs triage
README.md - API handlers → MTTR and learning metrics: serves insights
README.md - Incident workflows → SQLite incident store: reads and writes
backend/services/incidents.py - Triage workflow → Triage agent: requests triage
backend/services/triage.py - Triage agent → Reasoner backends: reasons over alert
backend/llm/agent.py - Triage agent → Memory selection: recalls context
backend/llm/agent.py - Memory selection → Local memory store: selects local
backend/memory/base.py - Memory selection → Hindsight memory store: selects Hindsight
backend/memory/base.py - Hindsight memory store → Hindsight client: uses transport
backend/memory/hindsight_store.py - Local memory store → Memory retrieval: retrieves memories
backend/memory/local_store.py - MTTR and learning metrics → SQLite incident store: reads incident data
backend/services/metrics.py - MTTR and learning metrics → Incident workflows: derives trends
backend/services/metrics.py - Unified authentication → Local authentication: delegates locally
backend/services/auth_unified.py - Unified authentication → Supabase authentication: delegates remotely
backend/services/auth_unified.py - Supabase authentication → Supabase transport: calls Auth API
backend/services/supabase_auth.py - Local authentication → SQLite incident store: stores local accounts
backend/services/auth.py - Supabase transport → Supabase services: uses Auth and REST
backend/services/supabase_client.py - Reasoner backends → Groq API: calls model API
README.md - Hindsight client → Supabase services