Universal messenger-to-agent bridge — connect WeChat/Feishu/Telegram to Claude Code/Codex/Copilot/OpenCode, or any custom agent via ACP.
Telegram WeChat
npm install -g im-hub
im-hub config wechat # Scan QR to login
im-hub start # Start the bridge
im-hub includes a built-in web interface for chatting with your agents directly from the browser.
im-hub start # Starts web UI at http://localhost:3000
Features:
- Real-time streaming responses via WebSocket
- Agent switching and chat history
- Settings page for managing agents, messengers, and ACP connections
- Bilingual UI (English / Chinese) — auto-detects your browser language
- Universal multiplexer — one instance, multiple messengers, multiple agents
- Custom agent support — connect any agent via ACP with
im-hub config agent - Plugin architecture — easy to add new messengers/agents
- TypeScript native — no Go/Docker required
- JSONL streaming — real-time agent responses
# Install globally
npm install -g im-hub# 1. Configure WeChat
im-hub config wechat
# Scan the QR code with WeChat
# OR configure Feishu (WebSocket long polling - no webhook needed!)
im-hub config feishu
# Enter App ID and App Secret from Feishu Open Platform
# OR configure Telegram
im-hub config telegram
# Get bot token from @BotFather
# 2. Configure Claude Code (optional, auto-detected)
im-hub config claude
# 3. Start the bridge
im-hub startFeishu uses WebSocket long polling mode, which means:
- ✅ No webhook configuration needed
- ✅ No public IP or domain required
- ✅ No ngrok or similar tools needed
- ✅ Works directly from localhost
Just configure your App ID and App Secret, then start the bridge. The bot will automatically connect to Feishu servers via WebSocket.
im-hub speaks ACP (Agent Communication Protocol), so you can plug in any agent that exposes a standard HTTP endpoint — your own business bots, internal tools, cloud services, anything.
im-hub config agent
# Interactive setup: name, endpoint URL, auth (none / Bearer / API key)
# Connection is validated automaticallyAfter setup, chat with it the same way as built-in agents:
/myagent analyze the Q1 sales report # Switch to your custom agent
im-hub # Same as 'start'
im-hub start # Start the bridge
im-hub config wechat # Configure WeChat
im-hub config feishu # Configure Feishu
im-hub config telegram # Configure Telegram
im-hub config claude # Configure Claude Code
im-hub config agent # Connect a custom ACP agent
im-hub agents # List available agents
im-hub messengers # List available messengers
im-hub help
Send these as messages to the bot:
hello # Send to default agent (context preserved)
/status # Show connection status
/help # Show available commands
/agents # List available agents
/new # Start a new conversation (clear context)
/cc explain this code # Switch to Claude Code
/cx explain this code # Switch to Codex
/co explain this code # Switch to Copilot
/oc explain this code # Switch to OpenCode
┌─────────────────────────────────────────────────────────────┐
│ im-hub core │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Plugin │ │ Message │ │ Session Manager │ │
│ │ Registry │ │ Router │ │ (per conversation) │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────────┐
│ Messenger Plugins│ │ Agent Plugins │
│ • wechat │ │ • claude-code │
│ • feishu ✓ │ │ • codex │
│ • telegram ✓ │ │ • copilot │
│ │ │ • opencode │
│ │ │ • your-agent (ACP) ✨ │
└─────────────────┘ └─────────────────────┘
im-hub/
├── src/
│ ├── core/
│ │ ├── types.ts # Plugin interfaces
│ │ ├── registry.ts # Plugin registration
│ │ ├── router.ts # Message routing
│ │ └── session.ts # Session management
│ ├── plugins/
│ │ ├── messengers/
│ │ │ └── wechat/ # WeChat adapter
│ │ └── agents/
│ │ ├── claude-code/ # Claude Code adapter
│ │ ├── codex/ # OpenAI Codex adapter
│ │ ├── copilot/ # GitHub Copilot adapter
│ │ └── opencode/ # OpenCode adapter
│ ├── index.ts # Main entry
│ ├── cli.ts # CLI commands
│ └── web/
│ ├── server.ts # Web chat HTTP + WebSocket server
│ └── public/
│ ├── index.html # Chat UI (bilingual)
│ └── settings.html # Settings UI (bilingual)
├── package.json
├── tsconfig.json
└── README.md
Config file: ~/.im-hub/config.json
{
"messengers": ["wechat"],
"agents": ["claude-code"],
"defaultAgent": "claude-code",
"acpAgents": [
{
"name": "my-agent",
"aliases": ["ma"],
"endpoint": "https://api.example.com",
"auth": { "type": "bearer", "token": "***" },
"enabled": true
}
]
}- Node.js 18+
- Claude Code CLI —
npm install -g @anthropic-ai/claude-code
# Clone
git clone https://github.com/ceociocto/im-hub
cd im-hub
# Install deps
npm install
# Build
npm run build
# Run in dev mode (watch)
npm run dev
# Run
npm start- WeChat adapter with QR login
- Claude Code agent integration
- Codex agent
- Copilot agent
- OpenCode agent
- Basic command routing
- Feishu adapter
- Telegram adapter
- Session persistence with conversation history
- ACP custom agent support
- Web Chat UI — browser-based agent chat with streaming responses
- Settings page — configure agents, messengers, and ACP from the browser
- Bilingual UI — English/Chinese with automatic browser language detection
- DingTalk adapter
- Slack adapter
Questions? Feel free to reach out on X or join the Discord.
MIT