Continuing Conversations with Memory
Memory
Memory objects can be used within your Agent to remember information from previous Agent executions and user details. Memory objects are flexible to store any information you would like about previous Agent executions. For example, if your Agent needs to remember previous chat history, you can use a memory object to store that information. Memory can also be used to load in information about the user executing the Agent. For example, IDP account information such as a user location can be used in a Agent to summarize the weather for the next week without the user explicitly needing to state that information.
Creating a New Memory Object
To create a new memory object:
- Navigate to the Project you are working on in the Projects Sub Menu.
- Select the Memory tab on the top menu.
- Select “New Memory”
- Provide a name for the Memory Object.
Use the Memory Object in your Agents
Once you have created a Memory Object it can be used in your Agents:
- Go to an Agent
- On the object selector you can select the memory object
- Drag the memory object into the Agent
- There are two ways to use memory:
- Store: this allows you to write information to the memory object to be stored for later retrieval.
- Load: this allows you to retrieve the information in the memory object.
- To select whether to store or load memory you can click on the edit icon on the memory object in the Agent.
Executing an Agent with Memory
To ensure memory is being used in the Agent you can pass in a userID or conversation ID to the Agent execution call:
- The body of the Agent execution API call contains a userId and a Conversation ID
- Pass in the userID to uniquely identify the user whose memory object needs to be retrieved
- Pass in the Conversation to identify which conversation history needs to be retrieved