Most "why Rust" pieces reach for speed. Speed is true and irrelevant to why infrastructure teams picked Rust for the layer under AI agents. The reason has more to do with what happens when you hand software root access and let it run unsupervised.
The growth numbers
GitHub's fastest-growing AI agent repositories in Q1 2026 show a clear shift. Rust AI tools from 2023 and 2024 averaged about 25 stars a day. The 2026 wave of Rust AI infrastructure projects averaged roughly 404 stars a day, a 16x jump that holds when you exclude corporate-backed repos and look only at community projects.
That pattern describes infrastructure teams making a language choice for a specific job, not Rust enthusiasts building niche LLM tooling.
The job changed
Early agent frameworks, LangChain and AutoGPT and CrewAI in their original form, called APIs and returned strings. A failure produced a malformed response.
Agents in 2026 run shell commands, manage files, spawn processes, and drive browsers, often with permission modes that skip manual approval for speed. Software at that access level runs autonomously for hours. Memory safety moves from preference to requirement.
Rust's ownership model and borrow checker provide memory safety without a garbage collector. Predictable behavior matters more than raw throughput when a tool call can delete a branch or reach production credentials. Avoiding a GC pause is a small win. Avoiding a use-after-free in a process holding your keys is the whole point.
Where the pattern shows up
- Vector databases. Qdrant, widely used in RAG pipelines, is written in Rust for throughput and memory efficiency in high-volume similarity search.
- Tooling that runs constantly. Astral's
ruffanduvreplaced slower Python equivalents for the work happening in the background of every developer session. - Agent frameworks. Rig gives Rust developers one trait-based interface across LLM providers, where switching from OpenAI to Anthropic comes close to a one-line change.
The common thread is Rust at the systems, execution, and sandboxing layer. That is where a bug becomes an incident rather than a wrong answer.
What this does not mean
Your agent stack does not need a rewrite. Python still runs agent logic, RAG pipelines, and most of the framework ecosystem, because the LLM tooling, examples, and hiring pool live there.
Production systems in 2026 look mixed: Python for reasoning, Go or similar for API and governance routing, Rust for the sandboxed executor where agent-generated actions reach the machine.
The cost is real. Engineers who know both Rust systems work and agent tooling are rare, which pushes compensation up at well-funded companies. Rust's agent ecosystem is smaller than Python's, so you write more yourself and find fewer examples to copy.
Four companies, one boundary
- Microsoft made Rust a Tier-1 language for new projects internally, alongside C++ and C#.
- OpenAI rewrote Codex CLI from TypeScript to a native Rust binary and removed the Node.js runtime.
- Cloudflare built Kitesurf, an agent-first browser engine in Rust compiled to WebAssembly, using roughly 7x less memory than Chromium for the same work.
- Vercel made a comparable infrastructure bet in the same window.
None of the four rewrote their AI logic. All four moved the execution, sandboxing, or runtime layer. Four unrelated teams drawing the same architectural line tells you something about where the risk sits.
What to do with this
An agent that runs shell commands, touches the filesystem, or holds real permissions earns a Rust rewrite at the execution layer faster than anywhere else. An agent that calls APIs and returns text does not, and Python's ecosystem depth still wins there.
For a cheaper entry point, adopt the Rust tools already in the workflow. ruff and uv deliver the performance and reliability argument without a line of Rust.
The data and the four examples are in the full write-up: https://www.hamvero.space/blog/rust-ai-agent-infrastructure/


