How agamaciag/vigil-document-analyst works
Vigil is a web-based enterprise document analyst. Users upload documents, choose a workflow, and receive a report from a three-stage Indexer → Analyzer → Advisor pipeline; they can inspect intermediate JSON and ask follow-up questions grounded in indexed document data. Upload parsing, workflow orchestration, semantic search, and chat are distinct parts of the runtime. The README documents workflow and OCR capabilities beyond the sampled excerpts; links to those unsampled internals are omitted where their callers are not shown.
Main entry points: pipeline.py Workflow orchestrator · app.py HTTP app · search_client.py Search integration · foundry_client.py Foundry client
Components 19
Web interface
- Web UI
static/app.js - HTTP app
app.py - Security middleware
middleware.py
Document ingestion
- Upload route
routes/upload.py - Document parser
doc_parser.py - Upload sessions
routes/__init__.py
Analysis pipeline
- Workflow orchestrator
routes/pipeline.py - Document chunker
chunker.py - Fact indexer
agents/indexer.py - Document analyzer
agents/analyzer.py - Gap rules
gap_rules.py - Report advisor
agents/advisor.py
Search and chat
- Follow-up chat
routes/chat.py - Search integration
search_client.py
Azure services
- Agent registration
agents/__init__.py - Foundry client
foundry_client.py
Other components
- Enterprise user
- Azure AI Foundry
- Azure AI Search
Connections 29
- Enterprise user → Web UI: uses
README.md - Web UI → HTTP app: calls API
README.md - HTTP app → Upload route: routes uploads
app.py - HTTP app → Workflow orchestrator: routes runs
app.py - HTTP app → Follow-up chat: routes questions
app.py - HTTP app → Security middleware: applies
app.py - Upload route → Document parser: parses files
routes/upload.py - Upload route → Upload sessions: stores documents
README.md - Workflow orchestrator → Upload sessions: resolves documents
README.md - Workflow orchestrator → Document chunker: chunks documents
routes/pipeline.py - Workflow orchestrator → Fact indexer: runs stage
routes/pipeline.py - Workflow orchestrator → Document analyzer: runs stage
README.md - Workflow orchestrator → Report advisor: runs stage
routes/pipeline.py - Workflow orchestrator → Search integration: indexes chunks
routes/pipeline.py - Workflow orchestrator → Search integration: indexes facts
routes/pipeline.py - Workflow orchestrator → Gap rules: evaluates rules
routes/pipeline.py - Follow-up chat → Search integration: retrieves context
routes/chat.py - Follow-up chat → Foundry client: gets inference client
routes/chat.py - Search integration → Azure AI Search: queries indexes
- Search integration → Azure AI Search: writes indexes
- HTTP app → Agent registration: registers agents
app.py - Agent registration → Fact indexer: registers
agents/__init__.py - Agent registration → Document analyzer: registers
agents/__init__.py - Agent registration → Report advisor: registers
agents/__init__.py - Fact indexer → Foundry client: gets inference client
agents/indexer.py - Document analyzer → Foundry client: gets inference client
agents/analyzer.py - Report advisor → Foundry client: gets inference client
agents/advisor.py - Foundry client → Azure AI Foundry: connects
foundry_client.py - Document parser → Azure AI Foundry: uses OCR