CosMix is an agent-operable computing system: legible, modifiable, and reconstructible by design. Not a desktop with AI features β an AI-first foundation that currently manifests as a Linux desktop plus a mesh service stack. The intended primary operator is an AI agent; the intended primary user is an AI-first developer driving the system through such agents.
This is the whole project in one repository: the Bus protocol, the Mix language, the daemon family, the desktop, and the documentation site (cosmix.dev).
git clone https://github.com/markc/cosmix ~/Projects/cosmix
~/Projects/cosmix/bootstrap
. ~/Projects/cosmix/env
mix man overviewThat is the entire install. bootstrap is a small POSIX-sh script β the one
thing that runs before mix exists β which installs a Rust toolchain via
rustup if you have none, builds mix, and hands over to setup.mix, which
builds everything else and installs the binaries. Nothing needs root.
- Clone it anywhere. The directory
bootstraplives in is$COSMIX;~/Projects/cosmixis only the documented default. Every path β source, binaries, config, state β derives from that one root, and the binaries find it from their own location, so no environment variable is required to run them (envis what you source to putbin/on your PATH). - Remove it by deleting the directory.
rm -rf $COSMIXremoves the install completely; cloning and runningbootstrapagain recreates it. - Update:
git pull && mix setup.mixβ the same script, re-run, rebuilds and reinstalls (it is idempotent). setup.mix --desktopalso builds the desktop;--systemadditionally copies the binaries to/opt/cosmix/binwith sudo (the systemd units undersrc/_etcexpect them there β installing those is deploy tooling's job).
$COSMIX/
βββ bootstrap the pre-mix installer (sh); its directory defines $COSMIX
βββ setup.mix everything after that, in Mix; re-run to rebuild/reinstall
βββ env generated: `. $COSMIX/env` exports COSMIX and adds bin/ to PATH
βββ bin/ generated: installed binaries ($COSMIX_BIN)
βββ etc/ var/ run/ log/ tmp/ generated runtime tree ($COSMIX_ETC β¦)
βββ src/ ONE Cargo workspace ($COSMIX_SRC)
β βββ crates/ every crate, flat: bus family, mix, substrate libs, daemons
β βββ desktop/ the desktop β its own workspace + toolchain (Bevy/Smithay)
β βββ _etc/ systemd units, polkit rules, sysusers, tmpfiles (shipped templates)
β βββ rust-toolchain.toml the compiler every clone builds with
βββ docs/ the cosmix.dev site: bus/ cos/ mix/ manuals (source of truth), bugs/, dev/
The runtime tree is resolved by one rule shared by mix and every daemon
(src/crates/cosmix-lib-config/src/paths.rs): $COSMIX from the
environment, else self-located from the running binary, else the documented
default; COSMIX_<KIND> overrides any single directory. A system install at
/opt/cosmix/bin with no checkout above it keeps the usual FHS/XDG
locations (/etc/cosmix, /var/lib/cosmix, ~/.config/cosmix, β¦).
CosMix is a one-way dependency chain β bus β mix β cos β that used to be three repositories and is now three groups of crates in one workspace. The name is the architecture: Cos + Mix.
| Group | Crates | What it is |
|---|---|---|
| Bus | cosmix-lib-bus, -client, -buildinfo, -log, -props-core |
The CosMix Agent Bus. The wire protocol, client, and shared primitives every layer talks over. Depends on nothing. β docs |
| Mix | cosmix-lib-mix, cosmix-mix, mix-bench |
Mesh & Interprocess eXchange. A pure-Rust, ARexx-inspired shell and scripting language with native keywords for routing messages across the mesh. Depends on bus. β manual |
| Cos | everything else under src/crates/ |
Cooperative Operating System. The daemon family β broker, mail, web, DNS, knowledge indexer, agent runtime β plus the foundation libraries they share. Depends on bus + mix. β docs |
| Desktop | src/desktop/ |
The compositor (cosmix-comp), the ctk toolkit and the apps. A separate workspace because it pins its own toolchain and vendors patched Smithay/wgpu. |
Origin note: CoS was first named for the Claude and Codex agents that co-authored the codebase; it now reads as the Cooperative Operating System layer.
Documentation β cosmix.dev
docs/ is the GitHub Pages source for cosmix.dev.
The manuals are written there directly β docs/mix/*.md is what mix man
reads locally and what cosmix.dev/mix/ serves β so a doc edit and the code
it describes land in the same commit.
| URL | Documents |
|---|---|
| cosmix.dev/bus/ | Bus protocol family β wire protocol, vocabularies, client, per-crate references |
| cosmix.dev/mix/ | Mix language manual β syntax, builtins, man pages, per-crate references |
| cosmix.dev/cos/ | Daemon family + foundation libraries, per-crate references |
| cosmix.dev/bugs/ | Public bug reports β upstream defects found and root-caused during CosMix development |
| cosmix.dev/history | The story so far β six months of decisions, reversals and what stuck, in one sitting |
Every doc has a clean URL β cosmix.dev/<section>/<page> β served by a
pre-generated HTML shell beside each markdown file. The shells are generated,
not written: after adding, renaming or removing a doc, regenerate and commit
them with mix docs/build/gen-doc-pages.mix. docs/dev/{bus,mix,cos}/ keeps
each former repository's agent-facing notes (README, CLAUDE.md,
AGENTS.md), rewritten to the monorepo paths.
The system is the project. Everything else β the desktop, the Bus-flavoured IPC, the sovereign mesh, the Mix language, the mail stack β is one of its surfaces, not its identity.
Lineage: AmigaOS / ARexx (every app is an addressable message port), Smalltalk / Lisp machines (a live, self-reflective image), Plan 9 (everything is a namespace). The novel contribution is an AI agent as a first-class operator of self-observation, self-modification, and self-reconstruction β which none of the precedents could have, because the agents didn't exist.
Every architectural decision is filtered through three questions:
- More legible to agents? β state queryable as structured data; code paths introspectable; events as accessible log streams; schemas agent-readable.
- More modifiable by agents? β config mutable through structured channels, not ad-hoc file edits; component lifecycle agent-operable; schemas updatable at runtime.
- More reconstructible by agents? β the build system itself agent-operable; sources/deps/artifacts navigable as structured data; the system able to rebuild parts of itself from source changes.
bootstrap + setup.mix are criterion 3 made literal: the whole system
rebuilds from one clone with one command, and the only script not written in
the system's own language is the one that exists to build that language.
This repository is public and contains no operator-specific state: no real host names, addresses, domains, keys or deploy targets (a hygiene gate on the maintainer's side refuses commits that carry them). Operational command-and-control β deploy scripts, mesh inventory, journals, specs and decision records β lives in a private control repo the maintainer keeps beside this one. Contributions go through pull requests here.
CosMix is a research system under active development β a bet that AI-first sovereign computing is real and that an agent-operable system is its right shape. The code is exploration residue, not frozen canon; where a document and the code disagree, the three criteria decide.
MIT β see LICENSE.
π§ CosMix Β· an agent-operable computing platform Β· 2026 Β© Mark Constable <mc@cosmix.dev>