RepositoryTypeScript
vb2250158

vb2250158/RabiRoute

Self-hosted gateway that bridges QQ, WeChat/WeCom and Feishu chat to your existing Codex or agent task — remote control from your phone, schedules and role context. | 自托管 AI 消息网关:把 QQ、微信、飞书接到你已有的 Codex / Agent 任务,支持手机远程、定时任务和角色上下文。

494stars
1forks
0issues
5views
English | 简体中文

RabiRoute

RabiRoute mascot showing message ingress, rule-based routing, Agent handling, and controlled replies

Let Agents connect everything around us.

Send chat, voice, scheduled, and device messages to the right Agent while keeping context, permissions, and delivery evidence explicit.

Last commit GitHub stars License: MIT Node.js 20 or newer Current version: 0.2.3 Status: active development

RabiRoute is an agent-neutral message gateway, delivery-policy router, and action gate. It receives QQ, webhook, scheduled, voice, desktop, and device messages, then uses a message Route to deliver each message to a selected Agent or program.

The Agent answers, writes code, calls tools, and performs the task. RabiRoute decides where the message came from, who receives it, which recent messages travel with it, whether an external reply is allowed, and where results and receipts are stored.

Quick start · Current capabilities · Recent changes · How it works · Documentation

What you can build

  • Route chat to an Agent. QQ groups, direct messages, the persona panel, and other inputs can enter a fixed project and Desktop task through a Route.
  • Run scheduled Agent work. Persona rules can trigger an Agent by interval, time window, daily time, or one-time schedule, or run an explicitly allowed local script.
  • Carry continuous context. Each persona owns its message history and references to plans, memories, and skills; every Route can limit the recent messages included in a delivery.
  • Configure each persona's plan workflow. Plan status keys, labels, descriptions, colors, order, views, approval behavior, and delayed archival come from that persona's configuration; Agents can evolve the catalog without a code release.
  • Control external sends. Agents reply to QQ, RabiLink, and other channels through one sending API. Targets, quoted messages, sender identity, and receipts are validated and recorded.
  • Send Windows text and images. RabiRoute Desktop supports selected-text actions, system screenshots, annotations, copy, pinning, and delivery to an active persona.
  • Connect speech and mobile devices. RabiSpeech, RabiLink phone and glasses clients, wearable inputs, and the remote Relay are implemented as experimental integrations.

Quick start

Windows installer

Download RabiRoute-<version>-windows-x64-setup.exe from GitHub Releases. The package includes RabiRoute Host, the Desktop surface, the local Manager, RibiWebGUI, Node.js, and production dependencies. On Windows, Host is the only application-lifecycle owner: it creates one application generation and keeps Manager and Desktop in that same generation.

A portable ZIP and SHA256SUMS.txt are also published. The ZIP uses the RabiRouteHost.exe + current.json + versions/<releaseId> layout and must be extracted only into a new empty directory; use Setup for every existing installation. Setup embeds that exact ZIP, stages it on the installation volume, verifies every manifest hash and size plus private-path, reparse-point, and Host self-test gates, then issues a generation-fenced quit. Only a valid candidate can atomically replace current.json and the bootstrap; failure restores the previous pointer and bootstrap. Exactly identified retired lifecycle entries move into installer-owned, non-executable quarantine names ending in .retired; rollback or power-loss recovery restores them in place, while foreign and similarly suffixed files never move. data/, logs/, and foreign files are neither overwritten nor removed by uninstall. Windows packages are currently unsigned, so verify the checksum before accepting a SmartScreen unknown-publisher warning.

Run from source

Requires Node.js 20 or newer and npm.

git clone https://github.com/vb2250158/RabiRoute.git
cd RabiRoute
npm install
npm run build
npm run start:manager

Manager prints its actual loopback URL after startup; the operating system assigns an unused port. Source-mode users open that printed URL. Packaged Windows users start RabiRoute Host and let Host status or the tray open the current URL; no fixed localhost port is part of the product contract. When no local runtime data exists, Manager creates a sanitized sample configuration from examples/data/.

Complete the first Route

  1. Open Quick setup and choose Scheduled trigger.
  2. Choose Codex Agent, then bind a project directory and an existing Codex/ChatGPT Desktop task.
  3. Save the Route and run one manual trigger from Log diagnostics.
  4. Confirm that the trigger succeeds and the same Desktop task receives a RabiRoute message.

The manual trigger performs a real delivery. See Complete the first Route for the full procedure and failure checks.

Current capabilities

The repository version is 0.2.3. The table lists behavior backed by current code, configuration surfaces, and tests. Features that require accounts, external services, or physical devices still need acceptance in their target environment.

AreaStatusWhat it provides
Routing coreVerifiedReceive messages, persist events, match rules, build Agent context, deliver to a handler, and record replies.
NapCat / OneBotVerifiedBind one NapCat to each Route, manage quick/password/QR login and security confirmation inside the Route card, receive QQ group/direct messages, preserve media evidence, and send replies through OneBot HTTP.
Schedules and persona automationVerifiedTrigger an Agent from messages or time rules; run persona-local scripts only after separate permission is enabled.
Codex DesktopVerifiedA full task ID selects the existing task, and each delivery supplies its workspace; report success only after the target rollout records the deliveryId. Deleted or archived bindings can be replaced under controlled rules.
RibiWebGUIVerifiedManage Routes, personas, message inputs, Agents, plans, memories, logs, diagnostics, themes, and desktop settings.
Persona plan workflowVerifiedUse persona-configured status keys and presentation metadata as the single source for Manager, WebGUI, and Desktop; add, update, replace, or retire states through guarded APIs while preserving plan history.
Plans, memories, and message processingVerifiedPage through plans and memories, submit plan feedback, assign message-processing work, and preserve state and receipts.
Windows desktopCore path implementedHost owns one application generation containing Manager and the tray/task-window surface; use selected-text actions, screenshots, and annotations. Some system interactions still need Windows device acceptance.
DSHExperimentalBind an explicit API address, workspace, and session as the primary or an auxiliary handler.
RabiSpeech / RabiLink / mobile and wearablesExperimentalConnect speech, phones, glasses, Relay, and health-data paths, with separate acceptance for each device and network environment.
LAN Rabi AgentExperimentalRun a headless worker on another computer and deliver Manager tasks to a configured Codex Desktop owner on that machine. Real multi-computer acceptance remains pending.

See Current capabilities and maturity for complete status, limits, and sources of truth.

Recent changes

0.2.3: durable Manager state and client recovery

  • Plan, memory, feedback, and route-catalog mutations now use revision checks, stable idempotency keys, generation fences, worker ownership, and recoverable receipts instead of direct parent-process writes.
  • Plan startup recovery publishes a complete canonical package before retiring legacy files. Storage leases and durable-delivery ownership stay alive during long work and fail closed if ownership changes.
  • RibiWebGUI, the Windows tray, Android SDK, RabiLink AIUI, and Xiaomi Home settings now keep explicit revisions and recover from Manager generation or endpoint changes without silently replaying a mutation.
  • Persona synchronization moves manifest and package inspection off the Manager request path, preserves canonical plan-package identity, and rejects stale or conflicting evidence.
  • Windows developer candidates, transactional install/apply scripts, Host fencing, and release manifests now share the same local-runtime ownership rules; source remains separate from installed state.

0.2.2: single Windows lifecycle and plugin runtime v2

  • RabiRoute Host became the only Windows application owner. Manager and tray run as same-generation children on an operating-system-assigned port and are discovered through authenticated Host state plus /meta identity.
  • Manager plugins moved to schema/profile v2 with explicit execution modes, readiness dependencies, generation replacement, process leases, and immutable Web Bundle revisions.
  • Codex Desktop delivery gained recorded deliveryId confirmation, controlled task replacement, and sidebar-index display names; RibiWebGUI gained bounded first-screen reads and recoverable catalog loading.
  • Desktop-pet, YeYu Gamer, wearable, Xiaomi Home, mobile voice, and LAN Agent integrations moved behind explicit plugin, device, and acceptance boundaries.

See the version changelog for individual changes and migration notes.

How it works

flowchart LR
    A[Chat · schedules · voice · devices] --> B[Message input]
    B --> C[Event record]
    C --> D[Route rules]
    D --> E[Context and attachments]
    E --> F[Agent or program]
    F --> G[Delivery policy and action gate]
    G --> H[Reply · receipt · audit]

Each Route stores its message input, persona, handler, workspace, and sending rules separately. Message adapters do not build Agent instructions, and Agents do not receive channel credentials or direct ownership of routing state.

Manager loads 29 independent built-in packages through one Plugin Kernel. Built-in and out-of-tree packages share schema/profile v2, the same SDK, dependency graph, permission checks, generation switching, execution-mode boundary, and Web module lifecycle. See Plugin packages and hot replacement.

Agent and safety boundaries

  • Real Codex messages travel only through Desktop IPC to the selected Codex/ChatGPT Desktop task owner.
  • The target Desktop task owns its model, tools, sandbox, and approvals. RabiRoute does not perform its reasoning.
  • The project-pinned codex app-server may create or name an empty task, but it does not execute Route messages.
  • Delivery fails with recorded evidence when Desktop is unavailable, the task cannot load, the workspace differs, or the owner is ambiguous.
  • Platform accounts, login state, and credentials remain owned by their platforms.
  • Local data/, logs, recordings, transcripts, tokens, cookies, and private paths stay out of the public repository.

RabiRoute does not currently provide a general Action Queue, a unified approval center, or a side-effect-free Route preview. Production closure for phones, glasses, wearables, and multi-computer Agents remains experimental.

Configuration and data

data/route/<configName>/adapterConfig.json
data/roles/<RoleId>/persona.md
data/roles/<RoleId>/personaConfig.json
  • adapterConfig.json stores message inputs, handlers, workspaces, Route rules, and persona bindings.
  • persona.md stores persona guidance and handler-facing work requirements.
  • personaConfig.json stores persona automation, avatar data, speech keywords, and recent-message limits.
  • data/roles/<RoleId>/conversation/ stores that persona's message history.
  • examples/data/ contains sanitized, copyable samples.

Buildable clients live under apps/, shared SDKs under packages/, and reusable Agent guides under skills/.

Documentation

First use

Installation and integrations

Development and maintenance

Development

npm run manager          # run Manager from TypeScript
npm run webgui:dev       # run the Vue/Vuetify frontend
npm run test             # run backend and contract tests
npm run build            # build Manager, independent plugin packages, and WebGUI
npm run check:config     # validate public and runtime JSON text

Before publishing changes, remove real account identifiers, chat content, tokens, cookies, local usernames, private paths, and runtime data/.

License

RabiRoute is licensed under the MIT License.

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

212.9k
Dec 2, 2026
RepositoryTypeScript
paperclipai/paperclip

The open-source app everyone uses to manage agents at work

118.9k
Dec 2, 2026
RepositoryPython
NousResearch/hermes-agent

The agent that grows with you

267.7k
Dec 2, 2026
RepositoryJavaScript
Leonxlnx/taste-skill

Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages

124.6k
Nov 26, 2026
RepositoryTypeScript
ruvnet/ruflo

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

82.7k
Dec 1, 2026
RepositoryTypeScript
garrytan/gstack

Ship agent-written code you can trust: review, QA, a destructive-command guard and PRs that carry their own evidence, for Claude Code and other coding agents.

143.2k
Dec 1, 2026
RepositoryTypeScript
heygen-com/hyperframes

Open-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.

94.6k
Dec 2, 2026
RepositoryRust
herdrdev/herdr

the runtime your coding agents live on

53.9k
Dec 1, 2026
RepositoryTypeScript
cheaper-inference/OmniRoute

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

91.8k
Dec 2, 2026