← Back to archive

Repo of the Day

dimetron/pi-go: Go implementation of AI coding agent

Published: Nov 12, 2026

Open repository ↗

Go implementation of AI coding agent. Contribute to dimetron/pi-go development by creating an account on GitHub.

Summary

pi-go is a Go implementation of an AI coding agent built on Google ADK Go. It combines multiple LLM providers with project-scoped file, shell, and Git tools, LSP integration, persistent sessions, subagents, and editor-facing RPC modes.

What it is useful for

Engineers can use pi-go for interactive repository work, such as explaining unfamiliar code, finding TODOs, editing files, running searches, or preparing a conventional commit. Its read, write, edit, shell, grep, find, tree, and Git tools are restricted to the project directory through Go’s os.Root, so an agent’s file operations are scoped to the checkout.

The same agent can be placed in automation pipelines. Print mode handles one-off prompts, JSON mode emits one JSON object per line for structured consumers, Unix-socket mode exposes JSON-RPC 2.0, and stdio RPC mode supports pi-compatible NDJSON clients. JSON output groups streamed text by sentence, so consumers reconstruct the response by concatenating delta fields.

Other documented workflows include:

  • Resuming work with pi --continue or pi --session <id>.
  • Switching between default, fast, planning-oriented, and other named model roles.
  • Running process-based subagents such as explore, plan, reviewer, and task.
  • Using language-server formatting and diagnostics for Go, TypeScript/JavaScript, Python, Rust, and Java.
  • Adding individual skills, Claude Code-compatible plugin bundles, shell hooks, and MCP servers.
  • Maintaining contextual project memory through the SQLite-backed Memory Palace.

Setup requires Go 1.27+ and either an LLM provider API key or a running Ollama instance. Provider selection is inferred from model names; unrecognized names are rejected instead of guessed. The Windows installer supports windows/amd64 only, and Windows installations without bash.exe require PowerShell-compatible commands. Locally built binaries also have no release attestation, so pi verify reports them as unverified by design.

How engineers can use it

Install the pi binary with the documented Go command:

go install github.com/dimetron/pi-go/cmd/pi@latest

Ensure GOPATH/bin is on PATH, configure a provider with pi setup or export its API key, then start the agent inside the repository you want it to inspect:

pi --model claude:sonnet

For non-interactive work, examples include:

pi --mode print "explain this codebase"
pi --mode json "list all TODO comments"
pi --mode socket --socket /tmp/pi-go.sock

Inside an interactive session, slash commands such as /plan, /commit, /branch, /compact, and /agents support longer repository workflows.