Claude, Codex or opencode,
inside your web app.
acp-chat is a chat panel and the server routes behind it. Your users talk to the agent they already have, on their own subscription, and the agent can use your app's tools and nothing else.
The agents you already use
Claude Code, Codex and opencode, through the Agent Client Protocol. No API keys: each user's own login. Model and effort menus, and opencode's free models marked.
Limited to your tools
Each agent's own shell, files, web and connectors are turned off, and every permission it asks for is refused unless it's one of your tools. A probe checks it against the real agents.
A panel for any page
<acp-chat> is a web component: plain HTML, React, Vue or Svelte. Answers stream
in, tool calls open to show what was asked and answered, in English or French.
Cards from your tools
A tool can show something in the answer, like a proposal with an Apply button, drawn by your page and saved with the chat.
Chats that come back
Saved as they go, in a folder or wherever your app keeps its records. Opened again, the agent resumes the conversation and remembers all of it.
Images and dictation
Questions can carry images for the agent to read, and speech can be written into the message box by a speech-to-text engine running on your own machine.
Get started
Install it from its latest release (npm comes later), with the agents you want beside it (opencode goes on the PATH):
npm install https://github.com/sigmaSd/acp-chat/releases/download/v0.1.0/sigmasd-acp-chat-0.1.0.tgz
npm install @agentclientprotocol/claude-agent-acp @agentclientprotocol/codex-acp
On your server, give the chat its routes:
import { chatServer, claude, codex, opencode } from "@sigmasd/acp-chat";
const chat = chatServer({
agents: [claude({ root }), codex({ root }), opencode({ root })],
cwd: emptyFolder, // where the agents work: an empty folder
setup: { instructions: "You help with …", toolServers: [myTools] },
store: "data/chats", // saved chats
});
// in your request handler, before your own routes (null: not a chat route)
const response = await chat.handle(request);
And on your page:
<acp-chat endpoint="/chat/" hint="Ask about this page."></acp-chat>
<script type="module" src="/chat/element.js"></script>
Your tools are a small script (serveTools) or served by your own server over HTTP. Check
who is asking before the chat routes: they run the user's own agents. The
README has the rest: cards, saved chats, the
web, words, and how each agent is locked down.