3.5 · Lesson

The Long-Term Memory API

In the previous lesson, you learned how the entity extraction pipeline automatically populates long-term memory from conversation messages. You can also add entities and preferences, and retrieve the Full definition for knowledge graph (opens in a new tab)A representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. directly using the long-term memory API.

In this lesson, you will learn the six long-term memory methods and when to use each: add_entity(), add_preference(), search_entities(), get_related_entities(), add_fact(), and search_preferences().