The Snug Protocol · open spec · MIT

Your software shouldn't need a landlord.

Snug lets AI-native apps live with you — your app, your data, your choice of intelligence.

Build personal apps with an AI agent, keep the app and its state in a portable .snug file, and let the host supply the intelligence at runtime.

the playground, real time — describe an app, watch it get built, run it.

the thesis

Agents are becoming portable. Tools are becoming standardised. Models are already interchangeable. Why are the applications they create still trapped?

An AI-generated application today usually stays where it was made — tied to the platform that generated it, the runtime that executes it, the backend that stores its rows, or the model environment it was written against. Every other layer of the stack learned to move. The application did not.

Snug draws the boundary somewhere else: the application and its accumulated state belong to the user, and the intelligence is supplied by the host at runtime. That is one design decision, and the rest of this page is what follows from it.

Own it.

The application and its accumulated state can live in a .snug file you control — real SQLite, openable with ordinary tools.

Move it.

Take the application between compatible Snug hosts, and change the intelligence behind it without rebuilding the app around another provider.

Keep it private.

The app needs no SaaS backend of its own. Pair Snug with local inference when the workload has to stay on-device.

the runtime agent bridge

The app is a body.
The agent is its mind.

A Snug app doesn't bundle a model — it sends versioned JSON envelopes to whatever agent its host runs, and animates the reply. Here is a chess app asking the host agent for its move, verbatim.

Thirteen frame types, all published as JSON Schemas. Read the wire protocol →

what ownership buys

What changes when the app belongs to you.

The intelligence isn't trapped inside the app

The host supplies the intelligence at runtime, so you can change models without rebuilding the application around another provider. Each app carries a compact runtime contract — what it is, what a good answer looks like — so its turns cost ~nothing and the same app runs well on a frontier model or a small local one.

The app and its state are yours

Code, versions, the app's own isolated data and its chats live in one portable .snug file — real SQLite, openable with ordinary tools, optionally sealed with a passphrase only you hold. Move it between compatible hosts, sync it where you choose, and leave whenever you like with everything.

Credentials stay outside generated code

Apps run in a hard sandbox with no network of their own. Connected requests pass through the host boundary, so your credentials never enter generated app code, never reach the model, and never reach a publisher — every call is made by a host executor inside a ceiling you approved and the host froze.

See how it works — six diagrams →

personal software

Not every app needs to become a service.

A budget tracker. A reading log. A personal CRM. A family organiser. A research tool for one recurring question. None of these are businesses — and none of them should need another account, another application-specific cloud database, and another company accumulating a permanent copy of what you put in.

Snug lets the application and its accumulated state live with you instead.The app runs against the intelligence your host provides, and everything it remembers stays in your .snug file — no backend of its own to sign up for, and nothing for a shutdown notice to take away.

for implementors

Ship the app platform
your product was missing.

Your product already has an AI assistant. Snug makes it an app platform: users describe tiny apps in your chat, the assistant writes them, and they run in a hard sandbox against your agent — with their own storage, versioning, and a security model that has already been attacked in anger.

  • An open spec — thirteen frames, published JSON Schemas, MIT.
  • A production reference implementation — runner, SDK, portable user database, credential broker, all extracted from a shipped system.
  • A whitepaper that argues the design — threat model and security properties included, not implied.
// a Snug app is one HTML file; the SDK is the bridge
const { isReady, sendMessage } = useSnugApp({ appId: 'ember-chess', displayName: 'Ember Chess' });
const db = useAppDB();

// the host agent is the app's brain — one call
const reply = await sendMessage('opponent-move', { lastMove: 'e7e5' });

// per-app isolated storage in the user's own file
if (reply.ok) await db.exec('INSERT INTO moves (san) VALUES (?)', [reply.data.move]);

Software that stays yours.

Yours in the oldest sense: it sits with you, works for you, and comes along when you go. Build one in about a minute and see what you end up holding.