A platform for creating and managing AI-powered virtual agents with knowledge base integration, built on top of LlamaStack.
This platform provides the tools to build and deploy conversational AI agents that can:
- Access knowledge bases - Upload documents and create searchable knowledge bases for RAG (Retrieval-Augmented Generation)
- Use tools - Integrate web search, databases, and custom tools through the Model Context Protocol (MCP)
- Apply guardrails - Built-in safety measures and content filtering
- Scale in production - Kubernetes-ready architecture
π€ Agent Management - Create and configure AI agents with different capabilities π Knowledge Integration - Document search and question answering via RAG π¬ Real-time Chat - Streaming conversations with session history π§ Tool Ecosystem - Built-in tools plus extensible MCP server support π‘οΈ Safety Controls - Configurable guardrails and content filtering
For local containerized development (without cluster):
π β See Local Development Guide
For local development setup:
# Navigate to local deployment directory
cd deploy/local
# Start all services with Docker Compose
make compose-up
# Or start step-by-step:
# 1. Start database (automatically initializes with permissions)
podman compose up -d
# or with Docker:
# docker-compose up -d
# 2. Start backend
cd ../../backend && python -m venv venv && source venv/bin/activate
pip install -r requirements.txt && alembic upgrade head
uvicorn main:app --reload &
# 3. Start frontend
cd ../frontend && npm install && npm run devNote: The PostgreSQL database is automatically initialized with proper permissions. Works with both Docker and Podman. No manual database setup needed!
Access your app:
- Frontend: http://localhost:5173
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
For production installation on Kubernetes/OpenShift:
# Navigate to cluster deployment directory
cd deploy/cluster
# Install with interactive prompts for configuration
make install NAMESPACE=your-namespace
# Or set environment variables and install
export NAMESPACE=ai-virtual-agent
export HF_TOKEN=your-huggingface-token
make installπ Full Installation Guide β
ai-virtual-agent/
βββ frontend/ # React UI with PatternFly components
βββ backend/ # FastAPI server with PostgreSQL
βββ mcpservers/ # Custom MCP tool servers
βββ docs/ # Architecture and API documentation
βββ deploy/
β βββ cluster/ # Kubernetes/Helm cluster deployment
β β βββ helm/ # Helm chart files
β β βββ scripts/ # Cluster deployment scripts
β β βββ Containerfile # Cluster container image
β β βββ Makefile # Cluster deployment commands
β βββ local/ # Local development deployment
β βββ compose.dev.yaml # Docker Compose for local dev
β βββ dev/ # Local development configs
β βββ Makefile # Local development commands
βββ tests/ # Integration test suite
The platform integrates several components:
- React Frontend - Web interface for agent and chat management
- FastAPI Backend - API server handling business logic and data persistence
- LlamaStack - AI platform managing models, agents, and inference
- PostgreSQL + pgvector - Data storage with vector search capabilities
- Kubernetes Pipeline - Document processing and knowledge base ingestion
π Detailed Architecture β
- Local Development Guide - Containerized development environment (without cluster)
- Contributing Guide - Development setup and workflow
- Backend API Reference - Complete API documentation
- Frontend Architecture - UI components and patterns
- Installation Guide - Production deployment on Kubernetes
- Agent Templates - Pre-built agent configurations
- Knowledge Base Setup - Document processing pipeline
- MCP Servers - Building custom tool integrations
- Testing Guide - Running integration tests
- API Reference - Backend API endpoints
Customer Support Agent
const agent = await createAgent({
name: "Support Bot",
model: "llama3.1-8b-instruct",
knowledge_bases: ["support-docs"],
tools: ["builtin::rag", "builtin::web_search"]
});Domain Expert (Banking)
const expert = await initializeAgentTemplate({
template: "commercial_banker",
knowledge_bases: ["banking-regulations"]
});Local Development:
cd deploy/local
# Start everything locally with Docker Compose
make compose-up
# Stop all services
make compose-down
# View logs from development services
make compose-logs
# Restart development services
make compose-restart
# Show status of development services
make compose-statusCluster Deployment:
cd deploy/cluster
# Install on cluster
make install NAMESPACE=your-namespace
# Uninstall from cluster
make uninstall NAMESPACE=your-namespace
# Check status
make install-status NAMESPACE=your-namespaceNote: All Makefile targets automatically load environment variables from a
.envfile in the repository root if it exists. No manualexportis required for common workflows.
Create a .env file in the repository root to configure your local environment. All Makefile targets will dynamically load this file if present:
cp .env.example .env
# then edit `.env` as neededAt minimum, set:
DATABASE_URL=postgresql+asyncpg://admin:password@localhost:5432/ai_virtual_agentOptional toggles:
# Skip attachments bucket initialization/access during local dev
DISABLE_ATTACHMENTS=true
# Provide admin bootstrap for Alembic seeding (optional)
# ADMIN_USERNAME=admin
# ADMIN_EMAIL=admin@change.meIf you plan to use file attachments locally or see this error during tests:
ImportError: failed to find libmagic. Check your installation
install the MIME detection dependency (libmagic) and Python binding:
- macOS (Homebrew):
brew install filepip install python-magic
- Ubuntu/Debian:
sudo apt-get install libmagic1(orlibmagic-dev)pip install python-magic
- Fedora/RHEL:
sudo dnf install file libmagicpip install python-magic
Notes:
- Unit tests import parts of the attachments stack. Without libmagic installed you can still proceed by installing the packages above.
- If youβre not using attachments in local dev, you can set
DISABLE_ATTACHMENTS=truein.envto skip bucket-related startup paths.
- π Issues - Report bugs and request features
- π¬ Discussions - Ask questions and share ideas
- π€ Contributing - See CONTRIBUTING.md for guidelines
- π Documentation - Browse
/docsfor detailed guides
MIT License - Built with β€οΈ by the Red Hat Ecosystem App Engineering team
