How sudeshdahale/ai-research-copilot works
Arclight is a research-paper discovery and analysis copilot. Researchers search and filter papers, curate them in workspaces, then ask workspace-scoped questions or generate documents; frontend routes expose those workflows through the backend API. Search spans external scholarly catalogs, while saved papers and generated documents are durable, and semantic similarity uses embeddings. Agent requests retrieve papers before producing a fast streamed answer and intent-specific deeper analysis. Several backend routes and frontend components are unsampled, so their relationships are included only where the README or SOURCE INDEX documents them; unverified implementation details are omitted.
Main entry points: router.py API router · _app.tsx Research workspace · agent.py Agent endpoint · paper_service.py Catalog search
Components 28
Research interface
- Research workspace
frontend/src/routes/_app.tsx - Paper search
frontend/src/routes/_app.search.tsx - Paper library
frontend/src/routes/_app.library.tsx - Paper details
frontend/src/routes/_app.papers.$id.tsx - Document review
frontend/src/routes/_app.review.tsx - Agent chat
frontend/src/components/agent/AgentChat.tsx
API and access
- API router
backend/app/api/v1/router.py - Authentication
backend/app/api/v1/auth.py
Paper discovery
- Search endpoint
backend/app/api/v1/search.py - Discover assistant
backend/app/api/v1/discover.py - Catalog search
backend/app/services/paper_service.py - Result ranking
backend/app/services/ranking_service.py - Search cache
backend/app/core/cache.py
Research analysis
- Agent endpoint
backend/app/api/v1/agent.py - Paper retrieval
backend/app/agents/nodes/retrieve.py - Fast answers
backend/app/agents/fast_pipeline.py - Deep analysis
backend/app/agents/deep_pipeline.py - Intent analysis
backend/app/agents/nodes - Language model
backend/app/services/llm_service.py
Persistence and jobs
- Workspace management
backend/app/api/v1/workspaces.py - Document generation
backend/app/api/v1/documents.py - Generation worker
backend/app/workers/generate_document.py - PostgreSQL and pgvector
backend/app/db/session.py - Vector similarity
backend/app/services/vector_service.py
Other components
- Researcher
- Redis cache and broker
- Scholarly catalogs
- Voyage embeddings
Connections 40
- Researcher → Research workspace: uses
- Research workspace → Paper search: opens
- Research workspace → Paper library: opens
- Research workspace → Paper details: opens
- Research workspace → Document review: opens
- Research workspace → Agent chat: asks questions
- Paper search → Search endpoint: queries
- Paper library → Workspace management: curates papers
- Paper details → API router: requests paper
- Document review → Document generation: reviews documents
- Agent chat → Agent endpoint: streams request
- API router → Authentication: routes
backend/app/api/v1/router.py - API router → Search endpoint: routes
backend/app/api/v1/router.py - API router → Discover assistant: routes
backend/app/api/v1/router.py - API router → Workspace management: routes
backend/app/api/v1/router.py - API router → Agent endpoint: routes
backend/app/api/v1/router.py - API router → Document generation: routes
backend/app/api/v1/router.py - Search endpoint → Catalog search: searches catalogs
- Catalog search → Scholarly catalogs: queries
- Catalog search → Result ranking: ranks results
- Search endpoint → Search cache: caches queries
- Discover assistant → Catalog search: re-queries
backend/app/api/v1/discover.py - Discover assistant → Result ranking: ranks candidates
backend/app/api/v1/discover.py - Discover assistant → Redis cache and broker: uses cache
- Agent endpoint → Paper retrieval: retrieves papers
backend/app/api/v1/agent.py - Agent endpoint → Fast answers: streams answer
backend/app/api/v1/agent.py - Agent endpoint → Deep analysis: dispatches analysis
backend/app/api/v1/agent.py - Paper retrieval → PostgreSQL and pgvector: loads workspace papers
backend/app/agents/nodes/retrieve.py - Paper retrieval → Catalog search: searches globally
backend/app/agents/nodes/retrieve.py - Fast answers → Language model: streams completion
backend/app/agents/fast_pipeline.py - Deep analysis → Intent analysis: selects intent node
backend/app/agents/deep_pipeline.py - Deep analysis → Language model: generates synthesis
- Workspace management → PostgreSQL and pgvector: persists workspaces
- Workspace management → PostgreSQL and pgvector: saves papers
- Document generation → Generation worker: queues jobs
- Generation worker → PostgreSQL and pgvector: persists documents
- Document generation → Redis cache and broker: uses broker
- Paper details → Vector similarity: requests similarity
- Vector similarity → Voyage embeddings: creates embeddings
- Vector similarity → PostgreSQL and pgvector: searches vectors