A faithful Go
implementation
of Pi.
Tracks Pi behavior through explicit parity evidence.
Pi deserves a
Go implementation.
Pi is one of the most thoughtfully designed coding agents available today. PiG aims to faithfully carry its behavior, architecture, and user experience into the Go ecosystem.
Pi remains the reference implementation.
PiG exists to make Pi accessible anywhere Go shines.
PiG · a faithful Go implementation of Pi
❯ make this project feel like me
I’ll start with your project instructions,
then build on what’s already here.
Your tools. Your models. Your workflow.
The same small core. The same room to make it yours. The features below describe the upstream Pi experience that guides PiG’s compatibility work.
Our compatibility philosophyChange the harness, not your workflow
PiG is not a sealed product. Add a command, tool, provider, workflow, or UI through an extension Resource.
Use source mode while you develop. Use a Piglet to compose the capability into an agent application.
Explore extensionsPiG · a faithful Go implementation of Pi
❯ add a /review command for my team
Registered /review.
Checks your diff against team conventions.
/reload → ready to go
15+ providers, hundreds of models
Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, Groq, Cerebras, xAI, Hugging Face, Kimi For Coding, MiniMax, NVIDIA, OpenRouter, Ollama, and more. Authenticate via API keys or OAuth.
Switch models with /model. Cycle through scoped models with Ctrl+P.
PiG · a faithful Go implementation of Pi
❯ /model
Model changed to Claude Opus 5.5.
Same session. All your context.
Tree-structured, shareable history
Sessions are stored as trees. Use /tree to navigate to any previous point and continue from there. All branches live in a single file. Filter by message type, label entries as bookmarks.
Export to HTML with /export, or upload to a GitHub gist with /share and get a shareable URL.
PiG · a faithful Go implementation of Pi
❯ /tree
Continuing from “Add provider filters”
Context engineering
Pi’s minimal system prompt and extensibility let you do actual context engineering. Control what goes into the context window and how it’s managed.
AGENTS.md · Project instructions loaded at startup.
SYSTEM.md · Replace or append to the default system prompt.
Compaction · Customize how older messages are summarized.
Skills & prompts · Load capabilities on demand, with reusable Markdown templates.
PiG · a faithful Go implementation of Pi
❯ help me work on this project
The right context, when you need it.
Steer or follow up
Submit messages while the agent works. Enter sends a steering message, delivered after the current tool and interrupting remaining tools.
Alt+Enter sends a follow-up that waits until the agent finishes.
PiG · a faithful Go implementation of Pi
❯ refactor the authentication module
Keep the existing public API.
I’ll preserve the public interface
while updating the implementation.
Four modes. Your way in.
Interactive · The full terminal UI experience.
Print / JSON · One-shot queries for scripts and structured event streams.
RPC · A JSON protocol over stdin/stdout for process-based integrations.
SDK · Embed PiG in Go applications.
Build with the SDKPrimitives,
not product branches.
Extensions are ordinary Go, Rust, Python, or Node Resources. Piglets compose them into named agent applications.
Build tools, commands, providers, policy gates, MCP adapters, custom UI, and derivative harnesses without adding product behavior to Stock PiG.
pig extension init ./review --lang gopig --piglet ./agents/reviewer.yaml
What stays out of the core
Stock PiG provides generic extension and Piglet contracts instead of dictating each product workflow. Put application behavior in Resources and select it through a Piglet.
No built-in MCP product
Select an MCP adapter extension and supply deployment bindings outside portable Piglet source.
No built-in sub-agent product
Compose a reviewed extension or separate agent application through a Piglet.
No permission product policy
Use an operating-system boundary or select a policy extension that fits your environment.
No built-in plan workflow
Use files, skills, or an extension selected by your agent application.
No built-in to-do workflow
Use a project file or select a focused extension.
No product-specific background shell
Use an explicit terminal or extension policy with owned lifecycle.
Improve PiG.
Start with observed upstream Pi behavior. Report a reproducible difference, preserve attribution, and support compatibility claims with parity evidence.
One ecosystem.
More places to run.
Pi came first. PiG carries its ideas, architecture, and experience into Go. Pi remains the reference implementation.
Where practical, PiG follows upstream behavior and minimizes divergence.
Where PiG began.
Michael Kinsy created PiG. The project was originally developed at Hewlett Packard Enterprise.
PiG is maintained independently from upstream Pi. Pi remains the reference implementation.
Built on the work of Pi.
PiG would not exist without the work of the Pi maintainers and contributors.
Their vision, architecture, and commitment to open source created the foundation that PiG builds upon.
Thank you.