Anthropic Uses Claude Agents to Rewrite Its Own API in Rust, Cutting Processor Use by 70%

Anthropic has revealed that it used its own Claude AI agents to migrate a major part of its Messages API from Python to Rust, achieving significant performance gains in the process.

The company reported that the agent-assisted rewrite reduced processor usage by approximately 70% per request and shortened the median time to the first response token by around 20%. The agents compared the original Python implementation against the new Rust version using live traffic, identified discrepancies, and proposed fixes that were then reviewed by human engineers.

This internal project is one of the clearest real-world demonstrations yet of AI agents handling a complex, production-critical software migration. Rewriting a high-traffic API involves more than simple code translation; it requires understanding subtle behavioural differences, maintaining compatibility for existing customers, and ensuring the new system performs reliably under load. Anthropic’s decision to let agents lead much of that work, under human supervision, shows growing confidence in the technology’s ability to manage substantial engineering tasks.

The choice of Rust is also notable. The language is widely regarded for its performance and memory safety characteristics, making it attractive for infrastructure that must handle large volumes of concurrent requests efficiently. By moving performance-sensitive components into Rust with AI assistance, Anthropic has improved both speed and resource efficiency at a time when inference costs remain a major concern across the industry.

For the wider software engineering community, the project offers a practical case study in how AI agents can be applied to legacy modernisation and performance optimisation. It also raises questions about the evolving role of human developers: while agents can accelerate large-scale rewrites, human oversight remains essential for architectural decisions, security review and final accountability.

As more companies experiment with agentic workflows, Anthropic’s results will be watched closely. If similar gains can be repeated across other systems, AI-assisted code migration could become a standard tool for organisations seeking to modernise infrastructure without the full cost and risk of traditional large-scale rewrites.

Nicole Kobie

Nicole Kobie is a technology and science writer with 20 years of experience cutting through industry hype to evaluate the actual viability of tomorrow’s innovations. A Contributing Editor at WIRED UK. Nicole is the author of The Long History of the Future and is dedicated to giving readers an honest, deeply researched look at how emerging tech impacts the real world.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button