How msakash443-lgtm/research works
Research AI Platform is a same-origin research workspace centered on private projects, structured context, auditable evidence, and durable evidence-synthesis runs. Researchers use the browser to create a project, save decisions and verified excerpts, then launch a run; the web service persists work for a separate worker, which may call a configured LLM. Optional retrieval is deliberately separate and off by default. The graph follows README-described flows and sampled/indexed references; many specialized routes and their internal calls were not inspected, so those links are omitted.
Main entry points: main.py FastAPI service · documents.py Evidence library · worker.py Research worker · agent.py Web search agent
Components 26
Research workspace
- Browser UI
backend/app/web/app.js
Web service
- FastAPI service
backend/app/main.py - Sign-in
backend/app/routers/auth.py - Projects and context
backend/app/routers/projects.py - Research records
backend/app/models.py - PostgreSQL
backend/app/database.py - Audit trail
backend/app/audit.py
Evidence and synthesis
- Evidence library
backend/app/routers/documents.py - Object storage
backend/app/object_storage.py - Evidence context
backend/app/agent/context.py - Prompt registry
backend/app/prompt_registry.py - LLM adapter
backend/app/agent/llm.py - Untrusted text guard
backend/app/untrusted_text.py - Extraction schemas
backend/app/extraction_schema.py
Durable processing
- Research runs
backend/app/routers/research_runs.py - Research worker
backend/app/worker.py - Task queue
backend/app/task_queue.py
Optional retrieval
- Scholarly connectors
backend/app/connectors - ARC client
backend/app/agent/arc_client.py - ARC retrieval API
backend/arc_retrieval/retrieval_api.py - Web search agent
backend/arc_retrieval/web/agent.py - SSRF protection
backend/arc_retrieval/web/_ssrf.py - Web search
backend/arc_retrieval/web/search.py
Other components
- Researcher
- LLM provider
- ARC HTTP service
Connections 24
- Researcher → Browser UI: uses
README.md - Browser UI → FastAPI service: calls API
README.md - FastAPI service → Sign-in: routes to
backend/app/main.py - FastAPI service → Projects and context: routes to
backend/app/main.py - FastAPI service → Evidence library: routes to
backend/app/main.py - FastAPI service → PostgreSQL: persists data
README.md - Projects and context → Research records: stores records
- Evidence library → Research records: stores evidence
- Research records → PostgreSQL: uses ORM
backend/app/models.py - FastAPI service → Research runs: routes to
backend/app/main.py - Research runs → Task queue: queues run
README.md - Task queue → Research worker: dispatches
README.md - Research worker → LLM adapter: requests synthesis
README.md - LLM adapter → LLM provider: calls endpoint
README.md - Research worker → PostgreSQL: stores run
README.md - Evidence library → Object storage: stores files
- FastAPI service → Audit trail: records actions
- FastAPI service → Scholarly connectors: offers opt-in
README.md - FastAPI service → ARC client: offers opt-in
README.md - ARC client → ARC HTTP service: calls HTTP
README.md - ARC HTTP service → ARC retrieval API: serves requests
- ARC retrieval API → Web search agent: dispatches
backend/arc_retrieval/retrieval_api.py - Web search agent → Web search: searches with
backend/arc_retrieval/web/agent.py - Web search agent → SSRF protection: fetches safely