Skip to content

agent_requests

Class info

Classes

Name Children Inherits
BaseAgentRequest
aclientp.schema.agent_requests
Base class for all agent requests.
CreateTerminalRequest
aclientp.schema.agent_requests
Request to create a new terminal and execute a command.
    KillTerminalRequest
    aclientp.schema.agent_requests
    Request to kill a terminal command without releasing the terminal.
      ReadTextFileRequest
      aclientp.schema.agent_requests
      Request to read content from a text file.
        ReleaseTerminalRequest
        aclientp.schema.agent_requests
        Request to release a terminal and free its resources.
          RequestPermissionRequest
          aclientp.schema.agent_requests
          Request for user permission to execute a tool call.
            TerminalOutputRequest
            aclientp.schema.agent_requests
            Request to get the current output and status of a terminal.
              WaitForTerminalExitRequest
              aclientp.schema.agent_requests
              Request to wait for a terminal command to exit.
                WriteTextFileRequest
                aclientp.schema.agent_requests
                Request to write content to a text file.

                  🛈 DocStrings

                  BaseAgentRequest

                  Bases: Request

                  Base class for all agent requests.

                  Source code in src/aclientp/schema/agent_requests.py
                  class BaseAgentRequest(Request):
                      """Base class for all agent requests."""
                  
                      session_id: str
                      """The session ID for this request."""
                  

                  session_id instance-attribute

                  session_id: str
                  

                  The session ID for this request.

                  CreateTerminalRequest

                  Bases: BaseAgentRequest

                  Request to create a new terminal and execute a command.

                  Source code in src/aclientp/schema/agent_requests.py
                  class CreateTerminalRequest(BaseAgentRequest):
                      """Request to create a new terminal and execute a command."""
                  
                      args: Sequence[str] | None = None
                      """Array of command arguments."""
                  
                      command: str
                      """The command to execute."""
                  
                      cwd: str | None = None
                      """Working directory for the command (absolute path)."""
                  
                      env: Sequence[EnvVariable] | None = None
                      """Environment variables for the command."""
                  
                      output_byte_limit: int | None = Field(default=None, ge=0)
                      """Maximum number of output bytes to retain.
                  
                      When the limit is exceeded, the Client truncates from the beginning of the output
                      to stay within the limit.
                  
                      The Client MUST ensure truncation happens at a character boundary to maintain valid
                      string output, even if this means the retained output is slightly less than the
                      specified limit."""
                  

                  args class-attribute instance-attribute

                  args: Sequence[str] | None = None
                  

                  Array of command arguments.

                  command instance-attribute

                  command: str
                  

                  The command to execute.

                  cwd class-attribute instance-attribute

                  cwd: str | None = None
                  

                  Working directory for the command (absolute path).

                  env class-attribute instance-attribute

                  env: Sequence[EnvVariable] | None = None
                  

                  Environment variables for the command.

                  output_byte_limit class-attribute instance-attribute

                  output_byte_limit: int | None = Field(default=None, ge=0)
                  

                  Maximum number of output bytes to retain.

                  When the limit is exceeded, the Client truncates from the beginning of the output to stay within the limit.

                  The Client MUST ensure truncation happens at a character boundary to maintain valid string output, even if this means the retained output is slightly less than the specified limit.

                  KillTerminalRequest

                  Bases: BaseAgentRequest

                  Request to kill a terminal command without releasing the terminal.

                  Source code in src/aclientp/schema/agent_requests.py
                  class KillTerminalRequest(BaseAgentRequest):
                      """Request to kill a terminal command without releasing the terminal."""
                  
                      terminal_id: str
                      """The ID of the terminal to kill."""
                  

                  terminal_id instance-attribute

                  terminal_id: str
                  

                  The ID of the terminal to kill.

                  ReadTextFileRequest

                  Bases: BaseAgentRequest

                  Request to read content from a text file.

                  Only available if the client supports the fs.readTextFile capability.

                  Source code in src/aclientp/schema/agent_requests.py
                  class ReadTextFileRequest(BaseAgentRequest):
                      """Request to read content from a text file.
                  
                      Only available if the client supports the `fs.readTextFile` capability.
                      """
                  
                      limit: int | None = Field(default=None, ge=0)
                      """Maximum number of lines to read."""
                  
                      line: int | None = Field(default=None, ge=0)
                      """Line number to start reading from (1-based)."""
                  
                      path: str
                      """Absolute path to the file to read."""
                  

                  limit class-attribute instance-attribute

                  limit: int | None = Field(default=None, ge=0)
                  

                  Maximum number of lines to read.

                  line class-attribute instance-attribute

                  line: int | None = Field(default=None, ge=0)
                  

                  Line number to start reading from (1-based).

                  path instance-attribute

                  path: str
                  

                  Absolute path to the file to read.

                  ReleaseTerminalRequest

                  Bases: BaseAgentRequest

                  Request to release a terminal and free its resources.

                  Source code in src/aclientp/schema/agent_requests.py
                  class ReleaseTerminalRequest(BaseAgentRequest):
                      """Request to release a terminal and free its resources."""
                  
                      terminal_id: str
                      """The ID of the terminal to release."""
                  

                  terminal_id instance-attribute

                  terminal_id: str
                  

                  The ID of the terminal to release.

                  RequestPermissionRequest

                  Bases: BaseAgentRequest

                  Request for user permission to execute a tool call.

                  Sent when the agent needs authorization before performing a sensitive operation.

                  See protocol docs: Requesting Permission

                  Source code in src/aclientp/schema/agent_requests.py
                  class RequestPermissionRequest(BaseAgentRequest):
                      """Request for user permission to execute a tool call.
                  
                      Sent when the agent needs authorization before performing a sensitive operation.
                  
                      See protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)
                      """
                  
                      options: Sequence[PermissionOption]
                      """Available permission options for the user to choose from."""
                  
                      tool_call: ToolCallUpdate
                      """Details about the tool call requiring permission."""
                  

                  options instance-attribute

                  options: Sequence[PermissionOption]
                  

                  Available permission options for the user to choose from.

                  tool_call instance-attribute

                  tool_call: ToolCallUpdate
                  

                  Details about the tool call requiring permission.

                  TerminalOutputRequest

                  Bases: BaseAgentRequest

                  Request to get the current output and status of a terminal.

                  Source code in src/aclientp/schema/agent_requests.py
                  class TerminalOutputRequest(BaseAgentRequest):
                      """Request to get the current output and status of a terminal."""
                  
                      terminal_id: str
                      """The ID of the terminal to get output from."""
                  

                  terminal_id instance-attribute

                  terminal_id: str
                  

                  The ID of the terminal to get output from.

                  WaitForTerminalExitRequest

                  Bases: BaseAgentRequest

                  Request to wait for a terminal command to exit.

                  Source code in src/aclientp/schema/agent_requests.py
                  class WaitForTerminalExitRequest(BaseAgentRequest):
                      """Request to wait for a terminal command to exit."""
                  
                      terminal_id: str
                      """The ID of the terminal to wait for."""
                  

                  terminal_id instance-attribute

                  terminal_id: str
                  

                  The ID of the terminal to wait for.

                  WriteTextFileRequest

                  Bases: BaseAgentRequest

                  Request to write content to a text file.

                  Only available if the client supports the fs.writeTextFile capability.

                  Source code in src/aclientp/schema/agent_requests.py
                  class WriteTextFileRequest(BaseAgentRequest):
                      """Request to write content to a text file.
                  
                      Only available if the client supports the `fs.writeTextFile` capability.
                      """
                  
                      content: str
                      """The text content to write to the file."""
                  
                      path: str
                      """Absolute path to the file to write."""
                  

                  content instance-attribute

                  content: str
                  

                  The text content to write to the file.

                  path instance-attribute

                  path: str
                  

                  Absolute path to the file to write.