Skip to main content

Overview

This template demonstrates SessionPlugin — payer-scoped key-value storage gated by x402 payment identity. Each x402 signer gets isolated storage that persists across requests. Two different payers never see each other’s data.

Project Structure

Session Store

SessionPlugin is auto-registered by the build pipeline. To customize the store, create app/session.ts:
app/session.ts
If app/session.ts is not present, the default InMemorySessionStore is used automatically.

Using Sessions in Tools

Tools access the session via getSession() — no need to pass payer identity manually:
app/tools/put-content.ts

Skills

Running

SessionPlugin API

Full API reference for SessionPlugin, Session, and SessionStore.

x402 Payments

Payment protocol that provides payer identity for sessions.