run_thronglet
Runs a selected harness/model agent on a task in a working directory and returns structured or text output; supports background runs for later collection.
Instructions
Runs an agent of an installed harness (see list_harnesses) on a task in cwd and returns its final message as JSON {session_id, text, stop_reason, usage, duration_s, warnings?}; with schema, structured replaces text. description names the thronglet for listings. With background: true the call returns {session_id, state, queued} as soon as the turn runs; collect the result with wait_thronglet.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent": "<agent>",
"prompt": "<prompt>",
"cwd": "<cwd>",
"description": "<description>"
},
"name": "run_thronglet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | Absolute path; the agent works in this tree | |
| agent | Yes | <harness>/<model>[:<effort>], e.g. claude/opus:max, codex/gpt-6-sol:xhigh; valid values: list_harnesses | |
| prompt | Yes | Task for the agent | |
| schema | No | JSON Schema (draft-07 or 2020-12) for structured output: the agent ends with a matching JSON value as its final message, returned as `structured` instead of `text` | |
| timeout_s | No | Wall-clock limit for the run in seconds; default from config (21600) | |
| background | No | Return as soon as the turn is running (or queued behind the session's current turn); collect the result with wait_thronglet | |
| description | Yes | What this thronglet is for, in a few words; shown in session listings |