Skip to content

About

Sonder Runtime — private-first GPU-backed AI orchestration, grounded execution, web tools, memory, and adaptive learning.

Topics

Resources

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Latest commit

 

History

3,603 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonder Runtime

Sonder Runtime

Prerelease downloads Android prerelease Linux prerelease Windows prerelease macOS prerelease

Sonder Runtime is a local-first AI runtime written in Python. It wraps a Sonder Inference (sonder-infer serve) model server with a policy layer, SQLite-backed memory, guarded host tools, agent orchestration, and optional adapter training, and exposes them through a terminal REPL, an OpenAI-compatible HTTP API, an MCP server, and a Flutter client app. Sonder is a runtime, not a foundation model: it ships no model weights, and names such as sonder:latest are logical tier aliases routed to your configured inference server. Sonder Inference is the local model server.

Website: https://sondercore.si

Key capabilities

  • Interfaces. python -m sonder_runtime provides repl, serve (OpenAI-compatible API, default 127.0.0.1:11435), and mcp, plus operational commands (preflight, doctor, status, config, migrate, backup, restore, drain, smoke, update). See the CLI reference.
  • Model tiers. Local fast, code, and general aliases routed to loopback Sonder Inference (127.0.0.1:11437); hosted/cloud tiers are available only after explicit opt-in. See model tiers and gateway.
  • Memory and learning. Hybrid retrieval over SQLite FTS5 and local embeddings; lessons are distilled from outcomes a caller records with record_outcome. See memory and learning.
  • Host tools. File, repository, code-execution, data, and web tools, each subject to the permission policy described under Security model. See tools and languages.
  • Agents. Single-agent tool loops, durable autopilot, and bounded parallel fleets with cancellation. See agent, autopilot, and fleets.
  • Operations. Schema migrations, backup and restore, signed updates, and a redacted diagnostics bundle. See backups and recovery and the update manager.
  • Training (optional). Adapter training with validation and rollback. See TRAINING.md.

Requirements

  • Python 3.11 or later. CI on main runs 3.14; 3.12 runs in a non-required compatibility job; 3.11 is the untested floor (checked 2026-11-20).
  • Sonder Inference (sonder-infer serve, default http://127.0.0.1:11437), installed and running.
  • At least one local model registered in Sonder Inference's model store (for example via sonder-infer models import-ollama or sonder-infer serve --model-dir <dir>). For semantic recall and lessons, configure an embedding model on Sonder Inference (SONDER_INFERENCE_EMBED_MODEL); without one, chat works but semantic recall is unavailable. Vision, reasoning, and other specialist models are optional. (setup_alias.py is retired.) See model requirements and onboarding and the model catalog.

Runtime Python dependencies are pinned in requirements-runtime.txt, the only file the installers use. Other requirements files (dev, update, Postgres, Anthropic, training) are optional: see optional dependency sets.

Install

From source

git clone https://github.com/Krilliac/Sonder-runtime.git
cd Sonder-runtime

Then follow install-workstation-local: the Windows installer script, the manual Linux/macOS/Windows venv steps, the extracted local-system bundle, WSL2 and the optional dependency sets. For a self-hosted Linux server behind TLS, follow install-server-private. The ordered path through every setup page is setup-start-here.

Prerelease app builds

The app-latest badges above link to a mutable prerelease snapshot of the build-apps workflow outputs. It may lag main and is not a versioned release. Versioned app-vX.Y.Z releases must pass the repository's version, artifact-integrity, SBOM, and provenance gates; see release-version-policy. Desktop bundles include the runtime in a local-system directory; run bootstrap-engine.cmd (Windows) or ./bootstrap-engine.sh (Linux/macOS) from it once to set up the local model.

Quick start

From a source checkout, run the venv interpreter created by the install. On a fresh state home start serve once first: migrate, repl and mcp run before serve leave the home in a state serve then refuses; see Fresh state home and the epoch-2 gate.

To serve the OpenAI-compatible API on loopback (Linux/macOS shown; on Windows use .\venv\Scripts\python.exe):

./venv/bin/python -m sonder_runtime preflight
./venv/bin/python -m sonder_runtime serve
curl http://127.0.0.1:11435/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"sonder","messages":[{"role":"user","content":"Hello"}]}'

Once serve has started, in another terminal:

./venv/bin/python -m sonder_runtime doctor      # read-only health report
./venv/bin/python -m sonder_runtime repl        # interactive terminal REPL
.\venv\Scripts\python.exe -m sonder_runtime doctor
.\venv\Scripts\python.exe -m sonder_runtime repl

In the REPL, /help lists commands, /model lists and switches models, and /runtime shows the tier-to-model policy. On Windows, sonder.cmd in the checkout or bundle root bootstraps the engine, starts the background API server and then opens the REPL (or acts as a thin client when SONDER_SERVER is set); see launchers and setup scripts.

To run as an MCP server, use ./venv/bin/python -m sonder_runtime mcp (Windows: .\venv\Scripts\python.exe -m sonder_runtime mcp). Client configuration examples are in integrations/.

More detail: getting started, HTTP API, and thin client and private hosting.

Configuration

Configuration is read from sonder.toml, and secrets from sonder.env, in the per-user Sonder home, or from the paths given by SONDER_CONFIG and SONDER_SECRETS. For the order in which sources override each other, see Configuration: precedence. python -m sonder_runtime config prints the effective, redacted configuration. Annotated examples are in packaging/sonder.toml.example and packaging/sonder.env.example; the full reference is configuration.

Tiers can optionally be routed to hosted models through OpenRouter: off by default, it needs OPENROUTER_API_KEY, the explicit SONDER_ALLOW_CLOUD=1 opt-in and a tier binding, and sends privacy-first routing preferences (no prompt logging, zero data retention) unless overridden. Claude models can likewise be bound through the Anthropic provider: the same opt-in, SONDER_ANTHROPIC_API_KEY (plus an optional second key), and a SONDER_ANTHROPIC_DAILY_USD spend cap. A non-loopback OpenAI-compatible endpoint is likewise capped: it needs declared prices (SONDER_OPENAI_PRICE_USD_PER_MTOK, SONDER_OPENAI_EMBED_PRICE_USD_PER_MTOK) and obeys SONDER_OPENAI_DAILY_USD and SONDER_OPENAI_MAX_TOKENS (see docs/integration/openai-compatible.md). Ollama :cloud models are kept current by the cloud model refresh: it retires models the provider retired, records the ollama.com catalog, and rebinds a retired cloud tier only to an entry of your preference ladder. Any OpenAI-compatible server (llama.cpp server, vLLM, LM Studio) can serve a tier through the OpenAI-compatible provider.

Security model

Sonder can execute code and modify files on the host, so access to a Sonder endpoint should be treated as shell access. Read SECURITY.md before enabling remote access. The runtime enforces the following:

  • Loopback by default. The server binds 127.0.0.1; remote access is only through a TLS reverse proxy (secure remote access, security model).
  • Cloud off by default. Hosted/cloud tiers and non-loopback inference each need their own explicit opt-in (SONDER_ALLOW_CLOUD, SONDER_ALLOW_REMOTE_INFERENCE, with SONDER_ALLOW_REMOTE_OLLAMA accepted as a deprecated alias); see security model.
  • Approvals. Permission modes plan, manual (default), acceptEdits, and auto control when tool calls need approval. Tools classed dangerous (for example file_delete, sqlite_mutate, git_merge) ask in every mode, and unattended callers (MCP, HTTP, agent loops) are refused instead of prompted. Raising the mode requires an attended caller.
  • File roots. File tools are constrained to configured roots, and file_delete is a dry run unless confirmed.

Optional container execution is described in ISOLATED_EXECUTION.md. Report vulnerabilities privately through the repository's GitHub Security tab.

Limitations

  • A small local model is not a frontier model. Give it the facts, delegate bounded transformations, and review its work.
  • Learning is grounded only when a caller records a real outcome; self-graded success is not treated as proof.
  • Multi-PC inference (SONDER_INFERENCE_PRIVATE_WORKERS) is request-level pooling, not model-weight sharding or shared-memory GPU federation. Each host runs its own Sonder Inference server and model store.
  • The optional NPU path is a utility accelerator for routing and embeddings; token generation remains on the model server's CPU/GPU path.
  • The unsafe lab removes model-loop host-tool policy; it does not provide OS isolation.

Behavior status

Labels follow the documentation status vocabulary. Unfinished implementation work is tracked only in the master implementation specification.

Behavior Status Boundary
Terminal REPL, OpenAI-compatible API, MCP server, and thin client Implemented Local by default; remote access only through the documented TLS profile.
app-latest desktop and mobile app builds Experimental Mutable prerelease snapshot that may lag main; not a versioned, release-ready build.
Missing optional models (embedding, reasoning, or vision) Degraded Chat keeps working; semantic recall or the unbound tier stays unavailable until configured.
Multi-PC Sonder Inference private-worker pooling (SONDER_INFERENCE_PRIVATE_WORKERS) Implemented Opt-in request-level scheduling with bounded transport failover.
Model-weight sharding or shared-memory GPU federation across PCs Unsupported Each host runs its own Sonder Inference server and model store.
Speech or unconfigured model tags without a provider-backed integration Unsupported Registering weights in a local model store does not by itself enable a Sonder feature.
Unsafe lab mode (runbook) Experimental Exact acknowledgement and disposable isolated hosts only; it provides no OS isolation.
Tested helper-process update activation on Windows and macOS Proposed UPDATE-002 tracks completing activation and self-replacement beyond Linux.

Project layout

Path Contents
sonder_runtime/ Layered package (domain, application, adapters, interfaces, platform, bootstrap); entry point python -m sonder_runtime.
server.py, root *.py Tool host and runtime modules used by the package.
app/ Flutter client for Android, Linux, Windows, and macOS (app/README.md).
packaging/ Installers, systemd units, reverse-proxy and configuration examples.
integrations/ MCP client configuration for Claude Code and Codex.
migrations/ Schema migrations applied by migrate.
scripts/ CI gate scripts, packaging, and maintenance tools.
docs/ Wiki, runbooks, and architecture records; overview in ARCHITECTURE.md.
tests/ pytest suite.

Development and testing

pip install -r requirements-dev.txt
python scripts/check_architecture.py
python scripts/check_requirement_evidence.py
python scripts/check_error_signals.py
python scripts/check_lint_ratchet.py
python scripts/check_history_privacy.py --json
python scripts/check_doc_links.py
python scripts/check_documentation_authority.py
python -m pytest -q -n auto --dist load

These are the gates of the tests job in .github/workflows/ci.yml, which also runs the offline evaluation lanes (eval_harness.py) and the TUF update-trust suites. Tests marked network or model are skipped unless --run-network or --run-model is passed. See CONTRIBUTING.md for the review workflow.

Related projects

License

Apache License 2.0.

About

Sonder Runtime — private-first GPU-backed AI orchestration, grounded execution, web tools, memory, and adaptive learning.

Topics

Resources

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages