Claude Code + Karpathy AutoResearch = Your RSI Engine (Before Anthropic Ships Theirs)
A YouTube video titled "Claude Code + Autoresearch = SELF-IMPROVING AI" went viral four days ago. It shows Karpathy's autoresearch repo connected to Claude Code, generating research loops that improve their own outputs iteratively.
The comments section lost its mind. People act like recursive self-improvement just got invented.
We've been running this architecture since January.
What the Video Shows (and What It Misses)
The viral demo connects two pieces:
Karpathy's autoresearch. A research automation framework that generates hypotheses, designs experiments, runs them, analyzes results, and feeds findings back into the next iteration. It's a research loop that compounds.
Claude Code. Anthropic's coding agent that writes, tests, and deploys code with minimal human intervention. Claude Code revenue grew 5.5x according to Anthropic's own reporting - developers are actually using it, not just demoing it.
Put them together: Claude Code writes code, autoresearch evaluates the output, generates improvement hypotheses, feeds them back to Claude Code, which implements the improvements. Repeat. Each cycle, the system gets measurably better at whatever task you pointed it at.
The video demonstrates one loop. It's impressive. But it's a demo.
What's missing: persistence across sessions. Metric tracking over time. A mutation framework that proposes, tests, and either applies or discards changes based on measured results. A safety layer that prevents regressions from propagating. An architecture that runs this 24/7, not as a one-shot demo.
Our RSI Architecture
Our system runs the full loop in production. Here's the architecture:
Measure. Every agent action produces metrics: latency, success rate, token cost, output quality (scored by evaluation agents). These metrics persist in SQLite databases across sessions.
Hypothesize. Given the metrics, the system generates improvement hypotheses. "Reducing the prompt length by 30% would decrease token cost without quality regression." "Switching to a cheaper model for classification subtasks would reduce cost by 40%." "Caching API responses for repeat queries would cut latency by 60%."
Mutate. Each hypothesis becomes a concrete code change. The mutation engine writes the diff, applies it to a sandboxed copy of the agent, and prepares a test suite.
Test. The mutated agent runs against the same workload as the baseline. Metrics are collected for the mutation.
Apply or discard. If the mutation improves the target metric without regressing others beyond tolerance, it gets applied to the production agent. If it regresses, it gets logged and discarded. The system learns from both outcomes.
Repeat. This runs continuously. Not once. Not when a developer remembers to trigger it. Every cycle, every day.
DryRun Security's "Agentic Coding Security Report" evaluates real Claude Code, Codex, and Gemini applications in development workflows. Their finding: agentic coding is moving from experiment to production. The security implications are real, which is why our RSI architecture includes regression testing and safe-rollback in the mutation loop.
Why Open-Source RSI Matters Now
Anthropic hasn't published their formal RSI paper yet. They've hinted at it. Internal researchers have discussed it. But the architecture isn't public.
That's a window.
Every developer who watched that viral video wants to build this. They're searching for "autoresearch OpenClaw," "Claude Code self-improving," "RSI agent tutorial." Most of those searches return nothing useful.
Our RSI engine (tools/rsi_core/) is open-source. It implements the full measure-hypothesize-mutate-test-apply loop. It drops into any agent framework. It tracks metrics across sessions. It has the safety layer that the viral demo doesn't show.
The architecture lives at github.com/AI-Agent-Economy. The RSI core is framework-agnostic - it works with Claude Code, OpenClaw agents, or any system that can run code and measure results.
Anthropic will publish their paper eventually. When they do, we'll already have months of production data and a community using our implementation.
Build your RSI engine now. Don't wait for permission from Anthropic to do what their own tools already make possible.
This article was written with AI assistance. All technical claims, code, and architectural decisions were validated by the author.
About the author
- I'm building payment rails for agent-to-agent payments
Comments
Join the discussionNo comments yet. Be the first to comment.