
pi-agent-for-claude
Run pi as a native Claude Code subagent: pi agents in Claude Code's own agent UI, streamed live, on any model pi can reach.
Install with your AI
Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.
Install and set up pi-agent-for-claude (claude-plugin project) into my current project. Found on https://claudeers.com/pi-agent-for-claude Repo: https://github.com/FazalAAli/pi-agent-for-claude Homepage/docs: — Detected install method: claude-plugin → /plugin install pi-agent-for-claude@FazalAAli/pi-agent-for-claude Category: plugins. Platforms: api, web, mobile. Read the repo's README for exact setup and env vars, then install it and wire it into my project. Claudeers Health Verdict: active; community-verified: false. Confirm the source before running anything.
/plugin marketplace add FazalAAli/pi-agent-for-claude /plugin install pi-agent-for-claude@FazalAAli/pi-agent-for-claude
git clone https://github.com/FazalAAli/pi-agent-for-claude
// compatibility
| Platforms | api, web, mobile |
|---|---|
| Operating systems | — |
| AI compatibility | claude |
| License | MIT |
| Pricing | open-source |
| Language | TypeScript |
https://github.com/user-attachments/assets/0bd4f5e4-c2d5-4e49-a882-30bf01357248
pi agent for claude
Run pi as a native Claude Code subagent: it shows in the agent list, streams live, takes follow-ups, and opens in a tmux pane as a teammate, while the model behind it is anything pi can reach.
> Have pi run with model kimi k2 and summarize this repo.
⏺ pi-agent-for-claude:pi(Summarize repo)
⎿ ▸ bash: {"command":"ls -la && git log --oneline -10"}
▸ bash: {"command":"cat package.json"}
This repo is an Expo/React Native calling app with a Go admin service...
— answered by pi, openrouter/moonshotai/kimi-k2
Experimental: built on Claude Code's early-access function hooks and some undocumented engine behaviour, so Claude Code updates may break it.
Requirements
- Claude Code 2.1.275+
- pi, logged in to at least one provider
- Node.js
- macOS or Linux
- tmux, for teammate panes
Setup
Add to ~/.claude/settings.json (shell variables alone don't reach teammate
panes):
{
"env": {
"CLAUDE_CODE_ENABLE_FUNCTION_HOOKS": "1",
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
},
"teammateMode": "tmux"
}
Install from a Claude Code session, then restart (inside tmux for teammate panes):
/plugin marketplace add FazalAAli/pi-agent-for-claude
/plugin install pi-agent-for-claude@pi-agent-for-claude
To develop it, load a clone from disk instead:
claude --plugin-dir /path/to/pi-agent-for-claude.
Usage
Ask Claude for pi in plain language; it picks the pi-agent-for-claude:pi
agent type.
- Spawn: "Have pi review the error handling in src/api."
- Pick a model: "Have pi run with model kimi k2 and …". Claude adds a
pi-model: <pattern>line, passed topi --model; otherwise pi uses its default.pi --list-models <search>lists models. - Follow up: messages to a running pi agent continue its pi session and model.
- Teammate pane: name it. "Spawn a pi agent named piper to …"
Answers end with — answered by pi, <provider/model>, read from pi's own
events. Trust it over what the model says about itself.
Security
pi runs its own read/bash/edit/write tools, outside Claude Code's permission prompts, tool policy and safety classifier. A pi agent can change files without asking. Restrict pi in its own config if that matters.
How it works
Claude Code starts a real subagent; the plugin replaces only its model
requests (turn.step) with a detached pi --mode json run, streaming pi's
text, thinking and tool calls. Hook calls get 10 s, so long runs span steps
chained through a no-op pi_progress tool. pi's final answer goes back as
text, SubagentHandback, or SendMessage for teammates, with pi's real
token usage.
Limitations
- No hooks, no pi. With function hooks off, a "pi" agent runs as Claude
Haiku. Claude is told to flag answers missing the
— answered by piline, but check yourself. For teammates, the variable must be in settingsenv. - Relies on undocumented engine behaviour: the 10 s hook budget,
subagent transcript files under
~/.claude/projects/, exact engine message text, andpsto detect teammates. pi_progresscalls appear in the transcript about every 7 s on long runs.- Cost figures for pi agents are priced as Claude tokens; check your provider's billing.
- Teammate shutdown requests go to pi as plain messages; close the pane yourself.
Troubleshooting
- "pi ended with no answer" plus a pi error: usually an unresolvable model pattern, or a provider pi isn't logged in to.
- Anything else: run
claude --debugand search the log forpi-agent-for-claudeandhook failed.
Testing
./smoke.sh runs an end-to-end check against real pi (costs a few cents).
claude plugin validate . checks the manifest and hooks module.
License
MIT. See LICENSE.
// faq
What is pi-agent-for-claude?
Run pi as a native Claude Code subagent: pi agents in Claude Code's own agent UI, streamed live, on any model pi can reach.. It is open-source on GitHub.
Is pi-agent-for-claude free to use?
pi-agent-for-claude is open-source under the MIT license, so it is free to use.
What category does pi-agent-for-claude belong to?
pi-agent-for-claude is listed under plugins in the Claudeers registry of Claude-compatible tools.
// embed badge
[](https://claudeers.com/pi-agent-for-claude)
// retro hit counter
[](https://claudeers.com/pi-agent-for-claude)
// reviews
// guestbook
// related in Claude Plugins
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explainin…
"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
financial-services — a Claude ecosystem project on GitHub.