How 2555jaa/university-agent works
Local University AI Agent serves students through a built-in web interface and API, supporting tutoring, academic research, persistent study memory, and restricted PC assistance. The main request path runs from user interface to FastAPI routes, then the agent orchestrator, which coordinates model routing, RAG, memory, and tools. RAG covers document parsing, chunking, embeddings, retrieval, and citations; security validates sensitive actions and records audit events. The README documents capabilities not fully visible in the sampled excerpts; relationships for those are shown only where supported by the README or source index.
Main entry points: orchestrator.py Agent Orchestrator · rag_service.py Grounded RAG · routes.py FastAPI Routes · router.py Hybrid Model Router
Components 22
Interfaces and API
- Built-in Web UI
app/web/static/app.js - FastAPI Routes
app/api/routes.py
Academic Agent
- Agent Orchestrator
app/agent/orchestrator.py - Mode Prompts
app/agent/prompts.py
Research and RAG
- Grounded RAG
app/knowledge/rag_service.py - Document Parser
app/knowledge/document_parser.py - Sliding Chunker
app/knowledge/chunker.py - Embedding Manager
app/knowledge/embeddings.py - Vector Index
app/knowledge/vector_store.py
Model Providers
- Hybrid Model Router
app/providers/router.py - Ollama Provider
app/providers/ollama_provider.py - Cloud Provider
app/providers/cloud_provider.py
Memory and Safety
- SQLite Study Memory
app/memory/database.py - Filesystem Tools
app/tools/filesystem_tools.py - Restricted Terminal
app/tools/terminal_tools.py - Action Validator
app/security/validator.py - Safe File Service
app/services/file_service.py - Execution Sandbox
app/security/sandbox.py - Audit Logger
app/security/audit.py
Other components
- Student
- Cloud AI Service
- Ollama Service
Connections 27
- Student → Built-in Web UI: uses
README.md - Student → FastAPI Routes: submits requests
README.md - Built-in Web UI → FastAPI Routes: sends requests
README.md - FastAPI Routes → Agent Orchestrator: dispatches chat
app/api/routes.py - FastAPI Routes → Grounded RAG: handles documents
app/api/routes.py - FastAPI Routes → SQLite Study Memory: manages study records
app/api/routes.py - Agent Orchestrator → Mode Prompts: uses prompts
app/agent/orchestrator.py - Agent Orchestrator → Grounded RAG: retrieves context
app/agent/orchestrator.py - Agent Orchestrator → SQLite Study Memory: loads and saves
app/agent/orchestrator.py - Agent Orchestrator → Hybrid Model Router: routes inference
app/agent/orchestrator.py - Grounded RAG → Document Parser: parses documents
app/knowledge/rag_service.py - Grounded RAG → Sliding Chunker: creates chunks
app/knowledge/rag_service.py - Grounded RAG → Vector Index: indexes and searches
app/knowledge/rag_service.py - Vector Index → Embedding Manager: embeds text
app/knowledge/vector_store.py - Hybrid Model Router → Ollama Provider: selects local
app/providers/router.py - Hybrid Model Router → Cloud Provider: selects cloud
app/providers/router.py - Ollama Provider → Ollama Service: calls inference
app/providers/ollama_provider.py - Cloud Provider → Cloud AI Service: calls inference
README.md - Agent Orchestrator → Filesystem Tools: dispatches file tools
app/agent/orchestrator.py - Agent Orchestrator → Restricted Terminal: dispatches commands
app/agent/orchestrator.py - Filesystem Tools → Action Validator: validates actions
app/tools/filesystem_tools.py - Filesystem Tools → Safe File Service: delegates file access
app/tools/filesystem_tools.py - Restricted Terminal → Action Validator: checks permissions
app/tools/terminal_tools.py - Agent Orchestrator → Execution Sandbox: uses for execution
app/agent/orchestrator.py - Agent Orchestrator → Audit Logger: records activity
app/agent/orchestrator.py - Grounded RAG → Audit Logger: records deletion
app/knowledge/rag_service.py - Action Validator → Audit Logger: records decisions
README.md