Skip to content

Messages Reference

Complete reference of every JSON-RPC method in the Agent Host Protocol, organized by direction and type. Each method links to the channel reference page that documents its parameters and result.

Client → Server Requests

Methods with an id that expect a response. Server-side handlers live on the channel page indicated in the Reference column.

MethodDescriptionReference
initializeEstablishes a new connection and negotiates the protocol versionCommon
pingVerifies that the AHP connection is still alive and keeps it from beingCommon
reconnectRe-establishes a dropped connection. The server replays missed actions orCommon
subscribeSubscribe to a URI-identified channelCommon
createSessionSession Channel
disposeSessionDisposes a session and cleans up server-side resourcesSession Channel
createTerminalCreates a new terminal on the serverTerminal Channel
disposeTerminalDisposes a terminal and kills its process if still runningTerminal Channel
createResourceWatch(no params)
listSessionsReturns a list of session summaries. Used to populate session lists and sidebarsRoot Channel
resourceReadReads the content of a resource by URICommon
resourceWriteWrites content to a file on the server's filesystemCommon
resourceListLists directory entries at a file URI on the server's filesystemCommon
resourceCopyCopies a resource from one URI to another on the server's filesystemCommon
resourceDeleteDeletes a resource at a URI on the server's filesystemCommon
resourceMoveMoves (renames) a resource from one URI to another on the server's filesystemCommon
resourceResolveResolves a resource — the combination of POSIX stat and realpathCommon
resourceMkdirCreates a directory on the server's filesystem with mkdir -p semanticsCommon
resourceRequestRequests permission to access a resource on the receiver's filesystemCommon
fetchTurnsFetches historical turns for a session. Used for lazy loading of conversationSession Channel
authenticatePushes a Bearer token for a protected resource. The resource field MUSTCommon
resolveSessionConfigIteratively resolves the session configuration schema. The client sends theRoot Channel
sessionConfigCompletionsQueries the server for allowed values of a dynamic session config propertyRoot Channel
completionsRequests completion items for a partially-typed input (e.g. a user messageSession Channel
invokeChangesetOperationInvokes a server-defined {@link ChangesetOperation} against a changesetChangeset Channel

Client → Server Notifications

Methods with no id that expect no response. Every notification carries a top-level channel: URI.

MethodDescriptionReference
unsubscribeStop receiving updates for a channelCommon
dispatchActionFire-and-forget action dispatch (write-ahead). The client applies actionsCommon

Server → Client Requests

Methods initiated by the server that the client must respond to.

MethodDescriptionReference
resourceReadReads the content of a resource by URICommon
resourceWriteWrites content to a file on the server's filesystemCommon
resourceListLists directory entries at a file URI on the server's filesystemCommon
resourceCopyCopies a resource from one URI to another on the server's filesystemCommon
resourceDeleteDeletes a resource at a URI on the server's filesystemCommon
resourceMoveMoves (renames) a resource from one URI to another on the server's filesystemCommon
resourceResolveResolves a resource — the combination of POSIX stat and realpathCommon
resourceMkdirCreates a directory on the server's filesystem with mkdir -p semanticsCommon
resourceRequestRequests permission to access a resource on the receiver's filesystemCommon
createResourceWatch(no params)

Server → Client Notifications

Pushed by the server without a preceding request. Every notification carries a top-level channel: URI.

MethodDescriptionReference
actionEvery action is wrapped in an ActionEnvelopeCommon
root/sessionAddedBroadcast to all clients subscribed to the root channel when a new sessionRoot Channel
root/sessionRemovedBroadcast to all clients subscribed to the root channel when a session isRoot Channel
root/sessionSummaryChangedBroadcast to all clients subscribed to the root channel when an existingRoot Channel
auth/requiredSent by the server when a protected resource requires (re-)authenticationCommon
otlp/exportLogsDelivers a batch of OTLP log records to a client subscribed to the host'sTelemetry Channel
otlp/exportTracesDelivers a batch of OTLP spans to a client subscribed to the host'sTelemetry Channel
otlp/exportMetricsDelivers a batch of OTLP metric data points to a client subscribed toTelemetry Channel

Version Introduction

All messages listed above were introduced in protocol version 1.

Released under the MIT License.