r/PiCodingAgent • • Oct 05 '26

News Introducing Pi-Bolt ⚡,the same Pi you all ❤️ with 35× faster large file writes, 2.4× less CPU, 3.3× less memory

https://github.com/opensec-git/Pi-Bolt

Hey everyone 👋

We've been working on this for a while and it's finally out. Pi-Bolt is Pi 1.0.3 compiled ahead of time to native code (AOT, no JIT).

Same Pi you already use, and it works with all your Pi plugins. It's just faster and lighter. ⚡

Benchmarks

Linux x86-64 (Benchmarked on AMD EPYC 7B13)

Benchmark Pi-Bolt Bun 1.4.2 Node 22 Node 24
Writing a 200 KB file through a tool call 0.8 s 27.8 s 44.3 s 33.6 s
CPU, streaming a 60k-char answer 3.8 s 43.1 s 43.7 s 40.3 s
CPU per tool turn, real hosted model 0.20 s 0.49 s 0.77 s 0.76 s
Memory of a session in tmux 27 MB 89 MB 132 MB 209 MB
CPU, interactive session (5 prompts) 303 ms 844 ms 1,242 ms 1,233 ms
Ready to type 45 ms 128 ms 303 ms 307 ms

macOS on Apple silicon (Benchmarked on M5 MacBook Air)

Benchmark Pi-Bolt Bun 1.4.2 Node 26
Writing a 200 KB file through a tool call 0.3 s 12.0 s 14.2 s
CPU, streaming a 60k-char answer 6.9 s 25.3 s 24.0 s
Memory of a session in tmux 31 MB 85 MB 161 MB
Memory after a 4.2M-token session 64 MB 95 MB 1,890 MB
CPU, interactive session (5 prompts) 126 ms 363 ms 544 ms
Ready to type 31 ms 63 ms 193 ms

The full method and raw benchmark data are in the repo.

What we changed

  1. Native code instead of a JIT. Pi is compiled to machine code ahead of time and starts from a prebuilt snapshot, so there's no warm-up and much less work at runtime. The compiler builds on Jarred Sumner's in-progress AOT work for Bun (oven-sh/WebKit#743), which we brought to x86-64 and macOS.
  2. No more slowdown on long outputs. Stock Pi redoes more and more work as an answer or file grows. Pi-Bolt only processes what's new, and that's where most of the 35× comes from.

Try it 🔥

curl -fsSL https://pi-bolt.opensec.in/install.sh | sh

Works on Linux x86-64 and Apple silicon. Windows support is coming soon, along with Linux ARM64.

Bonus plugins: the installer also offers subagents and a live todo list, two things people often miss in stock Pi. Both come prebuilt, so they load instantly.

Note: It will not modify your existing Pi Coding Agent Installation, So Feel Free to try it out !

Using plugins? They all work as-is. If you rely on heavy ones, use the -jit build of Pi-Bolt, or compile them into your own Pi-Bolt binary so they run as native code too (plugin guide).

🔗 Links

It's MIT licensed. If Pi-Bolt saves you some CPU and RAM, a ⭐ on the repo really helps us out.

Throw your heaviest sessions at it and tell us what breaks. We'll be in the comments ❤️

187 Upvotes

51 comments sorted by

43

u/AdCurious4788 Oct 05 '26

Did you considered raising a PR in Pi to solve this issue or just made a fork on your own?

35

u/opensecai Oct 05 '26

The cpu and memory gains are mainly because of AOT compilation instead of changes in the Pi code. the PR worthy fix can be the text streaming optimisation in this. we are working over raising a PR for it in Pi soon.

1

u/firebat-66 24d ago

Thank you for your efforts on this, is the PR up?

0

u/[deleted] Oct 06 '26

[deleted] — view deleted comment

5

u/opensecai Oct 06 '26

Yes, although we have mailed them ✌️

0

u/[deleted] Oct 06 '26

[deleted] — view deleted comment

2

u/opensecai Oct 06 '26

that's so true. we are working on the windows release and it would soon be available to use!

8

u/AlessandroPiccione Oct 05 '26

Benchmark Pi-Bolt Bun 1.4.2 Node 22 Node 24
Writing a 200 KB file through a tool call 0.8 s 27.8 s 44.3 s 33.6 s

What does this mean?
It seems to suggest that Pi 1.0.3 (is it Bun, Node 22 or Node 24?), takes 27, 44 or 33 seconds to write a file of 200KB ?

2

u/opensecai Oct 06 '26

Yep, you read it right. Each column is stock Pi 1.0 on a different runtime (Ours, Stock Bun, Node 22, Node 24). So writing a 200 KB file through a tool call takes stock Pi about 28 s on Bun, 44 s on Node 22 and 34 s on Node 24, vs 0.8 s on Pi-Bolt.

It's CPU time, not disk. Pi keeps re-rendering and re-parsing the streaming tool call as the file grows, and Pi-Bolt only processes the new part.

19

u/ConsiderationLate768 Oct 05 '26

Second time they posted this, gonna post again what I said on their previous one that got banned

Am I reading correctly that you're patching the bun runtime..? Wtf, completely unmaintainable. Why not look at what makes PI actually "slow" (it's not at all) instead of resorting to runtime hacks.

/opensec-git/Pi-Bolt/blob/pi-bolt/patches/bun/0010-macOS-a-static-heap-is-built-and-used-with-the-execu.patch

Do you even know what this is doing at all? Who knows what kind of security flaws this introduced. Vibecoded C++ slop, big nope from me

7

u/opensecai Oct 06 '26 edited Oct 06 '26

Second time you've come with the same comment, and you still don't know what you're pointing at. That file was older and there's no such file in the current repo and current shipped versions are secure.

We have fixed various critical vulnerabilities across many open source repositories, thus we made our best effort to make sure pi-bolt was safe and secure before it went out.

If you think there's a vulnerability, go ahead and find one that doesn't exist in upstream Pi Until then, try it out yourself you will ❤️ it ! :)

6

u/michaelsoft__binbows Oct 06 '26 edited Oct 08 '26

Your response which it sounds like you believe addresses the critical feedback actually just further validates that feedback.

I think that based on the claims of this description of the project at face value, it is highly impressive. But a decision to utililze a dependency always comes down to a judgement call made against the execution of it, and this casts serious doubt on it. It's unfortunate.

But... maybe it does have legs some sort of AOT approach to node/bun apps. Don't want to come across overly dismissive. Just would be highly concerned about maintainability of the appraoch.

2

u/DanceWithEverything Oct 06 '26

Really really bad idea

4

u/TomHale Oct 06 '26

Can someone please explain why this is a bad idea?

Understanding this is very important since it looks so good on the surface.

3

u/ConsiderationLate768 Oct 06 '26

This project is like complaining that your car is slow because the brake is stuck on, but instead of fixing the brake you add horsepower with a VERY dodgy cheap ebay turbo

1

u/icarus0228 Oct 06 '26

I think just a larger maintenance burden.

2

u/TomHale Oct 06 '26

Not my maintenance, not my problem 🤷

I don't think I care given the test suite passes, unless I'm missing something fundamental.

If it breaks, I move back to the official version.

Hell, the config is even byte compatible, right?

1

u/timmmmmmmeh Oct 07 '26

I haven't seen what they've done exactly but I imagine it's patching a library in their codebase while waiting for the upstream to merge their PR that fixes it.

3

u/ConsiderationLate768 Oct 07 '26

They aren't just patching any library, they're actually patching Bun. This would be like Mojang implementing some hacks in the Java runtime itself because Minecraft couldn't run fast enough.

Big difference here though is that this project was thrown together by AI in a few hours and PI really doesn't need such heavy optimizations

2

u/timmmmmmmeh Oct 07 '26

I agree with you if they intended to maintain a fork of bun. If it's just to keep things moving while they wait for bun to make the change I don't really agree.

On the slop part totally fair. If it was just the AI going " we need to patch bun" and someone agreeing without thinking about it then not good.

6

u/CevicheMixto Oct 05 '26

What the heck are y'all doing with Pi that you would notice the difference?

-2

u/opensecai Oct 05 '26

checkout opensec.in 😉

7

u/NomadStorm Oct 06 '26

Your website for a product designed to find bugs, is full of bugs. I lost count of how many I saw just scrolling down the page.

5

u/zebedeolo Oct 05 '26

i'll have to check this out. what are your long-term plans for mantaining it?

1

u/opensecai Oct 05 '26

We're planning to keep this maintained for the long run. We'll merge all new Pi release as it lands, and keep up with the upstream compiler work. If you do try it, tell us what you think !

8

u/kjesks Oct 05 '26

Too good to be true?

2

u/Megamygdala Oct 09 '26

Not sure i understand the benchmarks? How was it recorded? How is a single file write ever taking 28 seconds?

1

u/opensecai Oct 10 '26

Good question. The 28 s isn’t the disk write, which is instant. The test has a model write a 200 KB file through Pi’s write tool. A model sends the tool call’s arguments (the whole file) a few characters at a time, like any streamed answer. Stock Pi re-parses and re-renders the whole tool call on every chunk, so the work grows quadratically with file size. A 200 KB file is thousands of chunks, each re-processing everything received so far. Pi-Bolt only processes the new part.

How it’s recorded: each build runs the same prompts against a local server that replays identical model responses, so there’s no network or API variance. Pi-Bolt, Pi on Bun and Pi on Node are measured one after another on the same machine, and we report the medians. The full method and the scripts are in the repo, so anyone can rerun it.

1

u/either-15-or-40 Oct 05 '26

Does it improve startup times?

1

u/opensecai Oct 05 '26

Yes it improves the startup times too

1

u/peculiar-ragdoll Oct 05 '26

Really cool! Good job :)

3

u/opensecai Oct 05 '26

Glad that you liked it

2

u/giovanikx 27d ago

Awesome! There was another similar project in Go, but they focused too much on cool (but useless) visual stuff so I was waiting for a better option! Thank you!

1

u/icarus0228 Oct 06 '26

Already using it. So far, it seems fine. These kinds of versions of the original tool are what interest me the most, especially those leaning toward micro-optimizations.

1

u/Ang_Drew Oct 06 '26

wow this is so cool but it took tons of effort to maintain.

asked my agent briefly what you does here; patching webkit and bun, that's so much work to be done, but it is doable because of AI. i dont think this is good approaches but idk i have little experience on this kind of stuff.. will study your case and see if i can learn useful lessons 👍

1

u/TomHale Oct 06 '26

The config is byte compatible, right?

And you use the same test suite?

1

u/Gonjanaenae319 Oct 06 '26

What was the your eval system for this? Purely time to completion?

1

u/HyperWinX Oct 10 '26 edited Oct 10 '26

The project is absolutely impossible to build locally. I havent seen such a horrendous build process in a while.
prepare-pi.sh attempts to reach for all of the model providers in existence, keeps failing. After finding out that there is offline build mode, it kinda runs, but immediately fails because model catalog is empty. After slopping it together it still complains about amazon-bedrock.json not existing. This is absolutely impossible to work with, as expected from vibeslopped project
OP, do it, downvote me once again, like a little bitch you are, your slop is just pure slop

1

u/firebat-66 24d ago

It is concerning that building this from source would take so long. Can you elaborate on the issue a bit more, and if you ever got it working since your comment?

0

u/swamprg Oct 05 '26

What are the plans to port it to other architectures?

6

u/opensecai Oct 05 '26

For linux arm it will be coming soon. For windows, it will be released tomorrow. Stay tuned !

0

u/IronKarmic Oct 05 '26

Do you recommend the Linux build for WSL?

1

u/opensecai Oct 05 '26

yes, you can use it with WSL too

0

u/caraxeskalund Oct 06 '26

tbh, it's really great!!

0

u/abnormity54 Oct 07 '26

Too many emotes bruh

-1

u/HyperWinX Oct 10 '26

The project is absolutely impossible to build locally. I havent seen such a horrendous build process in a while.
prepare-pi.sh attempts to reach for all of the model providers in existence, keeps failing. After finding out that there is offline build mode, it kinda runs, but immediately fails because model catalog is empty. After slopping it together it still complains about amazon-bedrock.json not existing. This is absolutely impossible to work with, as expected from vibeslopped project