Skip to content
crewloomPublic

About

Universal AI Agent Control Room & Omni-Channel Mediator (Telegram, Phone/WhatsApp, Email, Remote Ops)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

87 Commits

Folders and files

Repository files navigation

Crewloom Bridge (legacy AgentGram CLI aliases)

Turn your Telegram into a live AI Agent Control Room & Ops Mission Control
Control OpenCode, AI coding agents, and terminal operations on your machine or VPS directly from your phone via Telegram.

legacy npm version dependencies CI Matrix GitHub release License: MIT TypeScript Node.js

Legacy npm package โ€ข ๐Ÿท๏ธ Releases โ€ข ๐Ÿš€ Quick Start โ€ข ๐Ÿ“ฑ Features


Bridge workflow (legacy AgentGram naming)

Developers shouldn't be chained to their desks waiting for an AI agent to finish modifying code, executing test suites, or running remote deployment scripts.

The bridge turns your phone into a mobile developer cockpit:

  • ๐Ÿ“ฒ Live Streaming Mission Control: Real-time progress updates inside a dynamic message (updates smoothly every ~2.5s with tools, steps, and output tails).
  • ๐Ÿ”˜ One-Tap Permission Buttons: Approve or reject file edits and commands with [ โœ… Allow Once ], [ โ™พ๏ธ Always Allow ], or [ โ›” Reject ].
  • โšก Auto Mode: Allows autonomous execution within configured policies. The blocklist is not a guarantee against every destructive command.
  • ๐Ÿ›ก๏ธ Application-level prompt-injection checks: Multi-layer defense against role hijacking, jailbreaks, delimiter evasion, and malicious prompt injections.
  • ๐Ÿ”Œ Extensible Channels & Engines: Built-in Telegram and Console channels, a dedicated OpenCode adapter, and generic CLI wrappers for Claude Code, Aider, and Shell. Configure additional CLI engines or load your own local channel/engine plugin without rebuilding the bridge. Slack, Discord, and Webhooks require an additional adapter.
  • ๐ŸŒ Multi-Machine & Server Ops: Run operations, SSH jump-host connections, deploy scripts (pinpoint-go), and remote log diagnostics directly from your phone.
  • โšก Zero npm Runtime Dependencies: Uses Node.js built-ins. Your selected coding engine must be installed or available separately.

๐Ÿ—๏ธ Architecture

flowchart LR
    User["๐Ÿ“ฑ Telegram / Console (plugins optional)"] -->|IChannelAdapter| ControlRoom["โšก AgentGram Control Room"]
    ControlRoom -->|IAgentEngine| Engine["๐Ÿค– OpenCode / Claude Code / Shell"]
    Engine -->|Configured Execution| Project["๐Ÿ“‚ Project Files & Git"]
    ControlRoom -->|Authorized Ops / SSH| Remote["๐Ÿ–ฅ๏ธ Remote VPS / Server"]
Loading

OpenCode events with a session ID are isolated to the active engine session before text, tool output, permissions or completion can affect its run. The control room also rejects events explicitly addressed to another run session; engines without session IDs retain their existing behavior.

ุฃุญุฏุงุซ OpenCode ุงู„ุชูŠ ุชุญู…ู„ ู…ุนุฑู‘ู ุฌู„ุณุฉ ุชุจู‚ู‰ ู…ุนุฒูˆู„ุฉ ุนู† ุงู„ุฌู„ุณุงุช ุงู„ุฃุฎุฑู‰ุŒ ุจู…ุง ููŠู‡ุง ุงู„ุฑุฏูˆุฏ ูˆุงู„ุฃุฏูˆุงุช ูˆุทู„ุจุงุช ุงู„ุฅุฐู† ูˆุฅุชู…ุงู… ุงู„ู…ู‡ู…ุฉ.

The Live Experience

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โšก AgentGram ยท Live Mission Control                    โ”‚
โ”‚                                                        โ”‚
โ”‚ Agent: ๐Ÿง  build (OpenCode) | Mode: ๐Ÿ”’ build           โ”‚
โ”‚ Channel: ๐Ÿ“ก Telegram Bot                               โ”‚
โ”‚ Status: ๐ŸŸข Executing bash (npm test)                   โ”‚
โ”‚ Step: 4/12 ยท โณ 14s ยท ๐Ÿ“ 3 files modified              โ”‚
โ”‚                                                        โ”‚
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚
โ”‚ > PASS tests/auth.test.js                              โ”‚
โ”‚ > PASS tests/api.test.js                               โ”‚
โ”‚ > All 14 tests passing                                 โ”‚
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚
โ”‚                                                        โ”‚
โ”‚ [ โน Stop ]      [ ๐Ÿ“ค Diff ]      [ ๐Ÿ”’ Mode ]           โ”‚
โ”‚ [ ๐Ÿ“ Projects ]                  [ ๐ŸŒ Language ]       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Installation and distribution status

Repository release: v2.2.5. Package metadata: crewloom-bridge. At the 2026-11-23 audit, this package name was not available in the public npm registry; the legacy agentgram package resolved to 2.0.9. Running npx agentgram does not install this repository release.

The canonical name is crewloom-bridge; agentgram is the identified legacy npm package. Until crewloom-bridge is published, use a reviewed source checkout rather than presenting the legacy npm package as the current release:

git clone https://github.com/crewloom/bridge.git
cd bridge
npm ci
npm run build
node dist/index.js --help

Review dependencies and configuration before running. Telegram setup needs a bot token; keep it out of commits and logs. The supported executables are crewloom and crewloom-bridge. cl-bridge, agentgram, ag and rumuze-edit are deprecated aliases that print a warning and will be removed in a future major release. The package is not yet published to npm; CI checks that npm pack ships dist/index.js. Prefer the token environment variables (AGENTGRAM_BOT_TOKEN, RUMUZE_EDIT_BOT_TOKEN, TGBRIDGE_TOKEN) over a config file.

๐ŸŽฎ Telegram Controls & Commands

Once connected, your Telegram chat becomes your project mission control:

Command / Control Description
Live Status Card Edits automatically every ~2.5s showing active tools, steps, and output tails
Interactive Approvals Commands requiring approval render inline buttons: [ โœ… Allow Once ], [ โ™พ๏ธ Always Allow ], [ โ›” Reject ]
Interactive Questions Agent questions appear as clickable buttons (single-choice, multi-select, or custom text)
Fast Interrupt Type stop, ูˆู‚ู, or ุฅูŠู‚ุงู at any time to immediately cancel execution
Presence Check Ask ู‡ู„ ุงู†ุช ุดุบุงู„ุŸ, ุงู„ุญุงู„ุฉ, or status to get an instant live status report
Instant Mentions Mention @agent or @model in any message to dynamically switch personas
/mode Switch execution mode: read (read-only diagnosis), build (interactive approval), or auto (autonomous execution)
/agents Switch active agent persona on the fly (e.g. build, delegate, code-review)
/models Switch LLM provider and model dynamically
/diff Get a condensed git diff summary of unstaged and staged changes
/usage View token usage, quota renewal countdowns, and rate limits
/stop Immediately interrupt and terminate the running agent process
/lang Toggle between English and Arabic UI

๐Ÿ”Œ Extension Configuration

The following support levels describe the adapters included in this package:

Integration Included support
Telegram / Console Built-in channel adapters
OpenCode Dedicated engine adapter
Claude Code / Aider / Shell Generic CLI execution, output, and cancellation; not full OpenCode event/permission parity
Additional CLI tools Configurable executable and argument templates
Additional channels / engines Trusted local JavaScript plugin implementing the exported adapter contracts
Slack / Discord / Webhooks No bundled adapter; supply your own plugin

Configure a CLI engine without changing bridge code

Add an engine profile to your project's .agentgram.json:

{
  "channel": "console",
  "engine": "my-agent",
  "cliEngines": {
    "my-agent": {
      "command": "my-agent-cli",
      "args": ["--quiet"],
      "promptArgs": ["run", "--prompt", "{prompt}"]
    }
  }
}

Replace my-agent-cli and its arguments with your installed tool's actual executable and non-interactive options. {prompt} is replaced inside each argument and passed directly to the executable without shell interpolation. Profiles can also customize the built-in CLI wrappers; opencode remains reserved for the dedicated adapter. Choose another profile with agentgram start --engine my-agent.

Load a local adapter plugin

Create bridge-plugin.mjs in your project. This minimal working example registers a named Console channel:

export function register({ channels, engines, config }) {
  channels.register('team-console', cfg => channels.get('console', cfg));
  // Register your own IChannelAdapter or IAgentEngine factory here.
  // Factories receive the resolved config, including config.extra.
}

Then add "plugins": ["./bridge-plugin.mjs"] and "channel": "team-console" to .agentgram.json. Plugins are loaded before adapters are resolved. Paths are relative to the project directory; .js, .mjs, and .cjs files are supported. A plugin exports register(context) (which may be async), or a default object with that method. The package exports BridgePluginContext, IChannelAdapter, and IAgentEngine for typed plugin authors.

These plugins execute local code with the bridge's privileges: only enable plugins and project configuration you trust. They are not sandboxed. The bridge does not download or install plugins. A missing or invalid plugin stops startup rather than silently falling back.

Global CLI profiles are merged with project profiles by name, with project settings taking precedence. A project's plugins list replaces the global list. extra settings merge at the top level and survive save/reload. The default Telegram/OpenCode setup requires no extension configuration.

Discover available integrations

Run agentgram integrations --dir /path/to/project (or add --json) to list built-in adapters, configured CLI profiles, plugin registrations, and the selected channel/engine. This command loads the configured trusted plugins but does not start a channel or engine and does not require Telegram pairing. Registration does not prove that a CLI executable is installed or a service is reachable.

๐Ÿ”’ Security Policies & Prompt Injection Checks

The bridge includes application-level policy checks. These are not an operating-system sandbox or a guarantee against prompt injection:

  1. ๐Ÿ›ก๏ธ Advanced Prompt Injection Defense:
    • Role Hijacking & Jailbreak Defense: Detects and blocks imperative prompt overrides ("ignore previous instructions", "disregard prior directives", "DAN mode", "system override:", and Arabic variants "ุชุฌุงู‡ู„ ุงู„ุชุนู„ูŠู…ุงุช ุงู„ุณุงุจู‚ุฉ", "ุฃู†ุช ุงู„ุขู† ููŠ ูˆุถุน ุงู„ู…ุทูˆุฑ").
    • System Boundary Isolation: Blocks delimiter evasion and token spoofing (</untrusted-report>, <system>, <|im_start|>, [INST] <<SYS>>).
    • Unicode & Obfuscation Stripping: Normalizes Unicode (NFKC) and strips zero-width/invisible evasion characters (\u200B, \u200C, \uFEFF, \u2060) and BiDi overrides (\u202E). Recursively inspects base64 payloads.
    • Data Exfiltration Defense: Blocks markdown image (![exfil](https://.../?token=)) and HTML link exfiltration vectors.
  2. ๐Ÿ” Cryptographic Quarantine Envelopes:
    • External error logs, server alerts, and untrusted inputs are wrapped inside isolated blocks (<untrusted-report id="...">) delimited with random nonces. A nonce is not a digital signature and does not authenticate the source.
  3. ๐Ÿšซ Execution Blocklist:
    • Irreversible destructive host wiping is blocked by default (rm -rf /, rm -rf ~, mkfs, shutdown, dd if=).
  4. ๐Ÿ‘ค Single Chat ID Lock: Every message and inline callback query validates chat.id == ALLOWED_CHAT_ID. Unknown users are ignored.
  5. ๐Ÿ”’ Loopback & Token Isolation: OpenCode server runs strictly on 127.0.0.1 with a per-session randomized high-entropy password; bot token is saved with strict 0600 file permissions.

๐Ÿ› ๏ธ CLI Reference

agentgram <command> [options]

COMMANDS:
  init               Interactive setup wizard & automatic Telegram pairing
  start              Start the control room for the current project
  stop               Stop running background daemon
  status             Display current daemon, server, and workspace status
      integrations       List built-in adapters, profiles, and plugin registrations
  service install    Install as persistent background service (macOS launchd / Linux systemd)
  service uninstall  Remove persistent background service
  service status     Check persistent background service status
  help               Display help message

OPTIONS:
  --dir <path>       Set target project directory (defaults to current working directory)
  --daemon, -d       Run in background as a detached process
  --channel <name>   Communication channel: telegram (default), console
  --engine <name>    AI coding engine: opencode (default), shell, claude, aider
  --version, -v      Show version number

๐Ÿค Contributing & Community

Contributions are welcome! Please read our Contributing Guide and Code of Conduct.


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more details.

About

Universal AI Agent Control Room & Omni-Channel Mediator (Telegram, Phone/WhatsApp, Email, Remote Ops)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages