@sashimikun_void: Prime-Bun: https://github.com/sng-asyncfunc/prime-bun… An ultra-fast Prime Agent fork designed to orchestrate concurren…
Summary
Prime Bun is a Bun-native fork of Prime Agent that replaces the Python notebook with a JavaScript/TypeScript runtime, dramatically reducing latency for long-running coding tasks.
View Cached Full Text
Cached at: 08/08/26, 09:07 AM
Prime-Bun: https://github.com/sng-asyncfunc/prime-bun… An ultra-fast Prime Agent fork designed to orchestrate concurrent sub-agents and execute long-running coding tasks without the Python latency tax.
sng-asyncfunc/prime-bun
Source: https://github.com/sng-asyncfunc/prime-bun
Prime Bun: A Bun-Native RLM Agent
Documentation • Verifiers • PRIME-RL • pi-mono
Bun-native by design
Prime Bun replaces the Python notebook with a native Bun implementation. RLM programs execute as persistent JavaScript or TypeScript directly in Bun—not through a Python wrapper or subprocess bridge—with retained session state, prepared runtime globals, native shell execution, abort and recovery handling, and snapshot support.
Lower is better. Bun faster is the reduction in elapsed time relative to the Python implementation.
| Operation | Bun | Python | Bun faster |
|---|---|---|---|
| Startup | 57.8 ms | 789.4 ms | 92.7% |
| Scalar cell | 2.07 ms | 2.96 ms | 30.1% |
| 64 KiB output | 1.77 ms | 3.10 ms | 42.9% |
| 10,000 writes | 3.20 ms | 14.98 ms | 78.6% |
| Native shell | 1.38 ms | 9.13 ms | 84.9% |
| Abort | 146.5 ms | 175.7 ms | 16.6% |
| Recovery | 2.55 ms | 3.30 ms | 22.7% |
| 32 MiB snapshot | 23.31 ms | 38.31 ms | 39.2% |
Prime Bun is a fork of Prime Agent. All credit for the original agent, RLM architecture, TUI, and surrounding ecosystem goes to Prime Intellect and the Prime Agent contributors. Their thoughtful and ambitious work created an exceptional open-source foundation; this fork focuses on a Bun-native JavaScript and TypeScript runtime.
Prime Bun builds on Prime Agent, an open-source coding and research agent for general and long-running work. It preserves two core abstractions:
- The Recursive Language Model (RLM) treats context as variables (prompt-as-a-variable) and tools like recursive subagents as function calls (programmatic tool /sub-agent calling) inside a persistent REPL.
- The Continual Harness stores supplemental prompts, memories, skill descriptions, and reusable subagent specifications as durable state that Prime Bun can refine through small, evidence-backed updates, local to the session by default.
Prime Bun combines a persistent Bun JavaScript control environment with durable harness state, so useful working context and reusable operating patterns can outlive a single chat window.
- Everything is programmatic: the persistent Bun notebook is the built-in model tool; file operations, shell commands, skill use, subagents, and context management happen through JavaScript or TypeScript.
- Subagents are built in:
rlm(...)spawns real child agents for parallel or background work and returns an admission handle; results arrive through explicit agent messages or files. - The harness can improve:
/refinereviews the current trajectory and can apply small, evidence-backed updates to supplemental harness state. It never rewrites the immutable base system prompt, and recorded snapshots support rollback. - Skills are executable: JavaScript-backed skills load prepared globals into the notebook, and the built-in skill creator can turn recurring workflows into project or personal skills.
- Sessions run in the background: daemon-backed agents keep running when the terminal disconnects and can be reattached later.
- Agents communicate directly: running agents can exchange messages and orchestrate one another without routing everything through the user.
- Long tasks keep moving: automatic compaction, persistent goals, heartbeats, schedules, autonomous mode, and retained subagents preserve progress across turns and terminal sessions.
Getting Started
Install the local checkout with Node.js 22.8 or newer:
git clone https://github.com/sng-asyncfunc/prime-bun.git
cd prime-bun
npm ci
npm link
npm link exposes the checkout as the prime-bun command. Run it from the repository or directory you want Prime Bun to work in:
cd /path/to/project
prime-bun
On first launch, run /login to choose a subscription or API-key provider. Prime Bun works in the current directory and can run commands and modify files there. Use a disposable clone, clean worktree, or another checkpoint you can inspect and restore.
Prime Bun executes model-generated JavaScript, TypeScript, and project commands with your user permissions. Its worker and notebook processes improve lifecycle isolation and recovery; they are not a security sandbox. Review changes and use trusted repositories, instructions, skills, and extensions only. Run untrusted code or instructions in an external sandbox or restricted environment.
Useful commands:
prime-bun agents # Browse running, idle, and saved sessions
prime-bun attach <agent> # Reattach to a running session
prime-bun --resume <path|id> # Resume a saved session
prime-bun status # Inspect background service state
prime-bun doctor [--fix] # Inspect or repair background services
prime-bun shutdown [--force] # Stop every agent, worker, and background service
Built for Long-Running Work
Prime Bun is built for long-running work, especially for evaluations in research. These features are available in the TUI and when run autonomously.
- Continual Harness:
/refinecan persist focused, reviewable lessons as supplemental prompts, memories, reusable skill descriptions, or subagent specifications, with recorded refinement history. It does not replace packaging and reviewing new executable skills. - Direct agent-to-agent communication: running agents and retained subagents can discover one another, exchange messages, and steer active work.
- Daemon-backed continuity: active sessions, Bun notebook state, schedules, and subagents keep running when the terminal detaches and can be reattached later.
- Heartbeats and schedules:
/heartbeat,rlmHeartbeat, andprime-bun schedulecan re-enter a session periodically or at a specific time. - Persistent goals:
/goalkeeps an objective and its progress active across turns until it is completed, paused, or cleared. - Bounded autonomous mode:
/autonomouscontinues within configured turn, token, and time budgets and can run user-defined quality gates. A passed gate checks only what that gate verifies; reaching a limit does not imply task success.
Documentation
- Quickstart — install, authenticate, and run a first session
- Usage and CLI reference — commands, sessions, autonomous limits, and output modes
- Long-running and background agents — detach and reattach, goals, heartbeats, and schedules
- RLM programming model — persistent Bun execution, subagents, skills, and the trust model
- JSON mode and RPC mode — headless automation and integrations
- Skills — install and create reusable capabilities
- Provider setup — subscription and API-key providers
- Architecture overview — daemon, worker, notebook, and persistence boundaries
- Development — build and run from source
Acknowledgements
Our agent and TUI is built on top of pi. We thank the authors of pi for their valuable work.
License
Prime Bun is fully open source and released under the MIT License.
Disclaimer
I am not claiming JavaScript wins every RLM race. If you are building data pipelines, running heavy numerical analysis, or using the classic scientific stack, Prime Agent’s native IPython setup is exactly what you need.
But the future of coding agents isn’t strictly data science. It is web infrastructure, edge deployments, and massive TypeScript monorepos. Prime Agent is an incredible leap forward for autonomous coding. But if you are building for the web, do yourself a favor: kill the Python kernel and run it in Bun.
Similar Articles
@sashimikun_void: prime-bun update: Hooked up @trevin's /ce-prototype to map out integration paths for the new Bun 1.4.0 features from @j…
The prime-bun project has been updated to map integration paths for Bun 1.4.0 features, using parallel RLM workers to implement prototypes concurrently with significant speedup.
PrimeIntellect-ai/prime-agent
Prime Agent is an open-source coding and research agent from Prime Intellect that combines a persistent Python environment with a durable harness, subagents, and self-improving capabilities for long-running autonomous work.
Rewriting Prime Agent in Rust
Prime Intellect 将其 Prime Agent 编码代理从 TypeScript 完全重写为 Rust,过程中由超过 2,000 个代理的自主集群在 10,000+ 沙箱中完成端到端改写,新版本运行更快、资源占用更低并新增 Windows 支持。
Prime Agent - a new coding harness surpassing Codex/CC/PI
Prime Agent is an open-source coding and research harness that outperforms proprietary harnesses, scoring 95.5% on ARC-AGI-3 and improving models across benchmarks.
Prime Agent: A self-improving RLM agent
Prime Intellect launches Prime Agent, a fully open-source self-improving coding harness built around Recursive Language Model (RLM) and Continual Harness abstractions, enabling persistent sub-agents and dynamic tooling via a REPL-based interface.