Automatic memory management for BOS and the bread ecosystem.
  • Rust 95.5%
  • Shell 3.5%
  • Python 1%
Find a file
Breadway 292e9ab682
All checks were successful
CPU checks / check (push) Successful in 53s
dev release / build (push) Successful in 3m15s
Merge pull request 'Add the shared CI build wrapper bakery releases call' (#57) from feature/bakery-breadram into main
2026-10-20 13:38:36 +08:00
.forgejo/workflows feat: publish breadram on the bakery tracks 2026-10-20 12:22:03 +08:00
ci fix: add the shared CI build wrapper bakery releases call 2026-10-20 13:11:39 +08:00
crates Merge remote-tracking branch 'origin/main' into fix/ram-79-honest-llama-capability 2026-10-20 11:51:54 +08:00
docs docs: record host-specific RAM-30 regression ceilings and limitations 2026-10-20 12:04:59 +08:00
examples feat: pause an opted-in job until a deadline it can honor alone 2026-10-13 07:03:18 +08:00
packaging Add CI, bakery packaging, and ecosystem registration 2026-10-11 20:24:34 +08:00
scripts fix: keep vanished pressure counter reads invalid in benchmarks 2026-10-20 08:44:52 +08:00
.gitignore chore: stop tracking python bytecode from the bench helpers 2026-10-15 15:03:36 +08:00
bakery.toml feat: publish breadram on the bakery tracks 2026-10-20 12:22:03 +08:00
Cargo.lock feat: pause an opted-in job until a deadline it can honor alone 2026-10-13 07:03:18 +08:00
Cargo.toml feat: pause an opted-in job until a deadline it can honor alone 2026-10-13 07:03:18 +08:00
CONTRIBUTING.md feat: bootstrap the breadram workspace and project contract 2026-10-11 13:24:47 +08:00
EVENTS.md fix: accept current bread APIs and require an external confirmation 2026-10-12 22:41:48 +08:00
LICENSE feat: bootstrap the breadram workspace and project contract 2026-10-11 13:24:47 +08:00
README.md Add a llama.cpp server and router adapter 2026-10-12 19:35:16 +08:00

breadram

Automatic memory management for BOS and the bread ecosystem.

breadram watches Linux memory pressure and, when asked to, applies bounded and reversible relief so a machine keeps doing useful work instead of thrashing or letting the out of memory killer pick a victim at random.

What the first release does

The first release is the standalone core: a daemon and a CLI that monitor host and cgroup memory pressure, identify large workloads, decide when the machine is under pressure, and apply authorized, reversible controls. It runs headless with nothing else installed. Automatic per workload relief, model server adapters, job admission, and desktop integration follow in later milestones (see docs/ISSUE-MAP.md).

By default it runs in monitor mode: it observes, explains, and records, and does not change system state. automatic mode is opt in.

Current state

The M1 foundation is implemented: telemetry, workload inventory, validated configuration, and the daemon with its versioned local IPC. The daemon monitors memory and workloads and serves a status snapshot over an owner only Unix socket; the CLI reads it. Pressure policy, controls, model adapters, job admission, and desktop integration are still to come, so the daemon currently observes and reports rather than acting.

Compatibility limits

  • Supported and tested baseline is Linux with cgroup v2 and systemd. cgroup v1 and missing PSI are degraded, explicitly reported states, not silent failures.
  • No root daemon is required. Controls that need privilege go through a small typed helper or the owning manager, and only when the operator authorizes it.
  • breadsearch, breadd, BOS, a compositor, model runtimes, and GPU libraries are all optional. Core management never waits on any of them.
  • breadram coexists with existing OOM management and does not install a second out of memory killer.

Build

cargo build --workspace

Run the daemon and client:

cargo run -p breadramd -- --mode monitor          # or --profile desktop
cargo run -p breadram-cli -- status
cargo run -p breadram-cli -- --json capabilities
cargo run -p breadram-cli -- watch

The daemon listens on $XDG_RUNTIME_DIR/breadram.sock unless --socket is given, and the socket is owner only. breadram exits 0 on success, 1 when the daemon is unavailable or returns an error, and 2 for a usage error.

Install

./packaging/install.sh install

Installs the systemd user service with the example configuration (monitor mode, inert until the operator opts in). See docs/INSTALL.md for enable, disable, upgrade, uninstall, hardening, and headless notes.

Layout

crates/breadram-core   shared contract types, no system or bread dependencies
crates/breadramd       the daemon binary
crates/breadram-cli    the breadram client binary
docs/                  project brief, architecture, issue map, handoff
packaging/             user service, example config, installer

Documentation

  • docs/PROJECT.md: the product contract.
  • docs/ARCHITECTURE.md: the decisions the implementation honours.
  • docs/ISSUE-MAP.md: the full card map and workflow.
  • docs/AGENT-HANDOFF.md: starting point for the next agent.
  • docs/CLI.md: the command line surface, its output contract, and exit codes.
  • docs/ADAPTER-CONTRACT.md: the optional workload adapter interface.
  • docs/HOOKS.md: the cooperative hook protocol for runtimes without an adapter.
  • docs/INSTALL.md: installing the user service, with hardening and recovery notes.
  • docs/LLAMACPP.md: the llama.cpp server and router adapter, router unload administration, and the real-server verification.
  • docs/SERVING-COORDINATION.md: request leases and the drain, sleep, and wake lifecycle.
  • CONTRIBUTING.md: branch model and checks.

License

MIT. See LICENSE.