dspy.RLM (DSPy 3.3.0b1). Every Turn constructs one fresh dspy.RLM, calls it once, and settles. There is no dspy.ReAct chat wrapper, no long-lived Agent, and no Fleet-owned RLM variable-mode monkeypatch. The maintained integration surface is the shipped Signatures, the delegation ladder, and the instruction fragments that compose the Root prompt.
Where DSPy lives
Configure models through profiles
Model, provider, token, and recursion policy live inconfig/fleet.toml under the selected profile. There are no DSPY_* environment variables. Select the profile at the top of config/fleet.toml:
- Interactive profiles (
daytona,daytona-recursive) call OpenCode Go:FLEET_OPENCODE_GO_API_KEY,FLEET_OPENCODE_GO_BASE_URL. - Managed and benchmark profiles call the Databricks AI Gateway:
DATABRICKS_TOKEN,FLEET_DATABRICKS_AI_GATEWAY_BASE_URL. - All committed profiles use
deepseek-v4-flashfor both Root and Sub.
The Root Signature
The default Fleet Root Signature carries a bounded, strict input surface. Every Signature receives:requesttext.- Bounded
session_context. - Bounded
skill_cards. - Bounded Attachment metadata.
read_session_history Tool. The Signature uses strict local Pydantic DTOs; conversion and JSON serialization happen once immediately before native dspy.RLM.acall().
Custom Skill Signatures retain JSON-compatible common input annotations. Only one selected Skill may provide a validated custom Signature per Turn; data-analysis is the only bundled Skill that does so.
Instructions are composed, not monolithic
src/fleet_rlm/rlm/instructions.py owns the default Fleet Root instruction fragments: base, REPL, tool, optional recursion, verification, and bounded-context guidance. Fragments are composed directly; disabling recursion under a non-recursive profile omits recursion guidance rather than deleting text from one large monolithic docstring.
Delegation ladder
The Root selects the cheapest sufficient primitive:- Python in the interpreter for deterministic work.
- Native
llm_query/llm_query_batchedfor semantic work. rlm_queryfor one iterative isolated subproblem.- Root-only
rlm_query_batchedfor ordered independent child RLMs.
RLM_NATIVE_CHILD_DEPTH = 1 is a fixed product invariant, not a policy value. Fleet reserves the shared recursive budget atomically before starting a child and bounds sibling concurrency through recursion_max_parallel_children.
See the Recursive RLM concept page for the isolation contract and the [rlm] bounds.
Large inputs
Long documents, workspace bundles, and durable Attachments cannot be inlined into the Root prompt. DSPy 3.3.0b1 ships theSandboxSerializable contract; Fleet builds host-constructed capsules that DSPy injects into the interpreter as REPL variables.
For example, authorized Attachment context is packaged into AttachmentContextCapsule before the Turn runs:
sandbox_assignment(...) while the LM sees only a short rlm_preview() summary. Skill authors should not import capsule classes directly; the host builds them.
Interpreter reuse within one Turn
Within one Run, interpreter calls reuse one context. Python state persists across RLM iterations. Every later Run receives a fresh context, and replacing a Daytona Sandbox remounts the Workspace Volume Scope without preserving Python globals.Tracing
config/fleet.toml [mlflow] policy controls DSPy tracing. Fleet enables MLflow DSPy inference autologging for the selected experiment; compile and evaluator traces stay disabled for live Turn observability. mlflow.trace_content_max_chars bounds each readable field, and mlflow.async_logging = true keeps trace export off the Turn critical path. See the observability page for the full policy.
What is not here
- No
dspy.GEPAoptimization API surface. Committed profiles are deterministic; there is nooptimizesubcommand and noPOST /api/v1/optimization/*endpoints. - No
dspy.ReActFleetAgentchat wrapper. - No BYOK per-caller LM selection.
- No Fleet-owned RLM variable-mode wrappers. Large inputs use DSPy’s native
SandboxSerializable.
See also
Recursive RLM
One-level recursive child boundary and
[rlm] bounds.Agent model
The one-Turn, one-fresh-RLM model and Skill disclosure.
HTTP API
Turn SSE contract that every Signature runs behind.
Configuration
Profile matrix and provider environment variables.