Multi-agent orchestration daemon (Claude Code / Gemini CLI / Codex CLI) over Telegram.
Status: v0.1.0.
A global daemon at ~/.agent-bus/ that:
- Serves multiple projects (repos) from one always-on process
- Routes Telegram commands to the right agent in the right repo
- Gates dangerous Bash commands via a blacklist + Telegram approval UI
- Runs independently of any IDE
crates/
├── agent-bus-proto/ Wire types only. No runtime deps. Embedded by hook binary.
├── agent-bus-core/ Shared logic: config, state actor, blacklist, redaction, path validation.
├── agent-bus-hook/ Minimal hook binary (cold-start <50ms, size <2MB).
└── agent-bus/ Main daemon + CLI.
- Linux with systemd user services, or Windows for the experimental Telegram daemon MVP
- Rust 1.75+
- A dedicated Telegram bot token from
@BotFather - Claude Code, Gemini CLI, or Codex CLI installed if you want to route work to those agents
- Linux is the primary supported platform. It includes the daemon, Telegram commands, systemd service install, Unix-socket permission approvals, and Claude Code hook integration.
- Windows support is experimental. The daemon and Telegram repo/agent routing can be built and run manually, but permission hook IPC and service installation are not ported yet.
- macOS is not officially supported yet, but should be closer to Linux than Windows once launchd/service packaging and peer-credential checks are added.
Clone and build:
git clone https://github.com/daitayduong/tele-agent-bus.git
cd tele-agent-bus
cargo build --release --workspaceInstall the two binaries:
sudo install -m 0755 target/release/agent-bus /usr/local/bin/agent-bus
sudo install -m 0755 target/release/agent-bus-hook /usr/local/bin/agent-bus-hookInitialize OS-level files and the systemd user unit:
sudo scripts/install.shLog out and back in once so your user picks up the agent-bus group membership.
Initialize your per-user config:
agent-bus initThis creates:
~/.agent-bus/config.yaml
~/.agent-bus/repos.yaml
Create a dedicated bot:
- Open Telegram and message
@BotFather. - Send
/newbot. - Follow the prompts and copy the bot token.
- Message your new bot once with
/start.
Find your chat ID:
curl "https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates"Look for chat":{"id":...} in the response. That number is your chat ID.
Export the values used by the default config:
export TELE_BUS_BOT_TOKEN='123456:ABCdef...'
export TELE_BUS_CHAT_ID='123456789'For a systemd user service, put the variables somewhere your user service can read them. One persistent option is ~/.config/environment.d/agent-bus.conf:
TELE_BUS_BOT_TOKEN=123456:ABCdef...
TELE_BUS_CHAT_ID=123456789Then log out and back in, or import them into the current user manager before starting the daemon:
systemctl --user import-environment TELE_BUS_BOT_TOKEN TELE_BUS_CHAT_IDValidate config:
agent-bus config validateStart the daemon:
systemctl --user daemon-reload
systemctl --user enable --now agent-busFor foreground debugging:
agent-bus daemonDo not run two agent-bus daemon processes with the same bot token. Telegram allows only one getUpdates consumer per bot.
Add a repository:
agent-bus repo add /path/to/project
agent-bus repo listIf you want Claude Code Bash permission approvals to go through Telegram, install the hook in that project:
agent-bus repo install-hook /path/to/projectAfter adding or removing repos, restart the daemon so Telegram sees the updated registry:
systemctl --user restart agent-bus/switch_rpshows repository buttons and sets the current chat's default repo./switch_rp <repo_id>switches directly to a repo without showing the picker./currentshows the current default repo./list_claudelists Claude desktop sessions for the current repo./list_codexlists Codex desktop sessions for the current repo./list_geminireports that Gemini desktop session bridging is not implemented yet.@claude <message>sends a message to the selected Claude session.@codex <message>sends a message to the selected Codex session.@agent:<repo_id> <message>routes explicitly to a repo and bypasses the default repo selection.
See docs/setup-telegram.md for the detailed Telegram setup flow.
See docs/setup-windows.md for the experimental Windows setup flow.
The permission-gate blacklist is a heuristic UX guardrail, not a sandbox. It is trivially bypassable by shell quoting, command substitution, aliases, interpreters, or encoded payloads. Do not rely on it as a security boundary against adversarial code. See spec §10.1.
# Requires Rust 1.75+
cargo build --workspace
cargo test --workspaceMIT. You may use, modify, distribute, and commercialize this project, provided that the copyright and license notice are preserved.
Copyright (c) 2026 John Chuong.
tele-agent-bus is created by John Chuong, an amateur programmer pursuing a few free projects, including docprivy.com and tele-agent-bus.
If this project is useful to you, you can support the author with a "Buy me a coffee" contribution through PayPal: johnchuong5@gmail.com.