Skip to content
Registry

pi

v0.1.6

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.

Install

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

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

Functions9

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

  • 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

  • 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

Point-in-time 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

Interrupt a live Pi run for a session.

Request
  • session_idstringrequired

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

Response
  • reasonstring
  • session_idstringrequired
  • stoppedbooleanrequired

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

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