Operations
Day-to-day operations and maintenance.
Health
- API liveness:
GET /api/v1/health - API readiness:
GET /api/v1/health/ready
Database
PostgreSQL is the persistent source of truth and the initial task queue. Daily backup for development/pilot; test restore into a clean environment.
Backup:
pg_dump -h localhost -U ai_operator -d ai_operator -F c -f /backups/ai_operator.dump
Restore:
createdb -O ai_operator ai_operator_restored
pg_restore -h localhost -U ai_operator -d ai_operator_restored /backups/ai_operator.dump
Agent
- Heartbeat every 5 seconds; offline after 2 minutes without heartbeat.
- Task expiry and idempotency keys protect against duplicate execution.
Migrations
Alembic migrations live in apps/api/alembic. Apply with:
cd apps/api
uv run alembic upgrade head
