Retrieve
This is the Retrieve stage of Working with Context. Retrieve relevant context after you ingest data and optionally shape the graph.
Use graph.search to retrieve context from a user graph or a Context Graph addressed with graph_id.
For an agent-memory workflow, Zep also produces several context types from a user’s graph. You can use three methods to assemble these types for an agent.
Context types
Each method assembles one or more context types into a string. The default Context Block can include all six types when they are available and relevant.
Read the context types overview to compare the types.
Available methods
Choosing a method
Use Zep’s Context Block when you want Zep to select and format relevant context.
Use context templates when you need a consistent format and automatic relevance detection.
Use custom construction when you must control the query, selected results, or format.