How vishalm342/agentic-research-assistant works
Arbor is a signed-in research application: users submit a constrained question, receive streamed progress and a citation-grounded knowledge tree, inspect sources/evidence, and expand a selected branch. The graph includes the main workflow, account/session lifecycle, retrieval/indexing, and frontend exploration. Several backend subsystems are represented from README capabilities and source-index references rather than inspected implementation; uncertain links are omitted.
Main entry points: research.py Research API · workspace.tsx Workspace state · graph.py LangGraph workflow · client.ts API and SSE client
Components 29
Research workspace
- Workspace state
frontend/src/state/workspace.tsx - Question composer
frontend/src/components/Composer.tsx - Tree and citations
frontend/src/components/SessionView.tsx - Evidence inspector
frontend/src/components/Inspector.tsx - Session history
frontend/src/components/Sidebar.tsx - Tree grounding
frontend/src/lib/tree.ts - API and SSE client
frontend/src/api/client.ts
API and identity
- Firebase sign-in
frontend/src/auth/firebase.ts - Research API
backend/app/api/routes/research.py - Token verification
backend/app/auth/firebase.py - Research contracts
backend/app/contracts.py
Research workflow
- LangGraph workflow
backend/app/workflow/graph.py - Research budget
backend/app/core/research_budget.py - Synthesis and critique
backend/app/services/model.py - Tree organizer
backend/app/workflow/expansion.py - Branch expansion
backend/app/services/branch_expansion.py - Progress events
backend/app/workflow/progress.py
Evidence retrieval
- Search and extraction
backend/app/retrieval/service.py - Search providers
backend/app/retrieval/providers.py - Voyage embeddings
backend/app/retrieval/embeddings.py - Chroma evidence index
backend/app/retrieval/chroma.py - ChromaDB
Session and index
- Session repository
backend/app/persistence/repository.py - Session records
backend/app/persistence/models.py - MongoDB
Other components
- Researcher
- Firebase Auth
- Chat model API
- Web sources
Connections 34
- Researcher → Workspace state: uses
README.md - Workspace state → Question composer: renders
frontend/src/App.tsx - Workspace state → Tree and citations: renders
frontend/src/App.tsx - Workspace state → Evidence inspector: renders
frontend/src/App.tsx - Workspace state → Session history: renders
- Workspace state → API and SSE client: requests
frontend/src/state/workspace.tsx - Firebase sign-in → Firebase Auth: authenticates
README.md - Researcher → Firebase sign-in: signs in
README.md - API and SSE client → Research API: sends requests
README.md - Research API → Token verification: verifies token
backend/app/api/routes/research.py - Token verification → Firebase Auth: verifies identity
README.md - Research API → LangGraph workflow: starts research
backend/app/api/routes/research.py - Research API → Session repository: loads and saves
backend/app/api/routes/research.py - LangGraph workflow → Search and extraction: retrieves sources
backend/app/workflow/graph.py - Search and extraction → Search providers: searches with
- Search providers → Web sources: searches
- Search and extraction → Voyage embeddings: chunks for indexing
- LangGraph workflow → Chroma evidence index: queries evidence
backend/app/workflow/graph.py - Chroma evidence index → Voyage embeddings: embeds queries
backend/app/retrieval/chroma.py - Chroma evidence index → ChromaDB: reads and writes
- LangGraph workflow → Research budget: bounds passes
backend/app/workflow/graph.py - LangGraph workflow → Synthesis and critique: synthesizes and critiques
backend/app/workflow/graph.py - Synthesis and critique → Chat model API: calls model
- LangGraph workflow → Tree organizer: builds knowledge tree
backend/app/workflow/graph.py - Research API → Branch expansion: expands selected node
backend/app/api/routes/research.py - Branch expansion → LangGraph workflow: runs focused research
backend/app/services/branch_expansion.py - Research API → Progress events: streams progress
backend/app/api/routes/research.py - Progress events → API and SSE client: streams events
README.md - Research API → API and SSE client: returns sessions
README.md - API and SSE client → Workspace state: updates state
frontend/src/state/workspace.tsx - Tree and citations → Tree grounding: uses tree data
frontend/src/components/SessionView.tsx - Evidence inspector → Tree grounding: resolves grounding
frontend/src/components/Inspector.tsx - Session repository → Session records: serializes records
backend/app/persistence/repository.py - Session repository → MongoDB: persists sessions