Notebook
openai-chatgptlangchain-pythonchatgptgenaielasticsearchelasticopenaiAIsmarter-agents-with-memorychatlogvectordatabasePythonsearchgenaistacksupporting-blog-contentvectorelasticsearch-labslangchainapplications
Export
Selective memory: Creating smart agents with Elasticsearch managed memory
This Notebook is the supporting content for the article: Selective memory: creating smart agents with Elasticsearch managed memory
We are going to use OpenAI Response API and tools to create an agent that can remember things across conversations selectively. This means based on who is talking with it will use Elasticsearch Document Level Security to retrieve the right memories.
[ ]
Initializing OpenAI and Elasticsearch
[ ]
[ ]
Creating memories index
[ ]
Sample memory
[ ]
You may see a timeout the first time because the ML nodes are warming. Wait some minutes and try again
Creating roles
[ ]
[ ]
Creating users with roles
[ ]
[ ]
Testing roles
[ ]
[ ]
Defining tools
[ ]
Creating tool functions
[ ]
[ ]
[ ]
[ ]
[ ]
Handling tools response
The response will be a list of tool calls, we must call each of the tools, and call the LLM back with the rool responses to generate the answer.
[ ]
Creating the agent
[ ]
[ ]
[ ]
[ ]