Agent Client Protocol - v0.2.0-alpha.8
    Preparing search index...

    Interface Client

    The Client interface defines the interface that ACP-compliant clients must implement.

    Clients are typically code editors (IDEs, text editors) that provide the interface between users and AI agents. They manage the environment, handle user interactions, and control access to resources.

    interface Client {
        requestPermission(
            params: RequestPermissionRequest,
        ): Promise<RequestPermissionResponse>;
        sessionUpdate(params: SessionNotification): Promise<void>;
        writeTextFile(params: WriteTextFileRequest): Promise<null>;
        readTextFile(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
    }
    Index

    Methods

    • Handles session update notifications from the agent.

      This is a notification endpoint (no response expected) that receives 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>

    • Writes content to a text file in the client's file system.

      Only available if the client advertises the fs.writeTextFile capability. Allows the agent to create or modify files within the client's environment.

      See protocol docs: Client

      Parameters

      Returns Promise<null>