Skip to content
المشاريع

حول

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

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
؜-١
خلال 7 أيام
؜-٩
خلال 15 يومًا
+٣١
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

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 or terminal.

Rust CI mobius crate version Apache 2.0 license

Benchmark · Quick start · Embed · Contribute · Rust API

What is in this repository

Crate Path What it is Use it when
mobius crates/mobius/ The agent framework: one session and its model and tool loop, with pluggable models, sandboxes, storage, and capabilities You are building your own agent or frontend in Rust
mobius-gateway crates/mobius-gateway/ The headless server that runs the agents: pairing, Bots, chats, and scheduled routines You are hosting agents for one or more clients
mobius-cli crates/mobius-cli/ The mobius terminal client, packaged with the mobius-gateway executable You want to use möbius in a terminal
mobius-desktop apps/macos/ The native macOS app (Rust and GPUI), shipped as a signed app, not on crates.io You want to use möbius on a Mac

Benchmark

Grain bar chart of peak sampled RAM: Codex median 1.95 GiB and largest 7.22 GiB; möbius median 0.26 GiB and largest 1.07 GiB.

On 20 Terminal-Bench 4.0 tasks with GPT-6 Luna, möbius 0.17.11 and Codex CLI 0.169.0 each passed 3. möbius used 48.9% fewer tokens and had a lower peak RAM sample on all 20 tasks, and took 17.9% more agent time in total. Read the full write-up.

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, AI/ML API, 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. Run the printed mobius pair command in another terminal. Quick Connect 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.

How it fits together

flowchart LR
    cli[Terminal client] <--> gateway[Self-hosted gateway]
    mac[macOS app] <--> gateway
    gateway <--> model[Model provider]
    gateway <--> workspace[Workspace files and tools]

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.

Concept What it means
Gateway The runtime on a Mac or Linux host you operate. It serves all your paired clients.
Bot A reusable agent profile: purpose, model, tools, instructions, and approval policy.
Chat A conversation with one Bot, a selected workspace, and its own durable transcript.
Routine A scheduled task owned by a Bot. Each run gets a fresh conversation.
Subagent A 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.

Path Owns
crates/mobius/src/agent/ The session and the model and tool loop
crates/mobius/src/backend/ Model providers, the sandbox, checkpoint storage, and session files
crates/mobius/src/middleware/ Optional capabilities, one module each
crates/mobius/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
crates/mobius-client/ Shared gateway client used by the desktop app
apps/macos/ The macOS app (workspace member, built on macOS); see its README
crates/mobius/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

Read For
CLI guide Installation, provider setup, and terminal controls
Gateway guide Hosting, pairing, sandbox policy, and computer control
Gateway configuration Every gateway.toml setting and environment variable
Transport encryption Pairing security, TLS policy, tested provider hosts and verification commands
Gateway contracts Wire and storage revisions, upgrade boundaries, rollback and reconnect behavior
Bots and context Chats, routines, subagents, and memory boundaries
Rust API The mobius crate
Privacy What 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.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…