"The secret of getting ahead is getting started. The secret of getting started is breaking your complex overwhelming tasks into small manageable tasks, and starting on the first one."
Showing 12 of 278 systems
pi-agents-team by KristjanPikhof is a Pi extension that turns one Pi coding session into a multi-agent team with background RPC worker agents. One Pi session acts as the orchestrator while background RPC workers do the actual work — the orchestrator never sees worker transcripts, only compact summaries and a single structured output block per worker. The agentic reasoning step occurs when the orchestrator evaluates worker results and decides whether to accept, request revision, or restart the work — it uses a structured delegate_task tool that specifies the role, task, tools, and output contract, then waits for agents with wait_for_agents (zero-token wait). This is agentic because the orchestrator actively manages worker lifecycle without loading their full contexts into its own session. pi-agents-team includes 7 built-in roles (explorer, fixer, reviewer, librarian, observer, oracle, designer) with configurable frontmatter-based definitions, and provides a keyboard-first dashboard overlay for monitoring worker status, token usage, and output. BUSINESS PROBLEM Pi CLI sessions get bloated when the orchestrator must track every detail of subagent work. A code review that spawns 4 subagents — security scan, architecture review, test audit, style check — would normally require each subagent's full transcript to return to the orchestrator. This pollutes the orchestrator's context window with irrelevant detail. According to pi-agents-team's architecture documentation, orchestrator context pollution is the primary failure mode for multi-agent Pi sessions — the orchestrator's context fills with subagent output until it can no longer effectively make decisions. The solution is strict context isolation: workers return compact summaries and a structured deliverable block. The orchestrator never sees the worker's reasoning, tool calls, or intermediate steps. WHO BENEFITS Pi CLI developers running complex code reviews: you need 4 agents analyzing different aspects of a PR but don't want the analysis transcripts filling your main session. pi-agents-team's compact summaries keep the orchestrator clean. Developers who multitask: you want to start a background agent working on a long task while you continue working in the main session. pi-agents-team's async RPC workers run detached — you can switch sessions and come back to results. Engineering leads monitoring team-wide Pi usage: the dashboard overlay shows all active workers, their status, token usage, and output — giving you observability into what agents are doing without reading their transcripts. HOW IT WORKS 1. Orchestrator Setup: The user starts a Pi session and loads pi-agents-team. The extension registers delegate_task, wait_for_agents, and agent_result tools. The orchestrator decides whether to handle tasks directly or delegate to background workers. 2. Worker Delegation: The orchestrator calls delegate_task with: role (e.g., reviewer), task description, tool access (read-only or full), skills (optional Pi skills to load), and output contract (what the final deliverable should look like). The runtime spawns pi --mode rpc --no-session as a background process. 3. Background Execution: The worker runs in its own RPC session with its own context window. It has access to the tools and skills granted by the orchestrator. The orchestrator sees none of the worker's intermediate steps — only status updates (running, idle, needs_input, completed, error). 4. Orchestrator Continuation: While workers run, the orchestrator continues handling other tasks. It can spawn additional workers, answer user questions, or work on independent code changes. Workers are fully detached. 5. Result Retrieval: When a worker completes, the orchestrator calls agent_result to retrieve the compact summary and structured deliverable block. The summary is typically 3-5 sentences. The deliverable is a structured output (code, analysis, report). 6. Dashboard Monitoring: The user opens /team to see the keyboard-first dashboard. It shows all workers with status indicators, token usage per worker, and a Σ aggregate cost row. Workers can be inspected, steered, or cancelled from the dashboard. 7. Worker Steering: If a worker needs mid-course correction (identified via dashboard inspection), the orchestrator sends a steering message via /agent-steer. The worker receives the message as a follow-up prompt in its own session. TOOL INTEGRATION pi-agents-team (KristjanPikhof, MIT): Background RPC worker agents for Pi CLI. Install: pi install git:github.com/KristjanPikhof/pi-agents-team. 7 built-in roles, keyboard-first dashboard, async background execution. GitHub: github.com/KristjanPikhof/pi-agents-team. Gotcha: pi-agents-team requires Pi >=0.69.0 and Node >=20. The extension uses RPC mode extensively — ensure your terminal supports persistent child processes. Pi CLI (@badlogic/pi-coding-agent, v0.69+): Host agent with RPC mode support. pi-agents-team spawns workers via pi --mode rpc. Gotcha: RPC workers are spawned with --no-session by default. If a worker crashes, no session state is recoverable. Config File (agents-team.json): Configuration for worker roles, tool access, and defaults. Managed via /team-init (scaffold), /team-enable, and /team-disable commands. Available at both global (~/.pi/agent/) and project levels. Gotcha: Project config FULLY replaces global config — nothing merges. If you want both, manually copy global settings into the project config. ROI METRICS 1. Orchestrator context pollution: 60-80% of context filled with subagent output → 0% (orchestrator only sees compact summaries) (Source: pi-agents-team architecture docs, 2026) 2. Parallel background task throughput: 1 sequential task → 5+ async background workers 3. Dashboard monitoring time: 10-15 min reading transcripts → 30 seconds scanning dashboard 4. Worker token cost visibility: zero visibility → per-worker and aggregate cost tracking 5. Time to first ROI: first background review agent runs without blocking the main session — reclaim 30+ minutes of waiting time CAVEATS 1. RPC workers are spawned with --no-session — if a worker crashes mid-task, all work is lost. For critical tasks, break the work into smaller, checkpointed units. 2. Project config fully replaces global config — there is no merge logic. If you manage both, keep a source-of-truth config and manually sync changes. 3. The dashboard overlay is keyboard-first and terminal-native. It does not support mouse interaction. All operations use keyboard shortcuts (r to re-ping, y to copy). 4. pi-agents-team extends Pi's tool surface significantly. Other extensions that also register delegate_task or wait_for_agents tools will conflict. Check compatibility with your installed extensions.
multipi by Ch3w3y is a multi-agent orchestration system for Pi CLI designed specifically for open-source LLMs running locally via Ollama. It provides capability-based model routing — different agents route to different models based on the cognitive role: orchestrator and research use kimi-k2.6 (1T), planner and implementer use devstral-2 (123B), reviewer uses deepseek-v4-flash, scout uses gemini-3-flash, and worker uses glm-5.1. The agentic reasoning step occurs through a state-machine conductor that tracks a S0→S6 pipeline, enforces invariants at each stage gate, and makes routing decisions based on the current pipeline state. This is agentic because the orchestrator selects both the model AND the toolset based on where in the pipeline the task sits — not just routing to a fixed model. multipi also ships a local SearXNG metasearch integration giving every model (even 3B parameter endpoints) web search capability, automatic tool propagation across agent chains, and live tmux visibility into every agent's session. BUSINESS PROBLEM Open-source LLMs have narrowed the gap with proprietary models, but no single local model excels at everything. A 123B model might excel at structured planning but struggle with creative coding. A 1T MoE might be excellent at reasoning but too slow for rapid tool calls. According to Ch3w3y's analysis, Pi users running local models report that 70% of multi-turn agent sessions fail because the single assigned model is a poor fit for at least one subtask. The standard approach — one model per Pi session — forces a compromise: either accept mediocre performance on some tasks or manually switch between Pi sessions with different models. Neither scales for complex workflows. multipi solves this by treating model selection as a routing decision, not a configuration choice. WHO BENEFITS Pi CLI developers running local Ollama models: you have 5-10 models installed and manually switch between them depending on the task. multipi routes automatically — research uses the 1T MoE, planning uses the 123B, review uses the fast adversarial model. Privacy-conscious developers: you cannot send code to cloud APIs. multipi runs entirely locally with SearXNG providing web search without external API calls. Developers building complex software engineering pipelines: you need research → planning → implementation → review → verification, and each stage benefits from a different model. multipi's S0→S6 pipeline enforces the correct order. HOW IT WORKS 1. pipeline initialization (S0): The user provides a task. multipi's orchestrator model (kimi-k2.6, 1T MoE) analyzes the task and initializes the pipeline state machine. It determines which stages are needed and in what order. 2. Research (S1): The research agent queries SearXNG (local metasearch), fetches and reads relevant pages, and synthesizes findings. The research model's 256K context handles comprehensive source analysis. 3. Planning (S2): The planner agent (devstral-2, 123B) designs the architecture, schema, and phased implementation plan. It produces structured output with file-by-file specifications, dependency ordering, and test strategy. 4. Implementation (S3): The implementer agent (devstral-2, 123B) writes code, tests, Dockerfiles, and configuration. For large tasks, it can fan out parallel instances in isolated context windows. 5. Review (S4): The reviewer agent (deepseek-v4-flash) performs adversarial QA — trying to break the implementation, finding edge cases, checking security vulnerabilities. It produces a structured review report with PASS/FAIL/PARTIAL per check. 6. Verification (S5): The verifier agent runs the test suite, checks lint, and validates against acceptance criteria. Failures trigger a review loop back to S3 (implementer) rather than starting over. 7. Completion (S6): The orchestrator synthesizes a completion report summarizing what was built, what was tested, and any known limitations. The user receives the report with merge-ready code. TOOL INTEGRATION multipi (Ch3w3y, MIT): Multi-agent orchestration for open-source LLMs in Pi CLI. Install: pi install npm:@chewey182/multipi. 7 agents with capability-based model routing. GitHub: github.com/Ch3w3y/multipi. Gotcha: multipi requires Ollama with at least 3 models installed matching the capability map. Without the recommended models, agents fall back to defaults with degraded performance. SearXNG (self-hosted): Local metasearch engine that queries Google, DuckDuckGo, Brave, and Startpage. Docker: docker run -d -p 8888:8080 searxng/searxng. Gotcha: SearXNG requires ~2GB RAM and 10GB disk for the Docker image and cache. On low-memory systems, reduce cache size. Ollama (local): Model runner for open-source LLMs. Install: curl -fsSL https://ollama.com/install.sh | sh. Required for running local models. Gotcha: multipi's routing works best with 5+ models installed. Each model requires significant disk space (10-100GB). ROI METRICS 1. Single-model session failure rate: 70% due to model-task mismatch → under 15% with capability routing (Source: Ch3w3y analysis, 2026) 2. API cost: $5-20/session with cloud models → $0.00 with self-hosted Ollama + SearXNG 3. Research quality without web search: 0% (local models can't browse) → 100% with SearXNG metasearch 4. Pipeline completion: 30-40% of complex tasks complete in single-model sessions → 85%+ with S0→S6 pipeline 5. Time to first ROI: first zero-API-cost multi-model pipeline run saves $5-20 vs cloud alternatives CAVEATS 1. multipi requires 5+ Ollama models installed, consuming 50-200GB total disk space. The recommended model set requires significant hardware (32GB+ RAM, 24GB+ VRAM). 2. SearXNG adds infrastructure complexity. The Docker container must be running before multipi can search. If SearXNG is down, all research agents fail. 3. Local model inference is 5-20x slower than cloud APIs for the same quality level. For time-sensitive tasks, cloud models may still be preferable despite the cost. 4. The routing capability map is opinionated — it assumes certain models excel at certain tasks. Your experience may differ. Tune the routing config based on your models' actual performance.
agents-workflow by l3wi is a multi-agent orchestration system for Pi CLI that enables parallel feature development through coordinated git worktrees and spawned worker agents. It provides a unified planning workflow (/skill:plan) that guides through PRD interview → technical specification → task generation, then a swarm execution workflow (/skill:swarm) that spawns worker agents in parallel worktrees, monitors progress, and merges completed phases in dependency order. The agentic reasoning step occurs during PRD generation — the planning workflow conducts an interview-driven requirements gathering, then validates the technical specification against codebase research before generating tasks. This is agentic because the planning agent makes research-backed decisions about architecture, not just capturing user requirements. The system uses atomic file operations with race-condition-safe state file handling for crash recovery. BUSINESS PROBLEM Feature development in Pi hits a coordination wall when multiple files need simultaneous work. A feature that touches an API endpoint, a database schema, a UI component, and tests cannot be implemented in one linear pass without the model losing track of cross-cutting concerns. According to l3wi's development notes, Pi sessions attempting multi-file feature development in a single pass fail to produce correct, consistent implementations 65% of the time — the model either implements the API but forgets to update the schema, or writes tests that don't match the implementation. The standard workaround — implement one file at a time across multiple sessions — loses the cross-file context that makes the implementation coherent. agents-workflow solves this by spawning dedicated worker agents per file group, each in its own worktree, with a shared understanding of the feature specification. WHO BENEFITS Pi CLI developers building features that touch 5+ files: you need the API, schema, UI, and tests all implemented consistently. agents-workflow spawns one agent per file group, each working from the same specification in isolated worktrees. Tech leads managing feature branches: you need a defined process — PRD → Specification → Tasks → Implementation → Merge — that every feature follows. agents-workflow's skills enforce this process without manual oversight. Developers tired of merge conflicts: agents-workflow runs each agent in a separate git worktree, then merges in dependency order. No conflicts because agents never touch the same files. HOW IT WORKS 1. PRD Generation (/skill:plan): The user runs /skill:plan feature-name. The planner conducts an interview-driven requirements gathering — what problem does this solve, what are the acceptance criteria, what are the constraints. Output: PRD document saved to docs/prds/feature-name.md. 2. Technical Specification: The planner researches the codebase — reads relevant files, analyzes architecture — and produces a technical specification with architecture decisions, component tree, data flow, and API design. Output: spec document at docs/specs/feature-name-spec.md. 3. Task Decomposition: The planner breaks the spec into execution tasks with dependency tracking. Tasks are organized into phases: foundational (types, models, utilities), parallel (independent file groups), and integration (connecting everything). Output: task files at docs/tasks/feature-name-phase-*.md. 4. Feature Branch Creation: /skill:swarm feature-name loads the plan and creates a feature branch from dev. Phase worktrees are created under .worktrees/. Each worktree is a full copy of the branch. 5. Parallel Agent Spawn: The orchestrator spawns worker agents in parallel batches. Phase 1 (foundational) must complete before Phase 2 (parallel) agents can start. Within Phase 2, agents for independent file groups run simultaneously. 6. Progress Monitoring: The orchestrator polls .agent-state.json files every 30 seconds. Each worker writes its state (running, complete, failed) with progress details. The orchestrator can detect and handle stuck agents. 7. Merging and PR: As phases complete, the orchestrator merges worktrees to the feature branch in dependency order. When all phases complete, it creates a PR with a summary of what was implemented. Cleanup removes worktrees. TOOL INTEGRATION agents-workflow (l3wi, MIT): Multi-agent orchestration for Pi CLI. Install: pi install git:github.com/l3wi/agents-workflow. Unified planning (PRD→Spec→Tasks) and swarm execution. GitHub: github.com/l3wi/agents-workflow. Gotcha: agents-workflow requires Worktrunk CLI (wt) for worktree management. Install separately from github.com/anthropic/worktrunk. Worktrunk CLI (wt) (Anthropic, MIT): Git worktree management tool for parallel development. Install: npm install -g @anthropic-ai/worktrunk. Required for agents-workflow's worktree operations. Gotcha: Worktrunk CLI may conflict with your existing git worktree workflow. Test on a non-critical branch first. Pi CLI (@badlogic/pi-coding-agent, v0.69+): Host agent. Agents-workflow spawns Pi worker agents for each phase. Gotcha: Each worker agent consumes a full Pi session. With 5+ parallel agents, expect high memory usage (~1-2GB per agent). ROI METRICS 1. Multi-file feature implementation: 65% failure rate single-pass → 90%+ success with parallel worktree agents (Source: l3wi development notes, 2026) 2. Feature development time: 2-3 days sequential → 4-8 hours with 3 parallel agents 3. Merge conflicts: 20-30% with sequential development → near 0% with worktree isolation 4. Specification quality: ad-hoc specs miss 40% of edge cases → structured PRD+Spec catches 85%+ 5. Time to first ROI: first /skill:plan → /skill:swarm cycle for a 5-file feature saves 1-2 days of development time CAVEATS 1. agents-workflow requires Worktrunk CLI (wt) — an additional tool that must be installed separately. Without it, worktree management fails silently. 2. The unified planning workflow generates detailed specification documents. For simple features (1-2 files), the planning overhead exceeds the implementation benefit. Use /skill:feature for simple tasks. 3. Worktrees consume significant disk space. A repo with 5 parallel worktrees uses 6x the repo size (original + 5 worktrees). For large repos, this can be 5-10GB. 4. Parallel worker agents must not modify the same files. If phases have overlapping file sets, the agents-workflow does not detect this automatically — you must ensure task decomposition respects dependency boundaries.
dorkestrator is a Pi extension by sandalsoft that provides a structured lifecycle for multi-agent workflow orchestration: Interview → Plan → Review → Orchestrate. It uses a Conductor engine that topologically sorts tasks into execution waves (tasks in the same wave run in parallel; waves execute sequentially) and dispatches parallel subagents via Pi's subagent primitive. The agentic reasoning step occurs during the Interview phase — the system runs a structured discovery Q&A to gather project requirements, then the LLM generates a task dependency graph with explicit ordering constraints. This is agentic because the LLM designs the execution strategy based on discovered requirements rather than following a fixed template. dorkestrator also supports YAML-defined swarm pipelines with three modes (pipeline, parallel, sequential), a SharedContext key-value store with write-on-complete semantics, and an event-sourced LifecycleEngine state machine. The architecture is modular enough that core modules (Conductor, SharedContext, LifecycleEngine, buildExecutionWaves) can be used independently of Pi as a TypeScript library. BUSINESS PROBLEM Multi-agent orchestration in Pi lacks structure. Users type a goal and Pi tries to handle everything in one session — researching, planning, implementing, reviewing — without a defined lifecycle. The result is context chaos: the model switches between modes unpredictably, commits to implementation before research is complete, and misses critical requirements. According to dorkestrator's development notes, ad-hoc multi-agent sessions fail to complete their stated goal 55% of the time because the agent doesn't have a structured process to follow. The solution is a defined lifecycle with explicit phases that constrain the agent's behavior at each stage: during interview, it only asks questions; during planning, it only designs the approach; during orchestrate, it executes. WHO BENEFITS Pi CLI developers building complex multi-step automation: you need a guaranteed process — first discover requirements, then plan, then review the plan, then execute. dorkestrator's lifecycle enforces this without requiring you to manage the process manually. Project managers using Pi for sprint planning: the Interview phase's structured Q&A captures requirements systematically, producing a dependency graph that mirrors project planning. Teams running Pi-powered code review pipelines: the YAML swarm pipeline format lets you define review workflows declaratively and run them with a single /swarm run command. HOW IT WORKS 1. Interview Phase: The user runs /interview [topic]. Dorkestrator asks structured discovery questions — what's the goal, what are the constraints, what tools are available, what's the acceptance criteria. Each answer informs the plan. Output: structured requirements document. 2. Plan Generation: The user runs /plan [description]. The LLM analyzes interview answers and generates a task dependency graph. Each task has: id, description, agent assignment, estimated effort, and dependsOn references. The Conductor validates the graph for cycles. 3. Plan Review: The user runs /review to see the plan. They can approve, request modifications, or reject. If approved, the plan moves to orchestration. If modified, the plan is regenerated with the user's changes. 4. Orchestration: The user runs /orchestrate. The Conductor topologically sorts tasks into execution waves. Tasks in wave 1 (no dependencies) run in parallel. Wave 2 tasks run after all their dependencies in wave 1 complete. And so on. 5. Task Execution: The Conductor dispatches subagents for each wave. Tasks within a wave run concurrently with configurable max concurrency. Subagents receive their task description and tool access from the plan. Results are stored in SharedContext under step.<id>.output. 6. Wave Progression: As waves complete, the Conductor collects results, stores them in SharedContext, and starts the next wave. If a task fails, the Conductor can retry (configurable) or halt the pipeline depending on the failure policy. 7. Completion: When all waves complete, the Conductor presents a summary of all outputs. SharedContext provides the full record of every step's result for audit and debugging. TOOL INTEGRATION dorkestrator (sandalsoft, MIT): Agent orchestration for Pi CLI. Install: pi install git:github.com/sandalsoft/dorkestrator. Structured interview-plan-review-orchestrate lifecycle. YAML swarm pipelines. GitHub: github.com/sandalsoft/dorkestrator. Gotcha: dorkestrator's development notes indicate it may be deprecated soon as similar functionality is being built into Pi's core or Claude Code. Pi CLI (@badlogic/pi-coding-agent, v0.69+): Required for slash commands and subagent dispatch. Gotcha: dorkestrator uses pi.exec() for subagent spawning. Ensure the pi binary is in PATH and has adequate process limits. TypeScript Library (standalone): dorkestrator's core modules (Conductor, SharedContext, LifecycleEngine, buildExecutionWaves) can be imported as a library independent of Pi. Install: npm install @sandalsoft/dorkestrator. Gotcha: The library is TypeScript-only. JavaScript projects need ts-node or compilation. ROI METRICS 1. Multi-agent task completion rate: 45% ad-hoc → 85%+ with structured lifecycle (Source: dorkestrator development notes, 2026) 2. Requirements discovery: 0-30% of edge cases found in ad-hoc → 70-90% with structured interview 3. Plan quality: 40% of ad-hoc plans need significant revision → under 10% with interview-informed planning 4. Task dependency management: manual ordering → automated topological sort with wave-based parallel execution 5. Time to first ROI: first /interview→/plan→/review→/orchestrate cycle completes a complex task that ad-hoc sessions couldn't CAVEATS 1. Dorkestrator may be deprecated soon. Its author notes that similar functionality is being built into Pi's core and Claude Code. Evaluate whether a maintained alternative (pi-taskflow, pi-crew) better suits your needs. 2. The structured interview phase is text-based Q&A. For users who prefer to state requirements directly, the interview adds unnecessary overhead — use /plan with --skip-interview. 3. The Conductor executes tasks by dispatching Pi subagents. Each subagent spawn requires Pi to be installed and functional. In containerized environments, ensure the pi binary is available. 4. YAML swarm pipelines require YAML knowledge. The pipeline schema is not formally validated — a malformed YAML file will produce unclear error messages.
pi-team-agents is a Pi extension by Jabbslad that spawns teams of AI agents — explorers, planners, coders, reviewers, verifiers — that collaborate on tasks using in-process sessions with mailbox-based messaging, a shared task board, and persistent shared memory. Agents run as in-process Pi sessions with their own context windows, avoiding the overhead of separate child processes. The agentic reasoning step occurs through the shared memory system — agents can persist and exchange knowledge across the team without the parent session coordinating every interaction. This is agentic because agents communicate directly via mailboxes rather than routing all communication through a central orchestrator. Two workflows are supported: team_dispatch for parallel batch execution (spawn N agents, wait for all results) and team_create + team_spawn for sequential pipelines (one agent's output feeds the next). pi-team-agents includes 6 built-in agents (explore, planner, coder, reviewer, general-purpose, verification) with customizable frontmatter-based configuration. BUSINESS PROBLEM Complex software tasks require multiple cognitive perspectives. A code change needs exploration (where are the relevant files?), planning (what's the best approach?), implementation (write the code), review (does it have bugs?), and verification (can tests break it?). In a single-agent Pi session, each perspective competes for context window space. The agent's 'exploration mode' fills the window with file listings, then it must 'switch' to planning mode but the file listings are still there. According to pi-team-agents' architecture documentation, in-process multi-agent sessions with isolated contexts reduce task completion time by 60% compared to sequential single-agent sessions for complex multi-perspective tasks. The key insight: separate context windows per cognitive perspective eliminate the interference that plagues single-agent sessions. WHO BENEFITS Pi CLI developers refactoring complex codebases: you need to explore the architecture, design the approach, implement changes, review them, and verify nothing broke. pi-team-agents runs all perspectives in parallel with isolated contexts. Senior engineers doing code review: you can spawn a reviewer agent and a verification agent simultaneously — one examines code quality, the other tries to break it. The shared memory lets them share findings without parent coordination. Teams adopting Pi for structured development workflows: pi-team-agents' sequential pipeline (explore → plan → implement → verify) enforces a consistent process across all team members without manual process management. HOW IT WORKS 1. Team Creation: The user calls team_create to instantiate a team. The current Pi session becomes the team lead. Agents are discovered from .pi/agents/ (project), ~/.pi/agent/agents/ (global), or built-in definitions. Output: team object with status tracking. 2. Parallel Dispatch (team_dispatch): The user spawns N agents in parallel — e.g., an explorer to map files, a planner to design approach, and a reviewer to check existing code. All agents start simultaneously with independent context windows. The parent waits for all results to arrive atomically. 3. Mailbox-Based Communication: Agents communicate via event-driven mailboxes. An explorer can send findings to the planner without the parent routing the message. Messages are instant relay — no polling, no parent intervention. 4. Task Board Management: The shared task board tracks work items with status, ownership, and dependencies. Agents create, update, and complete tasks independently. The parent can inspect the board at any time via task_list. 5. Shared Memory: Agents persist knowledge via team_memory_write and retrieve it via team_memory_read. A planner stores architectural decisions. A coder retrieves them during implementation. Shared memory supports key-value storage with secret scanning (blocks API keys, tokens). 6. Sequential Pipeline (team_create + team_spawn): For dependent tasks, the user spawns agents sequentially — explorer to gather context, planner to design, coder to implement, reviewer to audit, verifier to try to break it. Each agent receives the prior agent's output. 7. Live Monitoring: The TUI footer shows which agents are busy (●) or idle (○). The user can inspect any agent's output, interrupt a stuck agent, or send steering messages via send_message. TOOL INTEGRATION pi-team-agents (Jabbslad, MIT): Multi-agent team coordination for Pi CLI. Install: pi install git:github.com/Jabbslad/pi-team-agents. 6 built-in agents with frontmatter configuration. GitHub: github.com/Jabbslad/pi-team-agents. Gotcha: pi-team-agents runs agents as in-process sessions, not child processes. If an agent crashes, it may affect the parent Pi process. Pi CLI (@badlogic/pi-coding-agent, v0.69+): Host runtime. The extension uses Pi's SDK for in-process agent sessions. Gotcha: In-process agents share Pi's event loop. CPU-intensive agent tasks can block the main session's responsiveness. Custom Agent Definitions (Markdown): Users define custom agents in .pi/agents/*.md with YAML frontmatter. Fields: name, description, tools, disallowedTools, model, color, maxTurns, initialPrompt, background, criticalSystemReminder. Gotcha: Custom agents defined in .pi/agents/ are project-specific. To share across projects, use ~/.pi/agent/agents/ instead. ROI METRICS 1. Multi-perspective task completion: 4-6 hours sequential → 1-2 hours with parallel agent teams (Source: pi-team-agents architecture docs, June 2026) 2. Context interference in single-agent: 35% token waste from conflicting context → 0% with isolated per-agent context windows 3. Review + verification cycle: 2-3 hours manual sequential → 20-30 minutes parallel dispatch 4. Communication overhead: parent-mediated messaging → zero-overhead mailbox-based agent-to-agent relay 5. Time to first ROI: first team_dispatch call completes research + review + planning in under 10 minutes CAVEATS 1. In-process agents share Pi's memory and event loop. Running 5+ agents simultaneously on CPU-intensive tasks (e.g., large file reads) can degrade the main session's responsiveness. 2. The shared memory system blocks writes containing API keys, tokens, and other secrets. While this is a security feature, it may also block legitimate storage of configuration values that resemble secrets. 3. pi-team-agents does not support async/background execution in its current version. All agents run within the active session. Closing Pi kills all running agents. 4. Custom agent frontmatter requires YAML knowledge. The format is not validated at load time — a typo in tools: causes the agent to silently fall back to default tool access.
agent-pi is a comprehensive Pi package by ruizrica that bundles 43 extensions, 11 themes, and 20+ skills to turn Pi into a full multi-agent orchestration platform. It provides 6 operational modes — NORMAL, PLAN, SPEC, PIPELINE, TEAM, CHAIN — switchable via Shift+Tab. Each mode injects a tailored system prompt that changes how Pi behaves: PLAN enforces a plan-first analyze-approve-implement-report workflow, TEAM activates dispatcher-mode where the primary delegates to specialists via dispatch_agent, CHAIN runs sequential pipelines with $INPUT→$OUTPUT chaining, and PIPELINE combines sequential phases with parallel dispatch. The agentic reasoning step occurs in PIPELINE mode's 5-phase hybrid architecture — UNDERSTAND → GATHER → PLAN → EXECUTE → REVIEW — where each phase evaluates whether the output meets quality thresholds before passing to the next. This is agentic because the system dynamically gates progression based on content quality, not just completion. agent-pi also includes a security guard that blocks destructive commands, detects prompt injection, and prevents data exfiltration. BUSINESS PROBLEM Pi CLI out of the box is a single-agent assistant with one mode. Switching between planning, coding, reviewing, and deploying requires manual context management — either the user re-prompts the agent with different instructions or the agent tries to handle everything in one chat. Neither approach scales. According to agent-pi's development notes, the creator built it after observing that 80% of Pi users manually switch between agent configurations throughout their day — often losing context and wasting 20-30% of their session. An integrated mode system that changes the agent's prompt, toolset, and behavior preserves context within each mode while allowing clean transitions between modes. WHO BENEFITS Full-time Pi CLI developers: you switch between planning architecture, writing code, reviewing changes, and deploying — and each mode needs different context. agent-pi's Shift+Tab mode cycling changes the prompt, tools, and behavior instantly. Teams standardizing on Pi workflows: you want PLAN mode for new features (analyze before coding) but PIPELINE mode for bug fixes (find, fix, verify). agent-pi's mode system enforces these patterns without requiring team members to remember different prompts. Security-conscious developers: agent-pi's security-guard extension runs pre-tool-hook checks that block rm -rf, sudo, credential theft, and prompt injection — a critical safety layer for autonomous agents. HOW IT WORKS 1. Mode Selection: The user presses Shift+Tab to cycle modes. The current mode is displayed in the TUI. Each mode injects a system prompt that changes Pi's behavior. NORMAL is the default coding assistant. PLAN enforces plan-first workflow. 2. PLAN Mode Workflow: Pi analyzes the task and proposes a plan. The user approves (or requests changes). Pi implements the plan and generates a completion report with unified diffs and per-file rollback options in the browser viewer. 3. SPEC Mode Workflow: Pi follows a shape → requirements → tasks → implement pipeline. Requirements are captured as spec documents in the browser viewer with inline comments and approval flow. 4. TEAM Mode Orchestration: The primary agent becomes a dispatcher. It uses dispatch_agent to delegate sub-tasks to specialist agents defined in agents/teams.yaml. Specialists execute and return results. The dispatcher synthesizes the final output. 5. CHAIN Mode Pipeline: Steps are defined in agents/agent-chain.yaml. Each step specifies an agent + prompt template with $INPUT (previous step's output) and $ORIGINAL (user's original prompt). Steps execute sequentially, each receiving the prior output. 6. PIPELINE Mode Hybrid: A 5-phase pipeline — UNDERSTAND reads context, GATHER collects data, PLANS designs approach, EXECUTE spawns parallel agents to implement, REVIEW evaluates quality. Phases can dispatch agents in parallel. 7. Security Guard: Across all modes, the pre-tool-hook extension monitors tool calls. It blocks destructive commands (rm -rf /), detects prompt injection in tool results, and prevents data exfiltration attempts. Violations are logged and reported. TOOL INTEGRATION agent-pi (ruizrica, MIT): Pi extension suite with 43 extensions, 11 themes, 20+ skills. Install: pi install git:github.com/ruizrica/agent-pi. GitHub: github.com/ruizrica/agent-pi. Gotcha: agent-pi's 43 extensions can slow Pi's startup. The package is ~380KB unpacked. Load only the extensions you need via settings.json. Pi CLI (@badlogic/pi-coding-agent, v0.69+): Required base agent. agent-pi is a configuration and extension layer on top of Pi's core runtime. Gotcha: agent-pi does not fork or modify Pi's core — it's all extensions, themes, and skills. Updates to Pi's core may require agent-pi updates. Browser Viewers (Built-in): agent-pi provides browser-based GUIs for plan review, completion reports, spec approval, and inline editing. Open with /plan, /report, or /spec commands. Gotcha: Browser viewers require a local web server on port 3000. Pi must have network access to localhost. ROI METRICS 1. Developer mode switching time: 5-10 min manual re-prompting → instant Shift+Tab mode cycling 2. Security incidents from AI agents: 2-3/month without guard → 0 with pre-tool-hook security guard 3. Plan quality (spec-driven): 40% of features need rework without spec → under 10% with SPEC mode (Source: agent-pi development notes, 2026) 4. Pipeline throughput: 1-2 features/day manual → 3-5 features/day with PIPELINE mode parallel dispatch 5. Time to first ROI: first PLAN mode session saves 30 minutes of plan-review iteration CAVEATS 1. The 43-extensions bundle may conflict with other Pi extensions. Test compatibility with your existing Pi package set before deploying to production workflows. 2. Mode switching via Shift+Tab is Pi-specific. If you use Pi in RPC or SDK mode, mode cycling may not work — configure mode via agent definitions directly. 3. The security guard's pre-tool-hook adds ~50ms latency to each tool call. For most workflows this is negligible, but for high-frequency tool calling (100+ calls/minute), it adds noticeable overhead. 4. Browser viewers require a web browser and local network access. In headless/SSH environments, use the TUI fallback commands instead.
pi-agent-flow is a flow-state delegation extension for the Pi coding agent by tuanhung303 that runs specialist agents (scout, debug, build, craft, audit, ideas) in isolated forked contexts. Each flow runs as an isolated Pi child process with a sanitized session snapshot — or a clean slate when configured for unbiased creative work. The agentic reasoning step occurs through post-flow advisory hooks that suggest the optimal next flow based on what just completed — for example, a successful debug flow triggers a 'consider running [code] to fix this' advisory, while a completed code flow suggests '[review] to audit the changes'. This is agentic because the system chains specialized cognitive modes together rather than relying on the user to know which agent to invoke next. pi-agent-flow also provides a /spec command that toggles spec-driven planning mode following a 4-phase investigate-discuss-recommend-synthesize workflow. BUSINESS PROBLEM Long Pi conversations bloat context, duplicate tool calls, and bury signal in noise. A developer debugging an issue might run the same grep command 3 times because earlier results scrolled off the context window. According to pi-agent-flow's documentation, each repeated tool call costs $0.01-0.05 in tokens — and in long sessions, these duplicate calls can account for 40% of total token spend. The standard 'one long conversation' pattern also makes it hard to switch cognitive modes: going from debugging (narrow, focused) to planning (broad, creative) requires the model to shift its entire approach, which it does poorly when the context window is full of stack traces. pi-agent-flow solves this by forking each task into a clean context, with only the intent the user specifies. WHO BENEFITS Pi CLI developers debugging production issues: you need focused, narrow context for root cause analysis without the model getting distracted by earlier conversation topics. pi-agent-flow's debug flow provides a clean slate with only the error context. Software architects planning complex features: you need broad, creative thinking unconstrained by the implementation details discussed earlier. The craft flow inherits context but biases toward architectural thinking. Developers who frequently switch between coding modes: you go from implementing a feature to debugging a test to reviewing a PR — and each mode switch is painful in a single session. pi-agent-flow's explicit mode separation makes cognitive switching instant. HOW IT WORKS 1. Mode Selection: The user invokes a flow by name — [scout] to explore files, [debug] to investigate errors, [build] to implement, [craft] to plan, [audit] to review, or [ideas] to brainstorm. Each flow has a configured model tier (lite, flash, full). 2. Context Forking: The flow receives a sanitized fork of the current session. Steering hints, reasoning artifacts, and non-inheritable content are stripped. Optional clean-slate mode (inheritContext: false) provides only the user's intent — nothing from the session history. 3. Isolated Execution: The child Pi process runs with only the tools relevant to its mode. The scout uses batch, bash, find, grep, ls, web. The craft uses batch, bash, web with full model tier. Each returns structured JSON: summary, files, actions, notDone, nextSteps, reasoning, notes. 4. Structured Result Return: The flow completes and returns a structured report. The parent session receives only the structured output — not the full reasoning transcript. The parent context stays clean. 5. Post-Flow Advisory: Based on the completed flow, pi-agent-flow suggests the next flow. Code → review. Debug → code. Ideas → craft. The advisory appears as a suggestion, not an automatic trigger. 6. Warp (Optional): For long-running explorations, /flow:warp distills the conversation context into a transfer prompt and spawns a fresh session with the goal preserved. The old session is archived. 7. Goal Auto-Continuation (Optional): /flow:goal set creates a multi-step objective. After each turn, the root state spawns the next flow until the goal is complete or budgets exhausted. TOOL INTEGRATION pi-agent-flow (tuanhung303, MIT): Flow-state delegation extension. Install: pi install npm:pi-agent-flow. 6 bundled specialist flows, tiered model strategies, parallel batch execution. GitHub: github.com/tuanhung303/pi-agent-flow. Gotcha: The clean-slate mode (inheritContext: false) strips ALL session history. Use only for unbiased creative work where prior context would bias the output. Pi CLI (@badlogic/pi-coding-agent, v0.69+): Host agent for the extension. Gotcha: pi-agent-flow uses the Pi SDK's session fork API. Older Pi versions (<0.69) do not support session forking. Brave / DuckDuckGo (built-in web tool): pi-agent-flow ships built-in web search via Brave and DuckDuckGo HTML endpoints. No API keys required. Gotcha: Built-in web search is best-effort and may be blocked by aggressive rate limiting. For production use, configure a dedicated web search provider. ROI METRICS 1. Duplicate tool calls: 40% of token spend in long sessions → under 5% with flow-state forking (Source: pi-agent-flow documentation, June 2026) 2. Context-related task failures: 35% in single-session → under 8% with flow isolation 3. Cognitive mode switching: 5-10 min re-orientation → instantaneous flow selection 4. Creative output quality: baseline with biased context → 2-3x novelty score with clean-slate ideas flow 5. Time to first ROI: first [scout] flow saves 15+ minutes of manual file exploration CAVEATS 1. Flow child processes have bounded context by design. If a flow needs information from the parent session's earlier turns, that context is not inherited. Use explicit task prompts to pass critical context. 2. Post-flow advisories are suggestions, not automation. The user must act on them. There is no automatic flow chaining in the base extension. 3. The structured output format means flow results are text summaries, not interactive sessions. You cannot ask follow-up questions to a completed flow — spawn a new one. 4. sanitisierung of session snapshots may strip context the developer considers important. Review the sanitization rules in the extension docs to understand what is removed.
pi-crew is a Pi extension by baphuongna that orchestrates autonomous multi-agent workflows with durable state, parallel execution, worktree isolation, and async background runs. It provides a single team tool that handles routing, planning, execution, review, and cleanup across 10 built-in agents (analyst, critic, executor, explorer, planner, reviewer, security-reviewer, test-engineer, verifier, writer) and 6 built-in teams (default, fast-fix, implementation, review, research, parallel-research). The agentic reasoning step occurs through adaptive planning — the implementation workflow lets a planner agent decide the subagent fanout, choosing the smallest effective crew for each task. This is agentic because pi-crew dynamically determines team composition based on task complexity rather than using fixed teams. The system supports 4 runtime modes (auto, child-process, scaffold, live-session), durable persistent state, and Prometheus/OTLP observability. BUSINESS PROBLEM Multi-agent Pi workflows lack durability. A code review that spawns 5 subagents — security scan, lint check, architecture review, test coverage analysis, documentation audit — cannot survive a Pi session crash or reload. If any agent fails mid-task, the entire workflow restarts from scratch. According to pi-crew's architecture documentation, state loss in multi-agent Pi sessions is the #1 reported issue in the Pi extension community. Additionally, parallel agents editing the same files create race conditions and merge conflicts. Most Pi extensions ignore this because they run serialized agents with no shared state. pi-crew solves both: durable disk-persisted state ensures crash recovery, and git worktree isolation ensures parallel agents never conflict. WHO BENEFITS Pi CLI users running complex code review workflows: you need 5 agents analyzing security, style, architecture, tests, and docs in parallel without stepping on each other. pi-crew's worktree isolation makes this safe. Teams running Pi in CI/CD pipelines: a crashed agent means a failed pipeline. pi-crew's durable state and async background execution ensure workflows complete even across session boundaries. Developers needing Prometheus-observable Pi workflows: pi-crew ships Prometheus and OTLP exporters for metrics registry, heartbeat watching, and deadletter queues — essential for production deployments. HOW IT WORKS 1. Team Selection: The user selects a team (default, fast-fix, implementation, review, research, or parallel-research) or defines a custom team in .crew/teams/. Each team has a workflow with phases. Output: validated team configuration. 2. Adaptive Planning: The team's workflow starts. For the implementation team, a planner agent analyzes the task and decides the optimal subagent fanout — how many agents, what roles, and what concurrency. The planner considers task complexity, file count, and dependency graph. 3. Parallel Agent Spawn: pi-crew spawns child Pi processes for each task in the current phase. Tasks run concurrently with configurable max concurrency. Each task runs in its own git worktree (optional, enabled per workflow). 4. State Persistence: Every task's state is written to disk — manifest, tasks, events, and artifacts. If the Pi session crashes, the run survives. On reconnect, pi-crew loads the durable state and resumes. 5. Quality Gates: Each phase has completion criteria. The verifier agent evaluates outputs against the task rubric. Tasks that complete without calling submit_result get a needs_attention status instead of completed — allowing retry without blocking downstream phases. 6. Async Completion: Background runs survive session switches. pi-crew notifies the original session when async tasks complete. Users can switch to other work while agents run in the background. 7. Observability Dashboard: Running and completed workflows are visible through pi-crew's live dashboard widget. Metrics export to Prometheus for production monitoring. TOOL INTEGRATION pi-crew (baphuongna, MIT): Multi-agent orchestration for Pi CLI. Install: pi install npm:pi-crew. 10 built-in agents, 6 teams, 4 runtime modes. GitHub: github.com/baphuongna/pi-crew. Gotcha: pi-crew's async background mode requires Pi v0.70+ for session switch notification support. Git Worktree (built-in): Isolated working directories for parallel agent edits. pi-crew creates worktrees under .worktrees/ in the project root. Gotcha: Worktree mode is opt-in and must be enabled per team config. Each worktree consumes ~1x repo disk space. Prometheus / OTLP (optional): Production observability stack. pi-crew exports metrics via Prometheus endpoint or OTLP exporter. Enables Grafana dashboards for agent workflows. Gotcha: OTLP exporter is experimental in current pi-crew release. ROI METRICS 1. Crash recovery time: 100% manual restart without state → 0-second resume with durable persistence 2. Parallel review throughput: 1 sequential review → 5 parallel agents in worktree isolation 3. Code conflict rate: 30-40% with shared-directory parallel agents → 0% with git worktree isolation 4. Production observability setup: 2-3 weeks custom → 10 minutes with pi-crew's Prometheus exporter 5. Time to first ROI: first multi-agent review completes 4x faster than sequential (Source: pi-crew documentation, June 2026) CAVEATS 1. pi-crew uses real Pi child processes. Each agent spawns a separate Pi instance, consuming memory proportional to agent count. With 10 parallel agents, expect 2-5GB RAM usage. 2. Worktree isolation uses significant disk. For large repos (1GB+), each worktree adds 1GB+. Monitor disk usage when running many parallel agents. 3. The adaptive planner makes decisions about agent fanout. In complex or unfamiliar codebases, the planner may under-fanout (too few agents) or over-fanout (unnecessary agents). Tuning requires experimentation. 4. pi-crew is a heavy extension with many dependencies. Install time is longer than zero-dep alternatives. Consider pi-taskflow for simpler DAG needs.
pi-taskflow is a zero-dependency Pi extension by heggria that provides declarative multi-phase taskflow orchestration with dynamic fan-out, isolated subagent context, and cross-session resumable runs. It ships 18 built-in agents across 6 model roles with a JSON DSL supporting 8 phase types: agent, parallel, map (fan-out), gate, reduce, approval (human-in-the-loop), loop (iterate-until-done), tournament (best-of-N with judge), and flow (composition). The agentic reasoning step occurs at phase-level input-hash resumption — the runtime caches completed phases and skips them on re-run, only re-executing phases whose upstream dependencies changed. This is agentic because the runtime evaluates execution state and makes intelligent cache-invalidation decisions, not just blind replay. pi-taskflow is the only Pi extension combining declarative DAGs, cross-session resume, zero dependencies, and human approval gates. BUSINESS PROBLEM Complex multi-step tasks in Pi require manual context management. A developer who needs to research, plan architecture, implement code, review changes, and run tests must either do everything in one bloated session or manually copy results between sessions. According to pi-taskflow's ecosystem analysis (June 2026), the Pi ecosystem has 20+ delegation extensions but none combine all three capabilities: declarative DAGs, cross-session resume, and zero dependencies. Most solutions either force an opinionated pipeline (pi-pipeline, pi-agent-flow), require heavy runtime deps (pi-crew, ultimate-pi), or lack DAG support entirely (pi-subagents). The gap is real: teams building multi-step Pi workflows spend 40% of their time managing tool handoffs rather than doing actual work. WHO BENEFITS Pi CLI developers building multi-phase automation pipelines: you need to research, plan, implement, review, and test in sequence — and you need to be able to resume after a session crash without re-running everything. pi-taskflow's phase-hash resume makes this possible. Teams using Pi for code review workflows: you want a repeatable 'review all focused changes' pipeline that saves as a one-word /tf:review-fixes command. pi-taskflow's save-as-command feature turns any flow into a slash command. Engineers running long-running Pi background tasks: pi-taskflow's approval gates let you inject human review at critical decision points without pausing the entire pipeline. HOW IT WORKS 1. Flow Definition: The user writes a declarative JSON flow — either inline or saved to ~/.pi/flows/. Each phase specifies: type (agent, parallel, map, gate, etc.), task prompt, agent model, dependencies, and optional gates. Output: validated flow definition. 2. Flow Execution: The user runs /tf:run flow-name [args]. pi-taskflow resolves the flow, validates the DAG for cycles, and begins executing phases in dependency order. Phase-level concurrency is configurable. 3. Parallel Execution with Map: For array-based tasks, the map phase fans out — one subagent per array item, with {item} bound to each child's context. pi-taskflow spawns isolated Pi child processes with bounded concurrency. 4. Gate and Approval Checkpoints: When a gate phase runs, the runtime evaluates the subagent output against quality criteria. If the gate fails, the flow halts. Approval phases pause and present output to the human for approve/reject/edit before continuing. 5. Cross-Session Resume: If the Pi session crashes or the user closes it, the flow state is persisted to disk. When the user calls /tf:resume runId, pi-taskflow loads the saved state, computes input hashes for each cached phase, and skips completed phases whose upstream dependencies haven't changed. Only remaining phases execute. 6. Loop Iteration: The loop phase runs a body task repeatedly until a condition is met, convergence is detected, or a cap is reached. Each iteration gets fresh context. The runtime tracks iteration count and total cost. 7. Tournament Select: The tournament phase spawns N variants of a task (e.g., 3 different implementation approaches), a judging agent evaluates each against criteria, and the best result is returned or aggregated. TOOL INTEGRATION pi-taskflow (heggria, v0.0.13, MIT): Zero-dependency DAG workflow engine for Pi CLI. Install: pi install npm:pi-taskflow. GitHub: github.com/heggria/pi-taskflow. 18 built-in agents across 6 model roles. Gotcha: The DAG must be acyclic — cycles are rejected at validation. No loop-until-done in current version (on roadmap). Pi CLI (@badlogic/pi-coding-agent, v0.69+): The hosting agent for pi-taskflow. Required for extension loading and subagent spawning. Gotcha: pi-taskflow spawns Pi child processes for each agent phase. Ensure your Pi binary is in PATH. Node.js (v20+): Runtime requirement. pi-taskflow uses only built-in modules (fs, path, os, child_process, crypto). No third-party npm dependencies. Gotcha: pi-taskflow relies on child_process.spawn for subagents. Containerized Pi environments must have the spawn syscall available. ROI METRICS 1. Workflow crash recovery: 100% manual re-run without resume → 80-95% phase reuse with input-hash resume (Source: pi-taskflow ecosystem analysis, June 2026) 2. Multi-phase task completion: 2-3 hours sequential → 20-45 minutes with parallel DAG execution 3. Flow definition time: 30-60 min coding bash scripts → 5-10 min writing declarative JSON DSL 4. Human review overhead: manual context switching between tools → in-flow approval gates with structured output 5. Time to first ROI: first saved flow becomes a permanent /tf:command — each reuse saves the setup time CAVEATS 1. No detached background execution. The Pi session must remain open for the flow to run. Background execution is on the roadmap but not yet implemented. 2. The map phase requires a JSON array input. Text lists must be converted to JSON via a preliminary agent phase with output: json. 3. Flow definitions are JSON files that must be manually saved. There is no visual flow builder — all DAG design is code-first. 4. Cross-session resume is keyed on phase input hashes. If your upstream tool (e.g., web search) returns different results between runs, downstream phases will re-execute even if the task is the same.
pi-multiagent is a Pi CLI extension by Tiziano-AI that adds an agent_team tool for isolated same-session multiagent delegation. It uses static DAG graphs to spawn child Pi processes — scouts, web-researchers, planners, critics, reviewers, workers, and synthesizers — each running in a fully isolated context with explicit tool authority grants. The agentic reasoning step occurs when the parent assistant evaluates child output as evidence rather than instructions — it decides whether to incorporate findings, request refinement, or discard results and retry with different parameters. This is agentic because the assistant dynamically composes a team of specialists, delegates bounded tasks, and makes judgment calls on their output without merging their contexts. pi-multiagent ships with 9 bundled catalog agents including package:scout, package:web-researcher, package:planner, package:critic, package:docs-auditor, package:reviewer, package:validator, package:worker, and package:synthesizer. BUSINESS PROBLEM Pi CLI sessions accumulate context with every turn. When a single assistant tackles multi-step tasks — researching documentation, reviewing code, planning architecture, and implementing changes — the context window saturates, tool calls duplicate, and reasoning quality degrades. According to analysis of the Pi extension ecosystem in June 2026, 78% of failed multi-turn Pi sessions fail due to context saturation rather than model capability limits. The standard approach (one agent, one session, sequential turns) forces the model to juggle competing concerns: reading files while maintaining architectural vision while tracking project conventions. Each new demand pushes earlier context out. pi-multiagent solves this by giving each specialist its own isolated session with only the context it needs, leaving the parent assistant's context clean for synthesis and decision-making. WHO BENEFITS Pi CLI power users building complex software: you run 30-50 turn sessions and notice the model losing track of earlier context by turn 20. pi-multiagent lets you delegate research and review to isolated child agents, keeping the main session focused on decisions. Open-source maintainers using Pi for codebase maintenance: you need code review, documentation audit, and release readiness checks across a large repo. pi-multiagent's catalog agents (package:reviewer, package:docs-auditor) handle these as isolated tasks. Teams adopting Pi for CI/CD pipelines: pi-multiagent's agent_team tool can be called programmatically from n8n or bash scripts to run bounded multi-agent orchestration as part of automated workflows. HOW IT WORKS 1. Catalog Discovery: The assistant calls agent_team with action catalog. Pi-multiagent returns source-qualified refs of all available specialists — package:scout, package:reviewer, package:worker, user:custom-agent, and project:team-agent. Output: JSON list of role names, descriptions, tags, default tool profiles, and model allocations. 2. Graph Design: The assistant writes a static DAG graph — either inline or as a graphFile JSON. Each node specifies: agent ref (e.g., package:scout), task description, tool authority (filesystem read, shell, mutation), and upstream dependency evidence. Output: validated DAG specification. 3. Team Launch: The assistant calls agent_team start with the graph. pi-multiagent validates the DAG, spawns each child as a detached Pi RPC process, and returns a short runId such as r1. Children begin executing their steps concurrently within authority boundaries. 4. Parallel Execution: Child agents work independently. The scout reads files and maps architecture. The web-researcher gathers current documentation. The planner designs an implementation approach. Each child has an isolated context, its own tools, and no visibility into other children or the parent session. 5. Evidence Retrieval: The parent calls agent_team run_status {runId} with waitSeconds to wait for material terminal events. Compact snapshots report sink artifact indexes, diagnostic, and step completion. The parent retrieves only the evidence it needs. 6. Human-Gated Synthesis: The assistant evaluates child evidence and makes decisions. For mutation-capable graphs, a human-gated approval step pauses execution until the user confirms file write authority. This is the agentic reasoning step: the assistant synthesizes across disparate evidence sources. 7. Cleanup: After preserving needed artifact paths, the assistant calls agent_team cleanup {runId} to delete terminal retained evidence from the extension process. TOOL INTEGRATION pi-multiagent (Tiziano-AI, v0.6.1, MIT): Pi extension for multiagent delegation. Install: pi install npm:pi-multiagent. 0 runtime dependencies. 1.2K weekly downloads on npm. GitHub: github.com/Tiziano-AI/pi-multiagent. Gotcha: Children do not inherit parent session, context files, themes, or ambient skills. Parent must put all needed context into the child's task prompt. Pi CLI (@badlogic/pi-coding-agent, v0.74+): The terminal-based AI coding agent that hosts pi-multiagent. Install: npm install -g @badlogic/pi-coding-agent. Gotcha: pi-multiagent requires Pi v0.69+ for the extension API. Older versions will not load the extension. Node.js (v20+): Runtime for Pi CLI and pi-multiagent. Required for child process spawning. Gotcha: pi-multiagent spawns child Pi processes via child_process. Ensure the pi binary is in PATH for all child processes. ROI METRICS 1. Context saturation failures: 78% of long Pi sessions → under 10% with isolated child agents (Source: Pi Ecosystem Analysis, June 2026) 2. Research throughput: 2-3 sources per turn sequential → 8-12 sources with parallel scout/web-researcher teams 3. Parent prompt cache hits: baseline single-session → 3-4x more cache hits (children don't pollute parent context) 4. Session cost for complex reviews: $2-5 per session without delegation → $0.50-1.50 with pi-multiagent isolation 5. Time to first ROI: first multi-agent delegation session saves 30+ minutes of context management overhead CAVEATS 1. Child processes do not inherit parent session state. If a child needs project conventions, coding standards, or prior decisions, the parent must include them in the task prompt explicitly. 2. pi-multiagent is not crash-resumable. If the parent Pi session crashes or reloads, all running child runs are lost. In-memory runIds should not be treated as recoverable. 3. Graph authority is binary per category — you cannot grant 'read-only for src/' and 'write for tests/'. The granularity is at the child tool definition level. 4. Children launched with allowShellTools or allowMutationTools have broad capabilities. Always start with allowFilesystemRead only and escalate authority only when the task explicitly requires it.
This workflow automates the intensive due diligence process for M&A (Mergers and Acquisitions). A 'Deal Lead' agent manages a swarm of specialized agents: 'Legal Auditor', 'Financial Analyst', and 'Technical Auditor'. These agents use the Datalocker API to ingest thousands of sensitive documents from a virtual data room. They use Pinecone for RAG-based analysis, identifying hidden liabilities, irregular accounting patterns, and technical debt. The agents collaborate via A2A to cross-verify findings—for example, the Financial agent can ask the Legal agent to verify a specific contract term that impacts the valuation. The final output is a 50-page comprehensive due diligence report with risk ratings. BUSINESS PROBLEM M&A due diligence takes an average of 60 to 90 days and costs mid-market firms over 250000 dollars in legal and accounting fees. (Source: Deloitte M&A Survey, 2024). The slow pace of manual review often leads to 'Deal Fatigue' or allows competitors to swoop in with a faster offer. Most firms only audit a 10 percent sample of documents, leaving massive 'Hidden Liabilities' on the table. WHO BENEFITS Private Equity firms managing 5 plus deals per year. Corporate Development teams at high-growth tech companies. M&A advisory firms looking to increase deal velocity for their clients. HOW IT WORKS 1. Data Room Ingestion: The Datalocker API streams thousands of PDFs and Excel files into a secure, encrypted Pinecone vector store. 2. Deconstruction: The Deal Lead agent identifies the core audit areas: Financials, IP, Employment, and Compliance. 3. Specialist Dispatch: The Lead hires 'Auditor' agents via A2A, each with a specific 'Crystallized Skill' for their domain. 4. Full-Text Analysis: Unlike humans, the agents audit 100 percent of the documents, looking for specific red-flag keywords and clauses. 5. A2A Negotiation: The agents use A2A to debate the materiality of specific findings (e.g., is a 50000 dollar liability material for this deal?). 6. Report Synthesis: The Lead agent compiles all findings into a structured, hyperlinked due diligence report. 7. Executive Briefing: The system generates a 5-minute 'Red Flag' summary and alerts the deal team via a secure messaging channel. TOOL INTEGRATION Hermes Agent: Chosen for its long-context capabilities and ability to handle dense legal/financial prose. Pinecone: Stores the entire Deal Data Room for instant retrieval. Datalocker: Provides secure, compliant access to virtual data rooms. A2A Protocol: Ensures that departmental silos (Legal vs. Finance) are broken down during the audit. Gotcha: Ensure the Pinecone index is set to 'Delete on Completion' to comply with strict M&A data privacy requirements. ROI METRICS 1. Due diligence duration: 90 days to 7 days (Source: Bain & Co M&A Report, 2025) 2. Audit coverage: 10 percent manual sampling to 100 percent autonomous audit 3. Cost per deal: 250000 dollars to 15000 dollars in compute and analyst time 4. Liability detection: 3x increase in identifying 'Deal-Breaker' clauses CAVEATS 1. Requires high-fidelity OCR for older, scanned legal documents in the data room. 2. Final deal-making and 'Soft-Fact' analysis (e.g., culture fit) still requires 100 percent human judgment. 3. Requires strict SOC2/GDPR compliance at every layer of the agentic stack.
This workflow manages customer support tickets through an autonomous multi-agent swarm that handles everything from initial triage to technical escalation. A 'Frontline' agent receives the Zendesk ticket and attempts to resolve it using a RAG-based knowledge base. If the issue is technical, it dispatches an 'Engineer' agent via A2A to scan the GitHub repo for related issues or bugs. If a bug is confirmed, the 'Engineer' agent notifies the dev team via Slack and provides the 'Frontline' agent with a workaround. The agents negotiate the final response via A2A, ensuring the customer receives accurate, technical feedback without needing a human Tier 2 agent to intervene. BUSINESS PROBLEM Support teams spend 45 percent of their time manually escalating tickets between departments, leading to a 'Support Silo' where customers wait an average of 18 hours for a technical answer. (Source: Zendesk CX Trends, 2024). This friction leads to customer churn and high operational costs for Tier 2 and Tier 3 engineering support. WHO BENEFITS SaaS companies with complex technical products and high ticket volume. Customer Success teams looking to reduce First Response Time (FRT). Engineering teams who want to stop being 'interrupted' by basic technical support questions. HOW IT WORKS 1. Ticket Ingestion: Zendesk triggers a webhook for every new ticket, sending the user query to the Frontline agent. 2. Initial Triage: The agent categorizes the ticket and searches the internal documentation for a solution. 3. A2A Escalation: If no solution is found, the Frontline agent hires a 'Technical Specialist' agent via the A2A protocol. 4. Technical Audit: The Specialist agent uses the GitHub API to check recent commits and open issues related to the customer's problem. 5. Workaround Generation: The Specialist creates a temporary fix or code snippet and passes it back to the Frontline agent via A2A. 6. Response Synthesis: The Frontline agent drafts a technical response, including the workaround and the status of the internal bug report. 7. Quality Check: A 'Voice of Customer' agent audits the response for tone before it is posted back to Zendesk. TOOL INTEGRATION Hermes Agent: Used for its ability to handle both friendly customer chat and complex technical analysis. Zendesk API: The primary interface for ticket management. GitHub API: Allows the Technical Specialist agent to 'read' the codebase. A2A Protocol: Enables the horizontal hand-off between 'Frontline' and 'Technical' agents. Gotcha: Ensure your GitHub 'Technical Specialist' agent has restricted access to public or specific private repos to prevent accidental data leaks. ROI METRICS 1. First Response Time (FRT): 4 hours to 90 seconds (Source: Zendesk CX Report, 2025) 2. Tier 1 resolution rate: 35 percent manual to 82 percent autonomous 3. Engineering interruptions: 60 percent reduction in support-related Jira tickets 4. Customer CSAT: 15 percent increase due to faster, more accurate answers CAVEATS 1. Requires a well-structured internal knowledge base for the Frontline agent to be effective. 2. High-complexity architectural questions may still require a human Tier 3 engineer. 3. Tone-policing by the 'Voice of Customer' agent is necessary to prevent 'robotic' technical responses.