Conversation Memory
Conversation Memory allows BindAI agents to remember previous interactions with a user. Instead of treating every request as completely independent, the agent can retrieve earlier messages and use them as context when generating new responses. This creates conversations that feel continuous and natural.What is Conversation Memory?
Conversation Memory stores the sequence of messages exchanged between a user and an agent. For example:How It Works
Every interaction follows the same lifecycle.Automatic Integration
Attach a memory instance to an agent.Conversation Timeline
A conversation gradually grows over time.Building the Prompt
Before calling the language model, BindAI constructs a prompt containing:- system instructions
- previous conversation
- current user message
Example
Conversation begins.Multiple Conversations
Memory is usually organized by conversation or session.Conversation Growth
Over time, conversations become larger.- retain everything
- summarize older messages
- archive conversations
- remove outdated history
Memory and Context Windows
Language models have context limits. Very long conversations may exceed those limits. Applications commonly address this by:- summarizing older messages
- keeping only recent interactions
- retrieving only relevant history
- combining conversation memory with RAG
Conversation Memory vs Knowledge
Conversation Memory remembers interactions. Knowledge retrieves external information.
Both can be used together during execution.
Conversation Memory in Workflows
Conversation memory is also available inside workflows. Example:Clearing Conversations
Applications may choose to clear memory when a conversation ends. Conceptually:Best Practices
- Keep conversations focused.
- Avoid storing unnecessary messages.
- Clear memory when appropriate.
- Use summaries for long conversations.
- Combine conversation memory with knowledge retrieval for better results.
- Choose a provider that supports your persistence requirements.
