Stateful Database Adapters & Volume Locks
Provision and maintain persistent databases without risking catastrophic volume deletion during automated agent refactoring.
The Hazard of Ephemeral Container Management
AI coding agents naturally treat infrastructure as ephemeral: when prompted to "update the app" or "restart services", an agent using raw Docker CLI might execute docker compose down -v or recreate container volume mappings, destroying months of production records in milliseconds.
Dedicated Stateful Database Adapters
Smoooth provides dedicated lifecycle adapters for major open-source data stores:
- PostgreSQL 16: Automatic WAL persistence, initialization script execution, and
pg_isreadyhealth verification. - Redis 7: In-memory caching with append-only file (AOF) persistence enabled by default.
- MongoDB 7: Replica set configuration and volume durability.
- SQLite: Host filesystem directory mounting with file-locking safeguards.
Automatic Volume Locks (is_persistent: true)
# Declaring a persistent database via Smoooth manifest:
databases:
- name: "prod-postgres"
adapter: "postgres"
version: "16"
volume:
path: "/var/lib/smoooth/volumes/prod-pgdata"
retention_policy: "retain_on_delete"
is_persistent: true # Prevent agent destructive actions
When an adapter volume is marked with is_persistent: true, the Smoooth runtime prohibits any agent tool call from dropping, unmounting, or truncating the volume without an explicit confirmation signature from a human operator.