How tholkappiyan007/researchagent works
Research Agent is a multi-tenant RAG knowledge base with a web research interface. Users register or log in, then chat with the assistant and manage conversations and documents; document ingestion parses, cleans, chunks, embeds, and stores content for retrieval. The backend also exposes model selection and an LLM tool interface. The graph reflects README capabilities and the supplied source index; some route and frontend implementation details were not excerpted, so those relationships are left out or marked unverified.
Main entry points: ingestion.py Ingestion pipeline · main.py FastAPI application · Dashboard.jsx Research dashboard · chat.py Chat routes
Components 30
Research interface
- Web application
frontend/src/App.jsx - Login and registration
frontend/src/pages/Login.jsx - Research dashboard
frontend/src/pages/Dashboard.jsx - Chat interface
frontend/src/components/ChatInterface.jsx - Chat input
frontend/src/components/ChatInput.jsx - Conversation sidebar
frontend/src/components/ConversationSidebar.jsx - HTTP client
frontend/src/api/client.js - Chat API client
frontend/src/api/chat.js
API and identity
- FastAPI application
research_agent/api/main.py - Authentication routes
research_agent/api/routes/auth.py - Chat routes
research_agent/api/routes/chat.py - Document routes
research_agent/api/routes/documents.py - Model routes
research_agent/api/routes/models.py - Identity and tokens
research_agent/auth/security.py
Assistant and retrieval
- Chatbot
research_agent/agent/chatbot.py - Conversation memory
research_agent/agent/memory.py - Safety guardrails
research_agent/agent/guardrails.py - Retriever engine
research_agent/retriever/engine.py - Retriever tool interface
research_agent/retriever/tool_interface.py - Model registry
research_agent/config/model_registry.py
Knowledge processing and storage
- Relational data
research_agent/db/models.py - Ingestion pipeline
research_agent/pipeline/ingestion.py - Document loaders
research_agent/document_loaders - Text cleaner
research_agent/processors/cleaner.py - Token-aware chunker
research_agent/processors/chunker.py - Embedding providers
research_agent/embeddings - pgvector store
research_agent/vector_store/pgvector_store.py - Tenant manager
research_agent/vector_store/tenant_manager.py
Other components
- User
- LLM providers
Connections 38
- User → Web application: uses
frontend/src/App.jsx - Web application → Login and registration: routes to
frontend/src/App.jsx - Web application → Research dashboard: routes to
frontend/src/App.jsx - Login and registration → HTTP client: calls
frontend/src/pages/Login.jsx - Research dashboard → Chat interface: renders
frontend/src/pages/Dashboard.jsx - Research dashboard → Chat input: renders
frontend/src/pages/Dashboard.jsx - Research dashboard → Conversation sidebar: renders
frontend/src/pages/Dashboard.jsx - Research dashboard → Chat API client: uses
frontend/src/pages/Dashboard.jsx - HTTP client → FastAPI application: HTTP requests
- Chat API client → FastAPI application: HTTP requests
- FastAPI application → Authentication routes: mounts
research_agent/api/main.py - FastAPI application → Chat routes: mounts
research_agent/api/main.py - FastAPI application → Document routes: mounts
research_agent/api/main.py - FastAPI application → Model routes: mounts
research_agent/api/main.py - Authentication routes → Relational data: reads and writes
research_agent/api/routes/auth.py - Authentication routes → Identity and tokens: hashes and signs
research_agent/api/routes/auth.py - Chat routes → Chatbot: invokes
research_agent/api/routes/chat.py - Chat routes → Conversation memory: uses
research_agent/api/routes/chat.py - Chat routes → Safety guardrails: uses
research_agent/api/routes/chat.py - Chat routes → Ingestion pipeline: invokes
research_agent/api/routes/chat.py - Document routes → Ingestion pipeline: invokes
research_agent/api/routes/documents.py - Document routes → Relational data: reads and writes
research_agent/api/routes/documents.py - Model routes → Model registry: lists models
research_agent/api/routes/models.py - Chatbot → Safety guardrails: applies
research_agent/agent/chatbot.py - Chatbot → Model registry: selects model
research_agent/agent/chatbot.py - Chatbot → LLM providers: requests completion
- Safety guardrails → Retriever engine: checks retrieval
research_agent/agent/guardrails.py - Retriever tool interface → Retriever engine: calls
research_agent/retriever/tool_interface.py - Ingestion pipeline → Document loaders: loads files
research_agent/pipeline/ingestion.py - Ingestion pipeline → Text cleaner: cleans text
research_agent/pipeline/ingestion.py - Ingestion pipeline → Token-aware chunker: chunks text
research_agent/pipeline/ingestion.py - Ingestion pipeline → Embedding providers: embeds chunks
research_agent/pipeline/ingestion.py - Ingestion pipeline → pgvector store: stores chunks
research_agent/pipeline/ingestion.py - Ingestion pipeline → Tenant manager: checks tenant
research_agent/pipeline/ingestion.py - Retriever engine → Embedding providers: embeds query
research_agent/retriever/engine.py - Retriever engine → pgvector store: searches vectors
research_agent/retriever/engine.py - pgvector store → Relational data: persists vectors
research_agent/vector_store/pgvector_store.py - Tenant manager → Relational data: manages tenants
research_agent/vector_store/tenant_manager.py