Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

möbius logo  The möbius macOS app: a chat beside its diff, with other chats in the sidebar

möbius

An open-source runtime for coding agents.

A Rust framework, a gateway that runs your agents, a terminal client, and a native macOS app.
Run it on your own machine and pick up the same conversation from your Mac, terminal, iPhone, or iPad.

Rust CI mobius crate version Apache 2.0 license

Quick start · Embed · Contribute · User guide · Rust API

What is in this repository

CratePathWhat it isUse it when
mobiussrc/The agent framework: one session and its model and tool loop, with pluggable models, sandboxes, storage, and capabilitiesYou are building your own agent or frontend in Rust
mobius-gatewaycrates/mobius-gateway/The headless server that runs the agents: pairing, Bots, chats, and scheduled routinesYou are hosting agents for one or more clients
mobius-clicrates/mobius-cli/The mobius terminal client, packaged with the mobius-gateway executableYou want to use möbius in a terminal
mobius-desktopapps/macos/The native macOS app (Rust and GPUI), shipped as a signed app, not on crates.ioYou want to use möbius on a Mac

The iPhone and iPad app connects to the same gateway and is maintained separately.

This checkout prepares 0.17.10 for all four packages. It requires protocol 103 clients and gateway configuration version 30. Protocol 102 clients, including the 0.17.8 macOS app and 0.17.9 CLI, cannot connect; update clients before upgrading a gateway. Gateways already on 0.17.2 can upgrade in place. Existing 0.16.x gateways require an offline configuration conversion that preserves usage history in usage.json. See the 0.17.10 upgrade notes for client compatibility and rollout details, and the 0.17.7 notes for older configuration conversions.

Quick start

Install with Homebrew on macOS or Linux:

brew tap citizenhicks/mobius
brew trust citizenhicks/mobius
brew install mobius-cli
brew install --cask mobius-app   # the macOS app, optional

Then open a project:

cd /path/to/your/project
mobius

The first launch starts a local gateway in the background and opens provider setup. Connect a provider, choose a model, and start a conversation with the default @mobius Bot. Use /login to change providers and /bot to edit the Bot.

Built-in providers are OpenAI, Codex, Anthropic, DeepSeek, Kimi, Mistral, OpenRouter, and A2Agent, plus any endpoint that implements the OpenAI Responses API.

Other ways to install (the CLI guide has the details):

  • Prebuilt archive: download mobius-<version>-<target>.tar.gz from Releases for Apple Silicon macOS (aarch64-apple-darwin) or 64-bit Intel/AMD Linux (x86_64-unknown-linux-gnu).
  • Cargo: cargo install --locked mobius-cli. This needs Rust 1.100.0 or newer, and cloudflared installed separately if you want Quick Connect.

On Linux, sandboxed command execution requires Bubblewrap.

Connect your other devices

mobius-gateway connect

The gateway prints an address and a single-use pairing code. Enter them in the Apple app under Use your own gateway, or run the mobius pair command it prints on another terminal. By default this uses an account-free Cloudflare tunnel whose address changes when the gateway restarts. The gateway guide covers stable addresses and direct TLS. Keep the gateway machine awake and reachable for remote access and scheduled work.

The iPhone and iPad app is in TestFlight beta. If you would rather not host a gateway, möbius Cloud runs this same gateway for you; it is in beta and optional.

How it fits together

A message from the terminal reaches a bot on your gateway, goes to a model provider and back, runs a tool in the workspace, and the result streams to the Mac, terminal and iPhone at once.

The gateway is where files, commands, provider credentials, and agent sessions live. Clients send requests and render the same event stream, so work continues while the gateway runs, even after you close a client.

ConceptWhat it means
GatewayThe runtime on your Mac, Linux machine, or cloud host. It serves all your paired clients.
BotA reusable agent profile: purpose, model, tools, instructions, and approval policy.
ChatA conversation with one Bot, a selected workspace, and its own durable transcript.
RoutineA scheduled task owned by a Bot. Each run gets a fresh conversation.
SubagentA bounded helper a Bot starts inside a chat for parallel work.

Each Bot chooses its capabilities. File and shell tools are always present. Memory, context compaction, subagents, voice, questions, attachments, and artifacts start on; task lists, workspace instructions, image generation, computer control (Chromium, and native apps on macOS), and installed Agent Skills or OpenAI-format plugins start off. MCP and app connectors are not yet supported.

Commands run in a sandbox, Seatbelt on macOS and Bubblewrap on Linux, and fail closed if it is unavailable. A Bot's approval policy decides which actions need your confirmation; Full access lets its tools use everything the gateway account can. The gateway guide explains these boundaries, computer control, and the Linux desktop.

Embed the framework

[dependencies]
mobius = "0.17"

You compose an AgentConfig from a model router, a sandbox, a checkpoint store, and an ordered middleware stack. The core owns one linear session and its model and tool loop. Your application supplies the dependencies and consumes frontend-neutral events.

  • Bring a model: implement Model, or register a built-in provider with ModelRouter.
  • Add a capability: implement Middleware. It owns its tools, lifecycle hooks, state, commands, and presentation.
  • Build a frontend: submit protocol::Op values and render protocol::Event values.
  • Choose storage and execution: inject a CheckpointStore and a SandboxBackend.
  • Handle files and images: inject one backend::session_files::SessionFileStore into ModelRouter and the media-capable middleware. Tool results carry ordered ContentPart text, image, and file parts; checkpoints store references, not bytes.

Start from the compile-checked composition example in the API documentation. The gateway is the shipped composition root and the largest worked example.

Work on this repository

cargo run --locked -p mobius-cli --bin mobius   # build and run the terminal client
just test                                       # every test in the workspace
just complexity                                 # Clippy, warnings denied
just rules                                      # project rules Clippy cannot express

Rust 1.100.0 is pinned in rust-toolchain.toml. The shared Cargo configuration uses RUSTC_BOOTSTRAP for the experimental eight-worker compiler frontend; Cargo also builds independent crates in parallel. Linux sandbox tests need Bubblewrap.

PathOwns
src/agent/The session and the model and tool loop
src/backend/Model providers, the sandbox, checkpoint storage, and session files
src/middleware/Optional capabilities, one module each
src/protocol/Frontend-neutral operations, events, and presentation records
crates/mobius-gateway/Composition, authentication, Bots, sessions, routines, and the wire protocol
crates/mobius-cli/The terminal client and its rendering
apps/macos/The macOS app, its own Cargo workspace; see its README
tests/Framework integration tests

Read AGENTS.md before you change anything: it holds the design rules, the Rust style rules, the checks to run before handoff, and the release order. Issue reports and contributions are welcome.

Documentation

ReadFor
User guideSetup, everyday workflows, Bots, and settings
Terminal manualCommand reference and manual pages
CLI guideInstallation, provider setup, and terminal controls
Gateway guideHosting, pairing, sandbox policy, and computer control
Gateway configurationEvery gateway.toml setting and environment variable
Bots and contextChats, routines, subagents, and memory boundaries
Rust APIThe mobius crate
PrivacyWhat leaves your machine

The four packages share one version number. The three crates are published to crates.io one at a time and the macOS app is released as a signed build; see Releases in AGENTS.md.

License

Apache-2.0. See NOTICE for third-party attributions.

关于 About

möbius is a small, frontend-neutral Rust framework for coding agents.
agentaiai-agentsframeworkharnessllmllm-agentllm-agentsrust

语言 Languages

Rust90.8%
JavaScript4.9%
Swift3.2%
TypeScript0.3%
Python0.3%
Shell0.2%
PureBasic0.2%
CSS0.0%
HTML0.0%
Just0.0%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
756
Total Commits
峰值: 123次/周
Less
More

核心贡献者 Contributors