How devabdotolba/univai works
UnivAI turns uploaded textbooks into a scheduled, interactive semester: learners get voiced lectures grounded in book citations, lecture-linked quizzes, proctored exams, and dashboard results. The README documents the main service flow; the sampled Python code confirms the MCP RAG bridge and shared generation contracts, but the application and its major submodules are not sampled here. Their connections are therefore shown only where the README explicitly describes them.
Main entry points: UnivAI-Agent RAG and course generation · rag_client.py MCP RAG client · llm.py LLM adapter · UnivAI-app Web app and API
Components 20
Learning experience
- Web app and API
UnivAI-app - Learner dashboard
UnivAI-app - Admin controls
UnivAI-app
Shared services
- Book indexing bridge
services/rag-tools/rag_ingest.py - MCP RAG client
services/common/rag_client.py - Plan contracts
services/contracts/programme_plan.py - Source contracts
services/contracts/source_collection.py - Generation state machine
services/orchestrator/programme_generation.py - LLM adapter
services/common/llm.py - Virtual clock
services/common/clock.py - Tracing and redaction
services/observability/tracing.py - AI input guard
services/security/input_guard.py
Knowledge and generation
- RAG and course generation
UnivAI-Agent
Live class and assessment
- Live lecture rooms
UnivAI-live - Exam system
UnivAI-exam_system - Proctoring reports
UnivAI-exam_system
Persistent state
- PostgreSQL
infra/schema.sql
Other components
- Learner
- Student
- Model providers
Connections 22
- Student → Web app and API: uploads book
README.md - Web app and API → Book indexing bridge: spawns indexing
services/rag-tools/rag_ingest.py - Book indexing bridge → MCP RAG client: calls ingest
services/rag-tools/rag_ingest.py - MCP RAG client → RAG and course generation: calls MCP
services/common/rag_client.py - RAG and course generation → PostgreSQL: stores course
README.md - RAG and course generation → Live lecture rooms: publishes lectures
README.md - Live lecture rooms → Exam system: hands off course
README.md - Exam system → Proctoring reports: produces reports
README.md - Exam system → Learner dashboard: returns grades
README.md - Learner dashboard → Student: shows results
README.md - Web app and API → Admin controls: provides controls
README.md - Admin controls → Virtual clock: drives time
README.md - RAG and course generation → Plan contracts: uses plan contract
- RAG and course generation → Source contracts: uses source contract
- Generation state machine → Plan contracts: validates plans
services/orchestrator/programme_generation.py - Generation state machine → Source contracts: validates collections
services/orchestrator/programme_generation.py - RAG and course generation → LLM adapter: generates with
- LLM adapter → Model providers: requests completion
services/common/llm.py - MCP RAG client → AI input guard: guards inputs
services/common/rag_client.py - LLM adapter → AI input guard: guards inputs
services/common/llm.py - LLM adapter → Tracing and redaction: propagates trace
services/common/llm.py - MCP RAG client → Tracing and redaction: propagates trace
services/common/rag_client.py