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.
| Method | Description | Reference |
|---|---|---|
initialize | Establishes a new connection and negotiates the protocol version | Common |
ping | Verifies that the AHP connection is still alive and keeps it from being | Common |
reconnect | Re-establishes a dropped connection. The server replays missed actions or | Common |
subscribe | Subscribe to a URI-identified channel | Common |
createSession | Session Channel | |
disposeSession | Disposes a session and cleans up server-side resources | Session Channel |
createTerminal | Creates a new terminal on the server | Terminal Channel |
disposeTerminal | Disposes a terminal and kills its process if still running | Terminal Channel |
createResourceWatch | (no params) | |
listSessions | Returns a list of session summaries. Used to populate session lists and sidebars | Root Channel |
resourceRead | Reads the content of a resource by URI | Common |
resourceWrite | Writes content to a file on the server's filesystem | Common |
resourceList | Lists directory entries at a file URI on the server's filesystem | Common |
resourceCopy | Copies a resource from one URI to another on the server's filesystem | Common |
resourceDelete | Deletes a resource at a URI on the server's filesystem | Common |
resourceMove | Moves (renames) a resource from one URI to another on the server's filesystem | Common |
resourceResolve | Resolves a resource — the combination of POSIX stat and realpath | Common |
resourceMkdir | Creates a directory on the server's filesystem with mkdir -p semantics | Common |
resourceRequest | Requests permission to access a resource on the receiver's filesystem | Common |
fetchTurns | Fetches historical turns for a session. Used for lazy loading of conversation | Session Channel |
authenticate | Pushes a Bearer token for a protected resource. The resource field MUST | Common |
resolveSessionConfig | Iteratively resolves the session configuration schema. The client sends the | Root Channel |
sessionConfigCompletions | Queries the server for allowed values of a dynamic session config property | Root Channel |
completions | Requests completion items for a partially-typed input (e.g. a user message | Session Channel |
invokeChangesetOperation | Invokes a server-defined {@link ChangesetOperation} against a changeset | Changeset Channel |
Client → Server Notifications
Methods with no id that expect no response. Every notification carries a top-level channel: URI.
| Method | Description | Reference |
|---|---|---|
unsubscribe | Stop receiving updates for a channel | Common |
dispatchAction | Fire-and-forget action dispatch (write-ahead). The client applies actions | Common |
Server → Client Requests
Methods initiated by the server that the client must respond to.
| Method | Description | Reference |
|---|---|---|
resourceRead | Reads the content of a resource by URI | Common |
resourceWrite | Writes content to a file on the server's filesystem | Common |
resourceList | Lists directory entries at a file URI on the server's filesystem | Common |
resourceCopy | Copies a resource from one URI to another on the server's filesystem | Common |
resourceDelete | Deletes a resource at a URI on the server's filesystem | Common |
resourceMove | Moves (renames) a resource from one URI to another on the server's filesystem | Common |
resourceResolve | Resolves a resource — the combination of POSIX stat and realpath | Common |
resourceMkdir | Creates a directory on the server's filesystem with mkdir -p semantics | Common |
resourceRequest | Requests permission to access a resource on the receiver's filesystem | Common |
createResourceWatch | (no params) |
Server → Client Notifications
Pushed by the server without a preceding request. Every notification carries a top-level channel: URI.
| Method | Description | Reference |
|---|---|---|
action | Every action is wrapped in an ActionEnvelope | Common |
root/sessionAdded | Broadcast to all clients subscribed to the root channel when a new session | Root Channel |
root/sessionRemoved | Broadcast to all clients subscribed to the root channel when a session is | Root Channel |
root/sessionSummaryChanged | Broadcast to all clients subscribed to the root channel when an existing | Root Channel |
auth/required | Sent by the server when a protected resource requires (re-)authentication | Common |
otlp/exportLogs | Delivers a batch of OTLP log records to a client subscribed to the host's | Telemetry Channel |
otlp/exportTraces | Delivers a batch of OTLP spans to a client subscribed to the host's | Telemetry Channel |
otlp/exportMetrics | Delivers a batch of OTLP metric data points to a client subscribed to | Telemetry Channel |
Version Introduction
All messages listed above were introduced in protocol version 1.