All videos
0:00 / 0:00
ai

How to use RLMs in Deep Agents

LangChain1 July 2026Watch on YouTube

Description

Sydney Runkle, an open source engineer at LangChain walks through Recursive Language Models (RLMs), a pattern where a model can call itself, and shows how deep agents uses them to tackle large-scale data tasks that break standard agents. She demos the full RLM workflow using dcode, LangChain's terminal coding agent, including a live haiku tournament run across 16 parallel subagents, then benchmarks RLM-enabled deep agents against the Oolong dataset to show how performance holds up at 128k token context lengths where plain agents give up. 00:00 Intro: RLMs + deep agents 00:07 What is a recursive language model 00:44 Why use RLMs: reliability, finite context, deterministic coverage 01:32 How RLMs work in deep agents (code interpreter + task function) 02:30 Getting started + dcode haiku-tournament demo 03:38 Benchmark: the Oolong long-context dataset 05:14 Results: plain vs. RLM-enabled deep agent 06:29 Wrap-up

What you'll learn

  • Recursive Language Models (RLMs) enable models to call themselves, overcoming limitations of standard agents in large-scale tasks
  • RLMs provide improved reliability, finite context management, and deterministic coverage compared to conventional agent patterns
  • Deep agents leverage RLMs through code interpreter and task functions to execute tasks in parallel, as demonstrated in the haiku tournament example with 16 subagents
  • RLM-enabled agents maintain performance on the Oolong dataset at extreme context lengths (128k tokens) where traditional agents break down

Frequently asked questions

What is a Recursive Language Model (RLM) and how does it differ from standard language models?
An RLM is a pattern where a language model can call itself to break down and execute tasks. It differs from standard models by supporting recursion to handle more complex, large-scale tasks.
How do RLMs work in deep agents and what components are essential?
Deep agents use RLMs by combining a code interpreter and task functions. This enables agents to execute tasks in parallel and delegate subtasks to themselves.
Why are RLMs superior to standard agents for long-context tasks?
RLMs provide improved reliability, finite context management, and deterministic coverage. They maintain performance on datasets like Oolong at extreme context lengths (128k tokens) where traditional agents fail.
What was the haiku tournament demo and how does it demonstrate RLMs in action?
The haiku tournament demo ran 16 parallel subagents using the RLM pattern to generate and compare competing haikus. This demonstrates how RLMs coordinate complex, parallel tasks.

Topics

Related reads