Genkit categorizes agent data into two types: custom state is typed application data driving the next turn (e.g., workflow state, task list); artifacts are generated outputs that can be independently reviewed, downloaded, or versioned (e.g., reports, code patches). Tools can update both during a session, with Genkit streaming changes to the client in real-time.
For persistence, the framework offers two paths. With a configured session store, the agent is server-managed: messages, state, and artifacts are persisted as snapshots, and clients reconnect using a session ID. Genkit includes built-in stores for Firestore (production multi-instance), memory (development), and file (local testing), with support for custom implementations. Without a configured store, the client-managed approach is used: the server returns the full state, and the client sends it back on each interaction. EBENEZER DON (AI engineer) notes that the client-managed mode is suitable for temporary sessions or strict data residency requirements, but at the cost of increased network payload as the conversation grows.