ai-agent

recursive-llm

Recursive Language Models for efficient long-context processing. Analyze 1M+ tokens by storing context in a Python REPL while reducing LLM token usage.
614 stars+2★ this week87 forksPythonUpdated 10/2/2026100% free · open source
What it does

The recursive-llm tool enables efficient long-context processing by storing context in a Python REPL, allowing analysis of over 1 million tokens while reducing language model token usage.

When to use it
  • •When you need to process large texts or conversations that exceed the token limits of traditional language models
  • •When you want to reduce the cost of using language models by minimizing token usage
  • •When you need to maintain context across multiple interactions or turns in a conversation
Ready-to-paste prompt
rlm.process('Analyze the following text: ' + ' '.join([str(i) for i in range(100000)]))
Heads up: Make sure you have a compatible Python version (3.8 or later) and sufficient memory to handle the recursive context storage
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

🔑 Needs an API key

Works after you add credentials — the setup agent will ask you for them.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/recursive-llm && curl -fsSL https://workflowstacks.com/api/skills/recursive-llm/claude-skill -o ~/.claude/skills/recursive-llm/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How recursive-llm works
Codeflow
Free to inspect

Recursive-llm is a large Python project (~15k lines across 102 code files, plus 23 test files). Setup is light: installs like a normal app — add your API keys. Reading the code is optional. Last commit a month ago, MIT license, has a test suite.

Size
Large codebase
~15k lines · 102 code files · ~2 h to skim
Setup
One-command install
Installs like a normal app — add your API keys. Reading the code is optional.
Runs on
Python
Needs API keys (.env)
Python 48%TypeScript 44%CSS 7%JavaScript 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    pyproject.toml
    Dependencies and the commands it exposes
  3. 3
    .env.example
    The API keys and settings you must provide
  4. 4
    src/rlm/__init__.py
    Inside src/ — the main logic begins here
  5. 5
    examples/basic_usage.py
    A worked example — copy this to get going
What's in each folder
src/Core code — the actual logic12 files
examples/Examples you can copy12 files
visualizer/Folder93 files
experiments/Research & notebooks27 files
benchmarks/Evaluations & benchmarks7 files
tests/Tests — proof it works21 files
.github/CI / automation (GitHub Actions)3 files
READMEHas testsDocumentedCI checksExamples includedMIT licenseUpdated this month
Quick Actions
Details
Creator
grishahq
Language
Python
Category
ai-agent
Published
10/17/2025

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/recursive-llm.svg)](https://workflowstacks.com/skills/recursive-llm?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.