Skip to main content
Request types define the structure of requests sent from client to agent. All requests expect a corresponding response.

Initialization Requests

InitializeRequest

Sent by the client to establish connection and negotiate capabilities.
See also: InitializeResponse

AuthenticateRequest

Specifies which authentication method to use.

Session Management Requests

NewSessionRequest

Creates a new agent session.
See also: NewSessionResponse

LoadSessionRequest

Loads an existing session. Only available if the agent supports the loadSession capability.

ListSessionsRequest

UNSTABLE - Lists existing sessions with optional filtering and pagination.

ForkSessionRequest

UNSTABLE - Creates a new session based on the context of an existing one.

ResumeSessionRequest

UNSTABLE - Resumes a stopped session.

StopSessionRequest

UNSTABLE - Stops a running session.

Prompt Requests

PromptRequest

Sends a prompt to the agent for processing.
See also: PromptResponse, SessionUpdate

Configuration Requests

SetSessionModeRequest

Changes the session’s operating mode.

SetSessionConfigOptionRequest

Updates a session configuration option.

SetSessionModelRequest

UNSTABLE - Changes the model used by the session.

File System Requests

These requests are sent from agent to client.

ReadTextFileRequest

Requests the client to read a text file.

WriteTextFileRequest

Requests the client to write a text file.

RequestPermissionRequest

Requests the user to choose from a set of permission options.

Terminal Requests

These requests are sent from agent to client for terminal operations.

CreateTerminalRequest

Creates a new terminal and executes a command.

TerminalOutputRequest

Requests the current output from a terminal.

ReleaseTerminalRequest

Releases a terminal when no longer needed.

WaitForTerminalExitRequest

Waits for a terminal to exit.

KillTerminalRequest

Kills a terminal without releasing it.