Prerequisites
Before you begin, ensure you have:- A SambaCloud account with an API key
- Docker Desktop 4.43.0+ or Docker Engine installed
- A laptop with GPU support for running open models locally (alternatively, use Docker Offload if you don’t have a GPU)
Additional Requirements
- For Linux (Docker Engine) or Windows (Docker Desktop): Ensure Docker Model Runner requirements are met, specifically that GPU support is enabled and necessary drivers are installed
- For Linux (Docker Engine): Install Docker Compose version 2.38.1 or later
- Clone the example repository
Setup
1
Configure Environment Variables
Create a
.env file in your project directory with the following configuration:
Tip: Reference the .env.sample file in the repository for additional configuration options.
2
Define Agent Prompts
All agent prompts are defined in the
docker-compose.yml file. Customize agent behaviors, roles, and capabilities by modifying the prompts in this configuration file to match your use case.3
Start the Services
Launch the Docker Compose stack:If you’ve updated the code or configuration, rebuild the containers:The application will be available at http://0.0.0.0:8000
Usage
The agents can be accessed through both the web interface and API endpoints.Example Workflow
Enable Token Streaming for real-time responses, then follow these steps:1
Upload an Image
Upload an image such as an application architecture diagram, system design, or workflow visualization through the web interface.
2
Interact with the SambaNova Agent
Ask the SambaNova agent to analyze and explain the uploaded content:
3
Request Code Generation
Use the Developer agent to generate code based on the analysis:
Multi-Agent Collaboration
The Docker Compose setup enables multiple specialized agents to work together:- SambaNova Agent: Analyzes images, documents, and provides architectural insights
- Developer Agent: Generates code based on specifications and requirements
- Custom Agents: Define your own agents with specific roles and capabilities
Architecture
Docker Compose for Agents allows you to define:- AI Models: SambaNova models for inference and reasoning
- Agent Services: Specialized agents with distinct roles and prompts
- Supporting Services: Databases, message queues, storage, and other infrastructure
- Tool Integration: Connect agents to external APIs, databases, and services
docker-compose.yml file, making it easy to:
- Version control your entire agent architecture
- Scale services independently
- Deploy consistently across environments
- Share configurations with your team
Benefits
Docker Compose for Agents with SambaNova combines containerization best practices with high-performance AI inference to deliver:- Familiar workflow: Use the same Docker Compose syntax you already know
- Simplified deployment: Define complex multi-agent systems in a single YAML file
- Local development: Test and iterate quickly on your local machine
- Production-ready: Deploy to production with the same configuration
- Flexible architecture: Easily add, remove, or modify agents and services
- High-performance inference: Leverage SambaNova’s optimized models for fast response times
