Overview
Copilot Agent 365 is an enterprise-grade AI assistant that runs entirely on your local machine using Ollama and Llama 3.1. No API keys required, no data leaves your system, and it's completely free to run.
Key Features
- 🦙 Llama 3.1 - State-of-the-art open source LLM
- 🔒 100% Local - Your data never leaves your machine
- 🐳 Docker Ready - One command deployment
- 🧩 Modular Agents - Extensible architecture
- 💾 Persistent Memory - Remembers context across sessions
- ☁️ Azure OpenAI - Optional cloud integration
Prerequisites
Before you begin, make sure you have the following installed on your system.
-
Docker DesktopRequired for running containers. Download here
-
8GB+ RAMLlama 3.1 requires at least 8GB of memory to run smoothly
-
10GB+ Disk SpaceFor Docker images and the Llama 3.1 model weights
-
Git (Optional)For cloning the repository. You can also download the ZIP.
Quick Start
Get up and running in under 5 minutes with these simple steps.
Clone the Repository
Download the project files from GitHub:
git clone https://github.com/kody-w/copilot-agent-365-docker.git cd copilot-agent-365-docker
Start with Docker Compose
Choose the right command for your system:
docker compose -f docker-compose.cpu.yml up -d
docker compose up -d
Wait for Model Download
The first run will download the Llama 3.1 model (~4.7GB). Monitor progress:
docker logs -f ollama
Wait until you see "Model ready!" in the logs.
Access the Chat UI
Open your browser and navigate to:
Configuration
Customize your deployment with environment variables.
| Variable | Default | Description |
|---|---|---|
USE_OLLAMA |
true | Use local Ollama instead of Azure OpenAI |
OLLAMA_MODEL_NAME |
llama3.1 | Which Ollama model to use |
ASSISTANT_NAME |
CopilotAgent365 | Display name for the assistant |
FUNCTION_APP_PORT |
7071 | Port for the web interface |
Azure OpenAI Mode
To use Azure OpenAI instead of local Ollama:
docker run -p 7071:7071 \ -e USE_OLLAMA=false \ -e AZURE_OPENAI_API_KEY=your-key \ -e AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/ \ -e AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o \ kodywf/copilot-agent-365:latest
Architecture Deep Dive
Understanding how the components work together.
Docker Services
agent_function - The main application container running the Python Flask app with Azure Functions runtime.
ollama - The Ollama container that serves the Llama 3.1 model via an OpenAI-compatible API.
Agent System
The modular agent architecture allows for extensible functionality:
- ContextMemoryAgent - Recalls conversation history
- ManageMemoryAgent - Stores facts, preferences, and insights
- ScriptedDemoAgent - Interactive demos and walkthroughs
- GithubAgentLibraryManager - Manages agent installations
Docker Hub
Pull the pre-built image directly from Docker Hub.
docker pull kodywf/copilot-agent-365:latest
Available Tags
latest- Most recent stable build1.0.0- Initial release with Llama 3.1 support
Troubleshooting
Common issues and how to resolve them.
Container won't start
Check if Docker is running and ports aren't in use:
docker ps -a lsof -i :7071 lsof -i :11434
Slow responses
Without GPU acceleration, responses may take 30-60 seconds. Consider:
- Using a smaller model:
OLLAMA_MODEL_NAME=llama3.1:8b - Adding more RAM to Docker Desktop
- Using GPU acceleration if available
Reset everything
To completely reset and start fresh:
docker compose down -v docker system prune -a docker compose -f docker-compose.cpu.yml up -d