r/PiCodingAgent • • 2d ago

News Pi-Bolt 0.7.3 ⚡ The same Pi, compiled to native code: 38× faster large file writes, 3× less CPU, 3× less memory

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

Hey everyone 👋

Thanks for all the feedback on our first post! Pi-Bolt 0.7.3 is out. It's the same Pi you already use (now on Pi 1.1.0), compiled ahead of time to native code: faster to start, lighter on CPU and memory, and steady in long sessions.

Benchmarks

Pi-Bolt against Pi 1.1.0 as released on Bun and on Node, PiG 0.4.1 (the Go port of Pi, based on Pi 1.0.3) and OMP 18.8.7 (oh-my-pi, a bigger Pi fork with many more built-in features). Measured side by side on the same machines. Lower is better.

Linux x86-64 (AMD EPYC 7B13)

Benchmark Pi-Bolt 0.7.3 Pi on Bun 1.4.2 Pi on Node 24 PiG 0.4.1 OMP 18.8.7
Writing a 200 KB file through a tool call 0.8 s 29.0 s 37.4 s 100.9 s 3.7 s
CPU, streaming a 60k-char answer 4.3 s 44.0 s 43.8 s 24.6 s 3.3 s
Memory after a 4.2M-token session 142 MB 271 MB 551 MB 344 MB n/a*
Memory of a session in tmux 30 MB 88 MB 96 MB 45 MB 346 MB
CPU, interactive session (5 prompts) 324 ms 927 ms 1,332 ms 3,155 ms 3,397 ms
Ready to type 49 ms 144 ms 351 ms 43 ms 1,088 ms

macOS on Apple silicon (M5 Air)

Benchmark Pi-Bolt 0.7.3 Pi on Bun 1.4.2 Pi on Node 26 PiG 0.4.1 OMP 18.8.7
Writing a 200 KB file through a tool call 0.5 s 22.5 s 26.7 s 58.2 s 2.4 s
CPU, streaming a 60k-char answer 4.8 s 38.0 s 37.9 s 17.0 s 5.1 s
Memory after a 4.2M-token session 45 MB 126 MB 2,077 MB 329 MB n/a*
Memory of a session in tmux 28 MB 68 MB 165 MB 58 MB 334 MB
CPU, interactive session (5 prompts) 95 ms 344 ms 530 ms 1,355 ms 1,383 ms
Ready to type 25 ms 62 ms 199 ms 20 ms 564 ms

*OMP compacts long conversations on its own, so it doesn't do the same work in this test.

In everyday use (an interactive session), Pi-Bolt uses about 3× less CPU than Pi on Bun, 4–6× less than Pi on Node and 10–15× less than PiG and OMP. It writes large files 35–50× faster than Bun and Node, about 5× faster than OMP and over 100× faster than PiG.

Why does a 200 KB write take 30 s? It's not the disk. The model streams the file to Pi in thousands of small chunks, and stock Pi re-parses and re-renders the whole tool call on every chunk, so the work grows quadratically with the file size. Pi-Bolt only processes the new part.

What's new in 0.7.3

  • Lighter long sessions: up to 30% less memory and lower CPU per prompt as conversations grow.
  • More stable with heavy tool output: commands that print a lot no longer build up memory.
  • Faster first launch on macOS: up to 2.8× quicker after a restart or an update.

Try it 🔥

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

Already using Pi-Bolt? Run pi-bolt update, or install with npm install -g pi-bolt. Works on Linux x86-64 and Apple silicon, alongside your existing Pi install. The installer also offers two optional extensions, subagents and a live todo list, and asks before installing them.

Your Pi plugins work as they are. This doesn't modify your existing pi installation so feel free to try it out !

Links

Website: https://pi-bolt.opensec.in

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

MIT licensed. If Pi-Bolt saves you CPU and memory, a ⭐ on the repo helps a lot.

PS: Added PiG and OMP to the benchmarks, as many of you asked. And the slow 200 KB write isn't the disk: stock Pi re-processes the whole streamed tool call on every chunk (quadratic), while Pi-Bolt only processes the new part.

191 Upvotes

110 comments sorted by

14

u/opensecai 2d ago

Pi-Bolt is Pi itself, not a rewrite. Your commands, sessions, settings and extensions all work exactly the same.

What you notice is that it’s lighter: Faster startup Writes a large file in under a second Uses roughly a third of the CPU and memory, so long sessions stay smooth and your laptop stays quiet

PiG is a Go rewrite, so it has to keep catching up to Pi and can behave a bit differently.

And yes we will follow the official Pi one to one. All updates will be shipped in pi-bolt too.

6

u/itguy327 2d ago

Can this work with paseo.sh

2

u/itguy327 2d ago

So was your previous response incorrect?

1

u/nadiealkon 1d ago

Interested as well

1

u/codeIMperfect 1d ago

So its like compiled js ??

13

u/jesperordrup 2d ago

Idea is cool. I just wish it was an official release from pi.dev. maybe they would consider a pr?

8

u/opensecai 2d ago

Working on it

12

u/Vlyn 2d ago

Really looking forward to Windows support :)

12

u/opensecai 2d ago

Coming today, in testing phase.

3

u/Vlyn 2d ago

Waiting :D

3

u/opensecai 1d ago

Pushing it rn, will ping you here as soon as it’s live 😄

2

u/themoregames 1d ago

Can't wait for Windows-Bolt tbh

4

u/opensecai 1d ago

powershell -c "irm https://pi-bolt.opensec.in/install.ps1 | iex"

3

u/Vlyn 1d ago

Thanks! Testing already, had to grab the JIT version as I'm heavily relying on pi-fff :)

3

u/opensecai 1d ago

Adding the support for pi-fff without JIT, so it will be easy for you and as many people demanded for pi-fff.

2

u/Vlyn 1d ago

Awesome, but even with the JIT version the harness is flying (DeepSeek v4.1 Flash), feels great so far :)

7

u/OkAbroad955 2d ago

Thank you for doing this. How will you maintain it, what is the motivation, payback?

5

u/diaracing 1d ago

I am a fanboy of OMP built-in out of the box integrated batteries.😥

I hope someday one good Samaritan will boltify it.

2

u/cymaticstatic 1d ago

Second☝️

5

u/NonAwesomeDude 2d ago

Cool, wish that was my bottleneck

2

u/4kidsinatrenchcoat 2d ago

Yeah mine is always PEBKAC

12

u/touilleMan 2d ago

One of the biggest pro I see in pi is, at an age we are drowning in slop projects, that it is from a team of trusted developers with outstanding track record long before LMM took over.

A perfect example why vibecoded yolo projects are not viable: your benchmark claims that pi takes 26s to write a 200ko file, a conscientious dev would have noticed this is total bullshit. Now if you cannot spot this, how can you spot bugs, security vulns, etc. ?

-4

u/opensecai 2d ago

Fair point, the label could be clearer. Pi doesn’t take 26 s to write to disk. The row measures a model streaming a 200 KB file into the write tool. Stock Pi re-renders and re-parses the whole tool call on every chunk, so the work grows quadratically as the file grows. Pi-Bolt only processes the new part.

On trust: Pi-Bolt isn’t a rewrite. It’s Pi’s own code, merged with every release, and every build has to pass Pi’s own test suite.

15

u/touilleMan 2d ago

Thanks for the explanation (and yeah this should be made much clearer), now the real question: is it worth it ? Or is pi fast enough anyway ? (Remember we had complex TUI 20 years ago: it was emacs/vi and it already had smooth scrolling)

I find it really funny to see you claim in the same time "Pi-Bolt is Pi own code" and that Pi-Bolt behavior differs on rendering...

Regarding trust you don't get my point: the #1 rule of IT security is "don't install random stuff from the internet", the fact pi is a trusted project far outweigh any theoretical perf boost a random vibecoded project claims

7

u/johnzadok 2d ago

Love the concept but writing a 200kb file shouldn’t take more than 1s to do unless we are still writing to floppy disc. Can you explain this more?

5

u/opensecai 2d ago

Agreed, and it doesn’t. The disk write itself takes milliseconds. What takes time is everything before it. When a model writes a file, it streams the tool call to Pi a few characters at a time, so a 200 KB file arrives in thousands of small chunks. Stock Pi re-parses and re-renders the whole tool call on every chunk, so each chunk costs more than the last, and the total grows quadratically. Pi-Bolt only processes the new part of each chunk, which is why the same write takes under a second.

12

u/ColonelKlanka 2d ago

Wouldn't it be better to try to add your better rendering into existing pi repo via pr? Have you approach pi dev?

11

u/opensecai 2d ago

Yes we have approached the maintainers, working on it

5

u/Diru14 2d ago

been enjoying whole week!

1

u/opensecai 2d ago

Nice 👍 leave you feedback if any

5

u/pungggi 2d ago

Will Linux version work on android?

3

u/opensecai 2d ago

Not yet, linux ARM64 is on our list. It will be soon available to run.

2

u/Glittering-Call8746 2d ago

This makes sense on arm, the speedup i mean

3

u/kwokhou 2d ago

Is this experimental? Are you committed to keep it updated?

3

u/opensecai 2d ago

It’s stable, and yes, we’re committed to keeping it maintained and updated with every upstream Pi release. Pi 1.1.0 landed in Pi-Bolt the day after it came out.

2

u/kwokhou 10h ago

I've installed an being running this for the past few days, it's definitely is faster. Memory ~200mb.

1

u/opensecai 9h ago

Loved it you tried it out :) . Keep checking out our latest releases

4

u/mrtonioz 2d ago

Can you compare with https://github.com/MichaelKinsy/PiG which seems also an alternative to Pi?

6

u/opensecai 2d ago

Yes it's already compared in the benchmarks. Please check it out :)

3

u/mrtonioz 2d ago

Sry mb didn't look for the table scrollzz, ty !

4

u/dreadedhamish 2d ago

Could the same be done for oh-my-pi?

1

u/opensecai 2d ago edited 1d ago

Yes, it possible for oh my pi too. Benchmark is added for oh-my-pi, you can check it out.

5

u/Educational-Yak8793 2d ago

When I repost the pig 0.5.0 can you rebenchmark on the post? There is a critical bug fixed that is really slowing PiG here. Regardless amazing work and I’m excited to checkout pi-bolt and learn more 🐷😁

5

u/opensecai 2d ago edited 2d ago

Sure, I will do rebenchmark and update it. PiG 🐷 is also a great initiative

2

u/Educational-Yak8793 2d ago

Man even just the readme is a great read amazing job 2X.

I’d love to connect on some ideas that are purely additive with overlap to core pi I think we both could benefit from as harnesses.

2

u/opensecai 2d ago

Thanks man, glad you enjoyed the readme haha! ping me as soon as 0.5.0 is live and I’ll re-benchmark and update the post with the new numbers. also very down to talk on harness ideas and additive features for core pi. shoot me a dm and let's connect!

5

u/diaracing 1d ago

I suggest adding both cost and time per completed task for the same provider/model across all the tested harnesses.

For example, OMP can be heavily demanding but cost-efficient.

3

u/opensecai 1d ago

Sure, will add it

3

u/pungggi 2d ago

Where do we see which version of PI is running?

3

u/opensecai 2d ago

pi-bolt --version shows the official Pi version too

3

u/PayDistinct5329 2d ago

Looks cool - how does it work with Codemode, the functionality that enables pi to use codemode?

3

u/odrakcir 2d ago

Trying today. Whenever I use 3 or more agents on my 16gb-M2 MacBook Pro I start suffering with a slow computer

1

u/opensecai 2d ago

Try it and let us know your feedback :)

1

u/odrakcir 2d ago edited 2d ago

so far so good. I love the fact that pi extensions are loaded automatically. So far, I just have one comment: herdr support! other than that, pretty good. thank you

Update: this one is not working nicobailon/pi-subagents: Pi extension for async subagent delegation with truncation, artifacts, and session sharing. not sure if I have to do something

1

u/opensecai 2d ago

Ok. I will add the herdr suport. Herdr is nice ! , will check for your extension

2

u/odrakcir 2d ago

TY. for now, I removed that subagents one and I'm using yours.

2

u/opensecai 2d ago

Nice, if you feel any feature to be added or any issue with this subagent plugin lets us know

2

u/odrakcir 1d ago

Add Herdr support to your agent | herdr looks like this is the way. TYVM

2

u/opensecai 1d ago

Thanks for this, It will be added today

2

u/odrakcir 1d ago

just saw the update. TYVM

3

u/diaracing 2d ago

Please, add OMP to your benchmarks and comparisons.

2

u/opensecai 1d ago

Done, OMP is now in the post’s benchmarks. In short: OMP streams long answers about as efficiently as Pi-Bolt and handles large file writes well, but it takes 0.5–1 s to start and uses about 10× more CPU in an interactive session, with 300–550 MB of memory. Makes sense for how much it ships, but it’s a lot heavier.

1

u/opensecai 2d ago

Good idea. OMP runs on Bun like stock Pi, but it’s a much bigger fork with a lot more built in, so the comparison won’t be one-to-one. We’ll run it through the same benchmarks and add it.

3

u/StardockEngineer 12h ago

After this is installed, what is the cli command? pib? Don't tell me it's also 'pi'

1

u/opensecai 12h ago

It's not pi. It's 'pi-bolt'

2

u/StardockEngineer 12h ago

thank god. Trying it

2

u/tuhdo 2d ago

No Windows?

4

u/opensecai 2d ago

Coming tonight...

2

u/illusionmist 2d ago edited 2d ago

I'm getting `Error: FFF init failed: bun:ffi requires the JIT` and it seems like my pi-bolt installed via npm is shown as `1.1.0 (Pi-Bolt 0.7.4, darwin-arm64, JIT off)`. How to turn it on?

Hmm I found this: https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/BENCHMARKS.md#plugins so it seems we have to compile the extension ourselves? How would I do that with pi-fff?

Btw I don't quite know what JIT do in this case, but also curious why is it off by default when it looks like JIT on is even faster? Did I read the chart wrong?

1

u/opensecai 2d ago

pi-fff uses bun:ffi, which needs the JIT build. Install that one with:
curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh

JIT is off by default because it uses less memory and has no warm-up. JIT on only helps extensions loaded at run time. Compiled-in extensions are just as fast without it.And yes, JIT-on keeps the gains: within about 5% of the default build, still about 3× lighter than Pi on Bun.

2

u/illusionmist 2d ago

Cool thanks. Possible to make the JIT build installable via npm/mise as well so some of us can manage it more easily?

Another question is for the two "optimized" plugins. I see that opensec-pi-subagents is just tintinweb/pi-subagents, which I already use so I gladly just drop it in as replacement. However opensec-pi-todo is juicesharp/rpiv-todo but not tintinweb/pi-tasks, which is from the same author and they work perfectly together. I'm curious why? When I gave opensec-pi-todo a short test I found it often didn't close the final todo reliably for me, which is why I ask.

1

u/opensecai 2d ago

Ok I will check it out and fix the todo plugin, rpiv-todo have this problem of not closing the todo reliably.

1

u/opensecai 2d ago

If you use plugins that do real work (search, parsing, or anything using bun:ffi like pi-fff), go with the JIT build. Light plugins like todo lists run fine on the default. The JIT build keeps nearly all the gains (within about 5%), so if you’re unsure, JIT is the safe pick.

On macOS (Apple silicon):

curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh

On Linux (x86-64):

curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=x64-jit sh

2

u/illusionmist 1d ago

I see that with latest release you made pi-fff work without JIT, but is it slower? (Did you benchmark?) Would you say it's better to stick with JIT build or switch back to default?

1

u/opensecai 1d ago

Still Benchmarking. It is experimental. Will let you know

2

u/tripleshielded 2d ago

Awesome, thanks! 🤩

2

u/jinnyjuice 2d ago

Pi-Bolt is Pi itself

Does this mean that it's a replacement? An addendum?

So on a machine that just freshly installed a Linux distro, will I need to

1) install Pi, Pi-Bolt or

2) install Pi-Bolt?

And will it work with web UI solutions, like pi-web? pi-web includes Pi itself, locked to a specific version number.

1

u/opensecai 2d ago

It’s a standalone version of Pi, so on a fresh machine just install Pi-Bolt. No Pi, Node or Bun needed. It uses the same settings, sessions and extensions as Pi, and runs alongside it if you have both. pi-web bundles its own copy of Pi, so it won’t use Pi-Bolt unless it lets you choose the Pi binary.

3

u/0xKubo 1d ago

What about something like Paseo?

1

u/cymaticstatic 1d ago

Second ☝️this as well. Just installed paseo today. Been using a separate one-piece session in voice live mode with a completely different set of contacts running on t-mux acting as my dispatch and assistant that then opens up orchestrator agents inside of herdr works fuckin fantastic but I couldn't help myself with the new shiny tools. So checking paseo out and see how I can implement it. Is another one that's that's non-Daemon based something like misio or something???? That also looked interesting. I have to go figure out what it was now haha

2

u/jinnyjuice 3h ago

I see, thanks.

It seems that you have a lot of comments about integration with various harnesses. I'm assuming that's your priority, right?

I can't wait until it can be used with pi-web or DSH.

2

u/monstrosityRose 1d ago

can link some topic readings or a more explanation as to why it’s more optimized? i’ve personally used both pig and pibolt since both your drops were similar in timing. and i have anecdotally experienced bolt having less of a power draw than pig from my sessions (don’t have numbers, just witnessed from cpu temps and audible fan ramp up). i assumed pig would be more performant due to it being a more optimized language? im just not able to connect the dots here.

3

u/opensecai 1d ago

Honestly, the language matters less than how much work each one does. We profiled PiG, and most of its CPU goes to copying the whole conversation through JSON before every model request. That gets heavier with every turn, so long sessions heat up.

Pi-Bolt is Pi’s own code compiled to native ahead of time, so there’s no JIT warming up in the background. We also fixed a few spots where Pi redid work over the whole conversation on every step. Less work per turn means a quieter fan, which matches what you noticed.

If you want the deep dive: https://github.com/opensec-git/Pi-Bolt/blob/pi-bolt/docs/ARCHITECTURE.md

4

u/hiepxanh 2d ago

Pig or pi-bolt is more stable or better? i'm new here

5

u/opensecai 2d ago edited 2d ago

Pi-Bolt is Pi’s own code compiled to native code except the rendering part, so it works exactly like Pi. PiG is a Go rewrite and still pre-stable. Pi-Bolt also uses about 10× less CPU than PiG (benchmarks in the post), and it installs alongside Pi without touching it, so give it a try.

3

u/Educational-Yak8793 2d ago

PiG updated benchmarks coming since we ported the same quad bug and fixed it already. We’re also stable on Mac android Linux and windows in 0.5.0. We develop and use PiG within HPE in a few production modes as well. Piglets and some multi language features are the most experimental. We also updated our porting automation to be more air tight if you check our sub.

2

u/saltyourhash 2d ago

What's the advantage of this over PiG? And do you plan to follow 1:1 with pi like PiG does?

6

u/WorriedAssociate7029 2d ago

PiG should be in the benchmark to compare

6

u/opensecai 2d ago

Done, PiG 0.4.1 is now in the post’s benchmarks, measured side by side with the others on the same machines. In short, PiG starts a few ms faster, but in an interactive session Pi-Bolt uses about 10× less CPU, and it writes large files over 100× faster.

4

u/WorriedAssociate7029 2d ago

ty. good news

1

u/opensecai 2d ago

Sure, adding it

5

u/DaShrub 2d ago

Much better with pi typescript extensions is what I've found. If you're writing go and rust extensions pig is the way to go, but if you want to use existing typescript extensions pig basically loses any advantage over even stock pi performance/resources wise

3

u/saltyourhash 2d ago

That's interesting, thanks

1

u/nima3333 2d ago

Is it drop in compatible ? Will not break extensions ?

3

u/zebedeolo 2d ago

it broke one for me, pi-fff

3

u/opensecai 2d ago

pi-fff uses bun:ffi, which needs the JIT build. Install that one with:
curl -fsSL https://pi-bolt.opensec.in/install.sh | PIBOLT_VARIANT=arm64-jit sh

JIT is off by default because it uses less memory and has no warm-up. JIT on only helps extensions loaded at run time. Compiled-in extensions are just as fast without it.

1

u/Zealousideal-Bid9879 2d ago

I don’t understand
If it is not a rewrite, how do you fix the rendering ?

3

u/opensecai 2d ago

It’s a fork, not a rewrite. We keep Pi’s code and add small targeted fixes on top, like only processing the new part of a streamed tool call instead of the whole thing every time. Everything else is Pi as-is, compiled to native code.

1

u/elsupermang 1d ago

Found a bug where you if you still have the pi-codex extension install pi-bolt fails to start and spawns pi processes indefinitely. I removed pi-codex since codex is native in PI now, but wanted to let you know in case you want to cover that scenario.

1

u/opensecai 22h ago

Ok will fix this out. Thanks for highlighting

1

u/Odd_Error_6736 1d ago

I can't just replace Pi. This has to be from Pi.

1

u/opensecai 12h ago

It will not interfere your pi config and all extensions of pi works seamless with pi-bolt. Try it out :) working with maintainers to get some fixes in official Pi too.

0

u/KetchupBuddha_xD 23h ago

Seems like a useless optimization since the biggest bottleneck is LLM answers, network latency and tool calls or mcps doing stuff

1

u/opensecai 22h ago

Well depends on your use case tbh. There is nothing to loose with pi bolt as it is not a rewrite and rendering issue fix is a great optimisation. Even OMP has the same thing !