Skip to main content

Agent Operating System — terminal-native AI workspace for persistent worker teams

Project description

Git for AI Conversations.
Fork, merge, and weave AI conversations together.

Your browser does not support the video tag. Download video

pip install relayos && relay

GitHub Quick Start 中文 Deutsch Español Français 日本語 한국어


👋 The Problem

You switch between ChatGPT, Claude, Gemini, and DeepSeek. You copy output from one, paste into the next. You lose context between sessions. You spend 30% of your time managing tools instead of building.

And when you have a conversation that matters — a system design, an architecture review — it's trapped in a single session. You can't branch it, merge it, or build on it later.

🎯 The Solution

RelayOS treats AI conversations like code. Fork, merge, and weave them together.

#12 数据库设计                          #25 API设计
       │                                    │
       ├── /fork → #18 数据库v2              │
       │                                    │
       └────────── /merge ──────────────────┘
                            │
                            ▼
                         #31 系统架构
                         (Derived: #12 #25)

Zero config. Auto-detects your installed AI CLIs.

pip install relayos && relay

✨ What Makes RelayOS Different

Feature What It Does
🔀 Conversation Graph /fork /merge /attach — Git for conversations
🧠 Auto Routing Free models first, premium only when needed
💰 Budget Guard Per-task/daily/monthly hard limits, no surprise bills
🔌 Unified Provider API + CLI — zero-config, auto-detect installed tools
⌨️ OpenCode-Style TUI Ctrl+P command palette, Tab switch, Chat interface
💾 Cross-Session Memory /remember facts that persist across conversations
🌐 i18n Chinese + English auto-detect
🚀 Auto/Edit Mode Auto (no ask) or Edit (confirm before each call)

⚡ Quick Start

pip install relayos
relay

Opens the workspace. Type a task, press Enter.

No config required. RelayOS auto-detects your installed AI CLIs (claude, opencode, mimo, etc.) If none found, the setup wizard guides you.

One-liner tasks

relay "设计一个支付系统"        # Auto-routes to best workers
relay "Review this code"        # Detects intent automatically
relay "Explain Kubernetes"      # Single chat

Conversation branching

/fork              Branch current conversation
/merge id1 id2     Merge conversations together
/attach id         Import another session's context
/remember k: val   Save knowledge across sessions

Cost control

relayos cost report
# Today: $0.023 / $1.00
# This month: $0.187 / $10.00

Session management

/help              Show all commands
/new               New conversation
/clear             Clear messages
Ctrl+P             Command palette
Ctrl+X S           Session list
Ctrl+X G           Conversation graph

🖥️ The TUI

┌─ RelayOS  sess-31  Derived: #12 #25  [AUTO]  $0.02 ─┐
│                                                       │
│  > 设计一个支付系统                                     │
│                                                       │
│  [architect] 建议使用事件溯源架构,原因如下:           │
│    1. 幂等性天然保证                                   │
│    2. 审计日志免费获得                                 │
│                                                       │
│  [reviewer] 发现2个安全问题:                          │
│    JWT未设过期时间、缺少速率限制                        │
│                                                       │
├───────────────────────────────────────────────────────┤
│ > 帮我修一下审查问题█                                    │
│  Ctrl+P=palette  /fork  /merge  /remember  /help      │
└───────────────────────────────────────────────────────┘
Shortcut What
Ctrl+P Command palette (all settings)
Ctrl+X N New session
Ctrl+X S Session list
Ctrl+X G Conversation graph
Ctrl+X M Toggle auto/edit mode
Ctrl+X C Cost report
Tab Switch provider
Esc Cancel / clear input
Up/Down Input history

Command palette (Ctrl+P)

Command Palette
────────────────────────────────────────────────
Session:
  New Session          (Ctrl+X N)  Start fresh
  Fork Session         (/fork)     Branch current
  Merge Sessions       (/merge)    Combine sessions
  Switch Session       (Ctrl+X S)  Browse all
  Attach Session       (/attach)   Import context
Knowledge:
  Remember Fact        (/remember) Save knowledge
  Browse Knowledge     (Ctrl+X K)  Explore facts
Settings:
  Toggle Mode          (Ctrl+X M)  Auto / Edit
  Budget               (Ctrl+X C)  Spending
Tools:
  Conversation Graph   (Ctrl+X G)  Visual tree
System:
  Help                 (Ctrl+X ?)
  Quit                 (Ctrl+C)

Conversation Graph View (Ctrl+X G)

Conversation Graph
────────────────────────────────────────────────
└── Payment Design
    └── Architecture v1
        ├── Architecture v2
        └── > Final Arch
                ▲
                │
└── Cache Layer ────────────────────┘

🗺️ Architecture

Terminal (relay / relayos)
         │
         ▼
┌──────────────────────────────────────────────┐
│            Conversation Graph                │
│  (fork / merge / attach / session lifecycle) │
└──────────────────┬───────────────────────────┘
                   │
┌──────────────────▼───────────────────────────┐
│              ProviderRouter                  │
│  (weighted routing, auto/edit mode, budget)  │
└──────┬──────────────────────┬────────────────┘
       │                      │
┌──────▼──────┐     ┌─────────▼──────────┐
│  API Prov. │     │  CLI Provider       │
│  OpenAI    │     │  claude / opencode  │
│  Anthropic │     │  mimo / codex       │
│  Google    │     │  (auto-detected)    │
│  DeepSeek  │     └────────────────────┘
└─────────────┘

Storage (all SQLite, zero infrastructure)

~/.relayos/
├── config.yaml       ← Your provider config
├── sessions.db       ← Sessions + conversation graph
├── knowledge.db      ← Cross-session memory
├── cost.db           ← Usage + spending
├── state.db          ← Project facts + decisions
├── artifacts.db      ← Structured outputs
├── workers.db        ← Worker definitions
└── inbox.db          ← Messages

Design Philosophy

Principle Why
Conversation Graph Fork/merge conversations like code. Git for AI.
Zero config Auto-detect installed AI CLIs. No API keys required.
Budget-first Hard spending limits. No surprise bills.
Auto by default Workers auto-assigned. Provider names hidden.
i18n native Chinese + English. Auto-detect system language.

📈 Version History

Version What
V0.1 Model routing — 5 provider adapters
V0.2 Terminal pool — multi-CLI, cost tracking
V0.3 Worker system — 8 roles, persistence, TUI
V0.4 State compiler — structured state, event sourcing
V0.5 Model scheduler — 15 models, 3 cost profiles
V0.6 Session system — chat/ask/group modes
V0.7 Capability graph — multi-step decomposition
V0.8 Task graph execution — schema-aware artifact passing
V0.9 Cross-session memory — project knowledge
V0.10 Unified Provider — API + CLI abstraction
V0.11 Conversation Graph — fork/merge/attach
V0.12 OpenCode-style TUI + Graph View + BudgetGuard

💪 Built With

Component Tech
Language Python 3.10+
CLI + TUI Click + Rich
HTTP Client HTTPX
Storage SQLite (zero infra)
License Apache 2.0

Credits

  • Claude Code (Anthropic) — Primary development platform
  • OpenCode — TUI design inspiration
  • ECC plugin system — Agent orchestration patterns

📦 Installation

pip install relayos

From source

git clone https://github.com/jjjjjjjjnnjnn/relayos.git
cd relayos
pip install -e .

Optional: web dashboard

pip install relayos[server]
relayos serve --open

🌐 Languages


📄 License

Apache 2.0 Copyright 2026 jjjjjjjjnnjnn


Stop copy-pasting between AI tools.
Fork, merge, and weave conversations together.


GitHub Get Started
pip install relayos && relay

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

relayos-0.2.0a15.tar.gz (119.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relayos-0.2.0a15-py3-none-any.whl (138.9 kB view details)

Uploaded Python 3

File details

Details for the file relayos-0.2.0a15.tar.gz.

File metadata

  • Download URL: relayos-0.2.0a15.tar.gz
  • Upload date:
  • Size: 119.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for relayos-0.2.0a15.tar.gz
Algorithm Hash digest
SHA256 1a8ac4b2be0509da3d10d6bcb12c7cf566b1054d38f7b3a8843ab76d816607cc
MD5 e85625755fb770cd29bc668951fe6f66
BLAKE2b-256 7dcd292f205a2b00f6205f35b65be5d2f3a25ae66b735f8b9686cfb22fa04eed

See more details on using hashes here.

File details

Details for the file relayos-0.2.0a15-py3-none-any.whl.

File metadata

  • Download URL: relayos-0.2.0a15-py3-none-any.whl
  • Upload date:
  • Size: 138.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for relayos-0.2.0a15-py3-none-any.whl
Algorithm Hash digest
SHA256 2e5854b4e5d18ed4cbbe010e233a0bd2bbc532838294b725b53e4f69731c5869
MD5 9e0a119604c0d6457a3bcd1130cc8248
BLAKE2b-256 2d3d3c009bf4eb886f6ff0cae133aa783c26dd8341f0c875661e1194e54b401c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page