Prerequisites
Before deploying your agent, ensure you have:- Docker and Docker Compose installed
- Python 3.12+ (for local development)
- uv package manager installed
- Your
.envfile configured with required API keys
Environment Setup
1. Configure Environment Variables
Copy the example environment file and add your API keys:.env and add your credentials:
Never commit your
.env file to version control. It’s already included in .gitignore.Docker Compose Deployment
Your agent comes with a complete Docker Compose setup that includes:- Main Agent Service - Your Bindu agent
- Jaeger - Distributed tracing and monitoring
- Phoenix - LLM observability and debugging
Docker Compose Configuration
Thedocker-compose.yml file defines three services:
Docker Compose Commands
1
Build and Start Services
Build the Docker images and start all services:Or run in detached mode (background):
2
View Logs
View logs from all services:View logs from a specific service:
3
Stop Services
Stop all running services:Stop and remove volumes (clears all data):
4
Restart Services
Restart all services:Restart a specific service:
Access Your Services
Once deployed, access your services at:Agent API
Your Bindu agent endpoint
Jaeger UI
Distributed tracing dashboard
Phoenix UI
LLM observability dashboard
Makefile Commands
Your agent includes a Makefile with common development tasks. Usemake help to see all available commands.
Development Commands
make install
make install
Install the virtual environment and pre-commit hooks:This command:
- Creates a virtual environment using
uv - Installs all dependencies
- Sets up pre-commit hooks for code quality
make check
make check
Run all code quality checks:This command runs:
- Lock file consistency check
- Pre-commit hooks (linting, formatting)
- Static type checking with
ty - Dependency analysis with
deptry
make test
make test
Run tests with coverage:This command:
- Runs pytest with coverage reporting
- Generates XML coverage report
- Uses configuration from
pyproject.toml
make build
make build
Build wheel distribution file:This command:
- Cleans previous build artifacts
- Creates a new wheel file in
dist/ - Uses
uvas the installer
make docs
make docs
Build and serve documentation:This starts a local documentation server. Access it at
http://localhost:8000To test documentation build without serving:make clean-build
make clean-build
Clean build artifacts:Removes the
dist/ directory and all build artifacts.make help
make help
Display all available commands:Shows a formatted list of all Makefile targets with descriptions.
Dockerfile Overview
The Dockerfile uses a multi-stage approach optimized for Python 3.12 anduv:
Key Features
- Slim Base Image - Uses
python:3.12-slimfor minimal size - UV Package Manager - Fast dependency resolution and installation
- Frozen Dependencies - Ensures reproducible builds with
--frozenflag - Layer Caching - Dependencies installed before code copy for faster rebuilds
Deployment Workflows
Local Development
1
Install Dependencies
2
Run Quality Checks
3
Run Tests
4
Start Agent Locally
Docker Development
1
Configure Environment
2
Build and Run
3
Monitor Logs
4
Test Agent
Access your agent at
http://localhost:3773Production Deployment
1
Build Production Image
2
Tag for Registry
3
Push to Registry
4
Deploy to Production
Use your preferred orchestration platform (Kubernetes, ECS, etc.)
Monitoring and Observability
Jaeger Tracing
Access Jaeger UI athttp://localhost:16686 to:
- View distributed traces across your agent
- Analyze request latency and performance
- Debug issues with detailed span information
- Monitor service dependencies
Phoenix LLM Observability
Access Phoenix UI athttp://localhost:6006 to:
- Track LLM calls and token usage
- Analyze prompt and response quality
- Monitor model performance metrics
- Debug LLM-specific issues
Phoenix uses the OpenInference standard, which is compatible with many observability providers.
Troubleshooting
Common Issues
Port Already in Use
Port Already in Use
If you see port conflict errors:
Environment Variables Not Loading
Environment Variables Not Loading
Ensure your
.env file exists and is in the project root:Build Failures
Build Failures
Clear Docker cache and rebuild:
Agent Not Responding
Agent Not Responding
Check agent logs for errors:Verify the agent is healthy: