Why Did Anthropic Rewrite the Messages API in Rust?
Katelyn Lesse says Anthropic rewrote the Messages API in Rust because the service was a Python monolith and very inefficient on CPU, and the team could see a CPU wall coming.
CPU is used across the product services, the API, the apps, sandboxing, and CI, and more code means more CI runs. The company allocates that pool, including research sandboxing versus product sandboxing. The rewrite is the application-layer answer: run the API with less CPU without giving up tenant isolation or the security properties they want from the sandboxes. They had already gone multi-region. Rust looked like a strange choice because nobody in the room was a Rust developer. Claude wrote the code. The humans designed the system, and Claude also helped them work through that design. The Rust Messages API was fully rolled out in the week before this conversation. What mattered most was the plan and the verification. The implementation was Claude writing the code.
How Anthropic ships the #1 LLM in the World safely: Separating the Brain from the Hands ·