Rust Is Eating the Agent Stack
Four companies — Microsoft, OpenAI, Cloudflare, and Vercel — made independent infrastructure bets in 2026. All four picked Rust. Not for the same product. Not through coordination. Each team hit the same wall: the performance floor that agent workloads impose on sandboxes, runtimes, and CLI tools is too low for interpreted languages to hold.
📖 Read the full version with charts and embedded sources on AgentConn →
Microsoft elevated Rust to Tier-1 status, putting it on equal footing with C++ and C# for new projects — a 633-point Hacker News thread that drew 361 comments. OpenAI rewrote Codex CLI from TypeScript to Rust and shipped a native binary that eliminates the Node.js runtime entirely. Cloudflare built Kitesurf, an agent-first browser engine written from scratch in Rust and compiled to WebAssembly, using 7x less memory than Chromium. And Vercel shipped agent-browser, a headless browser automation CLI with a Rust core that hit 26,000+ stars in weeks.
This is not a "rewrite it in Rust" meme. It is a substrate shift — and if you are building agent harnesses, you need to understand which layers are moving and why.
The pattern in numbers: Rust AI agent repositories on GitHub went from an average of 25 stars/day in 2023–2024 to 404 stars/day in 2026 — a 16x increase year-over-year, according to OSS Insight's analysis.
The Three Layers That Moved
The agent stack is not monolithic. It has distinct layers with different performance requirements, and Rust is not eating all of them equally. The pattern is cleaner than the hype suggests: Python stays for orchestration logic. Rust owns the runtime underneath.
A landscape survey from Wren Learns Rust identified three layers where Rust adoption has concentrated:
- LLM integration crates — API connections, function calling, streaming. Libraries like Rig (6,700+ stars) abstract provider differences.
- Agent frameworks — Orchestration, multi-agent communication, state management. Projects like Pie (Ed Huang's Rust port of the pi coding agent) and OpenFANG (16,000+ stars) handle the coordination layer.
- Runtime infrastructure — Sandboxes, execution environments, durability. This is where the compiled-language advantage is most decisive: Cloudflare's Kitesurf, Vercel's agent-browser, and the Firecracker-style microVM sandboxes we covered previously.
The bottom layer — runtime infrastructure — is where Rust adoption is strongest and the performance delta is largest. That is not a coincidence. When your agent spawns 10,000 sandboxed code executions per hour, the difference between a 200ms and a 5ms cold start is the difference between a viable product and one that bleeds money on idle compute.
Why Rust, Specifically?
This is not a generic "compiled beats interpreted" story. Rust's specific guarantees — memory safety without garbage collection, zero-cost abstractions, fearless concurrency — map precisely onto the constraints that agent infrastructure imposes.
Memory pressure. The Zerostack project made this concrete. Its creator built a Unix-inspired coding agent in Rust after watching Claude Code consume multiple gigabytes of RAM during long sessions, causing out-of-memory errors on developer machines. Zerostack achieves an 8MB base memory footprint with ~90ms startup time. That 575-point HN thread (308 comments) was not about language preference — it was about a real production constraint hitting real developers.
Sandbox security. When agents execute untrusted code — which is what every coding agent does — the isolation boundary must be trustworthy. Rust's ownership model eliminates entire categories of memory-safety vulnerabilities that plague C/C++ runtimes. Cloudflare's Kitesurf runs browser components in isolated WebAssembly/Rust environments on Workers, achieving 3.1x less CPU for screenshots and 4.7x lower memory than Chromium — while maintaining the Chrome DevTools Protocol for compatibility.
Supply chain attack surface. The Codex CLI rewrite HN thread surfaced this explicitly: compiled binaries have a dramatically smaller attack surface than npm/pip dependency trees. One commenter noted that Windows enterprises face IT approval barriers for Node.js installation, making a standalone executable significantly more viable for institutional adoption. The Rust binary "just copies and runs" — no runtime, no transitive dependencies, no node_modules folder as attack surface.
The GitHub Signal
OSS Insight's data tells the story quantitatively. The 2023–2024 cohort of Rust AI tools — aichat, Rig, Goose — averaged 25 stars/day. Respectable, but niche.
The 2026 wave exploded:
| Project | Stars | Stars/Day | Purpose |
|---|---|---|---|
| Zeroclaw | 29,272 | 597 | Agent framework |
| Vercel agent-browser | 26,316 | 321 | Browser automation CLI |
| Google Workspace CLI | 23,611 | 738 | Workspace agent tooling |
| LLMfit | 20,856 | 444 | Model integration |
| OpenFANG | 16,145 | 425 | Agent orchestration |
| IronClaw | 11,325 | 192 | Agent runtime |
Fork ratios tell an equally important story. Zeroclaw at 14.2%, OpenFANG at 12.5%, and IronClaw at 11.4% — these are not vanity-star repos. High fork ratios indicate that teams are building production systems on top of these foundations.
The Zerostack Case Study
Zerostack deserves a closer look because it crystallizes the entire argument. Built by a developer who was frustrated by resource-constrained hardware choking on existing agent CLIs, it delivers the same core agent capabilities — file editing, bash execution, git integration, LLM interaction — at a fraction of the resource cost.
The HN discussion revealed that this is not an edge case. Multiple commenters reported that Claude Code and Copilot CLI consume "tens of gigabytes" during long sessions. When your coding agent is the heaviest process on your development machine, something is architecturally wrong.
The counterargument came from parhamn, creator of a competing agent framework: "Smarter models reduce harness importance." If models get good enough, the efficiency of the harness matters less. But that argument cuts both ways — if models are getting smarter, they are also getting more capable, which means agents are doing more work per session, which means resource consumption scales up, not down. The harness does not become less important. It becomes the bottleneck.
Cloudflare's Bet: A Rust Browser for Agents
Kitesurf is the most ambitious entry in the Rust-for-agents wave. Cloudflare did not just write a CLI tool in Rust — they built an entire browser engine from scratch. Rust core compiled to WebAssembly, running inside V8 isolates on Workers.
Why build a browser when Chromium exists? Because Chromium is built for humans. Tabs, extensions, themes, pixel-perfect rendering, 60fps scrolling — none of that matters when an agent is extracting HTML or taking a screenshot. Kitesurf strips all of it out and pays the performance dividend:
- 3.1x less CPU for screenshots
- 3.8x less CPU for HTML extraction
- 4.7x less memory for screenshots
- 7x less memory for HTML extraction
The trade-off is wall-clock time — Kitesurf is 1.8x slower on screenshots and 1.7x slower on extraction. But for agent workloads, memory and CPU efficiency matters more than raw speed because you are running thousands of instances concurrently. A browser that uses 7x less memory means you run 7x more agent browser sessions per machine.
💡 What this means for you: If you run browser-based agent workflows at scale (scraping, testing, web interaction), evaluate Kitesurf. It passes 215,000+ Web Platform Tests and supports Chrome DevTools Protocol — your existing Playwright/Puppeteer code works. The resource savings compound at scale.
The Contrarian Corner: Why Rust Might Not Win
⚠️ The TypeScript counterargument deserves a hearing. Justin Schroeder made the case on X: "Agents should be written in TypeScript. I know my last post said everything should be Rust... and it should be. Except agents." His argument: agents are inherently I/O-bound (waiting on API calls), not compute-bound. TypeScript's ecosystem for API integrations, JSON handling, and rapid iteration matters more than raw performance for the orchestration layer.
He is partially right, and the distinction matters. The orchestration layer — deciding which tool to call, managing conversation state, routing between models — is I/O-bound and benefits from TypeScript/Python's developer velocity. The runtime layer — sandboxing code execution, managing browser instances, handling file system operations at scale — is where Rust's advantages are decisive.
The risk for the Rust-everywhere thesis: developer velocity matters in a market moving this fast. A team that ships a "good enough" TypeScript agent harness in two weeks beats a team that ships a perfect Rust runtime in three months — if the performance ceiling is not yet the binding constraint. And for many teams, it is not.
The counterargument to the counterargument: the performance ceiling arrives faster than teams expect. One commenter in the Zerostack thread noted that existing tools consuming tens of gigabytes during long sessions is already the binding constraint for serious agent usage. The ceiling is not theoretical — it is current.
What the Community Is Saying
The convergence has not gone unnoticed. The Microsoft Tier-1 announcement alone drew 633 points and 361 comments on Hacker News — the kind of engagement reserved for genuine inflection points. But the signal is in the quality of the discussion, not just the volume.
In the Codex CLI thread, the most upvoted comment was not about performance benchmarks. It was about enterprise distribution: "Windows enterprises face IT approval barriers for Node installation, making a standalone executable significantly more viable for institutional adoption." When enterprise procurement is easier because of your language choice, you have crossed from engineering preference into business advantage.
The Zerostack thread surfaced a different angle. One commenter documented that existing agent CLIs consume "tens of gigabytes" during long coding sessions — a problem that compounds as agents take on longer, more complex tasks. The 8MB-vs-gigabytes comparison is not a synthetic benchmark. It is the difference between an agent that runs alongside your IDE and one that replaces your IDE because there is not enough RAM for both.
On X, the discourse splits predictably. Infrastructure engineers celebrate the move. Application developers push back. The tension is productive: it forces precision about which layers benefit from Rust and which do not. The worst outcome would be a blanket "rewrite everything in Rust" movement that ignores the real cost of Rust's learning curve and slower iteration speed for business logic.
The Agent Layer Is Rewriting Software Substack piece captured the broader context: agents need state management across multi-step execution, tool access governed by protocols, memory that persists across sessions, autonomous reasoning loops, and guardrails that constrain behavior in real time. Each of those requirements puts pressure on the runtime. And when the runtime is the bottleneck, you reach for the language that makes the runtime disappear.
What This Means for Agent Builders
The Rust consolidation is real, but it is not uniform. Here is the practical framework:
Rewrite in Rust (high ROI):
- Code execution sandboxes
- Browser automation runtimes
- CLI distribution (eliminate runtime dependencies)
- File system watchers and indexers
- Concurrent tool execution engines
Keep in Python/TypeScript (still correct):
- Agent orchestration logic
- Prompt engineering and template systems
- Model routing and fallback chains
- Integration APIs and webhook handlers
- Rapid prototyping and experimentation
The boundary: Ask yourself: "Does this layer run once per agent session, or once per agent action?" If it runs per-action (thousands of times per session), the compiled-language advantage compounds. If it runs once per session (startup, configuration, routing), developer velocity wins.
This is the same pattern that played out in web development: Python/Ruby for the application layer, C/C++/Rust for the infrastructure underneath (databases, web servers, operating systems). The agent stack is following the same architectural gravity.
The Road Ahead
Three predictions for the next 12 months:
1. The "Rust runtime, Python orchestration" pattern becomes the default architecture. Just as web frameworks settled on "application language on top, C/Rust infrastructure underneath," agent frameworks will stratify. Rig, OpenFANG, and their successors will provide the Rust runtime layer that Python orchestration frameworks like LangChain and CrewAI build on top of. The guardrail stack will span both layers.
2. Sandbox-as-a-service becomes a category. Cloudflare's Kitesurf is the opening salvo. Expect dedicated agent sandbox providers that offer Rust-based isolation environments optimized for agent workloads — code execution, browser automation, file system operations — with per-invocation pricing that makes in-house sandboxing uneconomical. We have already seen this trajectory with LangSmith sandboxes and Firecracker microVMs.
3. The CLI agent war consolidates around compiled binaries. Claude Code, Codex CLI, Zerostack, Pie — the next generation of coding agents will ship as single binaries, not npm packages. Distribution simplicity and resource efficiency will be table stakes, not differentiators. The competition moves up-stack to model integration quality, context management, and skill ecosystems.
The teams that win will not be the ones who rewrite everything in Rust. They will be the ones who identify which layers sit below the performance floor and migrate those — while keeping the rapid-iteration layers in the language that ships fastest. The harness is the moat, but the moat needs a foundation. In 2026, that foundation is increasingly Rust.
Originally published at AgentConn






Top comments (0)