@ogulcancelik/pi-spar
v0.1.11
Published
Agent-to-agent sparring for pi. Back-and-forth conversations with peer AI models for debugging, design review, and challenging your thinking.
Maintainers
Readme
pi-spar
Agent-to-agent sparring for pi. Back-and-forth conversations with peer AI models for debugging, design review, and challenging your thinking.
Install
pi install npm:@ogulcancelik/pi-sparSetup
Configure which models are available for sparring by editing ~/.pi/agent/spar/config.json:
{
"models": [
{ "alias": "opus", "provider": "anthropic", "id": "claude-opus-4.7", "thinking": "xhigh", "when": "best for deep reasoning" },
{ "alias": "minimax", "provider": "minimax", "id": "minimax-m2.7", "thinking": "low", "when": "great ui/ux eye, weaker on code" }
]
}Each entry needs alias, provider, and id. The optional thinking field sets the model's default thinking level for new spar sessions. If omitted, spar uses high. A tool call can still pass an explicit thinking value to override the config. The optional when field is shown in the tool description to help the agent pick the right model for the task.
Valid thinking values are off, minimal, low, medium, high, and xhigh.
Note: Changes are picked up on the next
spartool call — no restart needed. Thethinkingandwhentext are included in the live tool description the agent sees.
Usage
The extension provides a spar tool the agent can use, plus commands for viewing sessions.
Tool: spar
The agent uses this when you ask it to consult another model:
"spar with gpt about whether this architecture makes sense"
"ask opus to review the error handling in src/auth.ts"Sessions persist — follow up, push back, disagree. The peer can read files, grep, and explore your codebase but can't execute commands or write files.
Commands
| Command | Description |
|---------|-------------|
| /spar [session] | Watch a spar session in a floating overlay |
| /spview | Browse all sessions — view, peek, or delete |
Peek overlay
/spar opens a floating overlay that renders the spar conversation using the same components as pi's main TUI — same message styling, same syntax-highlighted tool output, same everything. It's pi inside pi.

- j/k or ↑/↓ — scroll by line
- ctrl+u/ctrl+d — scroll half-page
- g/G — jump to top/bottom
- q or Esc — close
Live sessions auto-scroll as the peer model responds.
Session browser
/spview opens an inline session browser:
- j/k or ↑/↓ — navigate
- enter — open peek overlay for selected session
- d — delete selected session
- D — delete all non-active sessions
- q or Esc — close
License
MIT
