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
👋 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
- English
- 中文 (Chinese)
- Deutsch (German)
- Français (French)
- Español (Spanish)
- 日本語 (Japanese)
- 한국어 (Korean)
📄 License
Apache 2.0 Copyright 2026 jjjjjjjjnnjnn
Stop copy-pasting between AI tools.
Fork, merge, and weave conversations together.
pip install relayos && relay
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relayos-0.2.0a16.tar.gz.
File metadata
- Download URL: relayos-0.2.0a16.tar.gz
- Upload date:
- Size: 119.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64fab10ecd937d52ffecb9304b2a6488615d91a547caca06e064e8e194c1776a
|
|
| MD5 |
aa087425cc34bcf786ea31a8ce5269a5
|
|
| BLAKE2b-256 |
61212588c3765fe280c5df0b3758764dffce4b7c957f3422c4bf81e24565f920
|
File details
Details for the file relayos-0.2.0a16-py3-none-any.whl.
File metadata
- Download URL: relayos-0.2.0a16-py3-none-any.whl
- Upload date:
- Size: 140.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0218be700deafb8f129c63da3f70a6d1149d13357bf1469cac65b9d65e9d4f25
|
|
| MD5 |
752018f58201f3b5fba63cd30c1045a3
|
|
| BLAKE2b-256 |
40248a412d5cf071d567e41eb001f1d806fd207e738c6843c263076d890e7994
|