Keep your CLI agents alive. 24/7. From your phone.
Not another IM bridge. This is a persistent agent gateway.
Most "IM to AI" projects work like this:
User message โ Start a process โ Send prompt โ Get response โ Kill process
Agent Keep works differently:
Agent lives in tmux โ 24/7 online โ Phone sends message โ
Agent does real work (files, terminal, browser, desktop) โ
Responds with results โ Context stays alive
The difference is fundamental:
| Typical IM Bridge | Agent Keep |
|---|---|
| Agent starts fresh every request | Agent lives in tmux/ConPTY 24/7 |
| Bridge manages conversation history | Agent manages its own session naturally |
| Limited to API-accessible tools | Full CLI, terminal, browser, desktop access |
| Timeout on long tasks | Always-on, no timeout |
| One agent at a time | 3+ agents running simultaneously |
| No Windows support | โ Windows desktop API direct-connect |
Each bridge is a standalone, pip-installable package. Pick the agents you use.
This repository now contains real bridge source code under packages/:
packages/claude-code-qq-bridge/packages/codex-qq-bridge/packages/agy-qq-bridge/
The top-level repo is the umbrella monorepo. Each bridge package keeps its own Python package metadata, entrypoints, and docs.
claude-code-qq-bridge โ The most mature bridge.
- โ Approval buttons via QQ card messages
- โ
Session state monitoring (
waitingFordetection) - โ JSONL incremental log reading (no ANSI garbage)
- โ Auto-restart on crash, single-session keep-alive
codex-qq-bridge โ Simple, clean, multi-turn.
- โ Multi-turn conversation with session continuation
- โ Adaptive JSONL file binding
- โ No approval interception (Codex handles it natively)
agy-qq-bridge โ Async log monitoring for Google Antigravity.
- โ Fully async, no busy locks
- โ Multi-part response support (one input โ many replies)
- โ
Adaptive session file binding on
/new
antigravity-qq-bridge-win โ Windows desktop remote AI workstation.
- โ
Direct API connection to
language_server.exe(no PTY/ConPTY needed) - โ Dynamic process discovery (auto-detect port + CSRF token)
- โ
Model auto-sync from desktop GUI (
settings.json) - โ
Session persistence (
conversation_idsurvives restarts) - โ UTF-8 forced output (no GBK crash on emoji)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your Phone โ
โ (QQ / WeChat / Telegram / etc.) โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Agent Gateway (Bridge Layer) โ
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Channel: QQ โ โ Channel: ... โ โ Adapter โ
โ โ (reference) โ โ (next) โ pattern โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โ โ โ โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Runtime Layer โ โ
โ โ โโโโโโโโ โโโโโโโโ โโโโโโโโ โโโโโโโโ โ โ
โ โ โ tmux โ โConPTYโ โ JSONLโ โSessionโ โ โ
โ โ โ โ โ โ โ Log โ โState โ โ โ
โ โ โโโโฌโโโโ โโโโฌโโโโ โโโโฌโโโโ โโโโฌโโโโโ โ โ
โ โโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโ โ
โโโโโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude Code โ Codex โ AGY โ AGY (Win) โ
โ (24/7 alive) โ (24/7) โ (24/7) โ (24/7) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Computer Environment โ
โ (Files, Terminal, Browser, Desktop Automation) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Each bridge is a channel adapter + agent adapter:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Bridge โ
โ โโโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Channel โ โ Agent โ โ
โ โ Adapter โ โ Adapter โ โ
โ โ โ โ โ โ
โ โ โข QQ WS โ โ โข tmux โ โ
โ โ โข WeChat โ โ โข ConPTYโ โ
โ โ โข Telegramโ โ โข PTY โ โ
โ โ โข Discord โ โ โ โ
โ โโโโโโโโโโโโโ โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
QQ is the reference implementation. Switching to WeChat, Telegram, or Discord means changing the channel adapter only โ the agent runtime, session management, and output capture stay the same.
You're running Claude Code / Codex / AGY on your server. You SSH in, type commands, wait. Can't check on long tasks from your phone. Context gets lost when you disconnect.
With Agent Keep:
- Open QQ โ Type "ๅธฎๆๆฃๆฅๆๅกๅจ" โ Done โ Reply comes back
- Long-running task? Send a message anytime, it replies when ready
- New session?
/newresets, bridge auto-reconnects
- Multiple agents running simultaneously on the same machine
- Each agent has its own persistent session, never cross-contaminated
- Windows machine acts as a remote AI workstation (browser, desktop, file ops)
- Full CLI tool access โ not limited by API sandboxing
- Agents can install packages, edit files, run scripts, control browsers
- True persistent sessions mean no context window rebuilding
# Clone the monorepo
git clone https://github.com/zz327455573/agent-keep.git
cd agent-keep
# Pick any bridge package, install with pip:
pip install ./packages/claude-code-qq-bridge
# Or install another bridge package:
pip install ./packages/codex-qq-bridge
pip install ./packages/agy-qq-bridge
# Initialize (only asks for QQ Bot credentials)
claude-code-qq-bridge --init
# Run
claude-code-qq-bridgeDetailed instructions in each bridge's README.
Most bridges start a new CLI process for each message, feed it the conversation history, and kill it after. This means:
- Every request reloads the full context (slow, expensive)
- Agent has no persistent state
- No ongoing tool access
API-based agents are sandboxed โ they can't touch your files, run local scripts, or control your browser.
Agent Keep is SSH + tmux, but automated. You don't need to SSH in, attach to a session, type commands, and watch output. The bridge handles all of that.
- WeChat / Enterprise WeChat channel adapter
- Telegram channel adapter
- Feishu / Lark channel adapter
- Discord channel adapter
- Unified CLI:
agent-keep start claude - Web dashboard: view all agents, session logs
- Multi-user support
- Docker deployment
CLI agents are the most capable AI tools we have. They run on our machines, have access to everything, and can do real work. The only thing missing is persistence โ they're stuck in a terminal, tied to an SSH session.
Agent Keep fixes that. It gives your agents a permanent home where they live, work, and wait for your instructions. From anywhere. From your phone.
MIT. Each bridge is independently licensed under MIT.
Made by @zz327455573 โ ็ซนๅฑฑๆ่พพ้จ็ช / ไธชไบบAI Agentๅจ็บฟๅ