# samo.host — Agent Onboarding Guide (v2.0) # Real hardened Linux VMs for humans and AI agents, with instant ZFS + Postgres 19 branching. ## 1. Quickstart CLI samo new agent-01 --agents claude,codex,agy # Provision ZFS-backed sandbox + private HTTPS URL samo fork agent-01 fix-auth-42 --clone-dblab # Instant ZFS CoW clone + Postgres 19 DBLab clone samo exec agent-01 -- "bun test" # Pinned-key PQC SSH + unprivileged systemd-run boundary samo host fix-auth-42 --private # Private-by-default HTTPS URL via Caddy / CF Access samo env create --app pgroast --branch feat-19 # Per-branch preview env on DBLab PG19 thin clone samo db upgrade --rehearse --target 19.2 # SamoDB AAA clone rehearsal (Analyst -> Actor -> Auditor) samo crypto audit # CNSA 2.0 / Dec 2026 PQC posture check samo patch --auto # ZFS snapshot-before-patch + health/RLS auto-rollback ## 2. Host-Side Credential Proxy Contract - NEVER ask for or store raw Anthropic, OpenAI, Google, Cloudflare, or Hetzner keys in a sandbox. - Sandboxes receive a short-lived scoped proxy token (SAMO_PROXY_TOKEN=samo_px_...) in root-owned /etc/samo/sandboxes//proxy.env (0640 root:samo-sb-), outside the ZFS dataset. - Route API traffic through the loopback proxy: ANTHROPIC_BASE_URL=http://127.0.0.1:/proxy/api.anthropic.com OPENAI_BASE_URL=http://127.0.0.1:/proxy/api.openai.com/v1 - Tokens can be revoked immediately without rotating master keys. ## 3. SamoDB Safety Invariants (AAA Pattern) - Analyst: Read-only telemetry (pg_stat_statements, auto_explain, pg_stat_kcache). Zero prod writes. - Actor: Clones prod on ZFS/DBLab, rehearses migrations & upgrades with amcheck + RLS probes. - Auditor: Independent model family signs off on rehearsal evidence before cutover. - Never touch production without a verified ZFS snapshot rollback path. ## 4. Machine-Readable Control Plane Endpoints GET /api/v1/health Liveness & state source (live ~/.samohost/ vs demo) GET /api/v1/fleet VMs, apps, DBLab PG19 preview clones (Bearer auth required off-loopback) GET /api/v1/samodb/levels SAE automation levels (0-5) & AAA rehearsal ledger GET /api/v1/crypto/policy CNSA 2.0 PQC cryptographic policy & measured audit status GET /api/v1/billing/plans Managed VM plans and Stripe billing configuration POST /api/v1/billing/quote Calculate monthly managed quote and promo savings POST /api/v1/billing/checkout Create Stripe Checkout session (requires STRIPE_SECRET_KEY)