Key Concepts
Looking to just get coding? Check out our Quickstart.
Zep is a context engineering platform that systematically assembles personalized context—user preferences, traits, and business data—for reliable agent applications. Zep combines Graph RAG, agent memory, and context assembly capabilities to deliver comprehensive personalized context that reduces hallucinations and improves accuracy.
Concepts Table
Use Cases Table
What is Context Engineering?
Context Engineering is the discipline of assembling all necessary information, instructions, and tools around a LLM to help it accomplish tasks reliably. Unlike simple prompt engineering, context engineering involves building dynamic systems that provide the right information in the right format so LLMs can perform consistently.
The core challenge: LLMs are stateless and only know what’s in their immediate context window. Context engineering bridges this gap by systematically providing relevant background knowledge, user history, business data, and tool outputs.
Using business data and/or user chat histories, Zep automatically constructs a temporal knowledge graph to reflect the state of an object/system or a user. The knowledge graph contains entities, relationships, and facts related to your object/system or user. As facts change or are superseded, Zep updates the graph to reflect their new state. Through systematic context engineering, Zep provides your agent with the comprehensive information needed to deliver personalized responses and solve problems. This reduces hallucinations, improves accuracy, and reduces the cost of LLM calls.
How Zep Fits Into Your Application
Your application sends Zep business data (JSON, unstructured text) and/or messages. Business data sources may include CRM applications, emails, billing data, or conversations on other communication platforms like Slack.

Zep automatically fuses this data together on a temporal knowledge graph, building a holistic view of the object/system or user and the relationships between entities. Zep offers a number of APIs for adding and retrieving memory. In addition to populating a prompt with Zep’s engineered context, Zep’s search APIs can be used to build agentic tools.
The example below shows Zep’s memory.context
field resulting from a call to thread.get_user_context()
. This is Zep’s engineered context block that can be added to your prompt and contains facts and graph entities relevant to the current conversation with a user. For more about the temporal context of facts, see Managing changes in facts over time.
Context Block
Zep’s Context Block is Zep’s engineered context string containing relevant facts and entities for the thread. It is always present in the result of thread.get_user_context()
call and can be optionally received with the response of thread.add_messages()
call.
Zep’s context block can either be in summarized or basic form (summarized by default). Retrieving basic results reduces latency (P95 < 200 ms). Read more about Zep’s Context Block here.
Summary (default)
Basic (fast)
You can then include this context in your system prompt: