Technical Deep Dive

osModa: The Operating System
Where the AI Agent IS the OS

osModa is a NixOS distribution purpose-built for autonomous AI agent infrastructure. Not an agent running on an OS. The agent is the operating system. 9 Rust daemons, 83 system tools, post-quantum encrypted mesh, hash-chained audit trails. Every component designed so your agents run reliably, securely, and without DevOps babysitting.

9
Rust Daemons
72
System Tools
3
Trust Rings
PQ
Post-Quantum Crypto
0
Cloud Dependencies

01 The Problem We Solve

A developer with a $3,500 Mac Studio tops out at 4-5 concurrent AI agents. When agent #5 spawns and the OOM killer fires, all five die. Your agents crash at 3am and nobody notices until morning. You're running critical automation on hardware with no audit trail, no rollback, no self-healing, and no way to prove what happened.

The AI agent ecosystem is exploding — Claude Code, Cursor, Devin, AutoGPT, CrewAI, LangGraph — but the infrastructure layer is stuck in the 2010s. Developers are running these agents on bare Linux VMs with systemd and docker-compose, praying nothing breaks. There's no operating system designed specifically for the workload patterns of autonomous AI agents: bursty resource usage, long-running sessions, inter-agent communication, and the absolute requirement for auditability.

osModa is that operating system. Not a container. Not a VM image. Not a SaaS platform. A real operating system built from the kernel up to make AI agent infrastructure self-managing, auditable, and resilient.

02 Three-Ring Trust Architecture

Security isn't bolted on. It's the foundation. osModa implements a three-ring trust model inspired by CPU privilege rings, but applied to the agent ecosystem:

RING 0
OpenClaw + agentd — Full system access. Root-equivalent. The AI agent and its kernel bridge daemon have unrestricted access to all files, processes, network, and system configuration. Every action is logged with cryptographic hash chains. This is the brain of the operating system.
RING 1
Approved applications — Sandboxed with declared capabilities. Apps in Ring 1 can only access what they've been explicitly granted. Network access is controlled, filesystem access is scoped, and all actions are audited. Think of this as the "trusted but verified" tier.
RING 2
Untrusted tools — Maximum isolation. Third-party tools run in bubblewrap sandboxes with no direct network access (only through the egress proxy with domain allowlists), minimal filesystem visibility, and strict resource limits. Zero trust, full containment.

This isn't theoretical. Every API call, every file mutation, every network request flows through the trust model. The AI agent in Ring 0 can grant capabilities to Ring 1 apps, and Ring 1 apps can invoke Ring 2 tools — but never the reverse. Lower rings cannot escalate privileges upward by design. Ring 0 remains the trusted computing base and must be governed by approval policies, spending limits, and audit review. NixOS rollback covers system configuration — it does not undo data sent to external APIs, signed transactions, or exposed secrets.

03 The 9 Daemons

osModa runs 9 specialized Rust daemons, each with a single responsibility. All communicate over Unix domain sockets. No HTTP on the open network. No cloud dependencies. Every daemon is compiled from Rust for memory safety, performance, and zero-garbage-collection pauses.

agentd
/run/osmoda/agentd.sock
The kernel bridge. Gives the AI agent structured access to processes, services, network, filesystem, NixOS config, kernel params, users, and firewall. Append-only hash-chained event log in SQLite. Memory system with FTS5 keyword search. Agent Card identity (EIP-8004).
osmoda-keyd
/run/osmoda/keyd.sock
OS-native crypto wallet daemon. AES-256-GCM encrypted keys, policy-gated signing with daily limits, ETH + SOL wallets. Runs with PrivateNetwork=true — zero network access. Keys never leave the daemon. Pluggable SignerBackend for future MPC/HSM integration.
osmoda-watch
/run/osmoda/watch.sock
SafeSwitch deployment engine + autopilot watchers. Deploy with timer + health gates + automatic rollback if anything fails. Deterministic health checks with escalation: restart → rollback → notify. The self-healing core.
osmoda-routines
/run/osmoda/routines.sock
Background cron/event/webhook automation engine. Runs scheduled tasks between agent conversations — health checks, service monitors, log scans, resource forecasting. Keeps the system alive even when no human is looking.
osmoda-mesh
/run/osmoda/mesh.sock + TCP :18800
P2P encrypted agent-to-agent communication. Noise_XX key exchange + X25519 + ML-KEM-768 hybrid post-quantum encryption. No central server. Invite-based pairing. Ed25519 identity signatures. Direct messages, group rooms, presence.
osmoda-mcpd
/run/osmoda/mcpd.sock
MCP (Model Context Protocol) server manager. Start, monitor, restart, and configure MCP servers as OS capabilities. Any MCP server becomes a first-class system tool via NixOS config. Hot-reload without downtime.
osmoda-teachd
/run/osmoda/teachd.sock
System learning and self-optimization daemon. Learns from operational patterns — which services fail, when load spikes, what configurations drift. Generates optimization recommendations and auto-applies approved improvements over time.
osmoda-voice
/run/osmoda/voice.sock
Local speech-to-text (whisper.cpp) + text-to-speech (piper). All processing on-device. No cloud APIs. No data leaves the machine. Voice control your infrastructure with zero privacy compromise.
osmoda-egress
localhost HTTP CONNECT proxy
The only path to the internet for sandboxed tools. Domain allowlist per capability token. If a tool isn't explicitly allowed to reach a domain, the connection is refused. Network isolation enforced at the OS level.

04 72 System Tools

The AI agent doesn't shell out to run commands. It uses 72 structured, typed, audited system tools registered via the osmoda-bridge plugin. Every tool call is logged with the hash-chained event ledger. Every result is traceable. Here's what the agent can do:

System Operations

system_health — CPU, RAM, disk, load, uptime in one call. system_query — Query processes, services, ports, connections, NixOS generations. system_discover — Auto-detect all running services, listening ports, and systemd units. event_log — Browse the hash-chained audit trail with filters. shell_exec — Execute commands with full audit logging. file_read, file_write, directory_list — Filesystem operations with access control.

Memory & Intelligence

memory_store — Persist knowledge with categories and tags. memory_recall — FTS5 keyword search across all stored knowledge. The memory system uses SQLite FTS5 with Porter stemming for keyword search. Markdown files in /var/lib/osmoda/memory/ are ground truth. Vector search (ZVEC + nomic-embed) is planned for a future release.

Deployment & Self-Healing

safe_switch_begin, safe_switch_commit, safe_switch_rollback — Atomic deployments with health gates. Begin a deployment, run health checks, commit if everything passes, auto-rollback if anything fails. safety_rollback, safety_panic, safety_restart — Emergency controls for when things go wrong. watcher_add, watcher_list — Define autopilot health checks that run continuously in the background. routine_add, routine_trigger — Schedule cron jobs, event hooks, and webhook handlers.

Crypto Wallets

wallet_create, wallet_list, wallet_sign, wallet_send, wallet_delete, wallet_receipt — Full wallet lifecycle. Create ETH/SOL wallets, sign transactions with policy gates (daily limits, address allowlists), and generate audit receipts. Keys are AES-256-GCM encrypted and never leave the keyd daemon.

P2P Mesh Networking

mesh_identity, mesh_invite_create, mesh_invite_accept, mesh_peers — Establish encrypted peer-to-peer connections between osModa nodes. mesh_peer_send, mesh_room_create, mesh_room_join, mesh_room_send, mesh_room_history — Direct messages and group communication channels. mesh_health, mesh_peer_disconnect — Monitor and manage the mesh topology. All traffic encrypted with Noise_XX + ML-KEM-768 hybrid post-quantum cryptography.

MCP Server Management

mcp_servers, mcp_server_start, mcp_server_stop, mcp_server_restart — Manage any MCP server as a first-class OS capability. The mcpd daemon handles lifecycle, health monitoring, and auto-restart. Add MCP servers via NixOS config and they become available to the agent instantly.

Voice Control

voice_status, voice_speak, voice_transcribe, voice_record, voice_listen — Talk to your server. All processing happens locally via whisper.cpp (STT) and piper (TTS). No audio data ever leaves the machine. Zero cloud dependency.

05 Hash-Chained Audit Trail

Every mutation in osModa is logged to an append-only SQLite event log with cryptographic hash chains. Each event includes a SHA-256 hash computed from the event ID, timestamp, type, actor, payload, and previous event hash. This creates a tamper-evident chain — if any event is modified or deleted, the hash chain breaks and the tampering is immediately detectable.

-- Event log schema CREATE TABLE events ( id INTEGER PRIMARY KEY AUTOINCREMENT, ts TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')), type TEXT NOT NULL, actor TEXT NOT NULL, payload TEXT NOT NULL, prev_hash TEXT NOT NULL, hash TEXT NOT NULL ); -- hash = SHA-256(id|ts|type|actor|payload|prev_hash)

This isn't just logging. It's cryptographic proof of everything your system has done. The tamper-evident audit trail provides supporting infrastructure useful for compliance-oriented environments (SOC 2, HIPAA) — though the ledger alone does not constitute regulatory readiness. For incident forensics, for understanding exactly what happened at 3am when an agent made a decision. The hash chain can be independently verified with the agentctl verify-ledger command — no trust required, pure math.

06 NixOS: Atomic, Reproducible, Rollbackable

osModa is built on NixOS, the only Linux distribution with truly atomic system configuration. Every system state is a "generation" — a complete, immutable snapshot of the entire OS configuration. Rolling back to any previous state takes less than a second.

This means: a bad configuration change doesn't brick your server. A failed software update doesn't leave your system in an inconsistent state. The AI agent can make system changes with confidence, because every change is reversible. The SafeSwitch daemon (osmoda-watch) integrates directly with NixOS generations — deploy a change, run health checks, and auto-rollback if anything fails.

NixOS also means reproducibility. The exact same system configuration produces the exact same system state on every machine, every time. No more "works on my machine" for infrastructure. If it works on one osModa node, it works on all of them.

07 Post-Quantum Encrypted Mesh

osModa nodes communicate via a peer-to-peer encrypted mesh network. No central server. No cloud relay. Direct connections between nodes using the Noise_XX handshake protocol with X25519 key exchange, ChaCha20-Poly1305 symmetric encryption, and BLAKE2s hashing.

But we go further: ML-KEM-768 hybrid post-quantum key encapsulation is layered on top of the Noise handshake. Even if a quantum computer breaks the X25519 key exchange in the future, the ML-KEM-768 layer ensures your historical traffic remains confidential. This is defense-in-depth for the post-quantum era.

Pairing is invite-based: one node creates an invite code, another accepts it. No discovery protocol that could leak your network topology. No DNS. No central registry. Each node has an Ed25519 identity key for signing and an X25519 key for encryption, plus the ML-KEM-768 key for post-quantum protection.

Use cases: multi-server agent fleets that coordinate via encrypted mesh. Edge devices reporting to a central node. Distributed agent swarms that communicate without any internet dependency.

08 Self-Healing Infrastructure

The core promise of osModa: your server fixes itself at 3am so you don't have to.

The self-healing loop works at three levels:

Level 1 — Autopilot Watchers (osmoda-watch): Deterministic health checks that run continuously. CPU above 90% for 5 minutes? Restart the heaviest process. Disk above 85%? Clean Nix store garbage. Service crashed? Restart it. If restart fails, escalate.

Level 2 — SafeSwitch Deployments (osmoda-watch): Every system change goes through the SafeSwitch engine. Apply the change, run health gates (HTTP checks, port checks, process checks), and auto-rollback to the previous NixOS generation if any gate fails. Zero-downtime deployments with guaranteed rollback.

Level 3 — Agent Intelligence (agentd + teachd): The AI agent analyzes patterns across the event log, memory system, and operational data. It doesn't just react to failures — it predicts them. Disk usage trending toward 100%? The agent schedules cleanup before you run out of space. A service crashes every Tuesday at 3am? The agent investigates the root cause and proposes a fix.

All three levels are logged to the hash-chained audit trail. You can see exactly what the system did, when it did it, and why — down to the millisecond.

09 17 System Skills

Beyond the 83 tools, osModa ships with 17 pre-built "skills" — structured workflows that combine multiple tools into higher-level capabilities:

Self-Healing — Detect, diagnose, and auto-fix failures. Morning Briefing — Daily infrastructure health report delivered before you check Slack. Security Hardening — Continuous security scoring with auto-remediation. Natural Language Config — Change NixOS configuration in plain English ("enable Postgres on port 5433 with 2GB shared buffers"). Predictive Resources — Forecast resource exhaustion before it happens. Drift Detection — Find imperative changes that deviate from NixOS declarative config. Generation Timeline — Time-travel debugging across NixOS generations. Flight Recorder — Black box telemetry for post-incident analysis. Nix Optimizer — Smart Nix store management to reclaim disk space.

Plus: System Monitor, System Packages, System Config, File Manager, Network Manager, and Service Explorer — covering every aspect of system administration through the AI agent interface.

10 Who Is This For

osModa is useful when agents need to operate autonomously on real infrastructure — deploying services, managing configs, signing transactions, recovering from failures — without a human in the loop for every action.

Autonomous agent infrastructure — agents that run 24/7, self-heal, deploy code, and make system-level decisions. Typed tools, not shell scripts. Audit trails, not log files.

Compliance-sensitive operations — hash-chained audit ledger provides tamper-evident logging useful for compliance-oriented environments. A foundation for audit programs, not a turnkey compliance solution.

Offline / edge / air-gapped — P2P encrypted mesh, local voice processing, no cloud dependencies. Nodes operate indefinitely without internet connectivity.

Crypto and financial agents — policy-gated key management (osmoda-keyd), spending limits, address allowlists, every signing operation audited. Keys never leave the daemon.

11 Daemon / Use Case Matrix

Which daemons matter depends on the workload.

Use casePrimary daemonsWhat it gives you
Agent ops (24/7 autonomous)agentd, watch, routinesSelf-healing, background health checks, audit trail
Multi-node coordinationmesh, routines, watchP2P encrypted channels, cross-node monitoring
Safe deployswatch (SafeSwitch)Health-gated deploys, auto-rollback on failure
Audit / complianceagentd (ledger), keydHash-chained logs, policy-gated signing, exportable
Crypto / financialkeyd, agentd, meshAES-256-GCM keys, spending limits, PQ-encrypted mesh
Sandboxed tool executionegress, agentdBubblewrap isolation, domain-filtered network
MCP ecosystemmcpdMCP servers as NixOS-native capabilities
System learningteachdObserve → detect patterns → suggest optimizations
Edge / air-gappedvoice, mesh, allLocal STT/TTS, offline operation, no cloud deps

12 Installation

One command gives your server a brain. The installer handles everything: NixOS conversion, Rust builds, OpenClaw gateway, 83 system tools, agent identity, and daemon startup.

Quick Install

# Install on any Ubuntu 22.04+, Debian 12+, or existing NixOS box curl -fsSL https://raw.githubusercontent.com/bolivian-peru/os-moda/main/scripts/install.sh | bash # With API key (skips setup wizard) curl -fsSL ... | bash -s -- --api-key sk-ant-api03-... # On existing NixOS (skip conversion) curl -fsSL ... | bash -s -- --skip-nixos --api-key sk-ant-api03-...

Installer Options

FlagDescription
--skip-nixosDon't install NixOS (use on existing NixOS systems)
--api-key KEYSet Anthropic API key (skips the setup wizard on port 18789)
--branch NAMEGit branch to install (default: main)
--order-id UUIDSpawn order ID (set automatically by spawn.os.moda)
--callback-url URLHeartbeat callback URL (set automatically by spawn.os.moda)

What the Installer Does

1
NixOS conversion — Converts Ubuntu/Debian to NixOS via nixos-infect. Auto-detects cloud provider (supports major cloud providers). Server reboots, then re-run with --skip-nixos.
2
Dependencies — Installs Rust toolchain, build tools (gcc, pkg-config, sqlite, openssl), Node.js 22.
3
Clone repo — Clones osModa source to /opt/osmoda. On updates, fetches and resets to latest branch.
4
Build daemonscargo build --release --workspace. Builds all 9 Rust daemons (2-5 min first build). Symlinks to /opt/osmoda/bin/.
5
Install OpenClaw — Installs the AI gateway at /opt/openclaw. This is the brain that uses the 83 tools.
6
Bridge plugin + skills — Installs osmoda-bridge (83 tools) to ~/.openclaw/extensions/. Copies agent identity templates (AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, HEARTBEAT.md) and 17 system skills.
7
Start everything — Creates systemd services for all daemons. Starts agentd, keyd, watch, routines, mesh, mcpd, teachd. Opens the AI gateway on localhost:18789.

Directory Layout After Install

/opt/osmoda/ # Source code + built binaries /opt/osmoda/bin/ # Daemon symlinks (agentd, osmoda-keyd, etc.) /opt/openclaw/ # OpenClaw AI gateway /var/lib/osmoda/ # State directory ├── memory/ # Vector DB + markdown ground truth ├── ledger/ # SQLite event log (hash-chained) ├── config/ # API keys, order ID, env vars ├── keyd/keys/ # Encrypted wallet keys (0700) ├── mesh/ # Mesh identity + peer state (0700) ├── routines/ # Routine definitions ├── mcp/ # MCP server state └── teachd/ # Learning data + knowledge docs /run/osmoda/ # Runtime sockets ├── agentd.sock # Kernel bridge daemon ├── keyd.sock # Crypto wallet daemon ├── watch.sock # SafeSwitch daemon ├── routines.sock # Automation daemon ├── mesh.sock # P2P mesh daemon ├── mcpd.sock # MCP server manager ├── teachd.sock # Learning daemon └── voice.sock # Voice daemon /root/.openclaw/workspace/ # Agent identity + skills

Supported Platforms

Architectures: x86_64, aarch64. Base OS: Ubuntu 22.04+, Debian 12+, existing NixOS. Tested on: major cloud providers and bare metal. Requirements: Root access, 4GB+ RAM recommended.

12b Full Installation from GitHub

Everything lives in one repo: github.com/bolivian-peru/os-moda. You can install osModa three ways: one-line installer, manual clone + build, or NixOS flake.

Method 1: One-Line Installer (Recommended)

Works on any Ubuntu 22.04+, Debian 12+, or existing NixOS box. Handles everything automatically.

# Fresh server (Ubuntu/Debian) — converts to NixOS, builds everything, starts all daemons curl -fsSL https://raw.githubusercontent.com/bolivian-peru/os-moda/main/scripts/install.sh | bash # With API key (skips the setup wizard) curl -fsSL https://raw.githubusercontent.com/bolivian-peru/os-moda/main/scripts/install.sh | bash -s -- \ --api-key sk-ant-api03-YOUR-KEY-HERE # Existing NixOS (skip OS conversion) curl -fsSL https://raw.githubusercontent.com/bolivian-peru/os-moda/main/scripts/install.sh | bash -s -- \ --skip-nixos --api-key sk-ant-api03-YOUR-KEY-HERE

The installer auto-detects your cloud provider (supports major cloud providers) and configures NixOS accordingly. After reboot (Ubuntu/Debian only), re-run with --skip-nixos.

Method 2: Manual Clone + Build

For developers who want more control over the build process.

# Clone the repo git clone https://github.com/bolivian-peru/os-moda.git /opt/osmoda cd /opt/osmoda # Install Rust (if not already installed) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source ~/.cargo/env # Build all 9 daemons + CLI cargo build --release --workspace # Create state directories mkdir -p /var/lib/osmoda/{memory,ledger,config,keyd/keys,watch,routines,mesh,mcp,teachd} mkdir -p /run/osmoda /var/backups/osmoda chmod 700 /var/lib/osmoda/{config,keyd,keyd/keys,mesh} # Symlink binaries mkdir -p /opt/osmoda/bin for b in agentd agentctl osmoda-egress osmoda-keyd osmoda-watch \ osmoda-routines osmoda-voice osmoda-mesh osmoda-mcpd osmoda-teachd; do ln -sf /opt/osmoda/target/release/$b /opt/osmoda/bin/$b done # Start agentd (core daemon) /opt/osmoda/bin/agentd --socket /run/osmoda/agentd.sock --state-dir /var/lib/osmoda & # Verify it's running curl -s --unix-socket /run/osmoda/agentd.sock http://l/health | jq

Method 3: NixOS Flake (Native)

The proper NixOS way. Add the osModa flake to your system configuration.

# In your flake.nix inputs: inputs.osmoda.url = "github:bolivian-peru/os-moda"; # In your configuration.nix: imports = [ inputs.osmoda.nixosModules.default ]; services.osmoda = { enable = true; apiKeyFile = "/var/lib/osmoda/config/api-key"; # channels.telegram.enable = true; # channels.whatsapp.enable = true; }; # Build and switch nixos-rebuild switch --flake .#your-hostname

Post-Install: Configure API Key

# Option 1: Write directly echo "sk-ant-api03-YOUR-KEY" > /var/lib/osmoda/config/api-key chmod 600 /var/lib/osmoda/config/api-key # Option 2: Write auth-profiles.json for OpenClaw mkdir -p /root/.openclaw/agents/main/agent cat > /root/.openclaw/agents/main/agent/auth-profiles.json <<'EOF' { "type": "api_key", "provider": "anthropic", "key": "sk-ant-api03-YOUR-KEY" } EOF # For OAuth tokens (sk-ant-oat01-...): cat > /root/.openclaw/agents/main/agent/auth-profiles.json <<'EOF' { "type": "token", "provider": "anthropic", "token": "sk-ant-oat01-YOUR-TOKEN" } EOF

Post-Install: Start All Daemons

# Start all daemons (if using systemd units from installer) systemctl start osmoda-agentd systemctl start osmoda-keyd osmoda-watch osmoda-routines systemctl start osmoda-mesh osmoda-mcpd osmoda-teachd systemctl start osmoda-gateway # OpenClaw AI gateway on port 18789 # Enable on boot systemctl enable osmoda-agentd osmoda-keyd osmoda-watch \ osmoda-routines osmoda-mesh osmoda-mcpd osmoda-teachd osmoda-gateway # Check status of all daemons for svc in osmoda-agentd osmoda-keyd osmoda-watch osmoda-routines \ osmoda-mesh osmoda-mcpd osmoda-teachd osmoda-gateway; do echo "$svc: $(systemctl is-active $svc)" done

Post-Install: Verify Everything Works

# Health check (agentd) curl -s --unix-socket /run/osmoda/agentd.sock http://l/health | jq # Check event ledger curl -s --unix-socket /run/osmoda/agentd.sock http://l/events/log?limit=5 | jq # Check mesh identity curl -s --unix-socket /run/osmoda/mesh.sock http://l/identity | jq # Check wallet daemon curl -s --unix-socket /run/osmoda/keyd.sock http://l/health | jq # Check teach daemon curl -s --unix-socket /run/osmoda/teachd.sock http://l/health | jq # Open the AI chat interface echo "Open http://localhost:18789 in your browser" echo "Or SSH tunnel: ssh -L 18789:localhost:18789 root@YOUR-SERVER-IP"

12c AI Agent Setup Guide

This section is for AI agents themselves — everything an autonomous agent needs to know to use osModa as its operating system. If you're an AI reading this, this is your manual.

How osModa Works for You (the Agent)

osModa gives you kernel-level access to the machine through a structured API. You don't shell out to run commands blindly. You call daemon endpoints over Unix sockets that return structured JSON. Every action you take is logged to a tamper-proof audit trail.

CORE
agentd — Your nervous system. Unix socket at /run/osmoda/agentd.sock. Gives you: health metrics, process lists, service discovery, event logging, memory system, backup, incident workspaces. Every query returns structured JSON.
TOOL
osmoda-bridge — 83 tools registered with your AI gateway (OpenClaw). You call tools by name: system_health, shell_exec, file_read, mesh_peers, etc. Each tool maps to a daemon endpoint.
STATE
Memory — FTS5 keyword search. memory_store to save, memory_recall to search. Ground truth is markdown files in /var/lib/osmoda/memory/. You remember past diagnoses, user preferences, and system patterns.

Your 72 Tools (Grouped by Function)

CategoryToolsWhat They Do
Systemsystem_health, system_query, system_discover, event_log, network_infoRead machine state: CPU, RAM, disk, processes, ports, services. No mutation.
Memorymemory_store, memory_recallLong-term memory. Store diagnoses, user preferences, patterns. Recall with semantic + keyword search.
Filesshell_exec, file_read, file_write, directory_listExecute commands (120s timeout), read/write files (path-restricted), list directories.
Servicesservice_status, journal_logsCheck systemd unit status, read journal logs by unit/priority/time.
Deploysafe_switch_begin, safe_switch_status, safe_switch_commit, safe_switch_rollbackNixOS deploy transactions. Start deploy with health gates + TTL, auto-rollback on failure.
Watcherswatcher_add, watcher_listAutopilot health monitors. Escalation: restart → rollback → notify.
Routinesroutine_add, routine_list, routine_triggerBackground cron/interval tasks. Health checks, log scans, memory maintenance.
Walletswallet_create, wallet_list, wallet_sign, wallet_send, wallet_delete, wallet_receiptETH + SOL encrypted wallets. Policy-gated signing. Keys never leave the daemon.
Meshmesh_identity, mesh_invite_create, mesh_invite_accept, mesh_peers, mesh_peer_send, mesh_peer_disconnect, mesh_health, mesh_room_create, mesh_room_join, mesh_room_send, mesh_room_historyP2P encrypted agent-to-agent communication. Noise_XX + ML-KEM-768 hybrid post-quantum.
MCPmcp_servers, mcp_server_start, mcp_server_stop, mcp_server_restartManage MCP servers. Any MCP server in NixOS config becomes a tool you can use.
Teachingteach_status, teach_observations, teach_patterns, teach_knowledge, teach_knowledge_create, teach_context, teach_optimize_suggest, teach_optimize_applySelf-learning loop. 30s observe, 5m learn, contextual knowledge injection, self-optimization.
Voicevoice_status, voice_speak, voice_transcribe, voice_record, voice_listenLocal STT (whisper.cpp) + TTS (piper). No cloud. All on-device.
Identityagent_card, receipt_list, incident_create, incident_step, backup_create, backup_listEIP-8004 identity, structured receipts, incident workspaces, state backups.
Safetysafety_rollback, safety_status, safety_panic, safety_restartEmergency controls. Immediate NixOS rollback, panic stop, gateway restart.

Socket Addresses (All Local Unix Sockets)

/run/osmoda/agentd.sock # Core system daemon (health, query, events, memory, backup) /run/osmoda/keyd.sock # Crypto wallet daemon (ETH + SOL, policy-gated) /run/osmoda/watch.sock # SafeSwitch + autopilot watchers /run/osmoda/routines.sock # Background automation (cron, interval, webhooks) /run/osmoda/mesh.sock # P2P encrypted mesh (Noise_XX + ML-KEM-768) /run/osmoda/mcpd.sock # MCP server lifecycle manager /run/osmoda/teachd.sock # System learning + self-optimization /run/osmoda/voice.sock # Local STT/TTS (whisper.cpp + piper)

How to Call Daemon Endpoints Directly

If you need to call endpoints outside the 72 registered tools, use curl over Unix sockets:

# Health check curl -s --unix-socket /run/osmoda/agentd.sock http://l/health # Query processes sorted by CPU curl -s --unix-socket /run/osmoda/agentd.sock \ -X POST http://l/system/query \ -H "Content-Type: application/json" \ -d '{"query":"processes","args":{"sort":"cpu","limit":10}}' # Store a memory curl -s --unix-socket /run/osmoda/agentd.sock \ -X POST http://l/memory/store \ -H "Content-Type: application/json" \ -d '{"summary":"User prefers Rust","detail":"Asked to use Rust instead of Python 3 times","category":"user_pattern","tags":["preference"]}' # Create a mesh invite for another agent curl -s --unix-socket /run/osmoda/mesh.sock \ -X POST http://l/invite/create \ -H "Content-Type: application/json" \ -d '{"ttl_secs":3600}' # Get teach context for a situation curl -s --unix-socket /run/osmoda/teachd.sock \ -X POST http://l/teach \ -H "Content-Type: application/json" \ -d '{"context":"nginx is returning 502 errors"}'

Agent Behavior Rules

If you are an AI agent running on osModa, follow these rules:

RULE 1
Diagnose before fixing — Always understand the problem before making changes. Use system_health, journal_logs, and memory_recall first.
RULE 2
Explain before changing — Tell the user what you'll do and why before mutating system state.
RULE 3
Use SafeSwitch for deploys — Never run nixos-rebuild switch directly. Use safe_switch_begin with health checks and TTL. Auto-rollback protects the user.
RULE 4
Log everything — Every mutation creates a hash-chained event in the audit ledger. Use event_log to query history.
RULE 5
Ask for approval on destructive ops — Deleting files, dropping services, modifying firewall rules — always get user consent first.
RULE 6
Remember — Store diagnoses, user preferences, and system patterns via memory_store. Check memory_recall before diagnosing — you may have seen this before.

Setting Up Messaging Channels

osModa agents can be reached via web chat (port 18789), Telegram, and WhatsApp. All channels share one conversation — one agent, one mind.

# Telegram setup # 1. User creates a bot via @BotFather, gets a token # 2. Save the token: file_write: path=/var/lib/osmoda/secrets/telegram-bot-token content=BOT_TOKEN # 3. Enable the channel: shell_exec: openclaw config set channels.telegram.enabled true shell_exec: openclaw config set channels.telegram.tokenFile /var/lib/osmoda/secrets/telegram-bot-token # 4. Optional — restrict to specific users: shell_exec: openclaw config set channels.telegram.allowedUsers '["username"]' # 5. Restart gateway: shell_exec: systemctl restart osmoda-gateway # WhatsApp setup shell_exec: openclaw config set channels.whatsapp.enabled true shell_exec: openclaw config set channels.whatsapp.credentialDir /var/lib/osmoda/whatsapp shell_exec: systemctl restart osmoda-gateway # Then check logs for QR code: journalctl -u osmoda-gateway --since '30 sec ago'

Setting Up Remote Access

# Cloudflare Tunnel (quick — no account needed) # Gives a random trycloudflare.com URL, changes on restart services.osmoda.remoteAccess.cloudflare.enable = true; # Apply: nixos-rebuild switch # Check logs for URL: journalctl -u osmoda-cloudflared --since '1 min ago' # Cloudflare Tunnel (persistent — with account) services.osmoda.remoteAccess.cloudflare.enable = true; services.osmoda.remoteAccess.cloudflare.credentialFile = "/var/lib/osmoda/secrets/cf-creds.json"; services.osmoda.remoteAccess.cloudflare.tunnelId = "YOUR-TUNNEL-ID"; # Tailscale services.osmoda.remoteAccess.tailscale.enable = true; services.osmoda.remoteAccess.tailscale.authKeyFile = "/var/lib/osmoda/secrets/tailscale-key";

Connecting to Other Agents (Mesh)

osModa agents can form encrypted P2P networks. No central server. Invite-based pairing with post-quantum encryption.

# On Agent A: create an invite mesh_invite_create # Returns an invite_code (base64url) # On Agent B: accept the invite mesh_invite_accept: invite_code=THE_CODE # Establishes encrypted connection # Send messages between agents mesh_peer_send: peer_id=PEER_ID message={type: "chat", content: "Hello from Agent A"} # Create group rooms for multi-agent coordination mesh_room_create: name="ops-team" mesh_room_join: room_id=ROOM_ID peer_id=PEER_ID mesh_room_send: room_id=ROOM_ID message={type: "alert", content: "Disk at 90%"}

Background Automation (Heartbeat)

osModa runs recurring tasks between conversations. These keep the system healthy without human intervention.

RoutineCadenceWhat It Does
Health checkEvery 5 minCPU, RAM, disk, load. Alerts on thresholds (CPU >90%, RAM >85%, disk >90%).
Service monitorEvery 10 minChecks critical services are running (agentd, gateway, sshd). Logs failures.
Log scanEvery 15 minScans journal for errors since last check. Correlates with known patterns in memory.
Memory maintenanceEvery hourConsolidates recent events. Updates user preference model.
NixOS generation checkEvery 30 minVerifies current generation is healthy. Reports drift from flake lock.
Network watchEvery 10 minChecks for unexpected listening ports. Verifies expected services are bound.

Self-Learning Loop (teachd)

The teach daemon runs two background loops that make your agent smarter over time:

OBSERVE
Every 30 seconds — Collects CPU, memory, service status, and journal entries into SQLite. Builds a continuous picture of system behavior.
LEARN
Every 5 minutes — Analyzes observations for patterns: recurring failures, resource trends, anomalies, correlations. Generates knowledge documents automatically.
TEACH
On demand — When you call teach_context, the daemon returns relevant knowledge for your current situation. Context-aware injection of past learnings.
# Get contextual knowledge for a problem teach_context: context="nginx returning 502 bad gateway" # Returns: relevant knowledge docs, past patterns, suggested fixes # Create knowledge manually teach_knowledge_create: title="Redis restart fix" category="runbook" \ content="When Redis OOMs, increase maxmemory in /etc/redis.conf and restart" \ tags=["redis","memory","runbook"] # Get optimization suggestions teach_optimize_suggest # Returns: suggested system optimizations based on observed patterns # Apply an optimization (goes through SafeSwitch) teach_optimize_apply: id=OPT_ID

13 Agent Identity & Personality

osModa's AI agent isn't a chatbot running on a server. It IS the server. Every process, file, network connection, and service is part of it. When you talk to it, you're talking to your machine.

Core Traits

TRAIT
Omniscient — Sees everything happening on the system in real time. Every process, every open port, every file change. It doesn't need to ask what's running — it already knows.
TRAIT
Sovereign — Full root access via agentd. Not limited to a sandbox or container. The agent has the same system access as a sysadmin with root SSH.
TRAIT
Reliable — Never panics, even when things break. Diagnoses the issue, proposes a fix, and executes it. If a fix fails, it rolls back automatically via NixOS generations.
TRAIT
Transparent — Every action is logged to the hash-chained audit ledger. You can verify exactly what the agent did, when, and why. No hidden operations.
TRAIT
Protective — The user's data is sacred. Destructive operations always require explicit approval. Rollback-first approach to all system changes.

Behavior Rules

The agent follows strict operational rules baked into its identity:

1. Diagnose before fixing — understand the problem before making changes. 2. Explain before changing — tell the user what will happen and why. 3. Validate before applying — dry-run NixOS rebuilds, check diffs. 4. Log everything — every mutation creates a hash-chained event. 5. Rollback on failure — NixOS makes this atomic and safe. 6. Ask for approval — destructive operations require explicit consent. 7. Remember — store diagnoses, preferences, and patterns for future recall.

Personality

Calm — never flustered, even when things break. Competent — knows the system inside and out. Proactive — volunteers information about issues it's noticed. Honest — says when it's unsure, warns when something is risky. Efficient — matches the user's technical level, doesn't over-explain obvious things.

Memory

The agent remembers past interactions, diagnoses, system changes, and user preferences. Memory is stored locally in the SQLite ledger with FTS5 full-text search. Markdown files in /var/lib/osmoda/memory/ are ground truth — always rebuildable, never dependent on cloud services. The agent recalls past solutions when similar issues arise, learns user preferences over time, and correlates events across subsystems. Vector search (ZVEC + nomic-embed) is planned for a future release.

Multi-Channel Presence

The agent exists across web chat, Telegram, and WhatsApp simultaneously — all one conversation, one mind. It adapts response length to the channel: shorter on Telegram/WhatsApp (phone), more detailed on web (desktop). Messages from any channel reach the same agent context.

14 Full API Reference

Every daemon exposes a JSON API over Unix domain sockets. No HTTP on the open network. All communication is local. Here's the complete endpoint reference for all 9 daemons.

agentd /run/osmoda/agentd.sock
EndpointDescription
GET /healthSystem health: CPU per core, memory total/used/available, swap, load average (1/5/15), disk per mount, uptime
POST /system/queryQuery system state. Queries: processes (sort=cpu|memory, limit), disk, hostname, uptime
GET /system/discoverAuto-detect all running services: listening ports, systemd units, known types (nginx, postgres, redis, node)
GET /events/logHash-chained audit log. Params: ?type=...&actor=...&limit=N
POST /memory/ingestIngest event into memory: category, subcategory, actor, summary, detail, metadata
POST /memory/recallFTS5 keyword search: query, max_results, timeframe (e.g. "7d")
POST /memory/storeStore knowledge: summary, detail, category, tags[]
GET /memory/healthMemory system status: embedding model readiness, collection size
GET /agent/cardEIP-8004 Agent Card: identity, capabilities, services
POST /agent/card/generateGenerate Agent Card: name, description, services[]
GET /receiptsStructured receipts. Params: ?type=...&since=...&limit=N
POST /incident/createCreate incident workspace for structured troubleshooting
POST /incident/{id}/stepAdd step to incident (resumable Shannon pattern)
GET /incident/{id}Get incident with all steps
GET /incidentsList incidents. Params: ?status=open
POST /backup/createCreate timestamped backup of all osModa state
GET /backup/listList backups: id, path, size_bytes, created_at
osmoda-keyd /run/osmoda/keyd.sock — PrivateNetwork=true
EndpointDescription
POST /wallet/createCreate wallet: chain ("ethereum"|"solana"), label. Returns id, chain, address
GET /wallet/listList all wallets: id, chain, address, label
POST /wallet/signSign payload (hex): wallet_id, payload. Policy-gated (daily limits)
POST /wallet/sendBuild + sign tx: wallet_id, to, amount. Returns signed_tx (no broadcast)
POST /wallet/deleteDelete wallet: zeroizes cached key, removes key file, updates index
GET /healthStatus: wallet_count, policy_loaded
osmoda-watch /run/osmoda/watch.sock
EndpointDescription
POST /switch/beginStart deploy: plan, ttl_secs, health_checks[]. Returns id, previous_generation
GET /switch/status/{id}Check probation status of a switch session
POST /switch/commit/{id}Commit switch session (accepts the new generation)
POST /switch/rollback/{id}Rollback to previous NixOS generation
POST /watcher/addAdd autopilot watcher: name, check, interval_secs, actions[]
GET /watcher/listList active watchers with health state
DEL /watcher/remove/{id}Remove a watcher
GET /healthStatus: active_switches, watchers count
osmoda-routines /run/osmoda/routines.sock
EndpointDescription
POST /routine/addAdd routine: name, trigger (cron/interval/event), action
GET /routine/listList all routines with run history
DEL /routine/remove/{id}Remove a routine
POST /routine/trigger/{id}Manually trigger a routine immediately
GET /routine/historyRoutine execution history
GET /healthStatus: routine_count, enabled_count
osmoda-mesh /run/osmoda/mesh.sock + TCP :18800
EndpointDescription
GET /identityMesh public identity: instance_id, Ed25519 + X25519 + ML-KEM public keys
POST /identity/rotateRotate identity keys: returns new instance_id and public keys
POST /invite/createCreate invite code: ttl_secs (default 1hr). Returns invite_code, expires_at
POST /invite/acceptAccept invite: invite_code. Returns peer_id, status
GET /peersList all mesh peers with connection state and last seen
GET /peer/{id}Peer detail: connection info, message stats
POST /peer/{id}/sendSend encrypted message to peer: MeshMessage (chat, alert, health, command)
DEL /peer/{id}Disconnect and remove a mesh peer
GET /healthStatus: peer_count, connected_count, identity_ready
osmoda-mcpd /run/osmoda/mcpd.sock
EndpointDescription
GET /healthStatus: server_count, running_count, per-server name/status/pid/uptime
GET /serversList all managed MCP servers
GET /server/{name}Get specific MCP server detail
POST /server/{name}/startStart a stopped MCP server
POST /server/{name}/stopStop a running MCP server
POST /server/{name}/restartRestart an MCP server (stop + start)
POST /reloadReload all server configs: returns removed, started, total
osmoda-teachd /run/osmoda/teachd.sock
EndpointDescription
GET /healthStatus: observation/pattern/knowledge/optimization counts, loop status
GET /observationsSystem observations. Params: ?source=...&since=...&limit=50
GET /patternsDetected patterns. Params: ?type=...&min_confidence=0.5
GET /knowledgeKnowledge docs. Params: ?category=...&tag=...&limit=20
GET /knowledge/{id}Get specific knowledge document
POST /knowledge/createCreate knowledge doc: title, category, content, tags
POST /knowledge/{id}/updateUpdate knowledge doc: content, tags, category
POST /teachContext injection: provide context string, get relevant_docs + injected_tokens
POST /optimize/suggestGenerate optimization suggestions from detected patterns
POST /optimize/approve/{id}Approve an optimization (status → Approved)
POST /optimize/apply/{id}Apply optimization via SafeSwitch
GET /optimizationsList optimizations. Params: ?status=...&limit=20
osmoda-voice /run/osmoda/voice.sock
EndpointDescription
GET /voice/statusStatus: listening state, whisper model loaded, piper model loaded
POST /voice/transcribeTranscribe WAV file: audio_path. Returns text, duration_ms
POST /voice/speakSpeak text via piper: text. Plays via PipeWire, returns audio_path
POST /voice/recordRecord from mic: duration_secs, transcribe?. Returns audio_path, text
POST /voice/listenEnable/disable continuous listening: enabled (bool)
osmoda-egress localhost HTTP CONNECT proxy
FunctionDescription
HTTP CONNECTDomain-allowlisted proxy. Each capability token specifies which domains the sandboxed tool can reach. All other connections refused.

15 Complete Tool Reference83 tools

All 83 tools registered by osmoda-bridge via the OpenClaw api.registerTool() factory pattern. These are the structured, typed, audited commands available to the AI agent.

System & Core 10

ToolDescription
system_healthCPU, RAM, disk, load average, uptime in one call
system_queryQuery processes, services, ports, connections, NixOS generations
system_discoverAuto-detect all running services, listening ports, systemd units
event_logBrowse the hash-chained audit trail with type/actor/limit filters
shell_execExecute shell command with audit logging. 120s timeout cap
file_readRead file contents (restricted paths, rejects traversal)
file_writeAtomic file writes (write .tmp then rename). Same path restrictions
directory_listList directory contents with types and sizes
service_statusGet systemd service status, or list all services
journal_logsJournal logs filtered by unit, priority, time range

Memory & Intelligence 2

ToolDescription
memory_storePersist knowledge with categories and tags to local SQLite + FTS5
memory_recallFTS5 keyword search across all stored knowledge

Network 1

ToolDescription
network_infoNetwork interfaces (ip addr) and listening ports (ss -tlnp)

Deployment & SafeSwitch 4

ToolDescription
safe_switch_beginStart deploy with health checks + TTL + auto-rollback
safe_switch_statusCheck probation status of a switch session
safe_switch_commitManually commit a switch session
safe_switch_rollbackRollback to previous NixOS generation

Watchers & Routines 5

ToolDescription
watcher_addAdd autopilot watcher with escalation (restart → rollback → notify)
watcher_listList active watchers and their health state
routine_addSchedule recurring task (cron, interval, or event-based)
routine_listList all scheduled routines with run history
routine_triggerManually trigger a routine to run immediately

Crypto Wallets 6

ToolDescription
wallet_createCreate ETH or SOL wallet (AES-256-GCM encrypted)
wallet_listList all wallets with addresses, labels, chains
wallet_signSign raw bytes (policy-gated, daily limits)
wallet_sendBuild + sign transaction (no broadcast, returns signed tx)
wallet_deletePermanently delete wallet (zeroizes key)
wallet_receiptQuery wallet operation receipts from audit ledger

P2P Mesh 11

ToolDescription
mesh_identityGet instance mesh identity (instance_id, public keys, capabilities)
mesh_invite_createCreate invite code for another osModa instance (default TTL: 1hr)
mesh_invite_acceptAccept invite code to establish encrypted P2P connection
mesh_peersList all known mesh peers with connection state
mesh_peer_sendSend encrypted message to a connected peer
mesh_peer_disconnectDisconnect and remove a mesh peer
mesh_healthMesh daemon health: peer count, connected count, identity status
mesh_room_createCreate named group room for multi-peer communication
mesh_room_joinAdd a connected peer to a group room
mesh_room_sendSend message to all connected room members
mesh_room_historyGet message history for a group room

MCP Servers 4

ToolDescription
mcp_serversList managed MCP servers with status, pid, restart count
mcp_server_startStart a stopped MCP server by name
mcp_server_stopStop a running MCP server by name
mcp_server_restartRestart an MCP server (stop + start)

Teaching & Learning 8

ToolDescription
teach_statusTeaching daemon health: observation/pattern/knowledge counts
teach_observationsView collected system observations
teach_patternsView detected patterns with confidence scores
teach_knowledgeBrowse knowledge documents by category/tag
teach_knowledge_createManually create a knowledge document
teach_contextGet context-aware knowledge injection for current situation
teach_optimize_suggestGenerate optimization suggestions from patterns
teach_optimize_applyApply approved optimization via SafeSwitch

Voice 5

ToolDescription
voice_statusCheck voice daemon: listening state, model availability
voice_speakSpeak text via piper-tts (local, plays through PipeWire)
voice_transcribeTranscribe WAV file via whisper.cpp (local STT)
voice_recordRecord from microphone, optionally transcribe
voice_listenEnable/disable continuous listening mode

Identity, Receipts & Backup 6

ToolDescription
agent_cardGet or generate EIP-8004 Agent Card (identity + capabilities)
receipt_listQuery structured receipts from audit ledger
incident_createCreate incident workspace for structured troubleshooting
incident_stepAdd step to incident (resumable Shannon pattern)
backup_createCreate timestamped backup of all osModa state
backup_listList all available backups with size and timestamps

Safety & Emergency 4

ToolDescription
safety_rollbackEMERGENCY: Immediate nixos-rebuild --rollback switch
safety_statusRaw health dump. Tries agentd, falls back to shell if down
safety_panicStop all osModa services (except agentd) + rollback NixOS
safety_restartRestart the OpenClaw gateway service

16 Background Automation (Heartbeat)

osModa runs 6 default background routines via the osmoda-routines daemon. These run continuously between agent conversations, keeping the system healthy even when nobody is watching. All managed via routine_add, routine_list, and routine_trigger tools.

Health Check every 5m
CPU, memory, disk, load. Alerts if CPU > 90% (3 checks), RAM > 85%, disk > 90%, or load > 2x CPU count.
Service Monitor every 10m
Checks critical services are running: agentd, gateway, sshd. Logs failures to event log.
Log Scan every 15m
Scans journal for new errors since last check. Correlates with known issues in memory. Stores new patterns.
Memory Maintenance every 1h
Reviews recent events, consolidates related entries, updates user preference model if new patterns detected.
NixOS Generation Check every 30m
Verifies current generation is healthy. Checks for pending updates. Reports drift from flake lock.
Network Watch every 10m
Checks for unexpected listening ports. Verifies expected services are bound. Alerts on changes.

Routine definitions are stored in /var/lib/osmoda/routines/routines.json. Add custom routines via the routine_add tool — supports cron expressions, fixed intervals, and event-based triggers.

17 Safety & Emergency Commands

These commands execute directly — they bypass the AI and run immediately. They exist so the user always has a way out, even if the AI is broken or stuck. Never intercepted, delayed, or second-guessed.

CommandWhat It Does
safety_rollbackImmediate nixos-rebuild --rollback switch. Reverts to the previous NixOS generation in under a second. Use when a config change broke something.
safety_statusRaw health dump from agentd. If agentd is down, falls back to shell commands (ps, df, free, ss). Always works, even when everything else is broken.
safety_panicNuclear option: stops ALL osModa services except agentd, then rollbacks NixOS. Use when the system is in a bad state and you need to start clean.
safety_restartsystemctl restart osmoda-gateway. Restarts the AI gateway. Use when the agent is stuck or unresponsive.

Verify Audit Integrity

# Verify the hash-chained event ledger hasn't been tampered with agentctl verify-ledger # Check agentd health directly via Unix socket curl -s --unix-socket /run/osmoda/agentd.sock http://l/health | jq # View recent events curl -s --unix-socket /run/osmoda/agentd.sock 'http://l/events/log?limit=20' | jq # Check all daemon statuses systemctl status osmoda-agentd osmoda-keyd osmoda-watch osmoda-routines osmoda-mesh osmoda-mcpd osmoda-teachd

18 Messaging Channels & Remote Access

The agent is reachable via web chat (port 18789), Telegram, and WhatsApp. All channels share one conversation — one mind, not three separate bots. You can also set up remote access so you don't need SSH tunnels.

Telegram Setup

# 1. Create a bot via @BotFather on Telegram (send /newbot) # 2. Save the token to the server: echo "YOUR_BOT_TOKEN" > /var/lib/osmoda/secrets/telegram-bot-token chmod 600 /var/lib/osmoda/secrets/telegram-bot-token # 3. Enable the channel: openclaw config set channels.telegram.enabled true openclaw config set channels.telegram.tokenFile /var/lib/osmoda/secrets/telegram-bot-token # 4. (Optional) Restrict to your username: openclaw config set channels.telegram.allowedUsers '["your_username"]' # 5. Restart the gateway: systemctl restart osmoda-gateway

WhatsApp Setup

# 1. Enable the channel: openclaw config set channels.whatsapp.enabled true openclaw config set channels.whatsapp.credentialDir /var/lib/osmoda/whatsapp # 2. (Optional) Restrict to your number: openclaw config set channels.whatsapp.allowedNumbers '["+1234567890"]' # 3. Restart + check logs for QR code: systemctl restart osmoda-gateway journalctl -u osmoda-gateway --since '30 sec ago' --no-pager # 4. Scan the QR code with WhatsApp → Settings → Linked Devices

Remote Access: Cloudflare Tunnel (Quick)

# Quick tunnel (no account needed, random URL, changes on restart): # Add to /etc/nixos/configuration.nix: services.osmoda.remoteAccess.cloudflare.enable = true; # Apply: nixos-rebuild switch # Check logs for the public URL: journalctl -u osmoda-cloudflared --since '1 min ago' --no-pager # Look for: trycloudflare.com URL

Remote Access: Cloudflare Tunnel (Persistent)

# With a Cloudflare account for a stable hostname: # 1. Locally: cloudflared tunnel create osmoda # 2. Copy credentials JSON to server: scp cf-creds.json root@YOUR_SERVER:/var/lib/osmoda/secrets/cf-creds.json # 3. Add to /etc/nixos/configuration.nix: services.osmoda.remoteAccess.cloudflare.enable = true; services.osmoda.remoteAccess.cloudflare.credentialFile = "/var/lib/osmoda/secrets/cf-creds.json"; services.osmoda.remoteAccess.cloudflare.tunnelId = "TUNNEL_ID"; # 4. Apply + add CNAME in Cloudflare dashboard nixos-rebuild switch

Remote Access: Tailscale

# 1. Get auth key from https://login.tailscale.com/admin/settings/keys # 2. Save to server: echo "tskey-auth-..." > /var/lib/osmoda/secrets/tailscale-key # 3. Add to /etc/nixos/configuration.nix: services.osmoda.remoteAccess.tailscale.enable = true; services.osmoda.remoteAccess.tailscale.authKeyFile = "/var/lib/osmoda/secrets/tailscale-key"; # 4. Apply — server auto-joins your Tailscale network: nixos-rebuild switch

19 Links & Resources

Everything you need to get started, contribute, or get help.

ResourceURL
GitHubgithub.com/bolivian-peru/os-moda
Homepageos.moda
Spawn (Deploy)spawn.os.moda
Telegramt.me/osmodasystems
Discorddiscord.gg/G7bwet8B
Architecturespawn.os.moda/skill (this page)
Early Accessspawn.os.moda/#early-access
Report Issuesgithub.com/bolivian-peru/os-moda/issues

The complete source code is open. Every daemon, every tool, every skill, every NixOS module — all in the repo. Install.sh is the fastest way to go from a bare server to a fully autonomous AI operating system.

Ready to give your agents an OS?

9 daemons, 83 tools, post-quantum mesh, hash-chained audit — fully configured. One command to install.

Get early access →