SNA

Core Concepts

The shape of SNA's runtime. Server, session manager, runtimes, history.

SNA is a Hono HTTP/WebSocket server that owns a long-lived process per session. The server is runtime-agnostic. Claude Code, Codex, and OpenCode each implement a common AgentProvider interface, so a single session can swap runtimes without losing context.

SnaClient
   │   HTTP (request/response, ordering)
   │   WS   (live events, fanout)

Hono server  ──►  SessionManager

                       ├─ Session (per session id)
                       │     ├─ AgentProcess  ◄── spawn(provider, cwd, ...)
                       │     ├─ Event buffer (in-memory, cursor-keyed)
                       │     └─ RuntimeSession chain (config history)

                       └─ Canonical history (SQLite)

Read order

For the on-the-wire protocol details (HTTP routes, WebSocket ops, event types), see API Spec.

On this page