Skip to content

Mo

An open-source programming language and single-binary runtime for living software — designed for AI agents to write, humans to verify, and services to evolve live.
v0.4.2
17-crate #![forbid(unsafe_code)] Rust workspace
Perceus
In-place reuse · no borrow checker · no GC pauses
0 Ambient I/O
Monotonic object-capabilities + in-memory fakes
Lean 4 + TLA+
Formal type safety, Bison LR(1) & protocol models
Terminal window
brew install robertguss/tap/mo
brew install robertguss/tap/arvo
brew install robertguss/tap/modb

Pure Domain Logic with Executable promises and examples

Section titled “Pure Domain Logic with Executable promises and examples”
module Account
expose Account, AccountError(..), open, deposit, withdraw
struct Account
owner: Text
balance: Decimal
end
enum AccountError
InvalidAmount
InsufficientFunds(short_by: Decimal)
end
fn open(owner: Text) : Account
Account(owner: owner, balance: 0)
end
fn deposit(account: Account, amount: Decimal) : Result(Account, AccountError)
return Error(InvalidAmount) if amount <= 0
var after = account
after.balance += amount
Ok(after)
end
fn withdraw(account: Account, amount: Decimal) : Result(Account, AccountError)
promise
result is Ok(after) implies after.balance >= 0
result is Ok(after) implies after.balance == account.balance - amount
end
examples
withdraw(Account(owner: "ada", balance: 100.00), 30.00) ==
Ok(Account(owner: "ada", balance: 70.00))
withdraw(Account(owner: "ada", balance: 100.00), 100.01) ==
Error(InsufficientFunds(short_by: 0.01))
end
return Error(InvalidAmount) if amount <= 0
return Error(InsufficientFunds(short_by: amount - account.balance)) if amount > account.balance
var after = account
after.balance -= amount
Ok(after)
end

Declarative HTTP api + In-Process actor + Zero-Socket Tests

Section titled “Declarative HTTP api + In-Process actor + Zero-Socket Tests”
module CounterApi
use Api
struct Count
value: Int
end
actor Counter
state Count = Count(value: 0)
calls add, current
promise on add
after.value == before.value + n
end
end
fn add(s: Count, _now: Time, n: Int) : (Count, Int)
(Count(value: s.value + n), s.value + n)
end
fn current(s: Count, _now: Time) : Int
s.value
end
api
actor counter: Counter
post "/add/:n" post_add
get "/count" get_count
end
fn post_add(counter: Counter, n: Int) : Int
counter.add(n)
end
fn get_count(counter: Counter) : Int
counter.current
end
test "HTTP routes and actor state run in memory with zero sockets"
counter = Actor.start(Counter)
assert ApiTest.send(CounterApi, Api.post("/add/4"), counter).text == "4"
assert ApiTest.send(CounterApi, Api.get("/count"), counter).text == "4"
end
Influence What Mo Draws From It
Elixir & the BEAM Share-nothing per-process heaps, instruction/memory budgets, supervision, composable actors, live introspection, and hot upgrades.
Rust Algebraic data types (struct/enum), exhaustive case, explicit Option/Result, exact math, and a #![forbid(unsafe_code)] toolchain.
Koka & Perceus Pure value semantics compiled with whole-program borrow inference and opportunistic in-place reuse (RESET/REUSE/SET_FIELD).
Elm Helpful single-cause diagnostics (E####), zero warnings, structured --json output, and automatic mo fix edits.
Object-Capabilities Zero ambient authority: capabilities pass explicitly, narrow monotonically (within, read_only, allow_hosts), and swap cleanly for deterministic fakes in tests.

Arvo

Calm, batteries-included full-stack web framework (SQLite WAL, Inertia v2 + React 19, AES-256-GCM sessions, CSRF, migrations, durable jobs).

Explore Arvo →

MoDB

Single-file, crash-safe CoW B+Tree embedded database with per-page SHA-256 checksums, hash-chained audit ledgers, grants, and replay.

Explore MoDB →

Motet & Mosh

Personal/executive AI agent roster with physically isolated secret vaults (Motet) and deterministic-first coding agent harness (Mosh).

Explore Agents →

Vellum & Mobrowse

AI-native collaborative workspace with 17 MCP tools (Vellum) and a zero-Chromium browser engine built in Mo (Mobrowse).

Explore Apps →