AcpAgent
A connection to an Agent Client Protocol agent — a coding agent such as Claude Code, Codex or Gemini CLI, or any agent built on an ACP SDK (e.g. Pydantic AI Harness run_acp_stdio). This app is the ACP client: it creates sessions, sends prompts, renders session/updates and answers session/request_permission (and, when files is given, fs/read_text_file / fs/write_text_file).
The connection opens on first use, is shared by every conversation (AcpBackend) using this agent, and reopens after a failure. Sessions are kept per conversation; a conversation whose session is gone is resumed with session/load when the agent supports it.
Transports: process (stdio, the transport the ACP spec defines) and webSocket (the ACP Kotlin SDK's WebSocket transport, one JSON-RPC message per text frame, for agents on another machine — the spec's remote transport is still a draft).
Parameters
shown in the UI until the agent introduces itself in initialize.
the session's working directory on the agent's machine (absolute, ACP session/new).
the client file system offered to the agent; null offers none.
opens a transport; called again after the connection failed.