---
title: ompig-slim
summary: A self-contained Go coding agent that brings PiG's runtime and a focused set of omp features into one native binary.
date: 2026-11-11
kind: tool
link: https://github.com/tmih06/ompig-slim
draft: false
---

![ompig-slim banner](/uploads/ompig-slim-banner.svg)

`ompig-slim` is a native Go coding agent built from [PiG's runtime](https://github.com/MichaelKinsy/PiG) and a curated set of features from [omp](https://github.com/can1357/oh-my-pi). It keeps the Pi layout and storage conventions, including `~/.pi/agent` for global state and `.pi` for project state, so existing sessions can carry over.

The result is a single executable rather than a JavaScript application with a separate runtime and dependency tree. The current release targets Linux and macOS on x64 and arm64.

## What made it worth building

The useful parts of an agent are often surrounded by startup cost: a runtime to load, packages to resolve, and a large process that stays resident after the work begins. `ompig-slim` puts the runtime in Go and keeps the executable self-contained.

The checked-in comparison uses a synthetic loopback OpenAI-compatible model on Linux arm64 with four reported CPUs. In that workload, the 0.1.0 binary had these median measurements:

```openui
root = RecordsTable("Measured comparison", ["Metric", "ompig-slim", "omp", "pi"], [["Startup", "121 ms", "2,176 ms", "1,129 ms"], ["Turn", "21 ms", "44 ms", "36 ms"], ["Peak RSS", "179 MiB", "499 MiB", "446 MiB"], ["Installed size", "73 MB", "419 MB", "271 MB"]])
```

These numbers describe harness overhead on one host, not model quality or provider latency. The full workload and evidence are in the [benchmark report](https://github.com/tmih06/ompig-slim/blob/main/benchmarks/COMPARISON.md).

## The working set

The binary includes the agent loop, model and account routing, a terminal UI, skills, subagents, and the tools needed to work in a repository. Some of the pieces that matter most in daily use are:

- `read`, `bash`, `edit`, `write`, `grep`, `find`, `web_search`, `codemode`, and `todo`
- model roles, fallback chains, OAuth, API keys, custom endpoints, and quota-aware account routing
- JSONL and RPC modes for integrations that do not use the terminal UI
- `@path` and `@url` mentions that load context before the model runs
- session state compatible with the Pi directory layout
- an optional Agent Hub for live subagents

The project also publishes agent state as JSON under the shared Pi state directory. A multiplexer, status bar, or notifier can watch those files without knowing how the agent itself works.

## A small interface, with room for integrations

The normal path is an interactive terminal session:

```sh
cd ~/code/thing
ompig-slim
```

An opening prompt, a one-shot answer, a resumed session, and a restricted tool set are all ordinary command-line forms:

```sh
ompig-slim "list the failing tests"
ompig-slim -p "review this diff"
ompig-slim -c
ompig-slim --mode rpc
ompig-slim --tools read,grep,find
```

For external status tools, each running session writes a small `status.json` file containing its state, mode, session id, process id, and update time. The [Herdr adapter](https://github.com/tmih06/ompig-slim/tree/main/extensions/herdr) is installed separately and turns that state into a sidebar, tab, and workspace rollups.

## Distribution

The installer needs no Go toolchain or `sudo`:

```sh
curl -fsSL https://raw.githubusercontent.com/tmih06/ompig-slim/main/scripts/install.sh | bash
```

It installs to `~/.local/bin/ompig-slim`, supports Linux and macOS on x64 and arm64, checks the release archive against its published SHA-256, and can pin a version. An installed binary can update itself in place with `ompig-slim update` or `ompig-slim upgrade`.

That checksum catches corruption and a truncated download. It is not a signature, so the release and its checksum still come from the same release channel.

## Remote broker

A separate broker executable can hold provider credentials and synchronize settings between clients. Inference and tools stay on each client; the broker owns the SQLite vault and refreshes OAuth tokens on the host.

```sh
docker run -d --name ompig-broker -p 127.0.0.1:8765:8765 \
  -e OMPIG_BROKER_TOKEN -v ompig-profile:/data \
  ghcr.io/tmih06/ompig-slim-broker:<version>
```

Clients connect from `/login` or with `ompig-slim broker setup`. Standalone and broker modes use the same `agent.db` schema, so a profile can move between them without a logical export and import.

## Development

The repository keeps the application layer small and maintains its PiG dependency in `vendor/`, where project-specific runtime patches live. The main checks are exposed through the Makefile:

```sh
make check
make race
make smoke
make build
```

`ompig-slim` is an independent MIT-licensed project, not an official PiG, Pi, or omp release.
