r/PiGCodingAgent • • Oct 19 '26

News PiG 0.5.0 is out 🐷 up with the latest Pi, far faster/ligher, and Piglets can change PiG itself so you decide how lean or not your base harness is.

Enable HLS to view with audio, or disable this notification

**edit: forgive the "ligher" typo, was a little too excited to press post :)

A couple of weeks ago I posted that 0.5.0 was en route and that I thought you would like it. It is out now 🐷 Here is what landed from that list, plus a few things that grew along the way.

  • Piglets. Piglet build can strip features out of the base harness or out of a prior Piglet, and a stripped Piglet can be the base for the next one. Piglets keep getting core updates for the parts they kept. pig-tern shipped as planned. pig-core is a lean base: it keeps only read, bash, edit and write.
  • Parity and porting. The port-map ledger is maintained mechanically now, and every row is closed. PiG follows Pi 1.3.0 up to Pi commit 1402973a, and every one of Pi's semantic interfaces is covered and held by a zero-gap gate in CI.
  • Evals. The eval and benchmark tooling became buffon, an open benchmark arena for the whole Pi community. The numbers below come from it, and you can rerun them.
  • Quality of life. pig extension upgrade rewrites older Go extensions for the new SDK, plus a lot of great contributions from the herd.

Release notes: https://github.com/MichaelKinsy/PiG/releases/tag/v0.5.0

Blog post with the full tables: https://pi-in-go.dev/blog/pig-0-5-0/

Repo: https://github.com/MichaelKinsy/PiG

Piglets (Pigpen): https://github.com/MichaelKinsy/pigpen

Buffon: https://github.com/MichaelKinsy/buffon

Performance

All numbers are median CPU ms from buffon on one machine, on the 0.5.0 release candidate. Lower is better.

Task PiG 0.5.0 PiG 0.4.1 Pi-Bolt Pi (Node)
--version 5 18 11 282
One prompt 16 64 44 424
One prompt with tools 29 119 56 518
RPC session 71 438 108 675
Interactive start 61 145 55 536
Resume a long session 69 137 50 443
Streaming a long answer (TUI) 403 2,451 925 2,850
One prompt, 10 TypeScript extensions 934 2,191 109 676
RPC, 10 TypeScript extensions 2,016 9,430 194 950

0.5.0 beats 0.4.1 on every row. Without extensions it beats Pi on every row. Pi-Bolt is a little ahead on interactive start and long-session resume.

The extension rows are a real loss. PiG starts a separate Node host for TypeScript extensions, and that adds a fixed cost. So I also ran the same extensions ported to Go and fused into a Piglet. This is my own run, not buffon, and it is labelled provisional. The Go and TypeScript extensions were checked to produce the same commands, tools, results and messages.

Scenario TS extensions Go extensions in a Piglet No extensions
Print, 10 extensions 941 67 16
RPC, 10 extensions 2,004 521 70

In print mode the Go Piglet is ahead of Pi-Bolt (67 against 109). In RPC mode Pi-Bolt is still ahead (194 against 521). Scripts and raw data are attached to the release as go-ext-comparison.tar.gz.

Most of the speed came from removing a few patterns. A streamed file write used to re-highlight the whole file for every new piece, and tool-call arguments were reparsed from the start on every token, which made long streams quadratic. Now PiG keeps state and processes only the new part. Every speed-up has to keep output byte-identical to Pi.

Piglets and binary size

Every built-in part of PiG is now a slot. A Piglet keeps a part, replaces it with Go code, or strips it so it leaves the binary. Stock PiG is the normal pig binary with everything built in. pig-core is a Piglet that keeps only read, bash, edit and write.

Binary Size
Stock PiG 0.5.0 70.3 MB
Go extensions only (TypeScript, Python and Rust runtimes stripped) 61.4 MB
pig-core 39.4 MB

Sizes are from linux/amd64 builds of the release commit. Slots can also replace a part: pig-tern fills the frontend slot so the same PiG draws natively in the Tern terminal.

Durable

Durable has come up a lot here, so here is how I think about it. Pi Durable is a stateful agent whose state lives on a server, separate from the client (TUI, web UI, mobile) and from the chat history. A session keeps going when a client disconnects, and any client can attach to it. PiG runs Durable natively in Go. In 0.5.0 its cost no longer grows with your history, and a session finds its next wake without walking every live task. The Cloudflare Durable host follows Pi 1.3.0 and runs its suite in CI. https://pi-in-go.dev/blog/pig-0-5-0/

buffon

buffon is a benchmark arena I made for the Pi community. Every harness gets the same tasks and the same Pi extensions on the same machine. You can rerun it, point it at your own tools, or add to it. It builds on the open work of Pi, Pi-Bolt, durable-bench and everyone who publishes their evals.

Try it

go install github.com/MichaelKinsy/PiG/cmd/pig@latest

Custom models in models.json now need an api on the model or its provider, as in Pi. Go SDK users can run pig extension upgrade to rewrite older extensions.

Not done yet

TypeScript extensions are slower than in Pi and Pi-Bolt, as above. The TinyGo Durable build used for Cloudflare starts cold slower than Pi's, and the normal pig binary does not use it. The first code-mode use in a process costs a few ms more, and the OAuth credential store is not available to Node extensions yet.

PiG is MIT licensed and free, with no hosted or paid tier holding anything back. Big thanks to the Pi team, to Pi-Bolt for its open benchmark suite, to durable-bench, to everyone who posts their evals in the open, and to the herd for the contributions and issues.🐷

34 Upvotes

10 comments sorted by

3

u/balcsida Oct 19 '26

Yess, let's goo

3

u/Educational-Yak8793 Oct 19 '26

Thank you for your help this release! 🐷

2

u/Equivalent_Idea8839 Oct 19 '26

I'm most impressed by the movie. How did you generate it exactly? Please give the steps.

1

u/Educational-Yak8793 Oct 19 '26

I hope you try the code too 😄 But I had PiG create it from a prompt and a hyper frame extension I'm working on. I'll try to get it to a point worth sharing soon!

2

u/DanielSReichenbach Oct 20 '26

Time to upgrade my extensions 🥳

1

u/Educational-Yak8793 Oct 20 '26

Let me know what you think of the release, hope you like it 😄

2

u/ganuong69 Oct 20 '26

How to port the Js extension to Go? Any tutorial or skill?

1

u/Educational-Yak8793 Oct 20 '26

good question! first thing just incase you didn't know, you don't have to port, PiG runs Pi's js/ts extensions as they are. porting to Go is for when you want it faster, no Node, or fused into a single Piglet binary. for the porting there's a skill and a Piglet for it in Pigpen:

`pig piglet add npm:@pi-in-go/pigpen-piglet-pig-porter`

`pig --piglet pig-porter`

Then point it at the extension and it ports it to Go with our extension SDK, and checks the Go version behaves the same as the original by running both through the same scripted scenarios. if you just want the skill on its own it's npm:@pi-in-go/pigpen-extension-port. and if you'd rather write one by hand the guide is at pi-in-go.dev/docs/latest/first-extension 🐷

1

u/ganuong69 Oct 20 '26

Thanks, I'm looking for pure Go for speed, you should make an extension homepage like Pi for contributor

1

u/Educational-Yak8793 Oct 20 '26

Of course, and we do have a similar page as well here - https://pi-in-go.dev/packages/

Happy to make updates however to make it more clear if you have ideas :)