Session storage
WednesdayAI persists conversation history in a session store. Plugins can read session data using the plugin SDK’s session access helpers. The storage backend (file, SQLite, Postgres) and optional Redis cache are configured by the administrator — plugins do not register or replace the backend.Reading sessions from a plugin
The plugin SDK exportsloadSessionStore to read the current agent’s session store:
loadSessionStore() returns Promise<Record<string, SessionEntry>>. Each key is a session key (e.g. agent:<id>:telegram:dm:<userId>); each value is a SessionEntry.
SessionEntry shape
SessionEntry is exported from openclaw/plugin-sdk. Key fields:
Guarding against storage errors
UseStorageReadAccessError to handle permission-denied cases cleanly:
Querying conversation history
getConversationReadQuery builds a query object for filtered reads:
Session storage backends (admin config)
Backend selection and caching are administrator configuration, not plugin configuration. Fromopenclaw.json:
Restart the gateway after changing storage config:
systemctl --user restart openclaw-gateway.
Related
- Plugin SDK reference — full exported surface
- Admin: Gateway configuration — where
sessions.storagelives in the config file