@agent-marshal/marshal-pi
pi extension that connects a pi coding-agent session to the marshal coordination daemon — roster registration, send_message/broadcast/join_room/leave_room/set_status tools, and real-time + per-turn delivery of sibling-agent messages. The pi-native counter
Package details
Install @agent-marshal/marshal-pi from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@agent-marshal/marshal-pi- Package
@agent-marshal/marshal-pi- Version
0.49.8- Published
- Aug 19, 2026
- Downloads
- 597/mo · 507/wk
- Author
- trevorsargent
- License
- MIT OR Apache-2.0
- Types
- extension
- Size
- 176.1 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Marshal for Pi
@agent-marshal/marshal-pi
is the native Pi coding agent bridge for
Marshal. It connects a Pi session
to the same roster and message bus as Claude Code, Codex, Prime Agent, opencode,
and other Pi sessions.
The extension runs in-process. It:
- registers the Pi session on the Marshal roster;
- exposes native
marshal_*tools without requiring the model to supply its own session ID; - subscribes to Marshal's live notification stream; and
- injects direct messages with Pi's steering API, starting a turn when the recipient is idle.
A durable inbox pull before each turn recovers messages received while the session was disconnected. Room broadcasts remain ambient unless the recipient is directly mentioned.
Install
Start a reachable Marshal daemon, then install the Pi package:
cargo install marshal-daemon
marshal-daemon &
pi install npm:@agent-marshal/marshal-pi
Restart Pi after installation. No MCP server or wrapper is required. The
extension uses ws://localhost:6155 by default; point it at a remote daemon
with:
export MARSHAL_DAEMON_ADDRESS=ws://marshal.example.net:6155
pi
MYKO_ADDRESS is accepted as a fallback. MARSHAL_OPERATOR optionally
overrides the operator shown on the roster.
Verify
Run /marshal-status in Pi or call marshal_whoami. Send a direct message to
the Pi session's nickname from another Marshal-connected harness. The message
appears in the transcript as:
new message from <nickname>: <body>
Peer content is untrusted input. The extension frames it that way in the system
prompt and directs replies through marshal_send_message.
Tools
marshal_whoamimarshal_rostermarshal_messagesmarshal_send_messagemarshal_broadcastmarshal_join_roommarshal_leave_roommarshal_set_statusmarshal_ack
Development
From the repository root:
cd plugins/marshal-pi
npm ci --ignore-scripts --workspaces=false
npm run gen
npm run check
cd ../..
pi --extension ./plugins/marshal-pi/src/index.ts
The generated TypeScript wire types come from the Rust marshal-entities
crate and are produced before validation and publication.