pi

An integration that runs the Pi open-source coding agent inside an isolated agentkernel sandbox. The sandbox keeps installed packages and files between commands during the session.

In plain words
What is it for?
Use it to launch Pi, run its coding tasks in a sandbox, and work with a project whose files and dependencies persist across commands.
Why use it?
It lets Pi execute shell commands away from the main machine while retaining the working state it builds during the session.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/thrashr888/agentkernel/pi
Clone the repo
git clone --depth 1 https://github.com/thrashr888/agentkernel
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,171 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01171
Opus 5 $0.00000 $0.00585
Sonnet 5 $0.00000 $0.00234
Haiku 4.5 $0.00000 $0.00117

Measured 2d ago against content hash 45b261c601c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

pi scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

# Or: curl -fsSL https://raw.githubusercontent.com/thrashr888/agentkernel/main/install.sh | sh

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# Or: curl -fsSL https://raw.githubusercontent.com/thrashr888/agentkernel/main/install.sh | sh
docs/agents/pi.md · 200 lines

How it starts

The opening of the file, as written. The whole thing — 200 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pi

Run Pi coding agent with agentkernel for isolated code execution.

Quick Start

Pi is an open-source coding agent with its own extension system. The agentkernel extension overrides Pi's built-in bash tool so every shell command runs in a microVM sandbox instead of on your machine.

# 1. Start agentkernel API server (pick one)
brew services start thrashr888/agentkernel/agentkernel   # runs in background, survives reboots
agentkernel serve                 # or run manually in a terminal

# 2. Install the extension (pick one)
pi install npm:pi-agentkernel     # via Pi's package manager (recommended)
agentkernel plugin install pi     # or via agentkernel CLI

# 3. Launch Pi — the extension loads automatically
pi

Extension Integration

Unlike MCP-based agents, Pi uses a native extension that replaces the built-in bash tool. When the extension loads:

  1. A persistent sandbox is created for the session
  2. Every bash call the LLM makes runs inside that sandbox via POST /sandboxes/{name}/exec
  3. State persists between calls — installed packages and files carry over
  4. The sandbox is removed when the session ends

If agentkernel is not running, the extension falls back to local execution.

The extension also provides:

Tool Description
bash Built-in tool override — routes all shell commands through the sandbox
sandbox_run One-shot command in a fresh sandbox (clean environment each time)
Command Description
/sandbox Show current sandbox status

Install

Via Pi's package manager (recommended):

pi install npm:pi-agentkernel

Or via agentkernel CLI:

agentkernel plugin install pi

The first method installs globally. The second creates .pi/extensions/agentkernel/ in your project.

Setup

1. Install agentkernel

brew tap thrashr888/tap && brew install agentkernel
# Or: curl -fsSL https://raw.githubusercontent.com/thrashr888/agentkernel/main/install.sh | sh

Read the full file on GitHub · 200 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 200 lines · 0 tokens per session scan C 45b261c601c1

Subscribe to this mod's changes

pi is an agent published in the GitHub repository thrashr888/agentkernel (58 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,171 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.