Pi · Dynamic Workflows · Cloudflare Pages

One terminal.
Four minds.

Run Claude Fable as your lead agent, dispatch OpenAI Sol and xAI Grok as adversarial specialists, and call OpenRouter Fusion when a second panel is worth the cost.

pi / multi-model harness
pi
Model scope: fable:low, sol:high,
  grok:high, fusion:low

Fable is the lead
Dynamic Workflows loaded
Sandbox initialized

/triad audit this design_
Architecture

Debate first. Write once.

The main conversation stays with Fable. Read-only agents inspect and challenge one another in parallel. A single implementation agent receives the decision, works in a git worktree, and verifies the result.

leadClaude Fable 5Understands intent and adjudicates.
criticOpenAI SolTests feasibility and implementation details.
adversaryxAI GrokChallenges assumptions and edge cases.
optional panelOpenRouter FusionAdds researched multi-model synthesis.
only writerSol implementerApplies the agreed change in a worktree.
Setup

From plain Pi to a model panel.

The harness lives in user-level Pi configuration, so it works in every project. Never paste keys into config snippets, repositories, or shell history.

AUTH

Authenticate each provider once

Launch Pi, run /login, and save credentials for Anthropic, OpenAI, xAI, and OpenRouter. Choose the Anthropic API-key path if Pi should bill API usage rather than a Claude subscription.

pi
/login
EXT

Install Dynamic Workflows

The extension supplies parallel agents, named roles, phases, retries, saved commands, and worktree isolation.

pi install npm:@quintinshaw/pi-dynamic-workflows
LEAD

Set Fable-low as the persistent lead

Add these fields to ~/.pi/agent/settings.json. Ctrl-P will cycle only through the four intended routes.

{
  "defaultProvider": "anthropic",
  "defaultModel": "claude-fable-5",
  "defaultThinkingLevel": "low",
  "enabledModels": [
    "anthropic/claude-fable-5:low",
    "openai-codex/gpt-5.6-sol:high",
    "xai-auth/grok-4.5:high",
    "openrouter/openrouter/fusion:low"
  ]
}
ROUTE

Route workflow tiers explicitly

Create ~/.pi/workflows/model-tiers.json. Exact routing prevents capability guesses.

{
  "tiers": {
    "small": "xai-auth/grok-4.5:high",
    "medium": "openai-codex/gpt-5.6-sol:high",
    "big": "anthropic/claude-fable-5:low"
  }
}
ROLES

Keep deliberators read-only

Create definitions under ~/.pi/agent/agents/. Use this shape for Fable, Sol, Grok, and Fusion. Only the implementer receives write tools.

---
name: fable-deliberator
description: Fable lead reasoner and adjudicator
tools: read, grep, find, ls
model: anthropic/claude-fable-5:low
---
Develop a concrete answer, state assumptions, and engage
with the other models' arguments. Do not modify files.
---
name: sol-implementer
description: Sol implementation agent
tools: read, bash, edit, write, grep, find, ls
model: openai-codex/gpt-5.6-sol:high
isolation: worktree
---
Implement only the agreed scope. Preserve unrelated work,
run focused checks, and report exact files changed.
FLOW

Make workflows predictable

Create ~/.pi/workflows/settings.json. Mentioning “deliberate” arms workflows; ordinary prompts stay single-agent.

{
  "keywordTriggerEnabled": true,
  "keywordTriggerWord": "deliberate",
  "defaultAgentTimeoutMs": 600000,
  "defaultConcurrency": 3,
  "defaultAgentRetries": 1,
  "progressPanelMode": "detailed",
  "persistAgentSessions": false
}
Keep the sandbox. A worktree prevents parallel writers from colliding; the sandbox limits what tools can reach. They solve different problems.
Daily use

Three levels of effort.

IntentUseWhat happens
Normal codingpiFable-low handles the task directly.
Explicit debate/triad <task>Fable, Sol, and Grok propose independently, cross-critique, then Fable decides.
Dynamic orchestrationInclude deliberateFable designs a task-specific workflow using named agents.
Research-heavy second opinion/fusion <task>OpenRouter Fusion runs its own panel and judge.
Manual model switchCtrl-PCycle through the configured routes.
Cost rule: use one model by default, the triad when disagreement is valuable, and Fusion only when research confidence justifies several underlying model calls.
Benefits

Why this beats one giant agent.

Perspective

Independent first passes

Parallel proposals reduce anchoring before models see one another’s answers.

Debate

Real cross-examination

Each model accepts, rejects, or revises concrete competing claims.

Safety

Controlled writes

Read-only reviewers cannot change files while still debating.

Routing

Model specialization

Fable leads, Sol pressure-tests implementation, and Grok hunts blind spots.

Economics

Predictable spend

Single-agent work stays single-agent; panels require explicit intent.

Portability

Project portability

User-level roles follow Pi across repositories without boilerplate.

Troubleshooting

Common failure modes.

Anthropic says “out of extra usage”
Pi is using subscription OAuth instead of the API-key credential. Run /login, select Anthropic, save the API key, then restart Pi.
A model appears but calls fail
Discovery and authentication are separate. Re-run /login for that provider and verify with one minimal no-tools prompt.
Workflow agents edit the same files
Keep reviewers read-only. Give write tools to one implementer and set isolation: worktree.
Startup prints skill collisions
The same skill exists in ~/.pi/agent/skills and ~/.agents/skills. Keep one canonical copy and move the duplicate outside Pi discovery.