@agent-marshal/marshal-prime-agent
v0.50.6
Published
Prime Agent extension that connects live conversations to the marshal coordination daemon with native tools and real-time steering delivery of sibling-agent messages.
Maintainers
Readme
Marshal for Prime Agent
@agent-marshal/marshal-prime-agent is the native Prime Agent bridge for
marshal. It is separate from the
marshal-pi package and targets Prime Agent's conversation lifecycle and canonical
session identities.
The extension runs inside each top-level Prime Agent conversation. Prime Agent RLM sub-agents stay part of their parent's Marshal session and are not added to the roster independently. It:
- registers the top-level conversation on the Marshal roster using Prime Agent's session ID;
- exposes native
marshal_*tools to the model; - subscribes to Marshal's live notification stream; and
- injects incoming direct messages with
pi.sendMessage(..., { deliverAs: "steer", triggerTurn: true }).
A direct message therefore appears in the transcript immediately and starts a turn when the recipient is idle. While the agent is working, it steers the active run at the next tool boundary. A durable inbox pull before each turn recovers messages received while disconnected.
Install
Start a reachable daemon, then install the Prime Agent package:
cargo install marshal-daemon
marshal-daemon &
prime-agent package install npm:@agent-marshal/marshal-prime-agentRestart Prime Agent after installation. No MCP server or wrapper is required. For a remote daemon:
export MARSHAL_DAEMON_ADDRESS=ws://marshal.example.net:6155
prime-agentThe default is ws://localhost:6155. MARSHAL_OPERATOR optionally overrides the
operator name shown on the roster.
For development:
cargo run -p marshal-entities --no-default-features --features codegen \
--bin typegen -- plugins/marshal-prime-agent/src/generated
prime-agent --extension ./plugins/marshal-prime-agent/src/index.tsVerify
Run /marshal-status inside Prime Agent or use marshal_whoami. Send a direct
message from another Marshal session to its nickname or session ID. It appears as:
new message from <nickname>: <body>Peer content is untrusted input. The extension adds that warning to the system
prompt and directs replies through marshal_send_message. Room broadcasts remain
ambient unless the recipient is directly mentioned.
Tools
marshal_whoamimarshal_rostermarshal_messagesmarshal_send_messagemarshal_broadcastmarshal_join_roommarshal_leave_roommarshal_set_statusmarshal_ack
