Skip to content

Client

Sub classes

Name Children Inherits
DefaultACPClient
aclientp.client.implementations.default_client
Default implementation of ACP Client interface for basic operations.
    HeadlessACPClient
    aclientp.client.implementations.headless_client
    Headless ACP client with real filesystem and terminal operations.
      NoOpClient
      aclientp.client.implementations.noop_client
      Minimal client that returns default responses for all operations.
        AgentSideConnection
        aclientp.agent.connection
        Agent-side connection.

          Base classes

          Name Children Inherits
          Protocol
          typing
          Base class for protocol classes.

          ⋔ Inheritance diagram

          graph TD
            95970858218656["protocol.Client"]
            95970836711072["typing.Protocol"]
            95970835676112["typing.Generic"]
            125067848591872["builtins.object"]
            95970836711072 --> 95970858218656
            95970835676112 --> 95970836711072
            125067848591872 --> 95970835676112

          🛈 DocStrings

          Bases: Protocol

          Base client interface for ACP.

          Methods with a default body are optional and gated by a capability the client advertises (or by an acp MCP server the client declared).

          Source code in src/aclientp/client/protocol.py
          @runtime_checkable
          class Client(Protocol):
              """Base client interface for ACP.
          
              Methods with a default body are optional and gated by a capability the client
              advertises (or by an ``acp`` MCP server the client declared).
              """
          
              async def request_permission(
                  self, params: RequestPermissionRequest
              ) -> RequestPermissionResponse: ...
          
              async def session_update(self, params: SessionNotification) -> None: ...
          
              async def write_text_file(
                  self, params: WriteTextFileRequest
              ) -> WriteTextFileResponse | None: ...
          
              async def read_text_file(self, params: ReadTextFileRequest) -> ReadTextFileResponse: ...
          
              async def create_terminal(self, params: CreateTerminalRequest) -> CreateTerminalResponse: ...
          
              async def terminal_output(self, params: TerminalOutputRequest) -> TerminalOutputResponse: ...
          
              async def release_terminal(
                  self, params: ReleaseTerminalRequest
              ) -> ReleaseTerminalResponse | None: ...
          
              async def wait_for_terminal_exit(
                  self, params: WaitForTerminalExitRequest
              ) -> WaitForTerminalExitResponse: ...
          
              async def kill_terminal(self, params: KillTerminalRequest) -> KillTerminalResponse | None: ...
          
              async def elicitation(self, params: ElicitationRequest) -> ElicitationResponse: ...
          
              async def elicitation_complete(self, params: ElicitationCompleteNotification) -> None: ...
          
              async def ext_method(self, method: str, params: dict[str, Any]) -> dict[str, Any]: ...
          
              async def ext_notification(self, method: str, params: dict[str, Any]) -> None: ...
          
              async def auth_status_update(self, params: AuthStatusUpdateNotification) -> None:
                  """**UNSTABLE**: The agent's authentication state changed."""
                  return
          
              async def mcp_message(self, params: MessageMcpRequest) -> MessageMcpResponse:
                  """**UNSTABLE**: Inner MCP request to an ``acp`` MCP server the client declared."""
                  raise RequestError.method_not_found("mcp/message")
          
              async def mcp_notification(self, params: MessageMcpNotification) -> None:
                  """**UNSTABLE**: Inner MCP notification for an ``acp`` MCP server the client declared."""
                  return
          

          auth_status_update async

          auth_status_update(params: AuthStatusUpdateNotification) -> None
          

          UNSTABLE: The agent's authentication state changed.

          Source code in src/aclientp/client/protocol.py
          async def auth_status_update(self, params: AuthStatusUpdateNotification) -> None:
              """**UNSTABLE**: The agent's authentication state changed."""
              return
          

          mcp_message async

          mcp_message(params: MessageMcpRequest) -> MessageMcpResponse
          

          UNSTABLE: Inner MCP request to an acp MCP server the client declared.

          Source code in src/aclientp/client/protocol.py
          async def mcp_message(self, params: MessageMcpRequest) -> MessageMcpResponse:
              """**UNSTABLE**: Inner MCP request to an ``acp`` MCP server the client declared."""
              raise RequestError.method_not_found("mcp/message")
          

          mcp_notification async

          mcp_notification(params: MessageMcpNotification) -> None
          

          UNSTABLE: Inner MCP notification for an acp MCP server the client declared.

          Source code in src/aclientp/client/protocol.py
          async def mcp_notification(self, params: MessageMcpNotification) -> None:
              """**UNSTABLE**: Inner MCP notification for an ``acp`` MCP server the client declared."""
              return
          

          :fa-brands-github: Show source on GitHub