How codinghub27/adaptive-coding-agent works
Adaptive Coding & Problem-Solving Agent is a web-based AI tutor, debugger, reviewer, and problem solver. A learner submits text, code, or an image; the backend interprets the input and intent, consults learner memory, plans assistance, and routes to a specialized capability. Retrieval and sandbox verification support relevant answers and code claims; response generation returns guidance, while learning events can update the learner model. The README documents this end-to-end flow; sampled code confirms routing, hint-ladder behavior, RAG indexing, sandbox setup, and auth persistence, but not every runtime call between subsystems.
Main entry points: api.py Chat endpoint · routing.py Agent routing · runner.py Sandbox runner · retrieve.py Hybrid retrieval
Components 25
Learner Interface
- Web UI
frontend/src/App.tsx - HTTP client
frontend/js/api.js
Input and Planning
- Chat endpoint
app/graph/api.py - Input understanding
app/input/api.py - Intent classifier
app/input/intent.py - Learner memory
app/memory/api.py - Teaching planner
app/agents/planner.py - Graph workflow
app/graph/build.py - Agent routing
app/graph/routing.py
Teaching Capabilities
- DSA solver
app/agents/dsa_solver.py - Hint ladder
app/agents/hint_engine.py - Debugger
app/agents/debugger.py - Code explainer
app/agents/explainer.py - Code reviewer
app/agents/reviewer.py - Response generation
app/response/generate.py
Knowledge and Verification
- Hybrid retrieval
app/knowledge/retrieve.py - Qdrant index
- Sandbox runner
app/execution/runner.py - Docker sandbox
app/execution/sandbox.py - Code verification
app/execution/verification.py
Platform Services
- FastAPI app
app/main.py - LLM provider
- PostgreSQL
- Authentication
app/auth/routes.py
Other components
- Learner
Connections 29
- Learner → Web UI: submits request
- Web UI → HTTP client: uses client
- HTTP client → FastAPI app: HTTP requests
- FastAPI app → Chat endpoint: mounts endpoint
- FastAPI app → Authentication: mounts routes
- Chat endpoint → Input understanding: interprets input
- Input understanding → Intent classifier: classifies intent
- Chat endpoint → Learner memory: loads learner context
- Chat endpoint → Teaching planner: plans assistance
- Chat endpoint → Graph workflow: runs workflow
- Graph workflow → Agent routing: selects capability
- Agent routing → DSA solver: dispatches DSA
- Agent routing → Debugger: dispatches debug
- Agent routing → Code explainer: dispatches explain
- DSA solver → Hint ladder: chooses hint rung
- DSA solver → Hybrid retrieval: retrieves context
- Debugger → Hybrid retrieval: retrieves context
- Code explainer → Hybrid retrieval: retrieves context
- Code reviewer → Sandbox runner: runs code checks
- Debugger → Sandbox runner: runs code
- Sandbox runner → Docker sandbox: executes request
- Sandbox runner → Code verification: verifies result
- Hybrid retrieval → Qdrant index: searches index
- Chat endpoint → Response generation: generates answer
- Response generation → LLM provider: requests generation
- Teaching planner → LLM provider: requests planning
- Learner memory → PostgreSQL: reads and writes
- Authentication → PostgreSQL: persists accounts
- Response generation → HTTP client: returns answer