# Prime Agent 用 Rust 重写自身

Original title: Rewriting Prime Agent in Rust

> Hacker News story 50027694 · language: zh · submitted 2026-10-09
> Web version: https://zeli.app/zh/story/50027694
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 64 · by [piotrgrabowski](<https://news.ycombinator.com/user?id=piotrgrabowski>) · 💬 20
[original](<https://www.primeintellect.ai/blog/prime-agent-rust>) · [HN discussion](<https://news.ycombinator.com/item?id=50027694>)

## Summary

自发布以来，Prime Agent 已处理超过 8 万亿个 token。我们决定用 Rust 将其彻底重写，以提升性能与稳定性。这次重构并非由人类主导，而是由超过 2000 个智能体自主协作完成。通过有限状态机编排任务，智能体在 Prime Sandboxes 中并行执行代码生成、审查与验证，确保与 TypeScript 版本的功能完全一致。Rust 的零成本抽象和编译时检查消除了大量运行时错误，同时显著降低了内存占用。经过性能爬山优化，新版本启动速度提升 14 倍，内存占用减少 80% 以上。这不仅是一次技术升级，更是对自主智能体能力的极限测试。

## Key quote

> 我们的目标是让智能体在尽可能少的人工干预下自主完成重写，人类只需搭建验证机制以支持大规模自主部署。

## HN discussion (20 comments)

### [AbuAssar](<https://news.ycombinator.com/item?id=50029142>)

> \> 总体而言，我们的 Rust 重写以及随后的性能爬坡（performance hillclimbing）让 Prime Agent 显著更快且资源效率更高。输入速度比 TypeScript 快约 14 倍，启动后内存占用减少超过 80%。
>
> 这次移植的成果非常棒

### [mgreg](<https://news.ycombinator.com/item?id=50028423>)

> 我对他们在这次迁移到 Rust 的过程中使用的 Planner -> Implementer -> Reviewer -> Verifier 流程很感兴趣。我见过类似的方案，但好奇他们具体是如何实现的。
>
> 好奇这种模式如何应用到全新的代码开发（greenfield coding）中，而不仅仅是用新语言复制一份代码或进行性能优化。

### [theturtletalks](<https://news.ycombinator.com/item?id=50028315>)

> 所以他们用 Prime Agent 和 GLM 5.3 进行群智协作（swarm），把代码重写成了 Rust。这也展示了 Prime Agent 身体力行，通过重构自身来践行其理念。既然 Prime Agent 底层是 Pi，他们会推出 Pi 的 Rust 重写版吗？Pi 的扩展使用的是 Typescript，我好奇它们是否还能正常工作。
>
> 我没看到很多人讨论 Prime Agent，我一直纳闷它是否仅仅是一个 Pi 扩展，因为它看起来就是一个子代理编排代理（subagent orchestration agent）。

---

## Cite

- Page: https://zeli.app/zh/story/50027694
- Date: 2026-10-09
- Source: primeintellect.ai (https://www.primeintellect.ai/blog/prime-agent-rust)
- Hacker News: https://news.ycombinator.com/item?id=50027694

## Other languages

- en: https://zeli.app/story/50027694 · markdown: https://zeli.app/story/50027694.md
- ja: https://zeli.app/ja/story/50027694 · markdown: https://zeli.app/ja/story/50027694.md
- ko: https://zeli.app/ko/story/50027694 · markdown: https://zeli.app/ko/story/50027694.md
- de: https://zeli.app/de/story/50027694 · markdown: https://zeli.app/de/story/50027694.md
- es: https://zeli.app/es/story/50027694 · markdown: https://zeli.app/es/story/50027694.md
- ru: https://zeli.app/ru/story/50027694 · markdown: https://zeli.app/ru/story/50027694.md
