Delegate self-contained work to a cheaper/faster model in a fresh, ephemeral Pi context.
Requires Piclaw >=1.8.0.
pi --list-models are executable.model must be an executable provider/model ID. Overrides bypass automatic tier and exclusion policy, but never executability or image-capability checks.--mode json --no-session --no-extensions; Delegate parses structured messages, tool progress, usage, model, stop reason, and errors.Open Settings → Add-Ons, install Delegate, then reload Piclaw when convenient. Installing or updating the package does not activate new code until Piclaw reloads.
Delegate self-activates after reload. It may also be listed explicitly in .piclaw/config.json:
{
"tools": {
"additionalDefaultTools": ["delegate"]
}
}delegate({
prompt: "Summarize the public API and list compatibility risks.",
files: ["src/client.ts"],
task_category: "summarize"
})| Category | Automatic target | Use for |
|---|---|---|
quick |
Tier 2 | Formatting, extraction, translation, factual Q&A |
summarize |
Tier 2 | File, note, and code summaries |
code |
Tier 3 | Code generation and mechanical refactoring |
analyze |
Tier 3 | Code review, architecture analysis, debugging |
reason |
Tier 3 | Complex planning and multi-step logic |
judge |
Tier 3 | A second opinion from another family when a valid alternative exists |
The requested tier is capped at the current model's verified tier. If that tier has no eligible model, Delegate searches lower tiers. Judge mode crosses families only when an eligible alternative exists.
| Profile | Child tools |
|---|---|
read_only |
read,grep,find,ls |
standard (default) |
read,grep,find,ls,bash |
full |
read,grep,find,ls,bash,edit,write |
A discovered MCP adapter is appended only when explicitly available. A custom comma-separated list of child Pi built-ins is also accepted. A named tool must exist in the child; installed Piclaw add-on tools are not inherited automatically.
delegate({
prompt: "Review this implementation.",
task_category: "analyze",
model: "github-copilot/gpt-5.4-mini"
})The ID must exactly match the child CLI catalog. An explicit override bypasses automatic tier, provider, and model-exclusion policy, but it must still be executable and support any attached image.
/workspace; symlinks cannot escape it, and non-regular files are rejected before sniffing.For a PDF or Office document, extract it with the appropriate Piclaw tool and delegate the resulting text. Convert unsupported images to PNG, JPEG, GIF, WebP, or BMP first.
The browser pane reads configuration from /agent/addons/api/delegate/config and model diagnostics from /agent/addons/api/delegate/models. Both are authenticated local Piclaw endpoints; Delegate stores no secrets.
Delegate keeps these roles separate:
ctx.modelRegistry; capability metadata and the current model.pi --list-models; the only source of subprocess candidates.Executable discovery is cached for 60 seconds. A manual Settings refresh invalidates it. Failed refreshes preserve the last known-good snapshot, expose the error, and remain stale so the next request retries automatically.
SIGTERM to SIGKILL if necessary.onUpdate while it runs.See REFERENCE.md for the full selection, execution, and diagnostics contract.
delegate