Agent Client Protocol

The Agent Client Protocol (ACP) is an externally maintained open standard for connecting clients to agents, letting a client prompt an agent and receive its responses and tool activity through a common interface. Link uses ACP to communicate with its harnesses.

What ACP provides

A client can be an editor, a chat interface or a service forwarding messages. The agent runs the model and tools. ACP defines the messages between them, so clients and agents can interoperate without each pair needing its own conversational API. The authoritative protocol specification is maintained by the ACP project.

Sessions and responses

A client initializes the connection, discovers the agent's capabilities and opens a session. Prompts go to that session, and the agent streams updates describing its response and tool activity. A client can cancel a running turn; loading, listing and resuming saved sessions depend on the capabilities the agent advertises.

Link uses ACP's session lifecycle and types, through the protocol's Rust SDK. Link Harness serves ACP version 1 over a WebSocket, and the harness hub bridges ACP over stdio to Link's WebSocket clients. Link's connections and chat interface use this shared conversation protocol.

Capabilities and transport

Read the initialize response before using optional features. Link Harness advertises session loading, listing and resuming, images and embedded resources; another harness may support a different set. Link's endpoint authentication and WebSocket framing are integration details, documented with the concrete endpoints.

  • Link Harness ACP describes its methods, capabilities and endpoint.
  • Harness hub describes how adapters expose an ACP harness through Link.
  • Harness interface describes installation, configuration and launch commands outside the ACP conversation protocol.

Carrying state between harnesses

ACP gives clients a common way to communicate with agents. Link's Agent State Protocol (ASP) adds optional state transfer through ACP extension methods and metadata. ACP and ASP together let Link obtain portable state from one harness and ask another to take it, subject to their advertised capabilities.

For ACP implementers

ASP is Link's extension, not a requirement for an ACP implementation or an adopted upstream ACP feature. Its state methods use the _asp/state/ namespace and its capabilities use _meta.asp. Support for ordinary ACP sessions does not imply support for these extensions; clients discover state export and import separately. Link-specific _link/ methods are documented with the endpoints that use them.