delegate
extension 1 skill
Delegate tasks to verified cheaper/faster child-Pi models with deterministic tier-safe selection
cost-optimizationdelegationmulti-model
Open Settings → Add-Ons and pick delegate
Source: addons/delegate

Delegate self-contained work to a cheaper/faster model in a fresh, ephemeral Pi context.

Requires Piclaw >=1.8.0.

Behaviour

Installation

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:

json
{
  "tools": {
    "additionalDefaultTools": ["delegate"]
  }
}

Usage

ts
delegate({
  prompt: "Summarize the public API and list compatibility risks.",
  files: ["src/client.ts"],
  task_category: "summarize"
})

Task categories

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.

Tool profiles

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.

Explicit model override

ts
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.

Files

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.

Settings API

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.

Model catalogs and caching

Delegate keeps these roles separate:

  1. Runtime catalogctx.modelRegistry; capability metadata and the current model.
  2. Executable catalog — child pi --list-models; the only source of subprocess candidates.
  3. Current model — classified independently to establish the automatic tier ceiling.

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.

Failure and timeout behavior

Limitations

See REFERENCE.md for the full selection, execution, and diagnostics contract.

Skills