Skip to Content
Nakama

ACP chat agents

Nakama can run a Claude, Codex, or OpenCode agent as the chat agent for a profile. The agent runs on the Nakama server and uses the Agent Client Protocol (ACP) to send replies and tool updates to Nakama.

Why use an ACP agent

Use an ACP agent when you want a coding agent to handle a profile's chat turns. Nakama still manages the profile, chat, and tool access. The ACP agent runs its own model loop and returns its updates to the chat.

ACP agents can use the Nakama tools assigned to the profile. They can also edit files inside that profile's workspace. Nakama denies shell commands and file edits outside that workspace.

Create an agent that uses ACP

Only platform admins can create agents and change an agent's chat agent.

  1. In the left rail, click + to open Create agent.
  2. Type a Name.
  3. Click Change. In Agent, select Claude, Codex, or OpenCode. Agent id is optional.
  4. Optional: choose an Avatar, and select the Tools the agent can use. The ACP agent gets these tools over MCP.
  5. Click Create agent.

The Create agent dialog with the name Code Reviewer and the agent Claude

  1. Select the new agent in the left rail. Then select the model and the reasoning effort in the menus next to the agent. The choices come from the selected ACP agent.

The agent set to Claude, with the model and reasoning effort menus

  1. With the agent selected in the left rail, click New chat and send a message.

Change an existing agent

  1. Click Agent in the sidebar and select the agent in the left rail.
  2. Open the agent menu under the agent's name.
  3. Select Claude, Codex, or OpenCode. The change saves at once.

The Agent menu open with Nakama, Claude, and Codex

In chat, the composer shows the model and reasoning choices that the selected ACP agent supports.

Server requirements

The ACP agent runs as a child process on the machine that runs Nakama. The server image includes the Claude and Codex ACP packages. The agent may still need its own provider credentials or sign-in on that machine before it can answer.

Keep the server able to start child processes. In Docker deployments, configure credentials for the container, not only for the host. The default Docker image does not include the Claude, Codex, and OpenCode binaries. See Docker.

OpenCode needs version 0.15.10 or later, the first release with opencode acp. Nakama looks for it in this order:

  1. The OPENCODE_PATH environment variable.
  2. The OpenCode binary in the server's node_modules.
  3. The server PATH, plus ~/.bun/bin, ~/.opencode/bin, /opt/homebrew/bin, and /usr/local/bin. On Windows, Nakama also checks the npm global folder.

Nakama uses the same search folders (step 3) for every agent that you save as a command name only, such as gemini.

If Nakama cannot find OpenCode, the chat shows an error. Install OpenCode with npm i -g opencode-ai or bun add -g opencode-ai, or set OPENCODE_PATH. Follow the selected agent's instructions for authentication and model access.

An ACP agent uses the profile's workspace as its working directory. Nakama gives it access only to tools assigned to that profile. Review those tools before you enable an ACP agent for a profile.

Change back to Nakama

Open the agent's Agent menu next to Name and select Nakama. New chat turns then use Nakama's built-in agent loop.

On this page