Personalized agents
Retrieve user preferences or facts from long-term memory across conversations.
AI Agents · Const
Semantic search lets a LangGraph agent retrieve memory-store items by meaning rather than exact wording. Configure semantic indexing, then provide a natural-language query to the store.
Semantic search lets an agent retrieve stored memories by meaning instead of requiring exact word matches. Configure an embedding model for the store, then pass a natural-language query to the store's search method.
await store.search(namespace, { query: string });| Name | Type | Description |
|---|---|---|
namespace | string[] | Namespace tuple identifying the memory collection to search. |
options | object | Search options containing the natural-language query. |
An array of stored items ranked by semantic similarity.
const items = await store.search(["user_123", "memories"], {
query: "I'm hungry",
});Searches a memory namespace using a natural-language query and returns semantically similar stored items.
Retrieve user preferences or facts from long-term memory across conversations.
Find relevant stored information when the query wording differs from the saved text.
Support agent workflows that search memory before generating a response.
Storesearchmemory storesemantic similarityembedding modelindexing settings