A chatbot with memory
Memory nodes store the conversation and recall it on the next message; each session has its own memory.
Advanced7 min
In this lesson
- Reading and writing memory
- Sessions in chat and the API
Build it yourself
This workflow is created in your account and opened in the editor, where you can change and run it.
The nodes in this workflow
Message
message
The user’s new message.
Read memory
chat
Gives this session’s summary and recent messages.
Text template
{{memory}} {{message}}
Puts the memory next to the new message.
Assistant
Claude Sonnet
Answers knowing the earlier conversation.
Reply
reply
Returns the result under this key in the API response and in chat.
Save to memory
chat
Appends the message and the reply to this session’s memory.