Skip to main content
Fleet RLM requires PostgreSQL. It stores Sessions, Turns, memories, runtime selections, selected replay snapshots, and GEPA optimization runs there. Workspace files live on the Session’s Daytona Volume, not in PostgreSQL.

Prerequisites

  • An existing PostgreSQL database reachable from the Fleet host. Fleet creates its tables, but not the database.
  • Fleet RLM installed with uv sync --dev
  • Daytona and model credentials configured as in the quickstart

Point Fleet at PostgreSQL

Set FLEET_DATABASE_URL in .env. Without it, Fleet uses postgresql://postgres:postgres@localhost:5432/fleet.
.env
The shipped config/fleet.toml puts Fleet’s tables in the fleet_rlm_lite schema (storage.database_schema). The schema name must be a lowercase PostgreSQL identifier.

Schema migrations

Fleet applies its schema when the API server starts. It takes a transaction-scoped advisory lock, reads the fleet_lite_schema_migrations ledger, and applies each pending numbered migration once. You don’t run a separate migration command. To run DDL as a different role, set FLEET_DATABASE_MIGRATION_URL. It must point at the same host, port, and database as FLEET_DATABASE_URL. Fleet closes the migration connection once startup migrations finish. If the database already has a newer schema than your Fleet version, startup fails with Database schema version <n> is newer than this Fleet version <m>. Upgrade Fleet instead of downgrading the database.
Fleet RLM Lite’s tables use fleet_lite_* names, separate from tables created by earlier Fleet releases. Fleet doesn’t migrate data from those tables or delete them.

Connection handling

Fleet uses one connection pool for all queries.
  • Fleet recycles pooled connections after 50 minutes and closes surplus connections idle for more than 10 minutes.
  • Fleet checks each connection when it takes it from the pool, so it never hands out a connection the server closed while idle.
  • A query that fails with a connection error is retried once. Writes are safe to retry: storing a Turn is conditional on its Turn ID, so a retry can’t store it twice.
Each active Session runtime holds a PostgreSQL advisory lock on its own dedicated connection. The lock gives one worker ownership of the Session. Session history and Turn status reads use the shared pool and don’t need the lock. If a worker loses the lock, Fleet evicts that runtime and rebuilds it on the next request, after any running Turn drains.

Use Lakebase

For Databricks Lakebase, connect to the direct PostgreSQL endpoint over TLS. Don’t use Lakebase’s transaction pooler: it doesn’t support the Session-level advisory lock Fleet holds. To authenticate with per-connection Databricks OAuth credentials instead of a password, set the endpoint resource path:
.env
You can set the same path in storage.lakebase_endpoint. With OAuth enabled, the URL must include a host, a user, and sslmode=require, and must not embed a password. A migration URL must use the same TLS endpoint and database, also without a password.

Run the API server

The server binds to 127.0.0.1:8000 by default ([server]). An invalid --port fails with fleet: error: invalid configuration instead of falling back to the default. fleet serve needs a reachable MLflow server. With the default local backend, start one with fleet cli or run your own on port 5001. See Observability.
The Fleet API has no caller authentication. A non-loopback --host fails with non-loopback binding requires FLEET_ALLOW_NON_LOOPBACK_BIND=true. Setting that variable adds no access control, so only do it behind a trusted network boundary or an authenticating proxy. See Security.

Health check

GET /health returns 200 with status: "ok", the Fleet version, and an mlflow object describing the initialized MLflow destination. mlflow.ready is true once Fleet has initialized its runtime experiment.

Upgrade

  1. Stop Fleet.
  2. Pull the new release and run uv sync --dev.
  3. Start Fleet. It applies any new schema migrations at startup.
Last modified on November 8, 2026