@sashimikun_void: Prime-Bun: https://github.com/sng-asyncfunc/prime-bun… An ultra-fast Prime Agent fork designed to orchestrate concurren…

X AI KOLs Following Tools

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.

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.
Original Article
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 Intellect

Prime Bun: A Bun-Native RLM Agent

Documentation • Verifiers • PRIME-RL • pi-mono

CI Build Binaries

Prime Bun Agent: Bun-native JavaScript RLM

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.

OperationBunPythonBun faster
Startup57.8 ms789.4 ms92.7%
Scalar cell2.07 ms2.96 ms30.1%
64 KiB output1.77 ms3.10 ms42.9%
10,000 writes3.20 ms14.98 ms78.6%
Native shell1.38 ms9.13 ms84.9%
Abort146.5 ms175.7 ms16.6%
Recovery2.55 ms3.30 ms22.7%
32 MiB snapshot23.31 ms38.31 ms39.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: /refine reviews 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: /refine can 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, and prime-bun schedule can re-enter a session periodically or at a specific time.
  • Persistent goals: /goal keeps an objective and its progress active across turns until it is completed, paused, or cleared.
  • Bounded autonomous mode: /autonomous continues 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

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

PrimeIntellect-ai/prime-agent

GitHub Trending (daily)

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

Hacker News Top

Prime Intellect 将其 Prime Agent 编码代理从 TypeScript 完全重写为 Rust,过程中由超过 2,000 个代理的自主集群在 10,000+ 沙箱中完成端到端改写,新版本运行更快、资源占用更低并新增 Windows 支持。

Prime Agent: A self-improving RLM agent

Hacker News Top

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.