OpenACP/README.md
lngdao f112941079
fix(tunnel): scope /tunnels to current session + update README (#45)
- /tunnels in session topic now shows only that session's tunnels
- /tunnels in assistant topic shows all tunnels
- README: move tunnel from nav heading to features section with link
2026-03-23 17:54:54 +07:00

11 KiB

OpenACP

Self-hosted bridge between messaging platforms and AI coding agents

One message, any channel, any agent.

License: MIT Node.js >= 20 ACP Protocol npm Twitter Follow

Getting Started | Agents | Usage | Configuration | Plugins | Development


What is OpenACP?

OpenACP lets you control AI coding agents (Claude Code, Codex, ...) from messaging apps like Telegram and Discord. You send a message, the agent writes code, runs commands, and streams everything back — in real time.

It uses the Agent Client Protocol (ACP) to talk to agents. You host it on your own machine, so you own the data.

You (Telegram / Discord / ...)
  ↓
OpenACP ─── ChannelAdapter ─── Session Manager ─── Session Store
  ↓                                                     ↓
ACP Protocol (JSON-RPC / stdio)                  Tunnel Service
  ↓                                                     ↓
AI Agent (Claude Code, Codex, ...)            File/Diff Viewer

Screenshots


Control Panel
Manage sessions, agents, and settings

Agent at Work
Plans, reads files, writes code

Real-time Tool Calls
See every action the agent takes

Agent Skills
Brainstorming, TDD, debugging & more

Supported Agents

OpenACP follows the Agent Client Protocol (ACP) standard — an open protocol for connecting AI coding agents to client applications. Agent definitions are loaded from the official ACP Registry via CDN (registry.json), so new agents are available as soon as they're registered.

Agent Distribution Description
Claude Agent npx Anthropic's Claude coding agent
Gemini CLI npx Google's official CLI for Gemini
Codex CLI npx OpenAI's coding assistant
GitHub Copilot npx GitHub's AI pair programmer
Cursor binary Cursor's coding agent
Cline npx Autonomous coding agent with file editing, commands, and browser
goose binary Open source AI agent for engineering tasks
Amp binary The frontier coding agent
Auggie CLI npx Augment Code's agent with industry-leading context engine
Junie binary AI coding agent by JetBrains
Kilo npx The open source coding agent
Qwen Code npx Alibaba's Qwen coding assistant
crow-cli uvx Minimal ACP native coding agent
...and more See full registry →

28+ agents supported — any agent registered in the ACP Registry works out of the box. Install with openacp agents install <name> or browse from Telegram with /agents.

Features

  • Multi-agent — Claude Code, Codex, Gemini, Cursor, and 28+ ACP-compatible agents
  • Telegram — Forum topics, real-time streaming, permission buttons, skill commands
  • Discord — Forum/thread-based sessions, slash commands, button interactions
  • Session persistence — Resume sessions across restarts
  • Daemon mode — Background service with auto-start on boot
  • CLI API — Create and manage sessions from the terminal
  • Config editor — Interactive openacp config for all settings
  • Setup wizard — Interactive first-run setup with bot validation and auto-detect
  • Plugin system — Install channel adapters as npm packages
  • Structured logging — Pino with rotation, per-session log files
  • Self-hosted — Your keys, your data, your machine

Tunnel & Port Forwarding

Expose any local port to the internet — dev servers, APIs, static sites. Tunnel is enabled by default with Cloudflare (free, no account needed).

  • /tunnel 3000 my-app in Telegram or openacp tunnel add 3000 --label my-app from CLI
  • /tunnels to list active tunnels with public URLs and stop buttons
  • Agents can create tunnels too — say "expose port 5173" and the agent handles it
  • Built-in file/diff viewer — Monaco Editor (VS Code engine) with syntax highlighting, line range links, markdown preview
  • Providers: Cloudflare (default), ngrok, bore, Tailscale Funnel

Setup

Prerequisites

  • Node.js 20+
  • A messaging platform — Telegram, Discord, or both:
    • Telegram: Create a bot via @BotFather, create a supergroup with Topics enabled, add bot as admin
    • Discord: Create a bot at Discord Developer Portal, invite it to your server with Manage Channels + Send Messages permissions

Install & first run

npm install -g @openacp/cli
openacp

Important: openacp is an interactive CLI. The first run launches a setup wizard that asks you questions in the terminal (bot token, server selection, workspace path, etc.). You must run it yourself in a terminal — it cannot be run by a script or an AI agent because it requires interactive input.

The wizard will:

  1. Choose your channel(s) — Telegram, Discord, or both
  2. Configure bot credentials — bot token and server/group ID, validated against the platform API
  3. Set a workspace directory — where agents will create project folders (default: ~/openacp-workspace)
  4. Detect installed agents — finds Claude Code, Codex, etc.
  5. Choose run mode — foreground (in terminal) or background (daemon with auto-start)

Config is saved to ~/.openacp/config.json. After setup, OpenACP starts automatically.

Running after setup

# Foreground (shows logs in terminal)
openacp

# Or as a background daemon
openacp start
openacp stop
openacp status
openacp logs

Other CLI commands

# Agent management
openacp agents                    # List all agents (installed + available)
openacp agents install <name>     # Install an agent from the ACP Registry
openacp agents uninstall <name>   # Remove an installed agent
openacp agents info <name>        # Show agent details & dependencies
openacp agents refresh            # Force-refresh the registry

# API (requires running daemon)
openacp api new [agent] [workspace]      # Create a new session
openacp api cancel <id>                  # Cancel a session
openacp api status                       # Show active sessions
openacp api agents                       # List available agents

# System
openacp config            # Interactive config editor
openacp reset             # Re-run the setup wizard
openacp update            # Update to latest version
openacp install <plugin>  # Install a plugin (e.g. @openacp/adapter-discord)
openacp uninstall <plugin>
openacp plugins           # List installed plugins

Usage

Once OpenACP is running, control it from Telegram or Discord:

Telegram — Bot commands in your supergroup:

Command Description
/new [agent] [workspace] Create a new session
/newchat New session, same agent & workspace
/cancel Cancel current session
/status Show session or system status
/agents Browse & install agents from ACP Registry
/install <name> Install an agent directly

Each session gets its own forum topic.

Discord — Slash commands in your server:

Command Description
/new [agent] [workspace] Create a new session
/newchat New session, same agent & workspace
/cancel Cancel current session
/status Show session or system status
/menu Open the control panel

Each session gets its own thread in the sessions channel. The agent streams responses in real time, shows tool calls, and asks for permission when needed.

Session Transfer

Move sessions between your terminal and messaging platforms:

Terminal → Chat:

# Install integration (one-time)
openacp integrate claude

# In Claude CLI, type /openacp:handoff to transfer the current session
# Or manually:
openacp adopt claude <session_id> --cwd /path/to/project

Chat → Terminal: Type /handoff in any session topic/thread. The bot replies with a command you can paste in your terminal to continue.

Sessions are not locked after transfer — you can continue from either side.

Roadmap

  • Phase 1 — Core + Telegram + ACP agents
  • Phase 2 — Tunnel/file viewer, session persistence, logging, plugin system
  • Phase 3 — Agent skills as commands, Discord adapter 🚧, Web UI
  • Phase 4 — Voice control, file/image sharing
  • Phase 5 — WhatsApp, agent chaining, plugin marketplace

Star History

Star History Chart

Contributing

See development guide.

Follow Us

Twitter Follow

License

MIT