Skip to content

Snug Protocol documentation

MCP connects agents to tools. Snug connects agents to apps.

Snug is an open protocol for tiny, user-built apps that think through their host’s AI agent at runtime. A Snug app is a small sandboxed app — usually one HTML file — created through conversation. At runtime it exchanges versioned JSON envelopes with the host agent: the agent is the app’s mind, the app is a body. Users own everything as one portable .snug file.

Build an app

You mostly talk — the agent writes the app. Understand what it produces in Build your first app.

Implement the protocol

Host Snug apps in your own product or build a hub client from scratch: Implementor quickstart.

Read the spec

The complete 1.0 specification — wire protocol, portable user database, connected apps, runtime contracts — plus JSON Schemas for every frame.

Three actors, deliberately separated:

  • The user owns ONE portable SQLite file (.snug) holding every app, its data, its chats, and its settings. It runs from a browser (OPFS) or a desktop disk, syncs where the user chooses, and exports whole.
  • The hub client (a web app, a desktop shell, your product) renders apps in a hard sandbox and brokers every capability: agent turns, storage, network, navigation.
  • The LLM provider is whatever the user or host picks — the protocol is provider-neutral, and a well-built app runs on a frontier model or a small local one.

Security is architectural, not policy: app iframes get no network of their own, and credentials never enter the app, never reach the LLM, and never reach a publisher. The whitepaper argues the design; the spec makes it normative.