| .vscode | ||
| apps | ||
| compose | ||
| config | ||
| data | ||
| notebooks | ||
| requirements | ||
| site | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.example | ||
| .env.template | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| download_model.py | ||
| gpu_server.py | ||
| manage.py | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Dynavera: Distributed Agentic Onboarding System
Dynavera is a multi-agent AI platform designed to automate role-specific onboarding. The system utilizes a distributed architecture to separate application logic from high-latency LLM inference, employing the Model Context Protocol (MCP) for internal data retrieval and Retrieval-Augmented Generation (RAG).
Project Goals
-
Distributed Orchestration: Implementation of a dual-node system (VPS/GPU) to manage real-time user interaction and heavy computational inference independently.
-
Context-Aware Training: Development of a RAG pipeline that utilizes semantic chunking and vector similarity search to provide role-specific guidance.
-
Agentic Workflow: Utilizing an orchestrator to manage stateful conversations, tool calls, and user progress tracking via WebSockets.
-
Automated Ingestion: Creating a pipeline for converting raw organizational documents (PDF/TXT) into searchable vector embeddings.
System Architecture
The application is split into two primary layers:
Management Layer (VPS)
- Framework: Django 5.x with Django Channels for WebSocket management.
- Database: PostgreSQL with the pgvector extension for semantic storage.
- Task Queue: Celery and Redis for asynchronous document processing and ingestion.
- Internal Routing:
apps/onboarding/mcp.pyserves as the Model Context Protocol router, bridging the agent to the PostgreSQL vector store.
Intelligence Layer (GPU Node)
- Inference Server:
gpu_server.py(FastAPI) located in the root, exposing endpoints for LLM chat completions and embeddings. - Semantic Processor: Custom logic within the inference server for smart chunking that detects topic shifts in text to optimize retrieval accuracy.
Tech Stack
- Backend: Django, Django REST Framework, Django Channels.
- Frontend: Vue 3, Vite, Pinia.
- Database: PostgreSQL (pgvector).
- AI/ML: FastAPI, OpenAI-compatible API structures, Sentence-Transformers.
- Infrastructure: Docker, Redis, Celery.
Application Structure
- apps.accounts: Manages User, Organization, and Role models, including invite-based onboarding logic.
- apps.knowledge: Handles the RAG pipeline, including TrainingFile management and RoleRagDocument vector storage.
- apps.onboarding: Contains the core logic for the onboarding experience:
consumers.py: The Agent Orchestrator managing WebSocket handshakes and session loops.mcp.py: The internal router for Model Context Protocol tool execution.models.py: Stores AgentConfig (prompts/tools) and OnboardingSession state.
- gpu_server.py: The entry point for the Intelligence Layer, handling embedding generation and LLM inference.
Instructions for Evaluation
The system is currently pre-loaded with demonstration data from internal configuration files.
Access Credentials
| Role | Password | |
|---|---|---|
| Admin | admin@example.com | admin |
| Manager | haleisaac@example.com | password |
| User | j.thompson@example.com | password |
Recommended Technical Walkthrough
To verify the integration of the Knowledge Pipeline and the Agentic Orchestrator, follow these steps:
- Environment Setup: Navigate to https://fyp.viswamedha.com. *
- Document Ingestion: Log in as the Manager (haleisaac@example.com). Navigate to the University of Birmingham organization. Upload a PDF relevant to a specific role.
- Vectorization: Observe the ingestion status. The system will extract text, send it to the GPU node for semantic chunking, and store the resulting 1536-dimension vectors in PostgreSQL.
- Agent Interaction: Access the Role Onboarding interface. Initiate a session.
- Retrieval Verification: This will query the agent regarding specific details within the uploaded PDF. The agent in
consumers.pywill trigger a tool call viamcp.py, retrieve the relevant document chunks, and provide a contextualized response via onboarding pages.
*Note: If the website that I hosted is not accessible, please set up the project locally by following the instructions in the Usage section below.
Usage
- Clone the repository.
- Copy the
.env.examplefile to.envor create a new.envfile based on.env.template, and change the necessary environment variables. * - Deploy via Docker Compose:
docker compose -f compose/dev/docker-compose.yml --env-file .env up -din the root directory. - Access the frontend at the configured port (usually
localhost:8000).
- Note: If you use a different secret key, when the fyp-django-dev container starts, you will need to execute the following command to reset all accounts to default passwords of "admin" for admin users and "password" for manager and user accounts:
docker exec -it fyp-django-dev python manage.py reset_passwords
Warnings
- The development compose is used here to allow HMR and easier debugging. Please only use this file.
- Ensure that a GPU is available and CUDA drivers are properly installed for the inference server to function.
- I have tested this on an RTX 3060 with 12GB VRAM, so I am not sure if it will work on other GPUs.
- There is no guarantee that it will load on a CPU-only machine as the batch size and model parameters are configured for GPU inference.