Keep a session alive for inbound work
Keep-alive sessions stay resident so later comms or external events can wake them up as future runtime-backed work.- CLI
- JSON-RPC
- REST
- Python
- TypeScript
Listen as a remote signed peer
Use therkat run comms flags when the agent process itself should be reachable
by other Meerkats or by a mob supervisor:
rkat-rpc --tcp, which exposes JSON-RPC for hosts and
SDKs rather than the signed peer channel.
Reply from inside an agent turn
The agent-facing tools are separate from the host APIs below. When a peer message caused the current turn, use the pre-addressedreply_to_peer tool:
peer_id input. The runtime mints a reply capability for the
incoming delivery and revalidates trust when the reply is sent. If several
peer messages were admitted in the same turn, the first call returns
ambiguous_reply with delivery IDs; retry with one of them:
peers, then
use send_message. Use send_response only when answering a typed
send_request, not as a general reply tool.
Send a typed comms command
comms/send is the typed host-side comms surface. Use it for local input, peer messages, peer lifecycle notifications, peer requests, and peer responses. The to field is the canonical peer ID (from comms/peers), not a display name.
- JSON-RPC
- REST
- MCP
- Python
- TypeScript
send_ambiguous details instead of send_failed:
Declare outbound content taint
Host-side peer sends can inherit the runtime declaration, declare a value for one send, or explicitly send no declaration. This example affirmatively marks the content as tainted:content_taint to inherit. Set it to "undeclared" to suppress a
runtime-level declaration for that send. Agent-facing tools do not expose this
override; they inherit the host-owned runtime declaration.
List discoverable peers
Usecomms/peers to see which trusted peers are currently visible to the session runtime.
- JSON-RPC
- REST
- MCP
- Python
- TypeScript
Inject a durable external event
Usesession/external_event when the event should enter the runtime’s external-ingress lane rather than the comms command lane.
- JSON-RPC
- REST
- Python
- TypeScript
Use
comms/send for typed inbox and peer communication. Use session/external_event when an outside system is appending durable runtime-backed work.