Agent Client Protocol - v0.5.1
    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<WriteTextFileResponse>;
        readTextFile?(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
        createTerminal?(
            params: CreateTerminalRequest,
        ): Promise<CreateTerminalResponse>;
        terminalOutput?(
            params: TerminalOutputRequest,
        ): Promise<TerminalOutputResponse>;
        releaseTerminal?(
            params: ReleaseTerminalRequest,
        ): Promise<void | ReleaseTerminalResponse>;
        waitForTerminalExit?(
            params: WaitForTerminalExitRequest,
        ): Promise<WaitForTerminalExitResponse>;
        killTerminal?(
            params: KillTerminalCommandRequest,
        ): Promise<void | KillTerminalResponse>;
        extMethod?(
            method: string,
            params: Record<string, unknown>,
        ): Promise<Record<string, unknown>>;
        extNotification?(
            method: string,
            params: Record<string, unknown>,
        ): Promise<void>;
    }
    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>

    • Extension method

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

      To help avoid conflicts, it's a good practice to prefix extension methods with a unique identifier such as domain name.

      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>