pi

pi is an agent for coding agents from musistudio/claude-code-router. It costs 0 tokens per session (644 once invoked), scanned A, original, MIT.

A command-line coding agent named Pi that can use a provider and model configured in CCR Desktop. CCR is a desktop tool for setting up and launching coding agents.

In plain words
What is it for?
Use it to create Pi profiles, choose models, and start separate Pi sessions from the terminal.
Why use it?
It lets you manage Pi's model and launch settings from CCR instead of configuring each command manually.

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/musistudio/claude-code-router/pi
Clone the repo
git clone --depth 1 https://github.com/musistudio/claude-code-router

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pi

README.md
[![agentmods](https://agentmods.dev/badge/agents/musistudio/claude-code-router/pi.svg)](https://agentmods.dev/agents/musistudio/claude-code-router/pi)
Your own site
<a href="https://agentmods.dev/agents/musistudio/claude-code-router/pi"><img src="https://agentmods.dev/badge/agents/musistudio/claude-code-router/pi.svg" alt="Measured on agentmods" height="20"></a>
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 644 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00644
Opus 5 $0.00000 $0.00322
Sonnet 5 $0.00000 $0.00129
Haiku 4.5 $0.00000 $0.00064

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

Security

Grade A, and why

pi scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/src/content/docs/en/configuration/agents/pi.md · 71 lines

How it starts

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

Who this is for

Pi is a coding agent that selects its provider and model from the command line. In CCR it is CLI only and always uses Only opened from CCR.

Use this page to route Pi to any CCR provider or Fusion model, or to run separate Pi sessions.

New to CCR? Add a provider and model first. See Add a provider and the Agent Config overview.

Prerequisites

  1. CCR Desktop is running with at least one provider + model configured.
  2. Pi is installed (available as pi on PATH).
  3. You are on Agent Config and click Add profile.

Create the profile

  1. On Agent Config, click Add profile and choose Pi.
  2. Enter a Config name (for example Pi - Work).
  3. Select a Model.
  4. Leave advanced environment settings empty unless you have a specific local setup need.
  5. Save, then copy and run the command from the profile card.

Configuration reference

Pi is fixed to Only opened from CCR and CLI only, so those two fields are not editable. The fields you configure are:

Field How to set it Effect
Agent Choose Pi Creates a Pi launch entry in CCR.
Config name Free text, e.g. Pi - Work Identifies the profile. Desktop commands use ccr-app "<name>"; CLI commands use ccr "<name>".
Enabled Toggle on/off Disabled profiles are not applied and not offered as launch entries.
Model A provider model or Fusion model The model Pi uses for every turn.
Environment variables Key/value rows Optional advanced overrides; leave empty for normal use.

Open and use

Desktop command copied from the profile card:

ccr-app "Pi - Work"

For CLI, run:

ccr "Pi - Work"

Multi-instance

Create separate Pi profiles when you want separate launch entries with different models.

Verify

  1. Run the desktop ccr-app command copied from the profile card, or the CLI ccr command.
  2. Send one message in Pi and confirm it replies.
  3. Open Request logs in CCR and confirm the request passed through the gateway.

Read the full file on GitHub · 71 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. 4d ago First seen · 71 lines · 0 tokens per session scan A 0fc999b97a34

Subscribe to this mod's changes

pi is an agent published in the GitHub repository musistudio/claude-code-router (37,021 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 644 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.