Topic Agent
/api/agents/topics/:topicNodeId/run
Generate a complete learning path for a topic:
- Topic Agent creates a sequence of concepts
- Subconcept Bootstrap Agents (parallel) create subconcepts + diagnostic questions for each concept
Body Parameters
User UUID
Generate a smaller learning path for testing (1-2 concepts, 2-3 subconcepts each). Default:
falseSSE Events
Agent has started
Claude’s reasoning between tool calls
Tool invocation
Tool result (truncated to 200 chars)
New node persisted to DB
New edge persisted to DB
Agent completed successfully
Agent failed
Concept Diagnostic
GET/api/agents/concepts/:conceptNodeId/diagnostic?userId=USER_ID
Retrieve the diagnostic assessment for a concept (optional survey before refinement).
Response
"concept""diagnostic_ready"Concept node UUID
Assessment object
Array of question objects
Number of answered questions
Total questions
Whether all questions are answered
Concept Refinement Agent
/api/agents/concepts/:conceptNodeId/run
Personalize the subconcept graph based on diagnostic answers.
Flow:
- Bootstrap subconcepts if missing
- GRADE diagnostic answers
- OBSERVE current subconcepts + student history
- REASON about gaps and mastery
- ACT - add/remove subconcepts, insert prerequisite/follow-up concepts
- VERIFY graph integrity
Body Parameters
User UUID
SSE Events
Diagnostic status summary
Agent’s reasoning steps
New subconcept added
Subconcept removed
Dependency edge created
Dependency edge removed
Path Review Agent
/api/agents/nodes/:nodeId/review
Post-completion review - decide if enrichment nodes should be added to the learning path.
Body Parameters
User UUID
Optional context about the student’s performance
Maximum number of nodes to add (default varies by agent)
Response
"path_review""no_change" or "updated"Reviewed node UUID
"concept" or "subconcept"Agent’s decision object (includes
should_add, notes, additions)Array of newly created nodes
Array of newly created edges
Agent Tools
Agents use structured tools to observe, reason, act, and verify:Topic Agent Tools
extract_all_concept_contexts- Batch-extract document sections for conceptssave_concept- Create concept nodesave_concept_edge- Create dependency edge
Subconcept Bootstrap Tools
save_diagnostic_question- Create diagnostic question (MCQ or open-ended)save_subconcept- Create subconcept nodesave_subconcept_edge- Create dependency edge
Concept Refinement Tools
grade_student_answers- Grade diagnostic answers via sub-agentget_current_subconcepts- View subconcept graphcheck_student_history- Cross-concept performanceadd_subconcept- Add bridge/remedial subconceptremove_subconcept- Remove mastered subconceptadd_prerequisite_concept- Insert concept before currentadd_followup_concept- Insert concept after currentvalidate_graph- Check for orphans/cycles via BFS