How itsbk13/agentic-rag works
This is a DSA tutoring application that guides a learner from an explain-first question session through mistake diagnosis, memory updates, learner profiling, and review recommendations. The React interface calls a FastAPI backend, which exposes the tutoring workflow and profile/revision capabilities. The workflow coordinates six agents; SQLite holds users, attempts, and profiles, while Chroma supports knowledge and learning-memory retrieval. The README documents additional evaluation, notes, and sandbox capabilities; their runtime wiring is only partly visible in the sampled source, so those links are omitted or marked unverified.
Main entry points: workflow.py Workflow orchestrator · App.jsx React app · main.py FastAPI service · memory_store.py Memory indexing
Components 23
Learner interface
- React app
frontend/src/App.jsx - Tutoring chat
frontend/src/components/ChatArea.jsx - API client
frontend/src/api.js - Code sandbox UI
frontend/src/components/CodeSandbox.jsx - Notes upload UI
frontend/src/components/NotesDropzone.jsx - Profile dashboard
frontend/src/components/ProfileDashboard.jsx
Tutoring workflow
- FastAPI service
backend/main.py - Workflow orchestrator
graph/workflow.py
Learning services
- Knowledge retrieval
agents/knowledge_agent.py - Explain-first tutor
agents/tutor_agent.py - Mistake diagnosis
agents/diagnosis_agent.py - Tutor evaluator
agents/evaluator_agent.py - Episodic memory
agents/memory_agent.py - Learner profiling
agents/learner_model_agent.py - Revision planning
agents/revision_agent.py - Memory comparison
evaluate/compare_memory_vs_no_memory.py
Persistence and retrieval
- Relational service
core/memory_service.py - SQLite database
core/models.py - Memory indexing
core/memory_store.py - Chroma collection
core/vector_store.py - Embedding service
core/embeddings.py - LLM service
core/llm.py
Other components
- Learner
Connections 29
- Learner → React app: uses
- React app → Tutoring chat: renders
frontend/src/App.jsx - React app → Code sandbox UI: renders
frontend/src/App.jsx - React app → Notes upload UI: renders
frontend/src/App.jsx - React app → Profile dashboard: renders
frontend/src/App.jsx - Tutoring chat → API client: requests
frontend/src/components/ChatArea.jsx - API client → FastAPI service: HTTP requests
frontend/src/api.js - FastAPI service → Workflow orchestrator: invokes workflow
backend/main.py - Workflow orchestrator → Knowledge retrieval: retrieves concepts
graph/workflow.py - Workflow orchestrator → Explain-first tutor: generates tutoring
graph/workflow.py - Workflow orchestrator → Mistake diagnosis: diagnoses attempt
graph/workflow.py - Workflow orchestrator → Episodic memory: updates memory
graph/workflow.py - Workflow orchestrator → Learner profiling: updates profile
graph/workflow.py - Workflow orchestrator → Revision planning: plans review
graph/workflow.py - Workflow orchestrator → Tutor evaluator: evaluates answer
graph/workflow.py - Knowledge retrieval → Memory indexing: searches knowledge
agents/knowledge_agent.py - Episodic memory → Memory indexing: retrieves episodic
agents/memory_agent.py - Episodic memory → Relational service: records attempts
agents/memory_agent.py - Learner profiling → Relational service: updates profile
agents/learner_model_agent.py - Revision planning → Relational service: reads profiles
agents/revision_agent.py - Relational service → SQLite database: reads and writes
core/memory_service.py - Memory indexing → Embedding service: embeds text
core/memory_store.py - Memory indexing → Chroma collection: indexes and searches
core/memory_store.py - Mistake diagnosis → LLM service: classifies with
agents/diagnosis_agent.py - Explain-first tutor → LLM service: generates with
agents/tutor_agent.py - Revision planning → LLM service: explains priorities
agents/revision_agent.py - FastAPI service → Memory comparison: exposes comparison
backend/main.py - FastAPI service → Memory indexing: supports notes ingestion
backend/main.py - API client → FastAPI service: submits sandbox code
frontend/src/api.js