Skip to content
Registry

pi

v0.1.33

pi coding agent as an iii worker — pi::run drives headless turns and pi::terminal::* runs the same agent in a shell::pty session on its own console page. Both publish raw events on the pi::raw-event trigger type and AgentEvent frames on pi::agent-event.

license: Apache-2.0agentclicoding-agentconsole-uiheadlesspiterminal

Install

bash
iii trigger compose::add worker=pi@0.1.33

Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.

Functions14

pi::auth::status

Function

Check which providers a pi terminal on this host can use. Reports the credential kind, a subscription login or an API key, read from `pi auth check`; never returns the credential itself.

Request
Empty object
Response
  • billingstringrequiredenum subscription, api-key, none, unknown
  • detailstringrequired
  • labelstringrequired
  • providerstring
  • providersobject[]
    • kindstringenum , subscription, api-key
    • providerstring
    • readyboolean
    • reasonstring
  • readyboolean
  • reasonstring

pi::follow_up

Function

Queue a follow-up message for a live Pi run; processed after the agent would otherwise stop.

Request
  • promptstringrequired

    Instruction to inject into the live run

  • session_idstringrequired

    iii session id of a live run

Response
  • queuedbooleanrequired
  • reasonstring
  • session_idstringrequired

pi::on-config-change

Function

Internal: reload pi configuration when it changes.

Request
Empty object
Response
valuenull

pi::run

Function

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

Request
  • 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

    • contentany ofrequired
      any of (2)
      Variant 1
      valuestring
      Variant 2
      itemsobject[]
      • typestringrequired
    • rolestringrequired
  • modelstring

    Model as "provider/modelId"; empty = Pi settings default

  • parent_session_idstring

    The session delegating this run. Written to the child session metadata, which is what nests it under its parent in the console — the same link a harness sub-agent carries.

  • 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)

Response
  • busyboolean
  • is_errorboolean
  • num_turnsnumber
  • pi_session_idany of
    any of (2)
    Variant 1
    valuestring
    Variant 2
    valuenull
  • reasonstring
  • resultstring
  • session_idstringrequired
  • stop_reasonstring
  • total_cost_usdnumber
  • usageany of
    any of (2)
    Variant 1
    • cache_read_tokensnumber
    • cache_write_tokensnumber
    • input_tokensnumberrequired
    • output_tokensnumberrequired
    Variant 2
    valuenull

pi::sessions::list

Function

List every Pi session this worker has run.

Request
Empty object
Response
  • sessionsobject[]required
    • cwdstringrequired
    • modelstringrequired
    • pi_session_idany ofrequired
      any of (2)
      Variant 1
      valuestring
      Variant 2
      valuenull
    • session_fileany ofrequired
      any of (2)
      Variant 1
      valuestring
      Variant 2
      valuenull
    • session_idstringrequired
    • statusstringrequiredenum working, done, error
    • total_cost_usdnumberrequired
    • turnsnumberrequired
    • updated_at_msnumberrequired
    • usageany ofrequired
      any of (2)
      Variant 1
      • cache_read_tokensnumber
      • cache_write_tokensnumber
      • input_tokensnumberrequired
      • output_tokensnumberrequired
      Variant 2
      valuenull

pi::start

Function

Start a Pi turn and return immediately; watch agent::events (group_id = session_id) for progress and turn_end.

Request
  • 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

    • contentany ofrequired
      any of (2)
      Variant 1
      valuestring
      Variant 2
      itemsobject[]
      • typestringrequired
    • rolestringrequired
  • modelstring

    Model as "provider/modelId"; empty = Pi settings default

  • parent_session_idstring

    The session delegating this run. Written to the child session metadata, which is what nests it under its parent in the console — the same link a harness sub-agent carries.

  • 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)

Response
  • busyboolean
  • reasonstring
  • session_idstringrequired
  • startedbooleanrequired

pi::status

Function

Check the status of a Pi session.

Request
  • session_idstringrequired

    iii session id returned by pi::run / pi::start

Response
  • livebooleanrequired
  • recordany ofrequired
    any of (2)
    Variant 1
    • cwdstringrequired
    • modelstringrequired
    • pi_session_idany ofrequired
      Show 2 nested
      any of (2)
      Variant 1
      valuestring
      Variant 2
      valuenull
    • session_fileany ofrequired
      Show 2 nested
      any of (2)
      Variant 1
      valuestring
      Variant 2
      valuenull
    • session_idstringrequired
    • statusstringrequiredenum working, done, error
    • total_cost_usdnumberrequired
    • turnsnumberrequired
    • updated_at_msnumberrequired
    • usageany ofrequired
      Show 2 nested
      any of (2)
      Variant 1
      • cache_read_tokensnumber
      • cache_write_tokensnumber
      • input_tokensnumberrequired
      • output_tokensnumberrequired
      Variant 2
      valuenull
    Variant 2
    valuenull
  • session_idstringrequired

pi::steer

Function

Inject a steering instruction into a live Pi run; applied after the current tool calls finish.

Request
  • promptstringrequired

    Instruction to inject into the live run

  • session_idstringrequired

    iii session id of a live run

Response
  • reasonstring
  • session_idstringrequired
  • steeredbooleanrequired

pi::stop

Function

Stop a live Pi run for a session.

Request
  • session_idstringrequired

    iii session id returned by pi::run / pi::start

Response
  • reasonstring
  • session_idstringrequired
  • stoppedbooleanrequired

pi::task

Function

Delegate one task to Pi and return its session id immediately — the sub-agent shape: it never parks the caller. The outcome is written to state under scope `agent_tasks`, key the child session id, so bind a `state` trigger on that BEFORE calling and be woken by it; progress streams onto agent::events (group_id = session_id). Pass `parent_session_id` to nest the child under the session that delegated it.

Request
  • cwdstring

    Working directory the turn runs in

  • iii_contextboolean

    Prepend the iii runtime discovery context (engine catalog via the iii CLI)

  • modelstring

    Model as "provider/modelId"; empty = Pi settings default

  • parent_session_idstring

    The session delegating this run. Written to the child session metadata, which is what nests it under its parent in the console — the same link a harness sub-agent carries.

  • session_idstring

    iii session id; reuse to resume the same Pi conversation

  • taskstringrequiredmin 1 chars

    The child's self-contained goal. It cannot see the caller's context, so name every resource it needs.

  • 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)

Response
  • busyboolean
  • reasonstring
  • session_idstringrequired
  • startedbooleanrequired

pi::terminal::activity

Function

A pi lifecycle event from a terminal session (session_start, agent_start, tool_start, tool_end, agent_end, session_end), posted by the workspace extension. Translated into AgentEvent frames on the events stream.

Request
  • argsobject
  • call_idstring
  • cwdstring
  • eventstring
  • is_errorboolean
  • promptstring
  • resultunknown
  • session_idstring
  • toolstring
Response
  • eventstringrequired
  • okbooleanrequired

pi::terminal::describe

Function

What a Pi terminal session runs: the pi binary, its argv, the workspace directory, and the session environment. The console page passes this straight to shell::pty::open.

Request
Empty object
Response
  • activity_bridgestring

    The `iii` CLI on the terminal host that carries this session's activity to the bus. Empty means nothing will reach the events stream.

  • argsstring[]required
  • cwdstringrequired
  • detailstring

    Anything wrong that does not stop a session from opening.

  • envobjectrequired
  • programstringrequired

pi::ui-content

Function

Console UI asset content (console plumbing).

Request
  • pathstringrequired
Response
  • contentstringrequired
  • content_typestring

run::start_and_wait

Function

Alias for pi::run under the shared agent entrypoint: run a turn for {session_id, messages} and return when it ends.

Request
  • 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

    • contentany ofrequired
      any of (2)
      Variant 1
      valuestring
      Variant 2
      itemsobject[]
      • typestringrequired
    • rolestringrequired
  • modelstring

    Model as "provider/modelId"; empty = Pi settings default

  • parent_session_idstring

    The session delegating this run. Written to the child session metadata, which is what nests it under its parent in the console — the same link a harness sub-agent carries.

  • 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)

Response
  • busyboolean
  • is_errorboolean
  • num_turnsnumber
  • pi_session_idany of
    any of (2)
    Variant 1
    valuestring
    Variant 2
    valuenull
  • reasonstring
  • resultstring
  • session_idstringrequired
  • stop_reasonstring
  • total_cost_usdnumber
  • usageany of
    any of (2)
    Variant 1
    • cache_read_tokensnumber
    • cache_write_tokensnumber
    • input_tokensnumberrequired
    • output_tokensnumberrequired
    Variant 2
    valuenull

Triggers0

No triggers registered

Search the registry

Find workers, kits and executables, or jump to a page.