How nextgenspark1/agentic-doc-intelligence works
Agentic Document Intelligence is a document-analysis platform with two product workflows: investigations and tendering. Users work through separate web applications; the backend provides shared API, authentication, and persistence alongside product-specific analysis. Investigation analysis is explicitly triggered by its route and scheduled as a background task. Tendering exposes workspaces, requirements, bid decisions, and a document library. The source index supports many module relationships, but does not reveal all runtime wiring; unverified frontend-to-API links are dashed.
Main entry points: __init__.py Case analysis · tendering/routes.py Tender routes · main.py Core API · investigation/routes.py Investigation routes
Components 27
User interfaces
- Case application
frontend/src/App.tsx - Case workspace
frontend/src/pages/CaseWorkspacePage.tsx - Case API client
frontend/src/api.ts - Tender application
tendering-frontend/src/App.tsx - Document library
tendering-frontend/src/pages/DocumentLibraryPage.tsx - Tender API client
tendering-frontend/src/api/tenders.ts
Shared backend
- Core API
backend/core/main.py - JWT authentication
backend/core/auth.py
Investigations
- Investigation routes
backend/apps/investigation/routes.py - Case analysis
backend/apps/investigation/pipeline/__init__.py - Entity resolution
backend/apps/investigation/pipeline/resolve_entities.py - Relationship building
backend/apps/investigation/pipeline/build_relationships.py - Anomaly detection
backend/apps/investigation/pipeline/detect_anomalies.py - Timeline reconstruction
backend/apps/investigation/pipeline/reconstruct_timeline.py - Case summaries
backend/apps/investigation/pipeline/summarise.py
Tendering
- Tender routes
backend/apps/tendering/routes.py - Tender workflows
backend/apps/tendering/pipeline - Readiness review
backend/apps/tendering/pipeline/readiness_review.py - Evidence matching
backend/apps/tendering/pipeline/evidence_matching.py
Data and AI
- Document extraction
backend/core/extract.py - Chunk retrieval
backend/core/retrieval.py - LLM services
backend/core/llm.py - Case data store
backend/core/db_core.py - Investigation store
backend/apps/investigation/db.py - Tender store
backend/apps/tendering/db.py
Other components
- Investigator
- Tendering user
Connections 29
- Investigator → Case application: uses
- Case application → Case workspace: routes to
frontend/src/App.tsx - Case workspace → Case API client: requests data
frontend/src/pages/CaseWorkspacePage.tsx - Case API client → Core API: calls API
- Core API → Investigation routes: mounts routes
backend/core/main.py - Investigation routes → JWT authentication: authenticates
backend/apps/investigation/routes.py - Investigation routes → Investigation store: reads and writes
backend/apps/investigation/routes.py - Investigation routes → Case analysis: schedules analysis
backend/apps/investigation/routes.py - Case analysis → Entity resolution: runs stage
backend/apps/investigation/pipeline/__init__.py - Case analysis → Relationship building: runs stage
backend/apps/investigation/pipeline/__init__.py - Case analysis → Anomaly detection: runs stage
backend/apps/investigation/pipeline/__init__.py - Case analysis → Timeline reconstruction: runs stage
backend/apps/investigation/pipeline/__init__.py - Case analysis → Case summaries: runs stage
backend/apps/investigation/pipeline/__init__.py - Case analysis → Document extraction: uses
backend/apps/investigation/pipeline/__init__.py - Tendering user → Tender application: uses
- Tender application → Document library: routes to
tendering-frontend/src/App.tsx - Document library → Tender API client: requests data
tendering-frontend/src/pages/DocumentLibraryPage.tsx - Tender API client → Tender routes: calls API
- Core API → Tender routes: mounts routes
backend/core/main.py - Tender routes → JWT authentication: authenticates
backend/apps/tendering/routes.py - Tender routes → Tender store: reads and writes
backend/apps/tendering/routes.py - Tender routes → Tender workflows: dispatches workflows
backend/apps/tendering/routes.py - Tender workflows → Readiness review: includes stage
- Tender workflows → Evidence matching: includes stage
- Core API → Case data store: uses
backend/core/main.py - Chunk retrieval → Case data store: queries chunks
backend/core/retrieval.py - Chunk retrieval → LLM services: embeds queries
backend/eval/retrievers.py - Readiness review → LLM services: requests reasoning
backend/apps/tendering/pipeline/readiness_review.py - Readiness review → Tender store: reads data
backend/apps/tendering/pipeline/readiness_review.py