Agent Client Protocol - v0.4.7
    Preparing search index...

    Class AgentSideConnection

    An agent-side connection to a client.

    This class provides the agent's view of an ACP connection, allowing agents to communicate with clients. It implements the Client interface to provide methods for requesting permissions, accessing the file system, and sending session updates.

    See protocol docs: Agent

    Index

    Constructors

    Methods

    • Handles session update notifications from the agent.

      This is a notification endpoint (no response expected) that sends real-time updates about session progress, including message chunks, tool calls, and execution plans.

      Note: Clients SHOULD continue accepting tool call updates even after sending a session/cancel notification, as the agent may send final updates before responding with the cancelled stop reason.

      See protocol docs: Agent Reports Output

      Parameters

      Returns Promise<void>

    • Executes a command in a new terminal.

      Returns a TerminalHandle that can be used to get output, wait for exit, kill the command, or release the terminal.

      The terminal can also be embedded in tool calls by using its ID in ToolCallContent with type "terminal".

      Parameters

      Returns Promise<TerminalHandle>

      A handle to control and monitor the terminal

    • Extension method

      Allows the Agent to send an arbitrary request that is not part of the ACP spec.

      Parameters

      • method: string
      • params: Record<string, unknown>

      Returns Promise<Record<string, unknown>>

    • Extension notification

      Allows the Agent to send an arbitrary notification that is not part of the ACP spec.

      Parameters

      • method: string
      • params: Record<string, unknown>

      Returns Promise<void>