Skip to content

v0.5.0 - RLM Agent

Choose a tag to compare

@dalehurley dalehurley released this 20 Jan 07:02
· 21 commits to master since this release

πŸš€ New Features

RLM (Recursive Language Model) Agent

Based on the MIT CSAIL research paper (arXiv:2512.24601v1), the new RLMAgent enables processing of inputs up to 100x larger than the model's context window.

Key Capabilities

  • REPL Environment: Input stored as external variable, not in context window
  • Smart Exploration Tools:
    • peek_input(start, length) - View substring by position
    • slice_input(start_line, end_line) - Extract line ranges
    • search_input(pattern) - Regex search with context
    • get_input_info() - Get input metadata
  • Variable Storage: Store intermediate results with set_variable/get_variable
  • Recursive Self-Invocation: Decompose complex tasks with recursive_call
  • Token Efficient: Only examine what's needed

Usage

use ClaudeAgents\Agents\RLMAgent;

$agent = new RLMAgent($client);

// Process a very large file without loading into context
$result = $agent->runWithInput(
    'Find all errors and summarize them.',
    $veryLargeLogFile  // Can be 10-100x larger than context!
);

πŸ“– Documentation

βœ… Tests

  • 72 new unit tests for RLMAgent and components
  • All existing tests continue to pass

πŸ“š References

Zhang, A.L., Kraska, T., & Khattab, O. (2026). Recursive Language Models. arXiv:2512.24601v1. MIT CSAIL.