Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

333 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Virtual Agent Quickstart

A platform for creating and managing AI-powered virtual agents with knowledge base integration, built on top of LlamaStack.

What is this?

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

Key Features

πŸ€– 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

Quick Start

Local Development

For local containerized development (without cluster):

πŸ“– β†’ See Local Development Guide

Local Development

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 dev

Note: The PostgreSQL database is automatically initialized with proper permissions. Works with both Docker and Podman. No manual database setup needed!

Access your app:

Cluster Deployment

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 β†’

Project Structure

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

Architecture Overview

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

Architecture

πŸ“– Detailed Architecture β†’

Getting Started Guides

πŸ‘©β€πŸ’» For Developers

πŸš€ For Deployment

πŸ”§ For Integration

Example Use Cases

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"]
});

Development Commands

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-status

Cluster 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-namespace

Note: All Makefile targets automatically load environment variables from a .env file in the repository root if it exists. No manual export is required for common workflows.

Environment setup (.env)

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 needed

At minimum, set:

DATABASE_URL=postgresql+asyncpg://admin:password@localhost:5432/ai_virtual_agent

Optional 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.me

Attachments (optional dependency)

If 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 file
    • pip install python-magic
  • Ubuntu/Debian:
    • sudo apt-get install libmagic1 (or libmagic-dev)
    • pip install python-magic
  • Fedora/RHEL:
    • sudo dnf install file libmagic
    • pip 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=true in .env to skip bucket-related startup paths.

Community & Support

License

MIT License - Built with ❀️ by the Red Hat Ecosystem App Engineering team

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages