Agent Client Protocol - v0.1.2
    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

    Implements

    Index

    Constructors

    • Creates a new agent-side connection to a client.

      This establishes the communication channel from the agent's perspective following the ACP specification.

      Parameters

      • toAgent: (conn: Client) => Agent

        A function that creates an Agent handler to process incoming client requests

      • input: WritableStream<Uint8Array<ArrayBufferLike>>

        The stream for sending data to the client (typically stdout)

      • output: ReadableStream<Uint8Array<ArrayBufferLike>>

        The stream for receiving data from the client (typically stdin)

        See protocol docs: Communication Model

      Returns AgentSideConnection

    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>