Docker Compose
The full runtime stack runs a master instance (port 8080), a worker instance (Kafka consumer), and all backing infrastructure: Kafka, Redis, PostgreSQL, Qdrant, MinIO, Vault, and an OCI registry.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose v2
- The
alquimia-runtimerepository cloned locally
Start the stack
Section titled “Start the stack”-
Copy the environment file
Terminal window cp .env.example .envEdit
.envand set at minimum:.env API_TOKEN=your-secret-tokenPOSTGRES_USERNAME=alquimiaPOSTGRES_PASSWORD=alquimiaKAFKA_SIGNING_KEY=<64-char-hex>Generate the signing key:
python -c "import secrets; print(secrets.token_hex(32))" -
Start all services
Terminal window docker compose up -dServices started:
runtime— master mode FastAPI app on port 8080runtime-worker— worker mode Kafka consumerkafka— Kafka broker (KRaft, no Zookeeper)redis— Session state and distributed locksdb— PostgreSQL persistent storage and audit logsqdrant— Vector store for RAGminio— S3-compatible blob storagevault— Secret management (dev mode)registry— Local OCI registry for agent packages
-
Run database migrations
Terminal window docker compose exec runtime alembic upgrade head -
Verify the stack is healthy
Terminal window curl http://localhost:8080/health/liveness# "OK"curl http://localhost:8080/health/readiness# "OK"
Send your first inference request
Section titled “Send your first inference request”# Create an agentspacecurl -X POST http://localhost:8080/registry/ \ -H "Authorization: Bearer your-secret-token" \ -H "Content-Type: application/json" \ -d '{"name": "my-agents", "namespace": "local", "tag": "latest"}'
# Add an agent (see Quickstart for the full agent JSON)curl -X POST "http://localhost:8080/registry/agent?agentspace_id=default" \ -H "Authorization: Bearer your-secret-token" \ -H "Content-Type: application/json" \ -d @my-agent.json
# Submit an inference requestcurl -X POST http://localhost:8080/event/infer/my-first-agent \ -H "Authorization: Bearer your-secret-token" \ -H "Content-Type: application/json" \ -d '{ "query": "What is the capital of France?", "user_id": "user-1", "session_id": "session-abc" }'# Returns: {"task_id": "task-...", "session_id": "session-abc", ...}Stream the response:
curl -N http://localhost:8080/event/stream/<task_id> \ -H "Authorization: Bearer your-secret-token"Service ports
Section titled “Service ports”| Service | Port | Purpose |
|---|---|---|
| runtime | 8080 | Master API |
| kafka | 9092 | Kafka broker (internal) |
| redis | 6379 | State store |
| db | 5433 (host) | PostgreSQL |
| qdrant | 6333, 6334 | Vector store |
| minio | 9222 (API), 9223 (console) | Blob storage |
| vault | 8200 | Secrets (dev mode) |
| registry | 5001 | OCI registry |
Local development with hot-reload
Section titled “Local development with hot-reload”docker compose -f docker-compose.yml -f docker-compose.dev.yml upSource directories are volume-mounted so code changes take effect without rebuilding.
Run with a local LLM
Section titled “Run with a local LLM”# Ollama + TEI embeddingsdocker compose -f docker-compose.yml -f docker-compose.ollama.yml -f docker-compose.tei.yml up
# vLLMdocker compose -f docker-compose.yml -f docker-compose.vllm.yml upStop the stack
Section titled “Stop the stack”docker compose down # Stop containers, keep volumesdocker compose down -v # Stop containers and delete volumesNext steps
Section titled “Next steps”- Inference Endpoints reference — full API documentation
- Configuration Reference — all environment variables
- Kubernetes & OpenShift — deploy to a cluster
Source
Section titled “Source”Alquimia-ai/alquimia-runtime—docker-compose.yml,.env.exampleAlquimia-ai/alquimia-core— SDK bundled inside the runtime image