Skip to content

Commit 0ac4761

Browse files
committed
docs: update agent plugin documentation to clarify persistent memory and chat state management
1 parent af5ce58 commit 0ac4761

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

  • adminforth/documentation/docs/tutorial/08-Plugins

adminforth/documentation/docs/tutorial/08-Plugins/26-agent.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,17 @@ Each item in `modes` defines a user-selectable preset in the chat UI. The select
295295

296296
The plugin adds a chat surface to the admin UI, keeps session history per admin user, and shows a mode picker when `modes` are configured.
297297

298-
## Persistent checkpointer
298+
## Persistent agent memory
299299

300-
If you do not configure `checkpointResource`, the plugin falls back to an in-memory `MemorySaver`. This is fine for local testing, but checkpoints are lost on process restart.
300+
The plugin stores visible chat history in the `sessions` and `turns` resources. This is what users see in the chat sidebar and in old conversations.
301301

302-
If you want persistent LangGraph checkpoints between requests, add a dedicated resource and pass it via `checkpointResource`.
302+
The agent also needs its own internal conversation state to continue an existing chat. If you do not configure `checkpointResource`, that internal state is kept only in the Node.js process memory. This is fine for local testing and for new chats, but it is not durable:
303+
304+
- after a server restart, users can still see old chat messages because `sessions` and `turns` are stored in your database
305+
- after a server restart, users can continue an old chat, but the agent will treat it like a new conversation because its internal state was lost
306+
- new chats will work normally again until the next restart
307+
308+
For production, configure `checkpointResource` so the agent can safely continue old chats after restarts and deployments.
303309

304310
You can use your own table and field names. The plugin does not require a specific schema name, only a mapping for these logical fields:
305311

0 commit comments

Comments
 (0)