Bypass the memory deduction phase and directly store pre-defined memories for efficient retrieval
📢 Announcing our research paper: Zentry achieves 26% higher accuracy than OpenAI Memory, 91% lower latency, and 90% token savings! Read the paper to learn how we're revolutionizing AI agent memory.
The Direct Import feature allows users to skip the memory deduction phase and directly input pre-defined memories into the system for storage and retrieval.
To enable this feature, you need to set the infer parameter to False in the add method.
Copy
messages = [ {"role": "user", "content": "Alice loves playing badminton"}, {"role": "assistant", "content": "That's great! Alice is a fitness freak"}, {"role": "user", "content": "Alice mostly cook at home because of gym plan"},]client.add(messages, user_id="alice", infer=False)
You can see that the output of add call is an empty list.
Only messages with the role “user” will be used for storage. Messages with roles such as “assistant” or “system” will be ignored during the storage process.