delegate
extension 1 skill
Delegate tasks to cheaper/faster models with auto model selection, tool access, and MCP support
cost-optimizationdelegationmulti-model
v0.1.0
Open Settings → Add-Ons and pick delegate
Or install from the terminal
# via pi CLI
pi install npm:@rcarmo/piclaw-addon-delegate@0.1.0

# via bun add (piclaw configures the registry automatically)
cd /workspace/.piclaw/addons
bun add @rcarmo/piclaw-addon-delegate@0.1.0

Send tasks to a cheaper/faster model in a fresh context with auto model selection, tool access, and MCP support.

Features

Install

cp extensions/delegate.ts /workspace/.pi/extensions/

cp -r skills/delegate /workspace/.pi/skills/

Then restart PiClaw. The extension auto-activates itself — no manual activate_tools needed.

> Note: PiClaw automatically creates a node_modules symlink in .pi/extensions/ on startup to resolve framework packages (@sinclair/typebox, etc.). No manual symlink is needed.

Optional: config-based activation

You can also add delegate to the default active tools in .piclaw/config.json:

{

"tools": {

"additionalDefaultTools": ["delegate"]

}

}

Stress test results

Tested on 12-core / 7.5GB container (github-copilot provider):

| Concurrency | Success rate | Avg latency | Max latency | Memory delta |

|---|---|---|---|---|

| 1 | 100% | 3.6s | 3.6s | — |

| 5 | 100% | 2.4s | 3.1s | — |

| 10 | 100% | 2.5s | 3.0s | +7 MB |

| 20 | 100% | 3.3s | 5.6s | +3 MB |

| 30 | 100% | 3.8s | 4.6s | +14 MB |

Safe for up to 20 concurrent calls. Bottleneck is API rate limits, not local resources.

Running the stress test


bun tests/delegate-stress-test.ts

bun tests/delegate-stress-test-2.ts

This is redundant if using the extension (it self-activates), but useful if you want explicit config control.

Quick reference

| Category | Model picked | Use for |

|---|---|---|

| quick | gpt-5.4-mini (tier 2) | Formatting, factual Q&A, translation |

| summarize | gpt-5.4-mini (tier 2) | File/note/code summaries |

| code | claude-sonnet-4.6 (tier 3) | Code gen, refactoring |

| analyze | claude-sonnet-4.6 (tier 3) | Code review, debugging |

| reason | claude-sonnet-4.6 (tier 3) | Complex logic — if you need frontier, don't delegate |

| judge | Different family than current (tier 3) | Second opinion, verify, double check |

| Tool profile | Tools included |

|---|---|

| read_only | read, grep, find, ls, mcp |

| standard (default) | read, grep, find, ls, bash, mcp |

| full | read, grep, find, ls, bash, edit, write, mcp |

Skills