Skip to main content
Fleet RLM runs each Turn as a DSPy program. It picks one of three routes, runs it with the Root model, and can delegate independent subtasks to child agents. DSPy owns the RLM loop, its history, and provider retries. Fleet supplies the sandbox, the tools, and the shared Turn budget.

Routes

direct, flex, and rlm are the route names in triage_decision and turn_complete events, stored Turns, traces, and fleet eval label --route. They replace the older direct_cot, single_rlm, delegated_rlm, flex_pipeline, and deep_rlm names. Re-optimize compiled programs that were tuned against the old triage labels.

Execution modes

The execution mode decides how Fleet picks a route. Set the default with runtime.execution_mode. Change it for one Session with /mode in the terminal or PUT /sessions/{session_id}/mode. In hybrid mode, triage uses the TypeSafe Jev model when FLEET_TYPESAFE_API_KEY is set, and the Sub model otherwise. Fleet falls back to rlm in three cases:
  • Triage returns an unknown or missing route.
  • Triage fails. The event evidence records override_reason: "routing_error".
  • Triage picks direct but the Turn has selected context. The event evidence records override_reason: "selected_context".
Only an explicitly selected direct mode inlines workspace files. Fleet adds the contents of the Session’s files/ folder to the prompt, up to 1,000,000 characters, and skips unreadable files. The Turn records direct_context_chars and direct_context_truncated, so you can tell when the limit clipped the context. When hybrid triage picks direct, Fleet doesn’t inline files. With the TypeSafe key set, Fleet also asks Jev which Skills are relevant to the task on the flex and rlm routes. It preloads the instructions of up to three relevant Skills.

Root and Sub models

By default, both roles use the shared [llm] model. Set model in a role table to give that role its own model. See Configure models.

Three ways to do sub-work

Pick the lightest option that solves the problem.

Recursive child agents

spawn_agent runs one child. spawn_agents runs up to eight independent children concurrently and returns their results in input order. Each child is a fresh dspy.RLM on the Sub model in an ephemeral child Sandbox.
  • A child gets copies of files/ and skills/, or of the input_paths you pass plus every Skill. It doesn’t see the parent’s memory or the shared learned notes.
  • A child can call only spawn_agent, so it can delegate further until runtime.max_agent_depth is reached.
  • A child returns findings and the artifacts it produced. Fleet verifies their digests and promotes them under artifacts/<agent-id>/ in the parent workspace.
  • A child that fails returns an error to its parent. The parent can retry or continue with other children.
  • When a Turn already has runtime.max_active_children children running, or has allocated runtime.max_child_sandboxes, Fleet refuses the next spawn instead of queuing it.
Children share the parent Turn’s deadline and model-call budget. Only the deadline, cancellation, and budget exhaustion end the whole Turn.

Turn budgets

Every Turn has one shared budget. When the model-call budget runs out, or a configured deadline passes, Fleet ends the Turn. Each prompt in llm_query_batched and each item in jev_decide_batched counts as one model call. When a reply is missing output fields, DSPy’s native JSON recovery makes one extra request, and that request also counts. See the configuration reference for valid ranges.

Stopping guidance

Fleet’s task instructions ask the model to submit on the next action once its answer and one supporting check agree. A supporting check can be a known reference value, a self-consistency test, or a second computation it already ran. Learned notes and memory are unreviewed hints, so a value that only matches a note doesn’t count as verified. This is model guidance, not an enforced limit.
Last modified on November 9, 2026