How shrx404/audit-agent works
Audit Agent is an audit-memory copilot: auditors browse and upload evidence, analyze a finding against historical records, inspect cited evidence and memories, then review and confirm an outcome for future recall. The frontend workspace calls the FastAPI backend through its typed API client. The README documents document extraction/indexing, recurrence detection, readiness checks, and deterministic scoring; sampled backend excerpts confirm upload, ask, analysis, and feedback routes, but do not expose every internal analysis step. The graph omits uncertain internal wiring.
Main entry points: page.tsx Workspace · main.py FastAPI routes · ask.py Question answering · client.py Memory wrapper
Components 19
Audit workspace
- Workspace
frontend/src/app/page.tsx - Source explorer
frontend/src/components/left-panel/SourceDataCorpus.tsx - Chat window
frontend/src/components/middle-panel/ChatWindow.tsx - Evidence panel
frontend/src/components/right-panel/MemoryPanel.tsx - Confirmation form
frontend/src/components/ConfirmationForm.tsx - Typed API client
frontend/src/lib/api.ts
Audit workflows
- FastAPI routes
backend/main.py - Evidence ingestion
backend/main.py - Finding analysis
backend/agent - Readiness checks
backend/agent/readiness.py - Audit feedback
backend/agent/state.py
Agent services
- Question answering
backend/agent/ask.py - Structured inference
backend/agent/llm.py - Memory wrapper
backend/memory/client.py - OmniRoute client
omniroute/services/llm_client.py
External services
- Hindsight memory
- Groq inference
- OmniRoute service
Other components
- Auditor
Connections 19
- Auditor → Workspace: uses
- Workspace → Source explorer: renders
- Workspace → Chat window: renders
- Workspace → Evidence panel: renders
- Workspace → Confirmation form: renders
- Workspace → Typed API client: requests
- Typed API client → FastAPI routes: HTTP calls
- FastAPI routes → Evidence ingestion: handles uploads
- FastAPI routes → Question answering: answers questions
- FastAPI routes → Finding analysis: analyzes findings
- FastAPI routes → Readiness checks: gets readiness
- FastAPI routes → Audit feedback: records feedback
- Evidence ingestion → Memory wrapper: retains evidence
- Question answering → Memory wrapper: recalls memories
- Question answering → Structured inference: generates answer
- Memory wrapper → Hindsight memory: reads and writes
- Structured inference → Groq inference: calls model
- OmniRoute client → OmniRoute service: routes completions
- OmniRoute client → Groq inference: fallback calls