Skip to content

WebSocket Protocol Reference

All communication between GSV clients, nodes, and the gateway uses JSON frames over WebSocket. The gateway endpoint is GET /ws.


Frame Types

Every message is a JSON object with a type discriminator.

Request Frame

json
{
  "type": "req",
  "id": "<string>",
  "method": "<string>",
  "params": <object|undefined>
}
FieldTypeRequiredDescription
type"req"yesFrame type discriminator.
idstringyesUnique request identifier (UUID). Used to correlate responses.
methodstringyesRPC method name.
paramsunknownnoMethod-specific parameters.

Response Frame

json
{
  "type": "res",
  "id": "<string>",
  "ok": <boolean>,
  "payload": <object|undefined>,
  "error": <ErrorShape|undefined>
}
FieldTypeRequiredDescription
type"res"yesFrame type discriminator.
idstringyesMatches the id of the originating request.
okbooleanyestrue for success, false for error.
payloadunknownnoPresent when ok is true. Method-specific result.
errorErrorShapenoPresent when ok is false.

Event Frame

json
{
  "type": "evt",
  "event": "<string>",
  "payload": <object|undefined>,
  "seq": <number|undefined>
}
FieldTypeRequiredDescription
type"evt"yesFrame type discriminator.
eventstringyesEvent name.
payloadunknownnoEvent-specific payload.
seqnumbernoSequence number for ordered events.

ErrorShape

typescript
{
  code: number;
  message: string;
  details?: unknown;
  retryable?: boolean;
}
FieldTypeRequiredDescription
codenumberyesError code.
messagestringyesHuman-readable error message.
detailsunknownnoAdditional error context.
retryablebooleannoWhether the client should retry.

Connection Lifecycle

  1. Client opens a WebSocket to GET /ws.
  2. Client sends a connect request as the first frame.
  3. Gateway validates the connection and responds with a ConnectResult.
  4. The connection is now established. The client may send RPC requests; the gateway may send events and requests.
  5. The connection terminates when either side closes the WebSocket.

RPC Methods

There are 46 registered RPC methods, organized by category below. Each entry documents the method name, direction, request params type, and response payload type.

Direction abbreviations:

  • C -> G: client sends to gateway
  • N -> G: node sends to gateway
  • G -> N: gateway sends to node (dispatched as events)

Connect

connect

Direction: C -> G, N -> G

Handshake method. Must be the first frame sent after WebSocket open.

Params: ConnectParams

FieldTypeRequiredDescription
minProtocolnumberyesMinimum protocol version supported. Currently 1.
maxProtocolnumberyesMaximum protocol version supported. Currently 1.
clientobjectyesClient identity (see below).
toolsToolDefinition[]noTool definitions (node mode only).
nodeRuntimeNodeRuntimeInfonoNode runtime capabilities (node mode only).
auth{ token?: string }noAuthentication credentials.

client object:

FieldTypeRequiredDescription
idstringyesClient identifier. Nodes use node-<hostname>. Clients use client-<uuid>.
versionstringyesCLI version.
platformstringyesOS name (e.g., macos, linux).
modestringyesConnection mode: "client", "node", or "channel".
channelChannelIdnoChannel identifier (channel mode only).
accountIdstringnoAccount identifier (channel mode only).

Result: ConnectResult

FieldTypeDescription
type"hello-ok"Fixed response type.
protocol1Negotiated protocol version.
server.versionstringGateway version.
server.connectionIdstringUnique connection ID assigned by the gateway.
features.methodsstring[]Available RPC methods.
features.eventsstring[]Available event types.

Chat

chat.send

Direction: C -> G

Send a message to the agent for processing.

Params:

FieldTypeRequiredDescription
sessionKeystringyesTarget session key.
messagestringyesMessage text. May contain slash commands or directives.
runIdstringnoClient-generated run ID for correlation.

Result: One of three variants:

Started (normal agent turn):

FieldTypeDescription
status"started"Agent turn has started.
runIdstringRun identifier.
queuedbooleanWhether the message was queued behind another run.
directives.thinkLevelstringThinking level directive, if parsed from message.
directives.modelobjectModel override directive, if parsed from message.

Command (slash command handled synchronously):

FieldTypeDescription
status"command"A slash command was handled.
commandstringThe command that was executed.
responsestringCommand output.
errorstringError message, if command failed.

Directive-only (no agent turn needed):

FieldTypeDescription
status"directive-only"Only directives were parsed; no message sent to agent.
responsestringAcknowledgement text.
directivesobjectParsed directives.

Configuration

config.get

Direction: C -> G

Get gateway configuration values.

Params:

FieldTypeRequiredDescription
pathstringnoDot-separated config path. If omitted, returns the full config object.

Result:

FieldTypeDescription
pathstringEchoed path, if provided.
valueunknownValue at the specified path.
configGsvConfigFull config object, if no path specified.

config.set

Direction: C -> G

Set a gateway configuration value.

Params:

FieldTypeRequiredDescription
pathstringyesDot-separated config path.
valueunknownyesValue to set.

Result:

FieldTypeDescription
oktrueSuccess indicator.
pathstringEchoed path.

Tools

tools.list

Direction: C -> G, N -> G

List all tools registered by connected nodes.

Params: none

Result:

FieldTypeDescription
toolsToolDefinition[]Array of tool definitions.

ToolDefinition:

FieldTypeDescription
namestringTool name (e.g., macbook:Bash).
descriptionstringTool description.
inputSchemaobjectJSON Schema for tool input.

tool.invoke

Direction: C -> G

Invoke a tool by name. The gateway dispatches the call to the appropriate node. This is a deferred method: the gateway may respond asynchronously after the node returns a result.

Params:

FieldTypeRequiredDescription
toolstringyesTool name.
argsobjectnoTool arguments.

Result: The tool execution result (varies by tool).

tool.result

Direction: N -> G

Return the result of a tool invocation back to the gateway.

Params: ToolResultParams

FieldTypeRequiredDescription
callIdstringyesCall ID from the tool.invoke event.
resultunknownnoTool result value (on success).
errorstringnoError message (on failure).

Result:

FieldTypeDescription
oktrueAcknowledgement.
droppedbooleantrue if the result was dropped (e.g., session no longer waiting).

tool.request

Direction: C -> G

Request a tool invocation in the context of a session (used by the agent loop).

Params: ToolRequestParams

FieldTypeRequiredDescription
callIdstringyesUnique call identifier.
toolstringyesTool name.
argsobjectyesTool arguments.
sessionKeystringyesSession context for the tool call.

Result:

FieldTypeDescription
status"sent"Confirmation that the request was dispatched.

Node

node.probe.result

Direction: N -> G

Return the result of a node probe (binary availability check).

Params: NodeProbeResultParams

FieldTypeRequiredDescription
probeIdstringyesProbe ID from the node.probe event.
okbooleanyesWhether the probe succeeded.
binsRecord<string, boolean>noMap of binary name to availability.
errorstringnoError message if probe failed.

Result:

FieldTypeDescription
oktrueAcknowledgement.
droppedbooleantrue if the probe result was dropped.

node.exec.event

Direction: N -> G

Report a node execution event (process started, finished, failed, or timed out).

Params: NodeExecEventParams

FieldTypeRequiredDescription
eventIdstringyesUnique event identifier.
sessionIdstringyesSession that triggered the execution.
eventstringyesEvent type: "started", "finished", "failed", or "timed_out".
callIdstringnoTool call ID.
exitCodenumber | nullnoProcess exit code.
signalstringnoSignal that terminated the process.
outputTailstringnoLast portion of process output.
startedAtnumbernoStart timestamp (epoch ms).
endedAtnumbernoEnd timestamp (epoch ms).

Result:

FieldTypeDescription
oktrueAcknowledgement.
droppedbooleantrue if the event was dropped.

Logs

logs.get

Direction: C -> G

Request node logs. The gateway dispatches a logs.get event to the target node. This is a deferred method.

Params:

FieldTypeRequiredDescription
nodeIdstringnoTarget node ID. If omitted, uses the execution host.
linesnumbernoNumber of log lines to retrieve (default: 100, max: 5000).

Result: LogsGetResult

FieldTypeDescription
nodeIdstringNode that returned the logs.
linesstring[]Log lines.
countnumberNumber of lines returned.
truncatedbooleanWhether the full log was truncated.

logs.result

Direction: N -> G

Return log lines in response to a logs.get event.

Params: LogsResultParams

FieldTypeRequiredDescription
callIdstringyesCall ID from the logs.get event.
linesstring[]noLog lines.
truncatedbooleannoWhether the output was truncated.
errorstringnoError message if log retrieval failed.

Result:

FieldTypeDescription
oktrueAcknowledgement.
droppedbooleantrue if the result was dropped.

Session

sessions.list

Direction: C -> G

List all known sessions.

Params:

FieldTypeRequiredDescription
offsetnumbernoPagination offset.
limitnumbernoMaximum sessions to return.

Result:

FieldTypeDescription
sessionsSessionRegistryEntry[]Session list.
countnumberTotal session count.

SessionRegistryEntry:

FieldTypeDescription
sessionKeystringSession key.
createdAtnumberCreation timestamp (epoch ms).
lastActiveAtnumberLast activity timestamp (epoch ms).
labelstringOptional session label.

session.get

Direction: C -> G

Get detailed session information.

Params:

FieldTypeRequiredDescription
sessionKeystringyesSession key.

Result:

FieldTypeDescription
sessionIdstringCurrent session ID.
sessionKeystringSession key.
createdAtnumberCreation timestamp (epoch ms).
updatedAtnumberLast update timestamp (epoch ms).
messageCountnumberNumber of messages in the session.
tokensTokenUsageToken usage breakdown.
settingsSessionSettingsSession settings.
resetPolicyResetPolicyAutomatic reset policy.
lastResetAtnumberTimestamp of last reset (epoch ms).
previousSessionIdsstring[]Previous session IDs from resets.
labelstringSession label.

TokenUsage:

FieldTypeDescription
inputnumberInput tokens consumed.
outputnumberOutput tokens consumed.
totalnumberTotal tokens consumed.

SessionSettings:

FieldTypeDescription
model{ provider: string; id: string }Model override.
thinkingLevelstringOne of: "none", "minimal", "low", "medium", "high", "xhigh".
systemPromptstringSystem prompt override.
maxTokensnumberMaximum output tokens.

ResetPolicy:

FieldTypeDescription
modestring"manual", "daily", or "idle".
atHournumberHour for daily reset (0-23). Only for daily mode.
idleMinutesnumberMinutes idle before reset. Only for idle mode.

session.stats

Direction: C -> G

Get session statistics.

Params:

FieldTypeRequiredDescription
sessionKeystringyesSession key.

Result: SessionStats

FieldTypeDescription
sessionKeystringSession key.
sessionIdstringCurrent session ID.
messageCountnumberMessage count.
tokensTokenUsageToken usage.
createdAtnumberCreation timestamp (epoch ms).
updatedAtnumberLast update timestamp (epoch ms).
uptimenumberSession uptime in milliseconds.
isProcessingbooleanWhether a run is currently active.
queueSizenumberNumber of queued messages.

session.reset

Direction: C -> G

Reset a session: clear messages, archive to R2, create a new session ID.

Params:

FieldTypeRequiredDescription
sessionKeystringyesSession key.

Result: ResetResult

FieldTypeDescription
okbooleanSuccess indicator.
sessionKeystringSession key.
oldSessionIdstringPrevious session ID.
newSessionIdstringNew session ID.
archivedMessagesnumberNumber of messages archived.
archivedTostringR2 path of the archive.
tokensClearedTokenUsageToken counts that were cleared.
mediaDeletednumberNumber of media files deleted.

session.patch

Direction: C -> G

Update session settings, label, or reset policy.

Params: SessionPatchParams & { sessionKey: string }

FieldTypeRequiredDescription
sessionKeystringyesSession key.
settingsPartial<SessionSettings>noSettings to merge.
labelstringnoNew label.
resetPolicyPartial<ResetPolicy>noReset policy fields to merge.

Result:

FieldTypeDescription
okbooleanSuccess indicator.

session.compact

Direction: C -> G

Trim a session to the last N messages. Removed messages are archived.

Params:

FieldTypeRequiredDescription
sessionKeystringyesSession key.
keepMessagesnumbernoNumber of messages to keep (default: 20).

Result:

FieldTypeDescription
okbooleanSuccess indicator.
trimmedMessagesnumberMessages removed.
keptMessagesnumberMessages remaining.
archivedTostringR2 archive path.

session.history

Direction: C -> G

Get session reset history.

Params:

FieldTypeRequiredDescription
sessionKeystringyesSession key.

Result:

FieldTypeDescription
sessionKeystringSession key.
currentSessionIdstringCurrent session ID.
previousSessionIdsstring[]List of previous session IDs.

session.preview

Direction: C -> G

Preview session messages.

Params:

FieldTypeRequiredDescription
sessionKeystringyesSession key.
limitnumbernoMaximum messages to return.

Result:

FieldTypeDescription
sessionKeystringSession key.
sessionIdstringCurrent session ID.
messageCountnumberTotal message count.
messagesunknown[]Message objects (role, content, etc.).

Channel

channels.list

Direction: C -> G

List all connected channel accounts.

Params: none

Result:

FieldTypeDescription
channelsChannelRegistryEntry[]Connected channel accounts.
countnumberTotal count.

ChannelRegistryEntry:

FieldTypeDescription
channelChannelIdChannel identifier ("whatsapp", "discord", etc.).
accountIdstringAccount identifier.
connectedAtnumberConnection timestamp (epoch ms).
lastMessageAtnumberLast message timestamp (epoch ms).

channel.inbound

Direction: Channel -> G

Deliver an inbound message from a channel to the gateway.

Params: ChannelInboundParams

FieldTypeRequiredDescription
channelChannelIdyesChannel identifier.
accountIdstringyesAccount identifier.
peerPeerInfoyesPeer (chat) information.
senderSenderInfonoSender information.
messageobjectyesMessage payload (see below).
wasMentionedbooleannoWhether the bot was mentioned.
mentionedIdsstring[]noIDs mentioned in the message.

PeerInfo:

FieldTypeDescription
kindstringChat type: "dm", "group", "channel", or "thread".
idstringChat/peer identifier.
namestringDisplay name.
handlestringUsername/handle.

SenderInfo:

FieldTypeDescription
idstringSender identifier.
namestringDisplay name.
handlestringUsername/handle.

message object:

FieldTypeDescription
idstringMessage identifier.
textstringMessage text.
timestampnumberMessage timestamp (epoch ms).
replyToIdstringID of the message being replied to.
replyToTextstringText of the message being replied to.
mediaMediaAttachment[]Media attachments.
location{ lat, lon, name? }Location attachment.

MediaAttachment:

FieldTypeDescription
typestring"image", "audio", "video", or "document".
mimeTypestringMIME type.
datastringBase64-encoded content.
r2KeystringR2 storage key.
urlstringURL to the media.
filenamestringOriginal filename.
sizenumberFile size in bytes.
durationnumberDuration in seconds (audio/video).
transcriptionstringTranscribed text (audio).

Result:

FieldTypeDescription
statusstringProcessing status.
sessionKeystringSession key the message was routed to.

channel.start

Direction: C -> G

Start a channel connection.

Params:

FieldTypeRequiredDescription
channelstringyesChannel name (e.g., "discord").
accountIdstringnoAccount identifier.
configobjectnoChannel-specific configuration.

Result:

FieldTypeDescription
oktrueSuccess.
channelChannelIdChannel identifier.
accountIdstringAccount identifier.

channel.stop

Direction: C -> G

Stop a channel connection.

Params:

FieldTypeRequiredDescription
channelstringyesChannel name.
accountIdstringnoAccount identifier.

Result:

FieldTypeDescription
oktrueSuccess.
channelChannelIdChannel identifier.
accountIdstringAccount identifier.

channel.status

Direction: C -> G

Get status of a channel's accounts.

Params:

FieldTypeRequiredDescription
channelstringyesChannel name.
accountIdstringnoAccount identifier. If omitted, returns all accounts.

Result:

FieldTypeDescription
channelChannelIdChannel identifier.
accountsChannelAccountStatus[]Account status entries.

ChannelAccountStatus fields include accountId, connected, authenticated, error, extra, and lastActivity.

channel.login

Direction: C -> G

Initiate channel login (e.g., WhatsApp QR code flow).

Params:

FieldTypeRequiredDescription
channelstringyesChannel name.
accountIdstringnoAccount identifier.
forcebooleannoForce re-login even if already authenticated.

Result:

FieldTypeDescription
oktrueSuccess.
channelChannelIdChannel identifier.
accountIdstringAccount identifier.
qrDataUrlstringQR code data for scanning (WhatsApp).
messagestringStatus message.

channel.logout

Direction: C -> G

Logout from a channel and clear stored credentials.

Params:

FieldTypeRequiredDescription
channelstringyesChannel name.
accountIdstringnoAccount identifier.

Result:

FieldTypeDescription
oktrueSuccess.
channelChannelIdChannel identifier.
accountIdstringAccount identifier.

Heartbeat

heartbeat.status

Direction: C -> G

Get heartbeat scheduler status for all agents.

Params: none

Result:

FieldTypeDescription
agentsRecord<string, object>Map of agent ID to heartbeat state (includes nextHeartbeatAt, lastHeartbeatAt, lastActive).

heartbeat.start

Direction: C -> G

Start the heartbeat scheduler.

Params: none

Result:

FieldTypeDescription
messagestringStatus message.
agentsRecord<string, object>Agent heartbeat states.

heartbeat.trigger

Direction: C -> G

Manually trigger a heartbeat.

Params:

FieldTypeRequiredDescription
agentIdstringnoAgent ID (default: "main").

Result:

FieldTypeDescription
okbooleanSuccess indicator.
messagestringStatus message.
skippedbooleanWhether the heartbeat was skipped.
skipReasonstringReason for skipping.

Cron

cron.status

Direction: C -> G

Get cron scheduler status.

Params: none

Result:

FieldTypeDescription
enabledbooleanWhether the cron scheduler is enabled.
countnumberTotal number of cron jobs.
dueCountnumberNumber of jobs due to run.
runningCountnumberNumber of currently running jobs.
nextRunAtMsnumberNext scheduled run (epoch ms).
maxJobsnumberMaximum allowed jobs.
maxConcurrentRunsnumberMaximum concurrent runs.

cron.list

Direction: C -> G

List cron jobs.

Params:

FieldTypeRequiredDescription
agentIdstringnoFilter by agent ID.
includeDisabledbooleannoInclude disabled jobs.
limitnumbernoMaximum jobs to return.
offsetnumbernoPagination offset.

Result:

FieldTypeDescription
jobsCronJob[]List of cron jobs.
countnumberTotal count.

CronJob:

FieldTypeDescription
idstringJob identifier.
agentIdstringAgent that owns this job.
namestringJob name.
descriptionstringJob description.
enabledbooleanWhether the job is enabled.
deleteAfterRunbooleanWhether to delete the job after it runs.
createdAtMsnumberCreation timestamp (epoch ms).
updatedAtMsnumberLast update timestamp (epoch ms).
scheduleCronScheduleSchedule configuration.
specCronModeJob execution specification.
stateCronJobStateCurrent runtime state.

CronSchedule variants:

KindFieldsDescription
"at"atMs: numberRun once at a specific epoch timestamp.
"every"everyMs: number, anchorMs?: numberRun at a fixed interval.
"cron"expr: string, tz?: stringStandard cron expression with optional timezone.

CronMode variants:

ModeFieldsDescription
"systemEvent"text: stringInject a user message into the agent's main session.
"task"message: string, model?, thinking?, timeoutSeconds?, deliver?, channel?, to?, bestEffortDeliver?Run in an isolated cron session with optional delivery control.

CronJobState:

FieldTypeDescription
nextRunAtMsnumberNext scheduled run (epoch ms).
runningAtMsnumberCurrently running since (epoch ms).
lastRunAtMsnumberLast run timestamp (epoch ms).
lastStatusstring"ok", "error", or "skipped".
lastErrorstringError from last run.
lastDurationMsnumberDuration of last run (ms).

cron.add

Direction: C -> G

Create a new cron job.

Params: CronJobCreate

FieldTypeRequiredDescription
agentIdstringnoAgent ID (default: "main").
namestringyesJob name.
descriptionstringnoJob description.
enabledbooleannoWhether enabled (default: true).
deleteAfterRunbooleannoDelete after execution.
scheduleCronScheduleyesSchedule configuration.
specCronModeyesExecution specification.

Result:

FieldTypeDescription
oktrueSuccess.
jobCronJobCreated job.

cron.update

Direction: C -> G

Update an existing cron job.

Params:

FieldTypeRequiredDescription
idstringyesJob ID.
patchCronJobPatchyesFields to update.

CronJobPatch: Same fields as CronJobCreate but all optional. The spec field uses CronModePatch (all fields except mode are optional).

Result:

FieldTypeDescription
oktrueSuccess.
jobCronJobUpdated job.

cron.remove

Direction: C -> G

Remove a cron job.

Params:

FieldTypeRequiredDescription
idstringyesJob ID.

Result:

FieldTypeDescription
oktrueSuccess.
removedbooleanWhether the job existed and was removed.

cron.run

Direction: C -> G

Manually trigger cron job execution.

Params:

FieldTypeRequiredDescription
idstringnoSpecific job ID to run. If omitted, runs due jobs.
modestringno"due" (default) or "force".

Result:

FieldTypeDescription
oktrueSuccess.
rannumberNumber of jobs executed.
resultsCronRunResult[]Per-job results.

CronRunResult:

FieldTypeDescription
jobIdstringJob ID.
statusstring"ok", "error", or "skipped".
errorstringError message.
summarystringExecution summary.
durationMsnumberDuration in milliseconds.
nextRunAtMsnumberNext scheduled run (epoch ms).

cron.runs

Direction: C -> G

List cron run history.

Params:

FieldTypeRequiredDescription
jobIdstringnoFilter by job ID.
limitnumbernoMaximum runs to return.
offsetnumbernoPagination offset.

Result:

FieldTypeDescription
runsCronRun[]Run history entries.
countnumberTotal count.

CronRun:

FieldTypeDescription
idnumberRun ID.
jobIdstringJob ID.
tsnumberRun timestamp (epoch ms).
statusstring"ok", "error", or "skipped".
errorstringError message.
summarystringExecution summary.
durationMsnumberDuration in milliseconds.
nextRunAtMsnumberNext run (epoch ms).

Pairing

pair.list

Direction: C -> G

List pending pairing requests from unknown senders.

Params: none

Result:

FieldTypeDescription
pairsRecord<string, PendingPair>Map of pair key to pending pair details.

PendingPair fields include senderId, senderName, channel, firstMessage, and requestedAt.

pair.approve

Direction: C -> G

Approve a pairing request.

Params:

FieldTypeRequiredDescription
channelstringyesChannel name.
senderIdstringyesSender ID.

Result:

FieldTypeDescription
approvedtrueConfirmation.
senderIdstringApproved sender ID.
senderNamestringSender display name.

pair.reject

Direction: C -> G

Reject a pairing request.

Params:

FieldTypeRequiredDescription
channelstringyesChannel name.
senderIdstringyesSender ID.

Result:

FieldTypeDescription
rejectedtrueConfirmation.
senderIdstringRejected sender ID.

Skills

skills.status

Direction: C -> G

Get skill eligibility status.

Params:

FieldTypeRequiredDescription
agentIdstringnoAgent ID (default: "main").

Result: SkillsStatusResult

FieldTypeDescription
agentIdstringAgent ID.
refreshedAtnumberTimestamp of last refresh (epoch ms).
requiredBinsstring[]Binaries required by any skill.
nodesSkillNodeStatus[]Connected node statuses.
skillsSkillStatusEntry[]Skill eligibility entries.

SkillNodeStatus:

FieldTypeDescription
nodeIdstringNode identifier.
hostRolestring"execution" or "specialized".
hostCapabilitiesstring[]Capability IDs.
hostOsstringOperating system.
hostEnvstring[]Environment variable names.
hostBinsstring[]Available binaries.
hostBinStatusUpdatedAtnumberLast bin probe timestamp (epoch ms).
canProbeBinsbooleanWhether the node supports bin probing.

SkillStatusEntry:

FieldTypeDescription
namestringSkill name.
descriptionstringSkill description.
locationstringSource location (agent-level or global).
alwaysbooleanWhether the skill is always active.
eligiblebooleanWhether all requirements are met.
eligibleHostsstring[]Node IDs that satisfy requirements.
reasonsstring[]Reasons for ineligibility.
requirementsSkillRequirementSnapshotRequirement details.

skills.update

Direction: C -> G

Re-probe nodes and refresh skill eligibility.

Params:

FieldTypeRequiredDescription
agentIdstringnoAgent ID (default: "main").
forcebooleannoForce re-probing even when cache is fresh.
timeoutMsnumbernoProbe timeout in milliseconds.

Result: SkillsUpdateResult

Extends SkillsStatusResult with:

FieldTypeDescription
updatedNodeCountnumberNumber of nodes that were probed.
skippedNodeIdsstring[]Node IDs skipped (fresh cache).
errorsstring[]Probe errors.

Workspace

workspace.list

Direction: C -> G

List files and directories in the agent workspace (R2).

Params:

FieldTypeRequiredDescription
pathstringnoDirectory path within the workspace.
agentIdstringnoAgent ID.

Result:

FieldTypeDescription
pathstringListed path.
filesstring[]File names.
directoriesstring[]Directory names.

workspace.read

Direction: C -> G

Read a file from the agent workspace.

Params:

FieldTypeRequiredDescription
pathstringyesFile path within the workspace.
agentIdstringnoAgent ID.

Result:

FieldTypeDescription
pathstringFile path.
contentstringFile content.
sizenumberFile size in bytes.
lastModifiedstringLast modified timestamp.

workspace.write

Direction: C -> G

Write a file to the agent workspace.

Params:

FieldTypeRequiredDescription
pathstringyesFile path within the workspace.
contentstringyesFile content.
agentIdstringnoAgent ID.

Result:

FieldTypeDescription
pathstringFile path.
sizenumberWritten size in bytes.
writtentrueConfirmation.

workspace.delete

Direction: C -> G

Delete a file from the agent workspace.

Params:

FieldTypeRequiredDescription
pathstringyesFile path within the workspace.
agentIdstringnoAgent ID.

Result:

FieldTypeDescription
pathstringFile path.
deletedtrueConfirmation.

Events

Events are sent from the gateway to connected clients/nodes as evt frames. The node does not receive chat events; the client does not receive tool.invoke or node.probe events.

chat

Emitted to clients during an agent turn.

Payload: ChatEventPayload

FieldTypeDescription
runIdstring | nullRun identifier.
sessionKeystringSession key for filtering.
statestringEvent state: "partial", "delta", "final", or "error".
messageunknownFull message object (on "final" state).
textstringIncremental text content (on "delta" / "partial" state).
errorstringError message (on "error" state).

tool.invoke

Emitted to the appropriate node when the agent needs to call a tool.

Payload: ToolInvokePayload

FieldTypeDescription
callIdstringUnique call identifier. The node must return this in tool.result.
toolstringTool name.
argsobjectTool arguments.

logs.get

Emitted to a node to request log lines.

Payload: LogsGetEventPayload

FieldTypeDescription
callIdstringCall identifier. The node must return this in logs.result.
linesnumberRequested number of lines.

node.probe

Emitted to a node to check binary availability.

Payload: NodeProbePayload

FieldTypeDescription
probeIdstringProbe identifier. The node must return this in node.probe.result.
kindstringProbe kind. Currently only "bins".
binsstring[]Binary names to check.
timeoutMsnumberProbe timeout in milliseconds.

Node Runtime Info

Provided by nodes during the connect handshake.

NodeRuntimeInfo:

FieldTypeDescription
hostRolestring"execution" or "specialized".
hostCapabilitiesstring[]Capability IDs: "filesystem.list", "filesystem.read", "filesystem.write", "filesystem.edit", "text.search", "shell.exec".
toolCapabilitiesRecord<string, string[]>Map of tool name to its capability IDs.
hostOsstringOperating system (e.g., "macos", "linux").
hostEnvstring[]Environment variable names present on the host.
hostBinStatusRecord<string, boolean>Map of binary name to availability.
hostBinStatusUpdatedAtnumberTimestamp of last bin probe (epoch ms).