The chat agent does not directly hand a task to a child RLM. Delegation is mediated by a specific ReAct tool,Documentation Index
Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
Use this file to discover all available pages before exploring further.
delegate_to_rlm, registered the same way as any other tool in the agent’s tool registry.
Delegation flow
Two entry points, one budget
Recursive RLM work has two entry points, and they share one budget:delegate_to_rlm()— from the host ReAct agent’s tool registry.sub_rlm()/sub_rlm_batched()— from Python code already running inside adspy.RLMsandbox, reaching back out through the Daytona bridge to spawn a further child.
DaytonaInterpreter.build_delegate_child() so child creation follows one backend-owned policy. rlm_max_llm_calls is a single shared semantic-call budget across the entire recursive tree. sub_rlm_batched() caps sibling parallelism at 4 while sharing that same budget.
Sandbox code can call llm_query(), llm_query_batched(), sub_rlm(), and sub_rlm_batched() through the Daytona bridge. These callbacks dispatch to fleet-rlm’s interpreter methods, not DSPy’s per-forward injected counters — that is why budget enforcement is global rather than per-frame.
Child isolation policy
The default isRLM_CHILD_ISOLATION_MODE=auto:
- If the parent has no durable mounted volume, fork the parent Daytona sandbox into a child sandbox.
- If a durable volume is mounted, create a clean child Daytona sandbox with the same
repo_url,repo_ref, andcontext_paths, plus a child-specificvolume_subpath. - If fork creation fails and
RLM_CHILD_FORK_FALLBACK=clean, retry with a clean child sandbox. - Delete child sandboxes after each recursive task.
Local workspace snapshot fallback
When the parent turn is analyzing a local host checkout and norepo_url is available to recreate that checkout in a clean child sandbox, delegate_to_rlm():
- Writes a bounded text snapshot of relevant local repository files into the child sandbox under
artifacts/rlm-inputs/local_workspace_snapshot.txt. - Adds that path to the child context.
Configuration
| Variable | Default | Purpose |
|---|---|---|
RLM_CHILD_ISOLATION_MODE | auto | auto, clean, or context (debug only) |
RLM_CHILD_FORK_FALLBACK | clean | Behavior when fork creation fails |
rlm_max_iterations | runtime default | Per-RLM iteration cap |
rlm_max_llm_calls | runtime default | Tree-wide semantic call budget |
See also
- Architecture — where the delegation tool fits.
- Configuration — full env var list.