run_local_agent
Delegate low-complexity or bulk tasks like searching, transforming, and summarizing files to a local subagent that runs its own tool loop, returning a compact answer and staged-write IDs without polluting your context.
Instructions
Delegate a low-complexity task to the LOCAL SUBAGENT: the cheap model runs its own tool loop (read_file, list_dir, search_files, stage_write, whitelisted run_command, plus any registered dynamic tools) entirely server-side. File contents and intermediate steps never enter your context — you get back a compact final answer + staged-write op ids to review. Use for mechanical, monotonous, or bulk work: finding things, transforming files, answering questions over many files. Do NOT delegate work needing real reasoning, security judgment, or architecture decisions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Self-contained task description. The local agent sees ONLY this text + optional context/files — include paths, names, and exactly what to return. | |
| files | No | File paths to read server-side and inline into the task (contents bypass your context). Keep this small — it consumes the local model's context window. | |
| model | No | ||
| paths | No | File/dir paths to tell the agent about WITHOUT inlining contents — it reads them via tools as needed. Better for many/large files. | |
| think | No | Chain-of-thought control for the agent's model (ollama `think`). think:false leaves more context/steps for tool calls on thinking models. | |
| verify | No | "self" = a second local pass critiques the result and flags it needs_review if it looks wrong. | |
| context | No | Extra background for the local agent (kept compact). | |
| num_ctx | No | Context window for the local model (ollama only). Smaller = less VRAM. | |
| options | No | Provider-native request overrides (ollama `options` keys / openai body fields). | |
| provider | No | ||
| max_steps | No | ||
| run_async | No | true = run as a background job; returns job_id immediately, poll get_job for progress + result. false = synchronous, but if the task outlasts config agent_sync_grace_ms the call returns a job_id so the result is never lost. Default: config agent_async. | |
| timeout_s | No | ||
| temperature | No | ||
| allowed_tools | No | Subset of local tools to permit, e.g. ["read_file","search_files"]. Default: all built-ins + dynamic tools. |