Bridge Lark/Feishu messages to any ACP-compatible AI agent.
lark-acp connects to Lark/Feishu via WebSocket, forwards incoming messages to an ACP agent over stdio, and sends the agent reply back to Lark.
Inspired by wechat-acp, but for Lark/Feishu.
- Lark/Feishu WebSocket long-connection (no polling, no public webhook URL needed)
- One ACP agent session per Lark conversation (1:1 DM or group chat)
- Built-in presets for Claude, Copilot, Gemini, Qwen, Codex, OpenCode, Pi
- Custom raw agent command support
- Agent thinking/reasoning display in Lark (optional)
- File system access for agents (read/write)
- Auto-approve tool permission requests
- Group chat support with
@mentionfiltering - Typing indicator via emoji reaction
- Node.js 20+ or Bun 1.0+
- Lark/Feishu bot app credentials (App ID + App Secret)
- An ACP-compatible agent CLI
# Install
npx lark-acp init # or: bunx lark-acp init
# Edit lark-acp.json with your credentials, then:
npx lark-acp # or: bunx lark-acpOverride the agent at runtime:
npx lark-acp --agent copilot
npx lark-acp --agent "bunx my-agent --acp"lark-acp init creates lark-acp.json in the current directory.
Config search order: $LARK_ACP_CONFIG → ./lark-acp.json → ~/.lark-acp/config.json
{
"lark": {
"appId": "cli_xxxxxxxxxxxx",
"appSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"botName": "AI Assistant",
"encryptKey": "",
"verificationToken": ""
},
"agent": "claude",
"acp": {
"cwd": "",
"idleTimeoutMs": 1800000,
"maxConcurrent": 10,
"showThoughts": false,
"mcpServers": []
},
"autoApprovePermissions": true
}| Field | Default | Description |
|---|---|---|
agent |
— | Preset name or raw command string |
acp.idleTimeoutMs |
1800000 |
Session idle timeout in ms (0 = never expire) |
acp.maxConcurrent |
10 |
Max concurrent agent sessions |
acp.showThoughts |
false |
Display agent reasoning in Lark before reply |
autoApprovePermissions |
true |
Auto-approve agent tool requests |
lark-acp [start] Start the bridge (default command)
lark-acp init Create lark-acp.json in the current directory
lark-acp agents List built-in agent presets
lark-acp --agent <val> Override agent (preset name or raw command)
lark-acp --help
lark-acp --version
| Preset | Agent |
|---|---|
claude |
Claude Code |
copilot |
GitHub Copilot |
gemini |
Google Gemini |
qwen |
Qwen Code |
codex |
OpenAI Codex |
opencode |
OpenCode |
pi |
Pi |
Run lark-acp agents to see the full command for each preset.
- Go to Lark Open Platform and create an app
- Enable "Bot" capability
- Get App ID + App Secret from "Credentials & Basic Info"
- Subscribe to the
im.message.receive_v1event - Enable long-connection mode under "Event Subscriptions" (no public URL required)
git clone https://github.com/akayj/lark-acp
cd lark-acp
bun install
bun run dev # start with file watching
bun run typecheck # TypeScript type check
bun run check # Biome lint + format check
bun run format # auto-format
bun run build # compile to single binary → dist/lark-acpMIT