Deployment
AgentSpine is designed to be highly portable, whether you are running it as an embedded SDK or a centralized server.
Infrastructure Requirements
Section titled “Infrastructure Requirements”For a production deployment, you need:
- PostgreSQL 16+: Source of truth for executions, events, and policies.
- Redis 7+: Used for distributed locks, idempotency keys, and coordination.
Deployment Patterns
Section titled “Deployment Patterns”1. Embedded SDK (Python)
Section titled “1. Embedded SDK (Python)”In this mode, AgentSpine runs inside your application process. Deployment simply involves:
- Installing the
agentspinepackage. - Setting
AGENTSPINE_DATABASE_URLandAGENTSPINE_REDIS_URLin your environment.
2. Centralized Server (Full Stack)
Section titled “2. Centralized Server (Full Stack)”The centralized server provides a REST API and handles the Dashboard.
Using Docker Compose
Section titled “Using Docker Compose”The easiest way to deploy the full stack is using our reference docker-compose.yml:
docker compose up -dThis starts:
- Postgres: State store.
- Redis: Caching/Idempotency.
- AgentSpine Server: The control plane API.
- AgentSpine Dashboard: The UI at
http://localhost:3000.
Production Checklist
Section titled “Production Checklist”- Database Backups: Ensure regular backups of the Postgres instance.
- Redis Persistence: Enable AOF or RDB persistence in Redis to avoid losing idempotency state.
- Security: Secure your database and Redis ports. Use
AGENTSPINE_MASTER_KEYfor sensitive data encryption. - Observability: Monitor the
/healthand/metricsendpoints.