Skip to main content

Fleet RLM

Recursive language-model backend with live streaming, durable sessions, and sandboxed execution.

Fleet RLM runs DSPy dspy.RLM behind a compact FastAPI + SSE API. Each turn executes in an isolated Daytona sandbox with workspace-scoped volumes, host-mediated tools, and a terminal client that streams reasoning, code, and output as it happens.

CircleCI PyPI Python License Docs DSPy FastAPI


Why Fleet RLM

  • RLM-native — One fresh dspy.RLM per turn with Python REPL execution, native sub-LM queries, and optional recursive child RLMs.
  • Operator-visible streaming — Reasoning, tool calls, interpreter code, and stdout flow over SSE to the maintained pi-tui terminal.
  • Durable by default — Sessions, turns, attachments, artifacts, and workspace memory survive across runs.
  • Sandboxed execution — Daytona interpreters run in isolated sandboxes with bounded workspace volumes and host-mediated memory tools.
  • Policy-driven runtime — Non-secret behavior lives in config/fleet.toml; secret values stay in environment variables.

Quick start

1. Install

git clone https://github.com/Qredence/fleet-rlm.git
cd fleet-rlm
uv sync --all-extras --dev
pnpm --dir tools/fleet-tui install --frozen-lockfile

You need Node 22.19+ and pnpm for the terminal client (fleet cli). uv sync does not install TUI dependencies; run the pnpm step above before fleet cli.

2. Configure credentials

Pick a runtime profile in config/fleet.toml (default_profile; shipped default is daytona-recursive), then export the provider and Daytona variables for that profile. See the profile matrix for the exact environment names.

Fleet connects through an OpenAI-compatible Chat Completions base URL, so Databricks is only the shipped example. To use OpenAI or another compatible provider, update the selected profile's model, api_key_env, and base_url_env entries in config/fleet.toml; the base URL is typically the provider's /v1 root, such as https://api.openai.com/v1.

export FLEET_DATABASE_URL='postgresql+asyncpg://...'
export FLEET_DAYTONA_API_KEY='...'
export DATABRICKS_TOKEN='...'
export FLEET_DATABRICKS_AI_GATEWAY_BASE_URL='https://<workspace-id>.ai-gateway.gcp.databricks.com/mlflow/v1'

uv run python scripts/db_init.py

Startup never applies migrations automatically — initialize the database explicitly before serving.

3. Run

Supervised backend + terminal (recommended for local development):

uv run fleet cli

Backend only:

uv run fleet web
# or
uv run fleet-rlm serve-api --port 8000

Resume a durable session:

uv run fleet cli -- --session <session-uuid>

Before your first turn, verify Daytona connectivity:

uv run fleet doctor daytona

Profile mismatch fails fast. fleet cli requires a Daytona profile that matches your credentials. Select profiles with /profiles in the TUI or edit default_profile, then restart Fleet.

How a turn works

Client  →  POST /api/sessions/{id}/turns  →  SSE stream
                │
                ├─ validate scope, attachments, skills
                ├─ TurnCoordinator opens run + prepares context
                ├─ RLMRunner executes one native dspy.RLM in Daytona
                ├─ stream reasoning, tools, code, output events
                └─ RunLifecycle commits result, artifacts, and turn history

The root agent can answer directly, delegate to sub-LMs, or fan out bounded recursive child RLMs. Session history stays host-side; workspace memory (memory/MEMORIES.md) persists across sandbox replacement.

Commands

Command What it does
uv run fleet cli Start backend + pi-tui terminal (Daytona profile required)
uv run fleet web Start backend only on port 8000
uv run fleet doctor daytona Opt-in disposable probe of provider, DB, mounts, interpreter
uv run python scripts/db_init.py Initialize or upgrade database to Alembic head
make check Default validation lane (backend + TUI)

Backend logs for supervised runs: .fleet_rlm/logs/.

API surface

Endpoint Purpose
POST /api/sessions/{session_id}/turns Idempotent turn execution over SSE
/api/sessions Session CRUD and committed turn history
/api/attachments Durable attachment upload and lookup
/api/artifacts/{artifact_id} Committed artifact metadata and content
GET /api/volume/tree Bounded read-only workspace volume tree (Daytona)
/api/skills Bundled skill card discovery
PUT /api/runs/{run_id}/cancellation Durable run cancellation

Full contract: HTTP API reference and OpenAPI.

Project layout

Path Role
src/fleet_rlm/ Canonical Python backend
tools/fleet-tui/ Maintained pi-tui terminal client
config/fleet.toml Runtime policy (profiles, limits, tracing)
migrations/ Alembic schema
docs/ Architecture, guides, and reference

Development

make check                 # lint, typecheck, tests (default lane)
make api-sync              # regenerate OpenAPI + TUI types
make check-security        # security scans

Contributing workflow and architecture rules: CONTRIBUTING.md.

Key docs:

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fleet_rlm-0.7.2.tar.gz (390.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fleet_rlm-0.7.2-py3-none-any.whl (477.9 kB view details)

Uploaded Python 3

File details

Details for the file fleet_rlm-0.7.2.tar.gz.

File metadata

  • Download URL: fleet_rlm-0.7.2.tar.gz
  • Upload date:
  • Size: 390.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fleet_rlm-0.7.2.tar.gz
Algorithm Hash digest
SHA256 50620c7ee11f6f1cda95ee5c77c7922ab1e34f37e0b68e7d62a0df666025bcca
MD5 36692076736b03a0e9ee914422819113
BLAKE2b-256 f6d6751097c931c81e61996e195b18df9b6ab31b3e7631e7b05a88b6d1e4f74d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fleet_rlm-0.7.2.tar.gz:

Publisher: release.yml on Qredence/fleet-rlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fleet_rlm-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: fleet_rlm-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 477.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fleet_rlm-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6597005273fef9587066e10a11ef305a415338aeb27b3e6c0e48ff5a1473ed14
MD5 08c927290d5969131bc62750c9bd8076
BLAKE2b-256 db9f9e157b97e5f2d63c407bd831b4cbfa0e88a8f1c04a1e1ca72a48a284d53b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fleet_rlm-0.7.2-py3-none-any.whl:

Publisher: release.yml on Qredence/fleet-rlm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

This release

0.7.2 This release

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.0

2 files

0.5.50

2 files

0.5.40

2 files

0.5.31

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.99

2 files

0.4.98

2 files

0.4.97

2 files

0.4.95

2 files

0.4.94

2 files

0.4.93

2 files

0.4.92

2 files

0.4.9

2 files

0.4.8

2 files

0.4.7

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page