v0.5.0 - RLM Agent
π 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 positionslice_input(start_line, end_line)- Extract line rangessearch_input(pattern)- Regex search with contextget_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.