Step 5 / 5
Persist the conversation
Swap ephemeral state for SQLite, Redis, or a vector store.
Memory is another contract. Default is in-memory; for production, pick an adapter.
import { fileMemory } from '@agentskit/memory/file'
export const memory = fileMemory({ path: './threads.json' })
Hydration, serialization, and long-term storage work the same across every memory backend.