How windfall8623/xunke-ai works
Xunke AI is a course-centered self-study agent: learners organize a topic or uploaded material into a course, study lessons, ask evidence-backed questions, practice, and use feedback and review recommendations to continue. The graph includes the documented course, teaching, retrieval, learning, and evaluation capabilities. Relationship evidence is primarily from the README’s architecture and capability descriptions; unsampled implementation details are not inferred.
Main entry points: pipeline.py Retrieval workflow · main.py FastAPI application · router.tsx Web application · engine.py RAG engine
Components 25
Learner experience
- Web application
web/src/app/router.tsx - Session and API client
web/src/app/AuthProvider.tsx
Course learning
- Course services
backend/app/services/course_service.py - Teaching agent
backend/app/teaching/graph.py - Lesson study
backend/app/services/course_read.py - Course assessments
backend/app/services/course_assessment_service.py - Practice generation
backend/app/practice/pipeline.py
Knowledge and agents
- Document Q&A
backend/app/qa/pipeline.py - RAG engine
backend/app/rag/engine.py - Retrieval workflow
backend/app/rag/pipeline.py - Evidence contracts
backend/app/rag/contracts.py - Execution budget
backend/app/rag/budget.py - Context assembly
backend/app/rag/context.py - Source scope
backend/app/rag/scope.py - Model providers
backend/app/llm/langchain_factory.py
Learning platform
- FastAPI application
backend/app/main.py - Learning and review
backend/app/services/review_service.py - Task execution
backend/app/services/job_service.py - MySQL records
backend/app/core/db.py - Redis events
backend/app/core/redis_client.py
Evaluation workbench
- Evaluation UI
web/src/pages/evaluation/RunsPage.tsx - Evaluation worker
evaluation/rag_eval/worker.py - Evaluation contracts
evaluation/rag_eval/contracts.py - Evaluation metrics
evaluation/rag_eval/metrics.py
Other components
- Learner
Connections 25
- Learner → Web application: uses
README.md - Web application → Session and API client: manages sessions
web/src/app/router.tsx - Web application → FastAPI application: requests services
README.md - FastAPI application → Course services: routes course work
backend/app/main.py - Course services → Teaching agent: generates courses
README.md - Learner → Lesson study: studies lessons
README.md - Learner → Document Q&A: asks questions
README.md - Document Q&A → RAG engine: retrieves evidence
backend/app/rag/engine.py - RAG engine → Retrieval workflow: runs workflow
backend/app/rag/engine.py - Retrieval workflow → Evidence contracts: exchanges evidence
backend/app/rag/pipeline.py - Retrieval workflow → Execution budget: reserves budget
backend/app/rag/pipeline.py - Retrieval workflow → Context assembly: assembles context
backend/app/rag/pipeline.py - Retrieval workflow → Source scope: checks scope
backend/app/rag/pipeline.py - Learner → Practice generation: practices
README.md - Learner → Course assessments: checks outcomes
README.md - Practice generation → Learning and review: records attempts
README.md - Course assessments → Learning and review: records learning evidence
README.md - FastAPI application → Task execution: submits tasks
README.md - Task execution → MySQL records: leases and stores
README.md - Task execution → Redis events: notifies
README.md - RAG engine → Model providers: generates answers
README.md - Learner → Evaluation UI: compares retrieval
README.md - Evaluation UI → FastAPI application: uses evaluation API
README.md - Evaluation worker → Evaluation contracts: uses contracts
evaluation/rag_eval/worker.py - Evaluation worker → Evaluation metrics: computes metrics
evaluation/rag_eval/worker.py