Skip to main content
rlm(...) — recursive language model — is how Fleet Prime Agent runs child agents from inside a session. Call it from an IPython cell and you get back a real agent process, not just another model call.

Why it’s different from a function call

A regular tool call runs a fixed piece of code. rlm(...) runs a full agent: it has its own kernel, its own transcript, its own tool loop, and it can spawn its own subagents. When the child finishes it returns a result to the parent kernel like any Python function would.

Spawning children

Inside an IPython cell:
Parallel fan-out is idiomatic:
Background runs return a handle you can await later:

What runs where

SubagentRuntimeHost schedules children. Each child runs as its own agent process with:
  • Its own IPython kernel
  • Its own transcript, written under the parent’s session tree
  • A parentSession link and a rlmDepth counter so the runtime knows how deep the tree is
The parent turn keeps streaming while children run, and each child shows up as its own tool card in the UI.

Refinement uses RLM

/refine is implemented on top of RLM. The harness spawns evaluator subagents, reads the trajectory, and updates supplemental state based on evidence. See Refinement.
  • Sessions — parent/child sessions are the primitive RLM builds on.
  • Streaming protocol — subagent events flow over the same stream as the parent.
Last modified on August 17, 2026