Overview
osModa (repository name os-moda) is an operating system built specifically for AI agents, based on NixOS. Its core idea is: you no longer have to SSH into the server to operate it manually; instead, you operate the server directly through conversation. The agent has typed, auditable access to the entire system, covering system health, configuration, deployment, crash recovery, and more. Because it runs on NixOS, every change is a transaction and can be undone with a single command.
Main Capabilities
- Structured tool access: 10 Rust daemons and 92 structured tools form a replaceable modular runtime. AI accesses the system through MCP tool calls rather than a raw shell. For example,
system_healthreturns JSON, rather than text that requires regex parsing. - Atomic rollback: Based on NixOS, every system change is a transaction, and every state has a generation number. A bad deployment can atomically roll back the entire system state.
- Switchable runtime: The modular gateway (osmoda-gateway, TypeScript) can drive pluggable runtime drivers:
claude-code(default, supports OAuth subscription or API key),openclaw(multi-provider BYOK CLI, API key only), and a prototype hosted agent driver. Each agent can choose its own runtime, credentials, and model, and can switch at runtime through the dashboard without rebuilding. - Persistent named conversations: Chat sessions can be persisted and named.
- Pre-indexed code knowledge graph: Makes it easier for agents to understand code structure.
- Append-only hash chain audit ledger: Every structured change is appended to the ledger as a SHA-256 hash chain, tamper-proof, and can be verified offline with
agentctl verify-ledger. - Encrypted mesh between servers: Servers communicate through an encrypted mesh (mesh peer port 18800, encrypted).
- Encrypted credential storage: Credentials are stored encrypted with AES-256-GCM in
credentials.json.enc, the key never leaves the gateway, and the REST API only returns prefix previews. - Autonomous operation and budget control: Supports
POST /loopsstarting an autonomous loop (interval + iteration limit + stop sentinel), persists across restarts, and automatically pauses after repeated errors. Each agent has a daily spending circuit breaker (dailyTokenCap/dailyUsdCap), checked before calling the model, and returns when the limit is exceededspend_cap_exceeded.
How to Use
Installation: osModa is a complete NixOS operating system, not an application, and will completely replace your operating system. It does not support working in Docker, LXC, or any container runtime (containers lack systemd, NixOS package management, and kernel-level access).
- NixOS (flake) — the recommended primary installation path.
- Any Linux server — experimental. Note: this will convert the host operating system to NixOS, which is destructive and irreversible; use only for fresh/disposable servers, and not recommended for production machines with existing workloads.
- Supports Ubuntu 22.04+, Debian 12+, existing NixOS, with architecture support for x86_64 and aarch64.
- Takes about 10 minutes on CX22.
After installation, it can support OAuth tokens (Claude Pro / Max subscription) or Console API keys (pay-as-you-go). OpenAI, OpenRouter, and future providers are integrated in the same way.
First-time use flow:
- Install (
curl | bashinstallation script, or add the flake to NixOS). The installer will convert to NixOS, build 10 Rust daemons, install osmoda-gateway + claude CLI + 92 MCP tools, and start everything. - Gateway first startup: create
/var/lib/osmoda/config/atagents.json+ encryptedcredentials.json.enc. If--credentialor--api-keywas passed in during installation, it is already loaded; otherwise the agent remains disabled until credentials are added. - Open the dashboard (hosted
https://spawn.os.moda/#/servers/<your-id>/engineor local Web UI) → Engine tab: add the key in the Credentials section and click Test to verify with a 1-token ping; in the Agents section, select the runtime, credentials, and model for each agent (osmodafor Web / full access,mobilefor Telegram / concise). Save. - Switch to the Chat tab to start a conversation. The agent has all 92 tools and already knows your system.
- You can try real operations, such as "install nginx and reverse proxy port 3000".
Switching runtime: Engine tab → change the Runtime dropdown → Save. This triggers SIGHUP, in-progress sessions continue using the old driver, the next message uses the new driver, zero downtime.
Onboarding a new provider: Add credentials with the new provider/type, then select it on any agent, no need to rerun the installer.
Deployment: Can be deployed to Hetzner / DigitalOcean / AWS.
Use cases
- Solo developers running their own servers: Instead of logging in via SSH, talk directly to the server. The system monitors itself, attempts routine fixes, and tells you what it did, and every OS-level change is reversible on NixOS.
- AI agent builders who need infrastructure: Give the agent a place to truly "live", including credential management, health monitoring, crash recovery, and an encrypted mesh between machines.
- Small teams tired of on-call shifts: Let the agent handle routine operations, escalate what it cannot handle, and keep a hash-chained audit trail of structured operations.
- Anyone who wants to experiment with an AI workforce: osModa is the computer your agent operates, rather than the VPS you SSH into. Currently research-grade, suitable for disposable experimental machines.
Trust model (3 tiers)
The agent is tier 0 by design; it is not a chatbot with sudo, but a system service with structured access to everything, constrained by NixOS atomicity and its own audit ledger. Lower tiers cannot escalate upward by design. Tier 0 is still the trusted computing base and must be governed through approval policies, spending limits, and audit review.
Security model and known limitations
Current protections: a blacklist, approval gates, and an audit ledger in front of structured MCP tools; NixOS atomic rollback; spending limits; audit review.
Currently bypassed by the default agent: the default claude-code runtime additionally gives the agent native Bash、Write、Edit tools, which execute directly and currently bypass the blacklist, approval gate, and ledger. Therefore, governance of tier-0 agents currently relies on NixOS atomic rollback, spending limits, and audit review, rather than item-by-item approval of every agent action.
Being fixed: A PreToolUse enforcement hook (routing native tools to agentd's approval + hash-chain ledger) has been implemented, released via install.sh + NixOS module, and the hook's wire contract with agentd has been integration-tested end to end. But it has not yet been verified that it can intercept real claude-code Bash calls on a running machine. Until confirmed, osModa should continue to be run on disposable/dedicated machines.
Coverage of NixOS rollback:
- Covers: OS configuration, package state, service definitions, firewall rules, system generation. Any erroneous configuration change can be atomically reverted.
- Does not cover: data already sent to external APIs, signed crypto transactions, deleted user data, leaked keys, side effects on remote systems.
Planned but not completed: Tier 0 tool gate enforcement (PreToolUse hook, pending real-machine verification); Tier 1/Tier 2 sandbox enforcement (bubblewrap isolation not yet fully wired up for all third-party tools); capability token authentication (socket authentication still mainly based on file permissions); external security audit (mesh encryption uses standard primitives Noise_XX, ML-KEM-768, but has not been independently reviewed); semantic memory (currently uses FTS5 BM25 keyword search; semantic vector search is designed but not yet wired up).
Project status
osModa is an ambitious single-person project (about 250 commits; 247 tests + self-run penetration testing, not an external audit), not battle-tested infrastructure. The core is stable, but the security model has known gaps that are being actively fixed. STATUS.md honestly assesses the maturity of each component. The runtime, agentd contract, and ledger are relatively mature; the mesh, crypto wallet, voice, and skill engine are relatively early and less validated. The official recommendation is explicit: run it on a fresh disposable server, not on a production machine you care about.
About fees and pricing
The material does not provide fee or pricing information for osModa itself. The Claude Pro / Max subscriptions, Console API keys, OpenAI and OpenRouter keys, etc. mentioned in the text are all credential types from third-party providers, and their specific pricing information is not provided.