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 任务,支持手机远程、定时任务和角色上下文。
RabiRoute

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.
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
- Open Quick setup and choose Scheduled trigger.
- Choose Codex Agent, then bind a project directory and an existing Codex/ChatGPT Desktop task.
- Save the Route and run one manual trigger from Log diagnostics.
- 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.
| Area | Status | What it provides |
|---|---|---|
| Routing core | Verified | Receive messages, persist events, match rules, build Agent context, deliver to a handler, and record replies. |
| NapCat / OneBot | Verified | Bind 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 automation | Verified | Trigger an Agent from messages or time rules; run persona-local scripts only after separate permission is enabled. |
| Codex Desktop | Verified | A 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. |
| RibiWebGUI | Verified | Manage Routes, personas, message inputs, Agents, plans, memories, logs, diagnostics, themes, and desktop settings. |
| Persona plan workflow | Verified | Use 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 processing | Verified | Page through plans and memories, submit plan feedback, assign message-processing work, and preserve state and receipts. |
| Windows desktop | Core path implemented | Host 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. |
| DSH | Experimental | Bind an explicit API address, workspace, and session as the primary or an auxiliary handler. |
| RabiSpeech / RabiLink / mobile and wearables | Experimental | Connect speech, phones, glasses, Relay, and health-data paths, with separate acceptance for each device and network environment. |
| LAN Rabi Agent | Experimental | Run 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
/metaidentity. - 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
deliveryIdconfirmation, 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-servermay 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.jsonstores message inputs, handlers, workspaces, Route rules, and persona bindings.persona.mdstores persona guidance and handler-facing work requirements.personaConfig.jsonstores 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
- Complete the first Route: complete a real Codex Desktop delivery.
- RibiWebGUI user guide: use the interface, personas, Routes, Agents, and troubleshooting tools.
- Interface and runtime status: determine whether Manager, a Route, and message inputs are healthy.
- Operations, logs, and troubleshooting: locate a failure by its visible symptom.
Installation and integrations
- Configuration: review local files, directories, and main settings.
- LAN Rabi Agent: connect a headless Codex worker on another computer.
- RabiSpeech: configure local or remote TTS and ASR.
- Client applications: build Android, Rokid AIUI, browser bridge, and Rabi Agent clients.
Development and maintenance
- Current capabilities and maturity: check whether a feature is verified.
- Documentation index: browse current, experimental, design, and historical material.
- Architecture: understand product boundaries and data flow.
- Project function map: locate feature ownership, APIs, and code entry points.
- Version changelog: review changes and migration requirements.
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.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
Agent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
🌊 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
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.
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.
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