# `ExMCP.ACP`
[🔗](https://github.com/azmaveth/ex_mcp/blob/v1.0.0/lib/ex_mcp/acp.ex#L1)

Facade for the Agent Client Protocol (ACP).

ACP lets clients control coding agents over stdio using JSON-RPC 2.0 — the same
wire format as MCP. Many coding agents speak ACP natively (Gemini CLI,
OpenCode, Qwen Code, etc.), and Elixir applications can expose native ACP
agents with `ExMCP.ACP.Agent`.

## Quick Start

    {:ok, client} = ExMCP.ACP.start_client(command: ["gemini", "--acp"])
    {:ok, %{"sessionId" => sid}} = ExMCP.ACP.Client.new_session(client, "/my/project")
    {:ok, %{"stopReason" => _}} = ExMCP.ACP.Client.prompt(client, sid, "Fix the bug")

    {:ok, agent} = ExMCP.ACP.start_agent(handler: MyApp.AgentHandler)

## Options

See `ExMCP.ACP.Client` and `ExMCP.ACP.Agent` for the full option lists.

# `run_agent`

```elixir
@spec run_agent(keyword()) :: :ok | {:error, any()}
```

Starts an ACP agent runtime and blocks until it exits.

Shorthand for `ExMCP.ACP.Agent.run/1`.

# `start_agent`

```elixir
@spec start_agent(keyword()) :: GenServer.on_start()
```

Starts an ACP agent runtime.

Shorthand for `ExMCP.ACP.Agent.start_link/1`.

# `start_client`

```elixir
@spec start_client(keyword()) :: GenServer.on_start()
```

Starts an ACP client connected to an agent subprocess.

Shorthand for `ExMCP.ACP.Client.start_link/1`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
