Recursive Language Models with DSPy + Modal and an integrated Web UI for secure long-context code execution
Project description
fleet-rlm
Secure, cloud-sandboxed Recursive Language Models (RLM) with DSPy and Modal.
fleet-rlm gives AI agents a secure cloud sandbox for long-context code and document work, with a Web UI-first experience, recursive delegation, and DSPy-aligned tooling.
Paper | Docs | Contributing
Quick Start (Web UI First)
Fastest path: install and launch the built-in Web UI.
# Install as a runnable CLI tool
uv tool install fleet-rlm
# Launch the Web UI server
fleet web
Open http://localhost:8000 in your browser.
- Prefer a regular environment install instead of
uv tool?
uv pip install fleet-rlm
fleet web
fleet webis the primary interactive interface.- Plain
fleet-rlminstalls are intended to supportfleet web. - Runtime settings (LM / Modal) can be configured from the Web UI Settings surface in local development.
- Full setup for Modal secrets, Neon DB, auth modes, and deployment is linked below.
Why fleet-rlm
- Chat with an RLM-powered agent in the browser (
fleet web) - Run recursive long-context tasks with a secure Modal sandbox
- Analyze documents (including PDF ingestion with MarkItDown/pypdf fallback)
- Stream execution events and trajectories for observability/debugging
- Expose capabilities as an MCP server (
fleet-rlm serve-mcp)
Other Ways to Run It
Common commands:
# CLI demo
fleet-rlm run-basic --question "What are the first 12 Fibonacci numbers?"
# Explicit API server
fleet-rlm serve-api --port 8000
# MCP server
fleet-rlm serve-mcp --transport stdio
# Explore long-context tooling
fleet-rlm run-long-context --help
Terminal chat surfaces
fleetstarts the standalone interactive chat launcher (Ink runtime path).fleet-rlm chatstarts the in-process terminal chat.- OpenTUI workflows and setup are documented in the guides (see links below) because they require additional local tooling.
Running From Source (Contributors)
# from repo root
uv sync --extra dev --extra server
uv run fleet web
Use the full contributor setup (frontend builds, env/bootstrap, quality gates) in AGENTS.md and docs/contributing.md.
Architecture Overview
Read this after the quick start if you want the full system picture (entry points, ReAct orchestration, tools, Modal execution, persistent storage).
graph TB
subgraph entry ["🚪 Entry Points"]
CLI["CLI (Typer)"]
WebUI["Web UI<br/>(React SPA)"]
API["FastAPI<br/>(WS/REST)"]
TUI["Ink TUI<br/>(standalone runtime)"]
MCP["MCP Server"]
end
subgraph orchestration ["🧠 Orchestration Layer"]
Agent["RLMReActChatAgent<br/>(dspy.Module)"]
History["Chat History"]
Memory["Core Memory<br/>(Persona/Human/Scratchpad)"]
DocCache["Document Cache"]
end
subgraph tools ["🔧 ReAct Tools"]
DocTools["📄 load_document<br/>read_file_slice<br/>chunk_by_*"]
RecursiveTools["🔄 rlm_query<br/>llm_query<br/>(recursive delegation)"]
ExecTools["⚡ execute_code<br/>edit_file<br/>search_code"]
end
subgraph execution ["⚙️ Execution Layer"]
Interpreter["ModalInterpreter<br/>(JSON protocol)"]
Profiles["Execution Profiles:<br/>ROOT | DELEGATE | MAINTENANCE"]
end
subgraph cloud ["☁️ Modal Cloud"]
Sandbox["Sandbox Driver<br/>(Python REPL)"]
Volume[("💾 Persistent Volume<br/>/data/<br/>• workspaces<br/>• artifacts<br/>• memory<br/>• session state")]
end
WebUI -->|"REST / WS"| API
CLI --> Agent
API --> Agent
TUI --> Agent
MCP --> Agent
Agent --> History
Agent --> Memory
Agent --> DocCache
Agent --> DocTools
Agent --> RecursiveTools
Agent --> ExecTools
DocTools --> Interpreter
RecursiveTools --> Interpreter
ExecTools --> Interpreter
Interpreter --> Profiles
Interpreter -->|"stdin/stdout<br/>JSON commands"| Sandbox
Sandbox -->|"read/write"| Volume
style entry fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
style orchestration fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
style tools fill:#fff3e0,stroke:#f57c00,stroke-width:2px
style execution fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
style cloud fill:#fce4ec,stroke:#c2185b,stroke-width:2px
Docs and Guides
- Documentation index
- Quick install + setup
- Configure Modal
- Runtime settings (LM/Modal diagnostics)
- Deploying the server
- Using the MCP server
- CLI reference
- HTTP API reference
- Source layout
Advanced Features (Docs-First)
fleet-rlm also supports runtime diagnostics endpoints, WebSocket execution streams (/api/v1/ws/execution), multi-tenant Neon-backed persistence, and opt-in PostHog LLM analytics. Those workflows are documented in the guides/reference docs rather than front-loaded here.
Contributing
Contributions are welcome. Start with CONTRIBUTING.md, then use AGENTS.md for repo-specific commands and quality gates.
License
MIT License — see LICENSE.
Based on Recursive Language Modeling research by Alex L. Zhang (MIT CSAIL), Omar Khattab (Stanford), and Tim Kraska (MIT).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fleet_rlm-0.4.8.tar.gz.
File metadata
- Download URL: fleet_rlm-0.4.8.tar.gz
- Upload date:
- Size: 217.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c603123c78169b413cafca423f2e99df76ee5ff6a217e9706c42f22dc9aaa782
|
|
| MD5 |
a4c2f51fd58083ea884754c45c3dc45d
|
|
| BLAKE2b-256 |
e0e553549a2f2d4a4d2eb1d34374c5e7d329c85829260394e2e154a14460ea99
|
Provenance
The following attestation bundles were made for fleet_rlm-0.4.8.tar.gz:
Publisher:
release.yml on Qredence/fleet-rlm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fleet_rlm-0.4.8.tar.gz -
Subject digest:
c603123c78169b413cafca423f2e99df76ee5ff6a217e9706c42f22dc9aaa782 - Sigstore transparency entry: 992113757
- Sigstore integration time:
-
Permalink:
Qredence/fleet-rlm@dc80f6cacc4de34bc4fd6d9704d632bf5e9d8161 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Qredence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dc80f6cacc4de34bc4fd6d9704d632bf5e9d8161 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file fleet_rlm-0.4.8-py3-none-any.whl.
File metadata
- Download URL: fleet_rlm-0.4.8-py3-none-any.whl
- Upload date:
- Size: 281.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09f555287ff9727795c4d482738b422664eda0c5f9ed4056bff0f5818bdce88c
|
|
| MD5 |
3faa707120f26a8afeafb5c74d1f39ed
|
|
| BLAKE2b-256 |
eaccd615612c425e7e2fea8a8f94ff6be8dbde443524663949070dfa1c9f338f
|
Provenance
The following attestation bundles were made for fleet_rlm-0.4.8-py3-none-any.whl:
Publisher:
release.yml on Qredence/fleet-rlm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fleet_rlm-0.4.8-py3-none-any.whl -
Subject digest:
09f555287ff9727795c4d482738b422664eda0c5f9ed4056bff0f5818bdce88c - Sigstore transparency entry: 992113765
- Sigstore integration time:
-
Permalink:
Qredence/fleet-rlm@dc80f6cacc4de34bc4fd6d9704d632bf5e9d8161 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Qredence
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@dc80f6cacc4de34bc4fd6d9704d632bf5e9d8161 -
Trigger Event:
workflow_dispatch
-
Statement type: