How gokul-hawk/cobra_tutor works
CobraTutor is an agentic tutoring platform: learners use the React app to request instruction or practice, receive personalized tutoring and quizzes, work through code/debugging activities, and view concept mastery. The Django backend supplies agent orchestration, quiz and knowledge-graph features, and knowledge tracing. Edges are limited to relationships supported by the README or the shown imports/calls; the API view wiring and several frontend-to-backend routes are not shown, so those links are omitted.
Main entry points: App.jsx App routing · gkt_service.py Graph knowledge tracing · AgentTutor.jsx Agent tutor UI · AgentCode.jsx Agent coding UI
Components 26
Learning interface
- App routing
frontend/src/App.jsx - Agent tutor UI
frontend/src/components/AgentTutor.jsx - Agent coding UI
frontend/src/components/AgentCode.jsx - Agent quiz UI
frontend/src/components/AgentQuiz.jsx - Chat API client
frontend/src/services/chatService.js - Code editor
frontend/src/components/CodeEditor.jsx - Code visualizer
frontend/src/components/VisualizerRenderer.jsx - Knowledge map
frontend/src/components/KnowledgeGraph.jsx
Tutor agents
- Main agent API
backend/main_agent/views.py - Agent orchestrator
backend/main_agent/services/orchestrator.py - Intent router
backend/main_agent/services/router_agent.py - Persistent tutor
backend/chatbot/services/persistent_tutor.py - Groq inference
backend/chatbot/services/groq_service.py
Learning services
- Quiz generation
backend/quizzes/services/gemini_service.py - Quiz records
backend/quizzes/models.py - Code practice agent
backend/Code/services/agent_service.py - Code practice records
backend/Code/models.py - Mastery context
backend/chatbot/services/context_service.py - Graph knowledge tracing
backend/chatbot/services/gkt_service.py - Bayesian tracing
backend/chatbot/services/bkt_service.py - Graph attention
backend/chatbot/services/gat_service.py
Knowledge data
- Graph query service
backend/quizzes/services/neo4j_services.py - Neo4j concept graph
- User records
backend/users/models.py - Knowledge graph API
backend/knowledge_graph/views.py
Other components
- Learner
Connections 27
- Learner → App routing: uses
- App routing → Agent tutor UI: routes to
frontend/src/App.jsx - App routing → Agent coding UI: routes to
frontend/src/App.jsx - App routing → Agent quiz UI: routes to
frontend/src/App.jsx - Agent tutor UI → Chat API client: requests via
frontend/src/components/AgentTutor.jsx - Agent tutor UI → Code visualizer: renders
frontend/src/components/AgentTutor.jsx - Agent coding UI → Code editor: renders
frontend/src/components/AgentCode.jsx - Agent coding UI → Code visualizer: renders
frontend/src/components/AgentCode.jsx - Chat API client → Persistent tutor: chat request
frontend/src/services/chatService.js - Learner → Main agent API: requests lessons
- Main agent API → Agent orchestrator: delegates to
- Agent orchestrator → Intent router: routes with
backend/main_agent/services/orchestrator.py - Intent router → Groq inference: classifies via
backend/main_agent/services/router_agent.py - Agent orchestrator → Persistent tutor: delegates to
backend/main_agent/services/orchestrator.py - Persistent tutor → Groq inference: generates with
- Quiz generation → Groq inference: generates through
backend/quizzes/services/gemini_service.py - Quiz generation → Quiz records: saves questions
backend/quizzes/services/gemini_service.py - Code practice agent → Mastery context: gets mastery
backend/Code/services/agent_service.py - Code practice agent → Code practice records: saves practice
backend/Code/services/agent_service.py - Mastery context → Graph knowledge tracing: reads mastery
backend/chatbot/services/context_service.py - Graph knowledge tracing → Graph query service: queries graph
backend/chatbot/services/gkt_service.py - Graph knowledge tracing → Bayesian tracing: updates tracing
backend/chatbot/services/gkt_service.py - Graph knowledge tracing → Graph attention: propagates mastery
backend/chatbot/services/gkt_service.py - Graph query service → Neo4j concept graph: queries
backend/quizzes/services/neo4j_services.py - Learner → Knowledge map: views mastery map
- Knowledge map → Knowledge graph API: fetches graph
- Knowledge graph API → Neo4j concept graph: reads concepts