
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
pi-teams turns your single Pi agent into a coordinated software engineering team. It allows you to spawn multiple "Teammate" agents in separate terminal panes that work autonomously, communicate with each other, and manage a shared task board—all mediated through tmux, Zellij, iTerm2, WezTerm, or Windows Terminal.
| iTerm2 | tmux | Zellij |
|---|---|---|
![]() | ![]() | ![]() |
Also works with WezTerm and Windows Terminal (cross-platform support)
Open your Pi terminal and type:
pi install npm:pi-teams
# 1. Start a team (inside tmux, Zellij, or iTerm2)
"Create a team named 'my-team' using 'gpt-4o'"
# 2. Spawn teammates
"Spawn 'security-bot' to scan for vulnerabilities"
"Spawn 'frontend-dev' using 'haiku' for quick iterations"
# 3. Create and assign tasks
"Create a task for security-bot: 'Audit auth endpoints'"
# 4. Review and approve work
"List all tasks and approve any pending plans"
tmux with clear labels so you always know who is doing what.teams.yaml and spawn entire teams with a single command.[team-name]: [agent-name] for easy identification in your window manager.off, minimal, low, medium, high) to balance speed vs. reasoning depth.You: "Create a team named 'my-app-audit' for reviewing the codebase."
Set a default model for the whole team:
You: "Create a team named 'Research' and use 'gpt-4o' for everyone."
Start a team in "Separate Windows" mode:
You: "Create a team named 'Dev' and open everyone in separate windows." (Supported in iTerm2 and WezTerm only)
You: "Spawn a teammate named 'security-bot' in the current folder. Tell them to scan for hardcoded API keys."
Spawn a specific teammate in a separate window:
You: "Spawn 'researcher' in a separate window."
Move the Team Lead to a separate window:
You: "Open the team lead in its own window." (Requires separate_windows mode enabled or iTerm2/WezTerm)
Use a different model:
You: "Spawn a teammate named 'speed-bot' using 'haiku' to quickly run some benchmarks."
Require plan approval:
You: "Spawn a teammate named 'refactor-bot' and require plan approval before they make any changes."
Customize model and thinking level:
You: "Spawn a teammate named 'architect-bot' using 'gpt-4o' with 'high' thinking level for deep reasoning."
Smart Model Resolution:
When you specify a model name without a provider (e.g., gemini-2.5-flash), pi-teams automatically:
pi --list-modelsgoogle-gemini-cli (OAuth) is preferred over google (API key)github-copilot, kimi-sub are preferred over their API-key equivalents--model provider/model:thinking commandExample: Specifying
gemini-2.5-flashwill automatically usegoogle-gemini-cli/gemini-2.5-flashif available, saving API costs.
You: "Create a task for security-bot: 'Check the .env.example file for sensitive defaults' and set it to in_progress."
Teammates in planning mode will use task_submit_plan. As the lead, review their work:
You: "Review refactor-bot's plan for task 5. If it looks good, approve it. If not, reject it with feedback on the test coverage."
You: "Broadcast to the entire team: 'The API endpoint has changed to /v2. Please update your work accordingly.'"
You: "We're done. Shut down the team and close the panes."
Automatic Cleanup:
When you shut down a team, pi-teams automatically cleans up orphaned agent session folders from ~/.pi/agent/teams/ that are older than 1 hour. This prevents accumulation of stale session data over time.
Manual Cleanup: If you need to clean up agent sessions without shutting down a team, or want to use a different age threshold:
You: "Clean up agent session folders older than 24 hours."
Predefined teams let you define reusable team templates in a teams.yaml file. This is perfect for common workflows where you always want the same set of specialists.
Create ~/.pi/teams.yaml (global) or .pi/teams.yaml in your project:
# Full development team
full:
- scout
- planner
- builder
- reviewer
- documenter
# Quick plan-build cycle
plan-build:
- planner
- builder
- reviewer
# Research and documentation
research:
- scout
- documenter
# Frontend specialists
frontend:
- planner
- builder
- bowser
Create agent definitions in ~/.pi/agent/agents/ (global) or .pi/agents/ (project-local):
scout.md:
---
name: scout
description: Fast recon and codebase exploration
tools: read,grep,find,ls
---
You are a scout agent. Investigate the codebase quickly and report findings concisely. Do NOT modify any files. Focus on structure, patterns, and key entry points.
builder.md:
---
name: builder
description: Implementation specialist
tools: read,write,edit,bash
model: claude-sonnet-4
thinking: medium
---
You are a builder agent. Implement code following the plan provided. Write clean, tested code.
Agent Definition Fields:
name (required): The agent's namedescription (required): What the agent doestools (optional): Comma or space-separated list of allowed toolsmodel (optional): Model to use (e.g., claude-sonnet-4, gpt-4o)thinking (optional): Thinking level (off, minimal, low, medium, high)List available team templates:
You: "List all predefined teams I can use."
List available agent definitions:
You: "Show me all predefined agents."
Create a team from a template:
You: "Create a team named 'my-project' from the 'plan-build' predefined team in the current directory."
This single command:
With options:
You: "Create a team named 'big-team' from 'full' predefined team using 'gpt-4o' as default model and separate windows."
Sometimes you create a team with custom prompts and settings that you'd like to reuse later. Instead of manually creating teams.yaml and agent definition files, you can save any runtime team as a template.
CREATE → USE → SAVE → REUSE
See which teams you have that can be saved:
You: "List all runtime teams."
You: "Save team 'my-modularization-team' as template 'code-modularization'"
This creates:
~/.pi/agent/agents/ for each teammate~/.pi/teams.yaml with the new templateTo save a template that's specific to the current project:
You: "Save team 'my-frontend-team' as template 'frontend-sprint' with scope 'project'"
This creates files in .pi/agents/ and .pi/teams.yaml in the current project directory.
Once saved, use it just like any predefined team:
You: "Create a team named 'auth-refactor' from the 'code-modularization' template in the current directory"
To show multiple agents on one screen, pi-teams requires a way to manage terminal panes. It supports tmux, Zellij, iTerm2, WezTerm, and Windows Terminal.
Install tmux:
brew install tmuxsudo apt install tmuxHow to run:
tmux # Start tmux session
pi # Start pi inside tmux
Simply start pi inside a Zellij session. pi-teams will detect it via the ZELLIJ environment variable and use zellij run to spawn teammates in new panes.
If you are using iTerm2 on macOS and are not inside tmux or Zellij, pi-teams can manage your team in two ways:
It will name the panes or windows with the teammate's agent name for easy identification.
WezTerm is a GPU-accelerated, cross-platform terminal emulator written in Rust. Like iTerm2, it supports both Panes and Separate OS Windows.
Install WezTerm:
brew install --cask weztermHow to run:
wezterm # Start WezTerm
pi # Start pi inside WezTerm
Windows Terminal is the modern, feature-rich terminal emulator for Windows 10/11. It supports both Panes and Separate OS Windows.
Requirements:
Install Windows Terminal:
winget install Microsoft.WindowsTerminalscoop install windows-terminalInstall PowerShell Core (optional but recommended):
winget install Microsoft.PowerShellscoop install powershellHow to run:
# Open Windows Terminal and start pi
wt
pi
Or start pi directly from Windows Terminal with new window:
wt -- pwsh -c "pi"
Note: On Windows, pi-teams uses PowerShell for command execution. Make sure pi is in your PATH. If you installed pi via npm and Node.js, verify both are accessible from PowerShell.
This project is a port of the excellent claude-code-teams-mcp by cs50victor.
We have adapted the original MCP coordination protocol to work natively as a Pi Package, adding features like auto-starting teammates, balanced vertical UI layouts, automatic inbox polling, plan approval mode, broadcast messaging, and quality gate hooks.
MIT
FAQs
Agent teams for pi, ported from claude-code-teams-mcp
The npm package pi-teams receives a total of 705 weekly downloads. As such, pi-teams popularity was classified as not popular.
We found that pi-teams demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.