Run local ACP coding agents from Weixin. Each chat gets an isolated agent session and working directory; replies stream back to the IM conversation.
Requirements: Go and the agent command selected by default.agent.
mkdir -p ~/.omp-im
cp config.example.json ~/.omp-im/config.json
# Edit work_dir and retain only the platform(s) you configure.
go run ./cmd/omp-im -config ~/.omp-im/config.json -log-level infoconfig.example.json contains a Weixin example. Edit the work_dir before running.
Build an executable when running persistently:
make build
make install-user # installs ~/.local/bin/omp-im| Config name | Local ACP command | Installation |
|---|---|---|
omp |
omp acp |
Install and authenticate the omp CLI. |
claude |
claude-agent-acp |
npm install -g @agentclientprotocol/claude-agent-acp |
codex |
codex-acp |
npm install -g @agentclientprotocol/codex-acp |
Claude Code and Codex use their own local CLI credentials. omp-im reports the installation command when a selected ACP adapter is unavailable.
omptool calls are auto-approved. Restrict platform access withallow_frombefore exposing it to other users.
Leave platforms[].options.token empty, then log in interactively:
omp-im -config ~/.omp-im/config.json weixin loginThe QR-code session is retained under ~/.omp-im/weixin/. Set token instead when using an existing iLink bot token. Limit senders with allow_from ("*" or empty permits everyone). A turn-summary footer (⏱️ elapsed · 🧠 context%) is appended to each reply by default; turn it off with /display footer off or set display.footer to false in the config.
Use the test-only HTTP platform without an IM account:
{"type":"http","options":{"addr":":8080"}}Then POST a message:
curl -X POST http://localhost:8080/send \
-H 'Content-Type: application/json' \
-d '{"session_key":"test:u1","user_id":"u1","content":"hello"}'| Command | Purpose |
|---|---|
/agent [name] |
Show or switch agent. |
/proj [name] |
Show or switch project. |
/p |
Show agent, model, turn status, and token usage. |
/esc |
Cancel the active reply. |
/new |
Start a fresh conversation. |
/ls |
List the current agent's own historical sessions for this project. |
/sw <n or id> |
Switch to one of the listed sessions (resumes it next message). |
Agent session IDs persist in ~/.omp-im/sessions.db by default (bbolt). On restart, omp-im resumes ACP sessions when the selected adapter supports it. /new, an agent switch, or a project switch clears the saved session.
ecosystem.config.js runs the installed binary at ~/.local/bin/omp-im from ~/.omp-im using config.json.
make install-user
pm2 delete omp-im 2>/dev/null || true
pm2 start ecosystem.config.js
pm2 logs omp-im
pm2 restart omp-im
make pm2-stop