{"slug": "anthropic-moves-its-messages-api-from-python-to-rust-with-help-from-claude", "title": "Anthropic moves its Messages API from Python to Rust with help from Claude", "summary": "Anthropic migrated its Messages API from Python to Rust, using Claude agents to find and fix behavioral differences between the two versions, and the company says the rewrite cut CPU use per request by about 70%. Engineers Katelyn Lesse and Angela Jiang described the effort on an October 27, 2026 episode of the Latent Space podcast, saying the migration was finished by September 2026, that the team started with no prior Rust experience, and that Claude wrote most of the code while humans handled architecture and migration strategy; the podcast cited a 40-50% CPU decrease and a 10-20% improvement in time-to-first-token latency. The team validated the new implementation with shadow traffic, running real requests against both the Rust and legacy Python versions before switching over.", "body_md": "# Anthropic moves its Messages API from Python to Rust with help from Claude\n\nAnthropic / Wikimedia Commons (Public domain)\n\nThe company says AI agents found and fixed behavioral differences, cutting CPU use per request by about 70%\n\n[Anthropic](https://cryptobriefing.com/markets/anthropic/) has rewritten the backbone of its developer business in a new programming language, and it let its own AI do most of the typing.\n\nThe company migrated its Messages API from Python to Rust, using Claude agents to find and fix differences between the two versions. Anthropic says the move cut CPU use per request by about 70%.\n\nThe Messages API is the plumbing developers use to send prompts to Claude and get responses back, so any efficiency gain there touches a lot of traffic.\n\n## How Claude helped rewrite its own front door\n\nAnthropic frames the project around an idea it calls the generator-verifier gap. Some problems are far easier to check than to solve.\n\nA code migration fits that shape neatly. Writing a Rust version of a large Python system is hard. Checking whether the new version behaves exactly like the old one is comparatively mechanical, and that mechanical checking is work AI agents can grind through at scale.\n\nAccording to deep research findings drawing on an October 27, 2026 episode of the Latent Space podcast, Anthropic’s Katelyn Lesse and Angela Jiang described the effort in detail. The migration replaced a Python-based monolith with a Rust implementation and was finished by September 2026.\n\nThe team took the wholesale route rather than moving pieces over gradually.\n\nThe engineers reportedly started with no prior Rust experience. Claude wrote most of the code, while the humans focused on system architecture and the migration strategy.\n\n### AI, tech, and the markets they move—in one daily briefing.\n\nDaily. Free. Join 34,000+ readers across crypto, finance, and policy.\n\nTo make sure nothing broke, the team used shadow traffic. Real requests were run against the new Rust version alongside the legacy Python one, so outputs could be compared to confirm they matched before the switch carried real weight.\n\n## The numbers, and why they differ\n\nAnthropic’s own write-up puts the CPU savings at about 70% per request.\n\nThe podcast discussion, as summarized in the research findings, cited a 40-50% decrease in CPU usage. It also reported a 10-20% improvement in time-to-first-token latency, which is how long a user waits before the first piece of Claude’s answer appears.\n\nThe two CPU figures come from different sources and do not perfectly align. Either way, both describe a substantial drop in the compute needed to handle the same request.\n\n## Background: a bet that AI can rewrite AI infrastructure\n\nPython is a popular choice for building quickly, and many AI companies started there. Rust is a language engineers often reach for when they want tighter control over performance.\n\nAnthropic’s pitch is that the economics change when an AI model can handle the bulk of the translation and a verification loop can catch the mismatches. The humans set the plan. The agents do the long, repetitive work of making two codebases agree.\n\nThe detail that the team began without Rust expertise is arguably the most telling part of the story. Historically, a language migration required hiring or training specialists first. Here, the specialist knowledge was effectively supplied by the model.\n\n## What this means\n\nFor Anthropic, the clearest implication is cost. Lower CPU use per request means the same hardware can serve more API calls. The research findings describe the gains as evidence the migration helps the API handle increased demand.\n\nFor developers building on Claude, the practical payoff is speed. A 10-20% improvement in time-to-first-token, as described on the podcast, is the sort of change end users feel without knowing why.\n\nThere are caveats. Shadow traffic only verifies the behavior it actually sees, so rare edge cases can slip through if they never appear during the comparison window. And a wholesale cutover carries more concentrated risk than a phased rollout, even with careful verification.\n\n**Disclosure:** This article was edited by Diego Almada Lopez. For more information on how we create and review content, see our [Editorial Policy](https://cryptobriefing.com/editorial-policy/).", "url": "https://wpnews.pro/news/anthropic-moves-its-messages-api-from-python-to-rust-with-help-from-claude", "canonical_source": "https://cryptobriefing.com/anthropic-messages-api-python-to-rust/", "published_at": "2026-11-25 16:30:20+00:00", "updated_at": "2026-11-25 16:45:40.318552+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-infrastructure", "large-language-models", "developer-tools"], "entities": ["Anthropic", "Claude", "Messages API", "Katelyn Lesse", "Angela Jiang", "Latent Space", "Rust", "Python"], "also_reported_by": [], "takeaway": "Anthropic replaced its Python Messages API monolith with Rust written largely by Claude agents, verifying behavior with shadow traffic and reporting roughly 70% lower CPU per request and a 10-20% time-to-first-token gain.", "recommendation": {"advice": "For a large language migration, run shadow traffic against the old and new implementations and have agents reconcile behavioral differences before cutover; Anthropic reports about 70% lower CPU per request.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/anthropic-moves-its-messages-api-from-python-to-rust-with-help-from-claude", "markdown": "https://wpnews.pro/news/anthropic-moves-its-messages-api-from-python-to-rust-with-help-from-claude.md", "text": "https://wpnews.pro/news/anthropic-moves-its-messages-api-from-python-to-rust-with-help-from-claude.txt", "jsonld": "https://wpnews.pro/news/anthropic-moves-its-messages-api-from-python-to-rust-with-help-from-claude.jsonld"}}