Short-term memory with checkpointers and threads
Notebook· 03.02· 120–150 min· Lesson 28 of 129
The notebook opens in your lab, in a new tab. If your server is stopped, it starts first (a few seconds).
By the end you can
- Add short-term memory to an agent with
checkpointer=InMemorySaver()and athread_id. - Inspect saved state with
get_stateandget_state_history, and explain what a checkpoint is. - Persist conversations across kernel restarts with
SqliteSaver(viamastery.memory.make_checkpointer). - Keep custom state fields in the thread, edit state with
update_state, and delete a thread. - Avoid the Windows file-locking traps of SQLite files.
Before you start
Lesson 03.01.
Python in this lesson
Python guideNew herefinallysqlite3
