The bridge is a fetch-style handler (createBridge from agent-interface-protocol/server, or an app handler wrapping it like the demo’s createApplication), so it runs anywhere that can serve Request → Response on the same origin as your pages.
agentInterfacePlugin({ handle, match }) mounts the handler into vite dev and vite preview. One process serves the frontend and the bridge, with an in-memory store.

Storage

Sessions, snapshots and queued invocations live in a Storage implementation (exported from agent-interface-protocol/server). The default is in-memory and process-local:
  • Restarting the server clears every session.
  • Multiple instances don’t share state. On serverless platforms, requests for one session can land on different instances.
For any multi-instance deployment (including Vercel under load), implement Storage against a shared store such as Redis and pass it to createBridge (or your app handler). The in-memory store is fine for demos only.
The interface is small: get, set (with TTL and an optional only-if-absent flag) and take (atomic get-and-delete).