Queue a follow-up message for a live Pi run; processed after the agent would otherwise stop.
promptstring*required
Instruction to inject into the live run
session_idstring*required
iii session id of a live run
session_idstring*required
pi::on-config-change
functionInternal: reload pi configuration when it changes.
Run one Pi coding-agent turn and wait for the result. Accepts `prompt` or a `messages` array; streams raw Pi events onto pi::events, AgentEvent frames onto agent::events, and returns {session_id, result, usage, total_cost_usd}.
cwdstring
Working directory the turn runs in
iii_contextboolean
Prepend the iii runtime discovery context (engine catalog via the iii CLI)
messagesobject[]
Alternative to prompt: role/content messages; the last user entry becomes the prompt
modelstring
Model as "provider/modelId"; empty = Pi settings default
promptstring
The user prompt for this turn
session_idstring
iii session id; reuse to resume the same Pi conversation
thinking_levelstringenum: off, minimal, low, medium, high, xhigh
Reasoning depth for this turn
timeout_msintegermax 9007199254740991
Reserved for callers; not forwarded
toolsstring[]
Tool allowlist; empty = Pi defaults (read, bash, edit, write)
session_idstring*required
usageany of
any of (2)
variant 1
input_tokensnumber*required
output_tokensnumber*required
pi::sessions::list
functionList every Pi session this worker has run.
sessionsobject[]*required
pi_session_idany of*required
session_fileany of*required
session_idstring*required
statusstring*requiredenum: working, done, error
total_cost_usdnumber*required
updated_at_msnumber*required
usageany of*required
any of (2)
variant 1
input_tokensnumber*required
output_tokensnumber*required
Start a Pi turn and return immediately; watch agent::events (group_id = session_id) for progress and turn_end.
cwdstring
Working directory the turn runs in
iii_contextboolean
Prepend the iii runtime discovery context (engine catalog via the iii CLI)
messagesobject[]
Alternative to prompt: role/content messages; the last user entry becomes the prompt
modelstring
Model as "provider/modelId"; empty = Pi settings default
promptstring
The user prompt for this turn
session_idstring
iii session id; reuse to resume the same Pi conversation
thinking_levelstringenum: off, minimal, low, medium, high, xhigh
Reasoning depth for this turn
timeout_msintegermax 9007199254740991
Reserved for callers; not forwarded
toolsstring[]
Tool allowlist; empty = Pi defaults (read, bash, edit, write)
session_idstring*required
Point-in-time status of a Pi session.
session_idstring*required
iii session id returned by pi::run / pi::start
recordany of*required
any of (2)
variant 1
pi_session_idany of*required
… expand 2 nestedcollapse
session_fileany of*required
… expand 2 nestedcollapse
session_idstring*required
statusstring*requiredenum: working, done, error
total_cost_usdnumber*required
updated_at_msnumber*required
usageany of*required
… expand 2 nestedcollapse
any of (2)
variant 1
input_tokensnumber*required
output_tokensnumber*required
session_idstring*required
Inject a steering instruction into a live Pi run; applied after the current tool calls finish.
promptstring*required
Instruction to inject into the live run
session_idstring*required
iii session id of a live run
session_idstring*required
Interrupt a live Pi run for a session.
session_idstring*required
iii session id returned by pi::run / pi::start
session_idstring*required
run::start_and_wait
functionAlias for pi::run under the shared agent entrypoint: run a turn for {session_id, messages} and return when it ends.
cwdstring
Working directory the turn runs in
iii_contextboolean
Prepend the iii runtime discovery context (engine catalog via the iii CLI)
messagesobject[]
Alternative to prompt: role/content messages; the last user entry becomes the prompt
modelstring
Model as "provider/modelId"; empty = Pi settings default
promptstring
The user prompt for this turn
session_idstring
iii session id; reuse to resume the same Pi conversation
thinking_levelstringenum: off, minimal, low, medium, high, xhigh
Reasoning depth for this turn
timeout_msintegermax 9007199254740991
Reserved for callers; not forwarded
toolsstring[]
Tool allowlist; empty = Pi defaults (read, bash, edit, write)
session_idstring*required
usageany of
any of (2)
variant 1
input_tokensnumber*required
output_tokensnumber*required