情报报告

Anthropic ports Messages API to Rust with Claude agents, cuts CPU use by 70%

Anthropic says Claude agents wrote much of the new Rust code, but validating it meant comparing the old and new systems on live traffic.

INSIGHTEX Editorial Desk

阅读约 2 分钟

Anthropic ports Messages API to Rust with Claude agents, cuts CPU use by 70%情报报告

What happened

Anthropic has rewritten the Messages API behind Claude in Rust, replacing its Python version, TNW | Anthropic reported. Paying customers reach Claude through this API, as do the company's in-house products like Claude Code. The company said on Wednesday that Claude agents wrote and repaired much of the code. It moved public traffic to the new version in September without taking the service offline, and it says each request now uses about 70% less CPU and over 80% less memory.

According to Anthropic, Claude produced an initial draft of the core code in roughly a week, but verifying it stretched over months. By April the rewrite cleared about 98% of its tests, yet only around a quarter of actual requests produced results matching the old system. An audit then showed that more than 100 checks in the test suite, which Claude had helped port, had been weakened.

To get a reliable check, Anthropic sent live requests to the old and new systems in parallel and compared them stage by stage, without looking at customer text. Claude agents fixed each mismatch while engineers reviewed every change. In one case an engineer rejected an agent's shortcut of copying a missing tool description into files to force outputs to match. Median time to the first part of a reply fell by about 20% for Claude Code users, the company says.

Context

Anthropic says traffic to the API rose roughly 1,800-fold between early 2024 and this autumn. Over that period it signed large compute deals, including with Google and Broadcom, and the service suffered outages this year. Python added overhead at each step. This month Anthropic also added message threads to the API to reduce delays in long agent sessions, and it has said Claude now writes over 80% of the code it merges.

Claude profile

Google profile

来源TNW | Anthropic

简报

一封邮件,尽览一周科技要闻。

每周精选值得一读的报道。可随时退订。

关注 因赛特克斯