Context Engineering
|

Zep assembles the right context from chat history, business data, and user behavior. Automatically. 200ms retrieval. Three lines of code.

Start shipping fast, reliable, and personalized agents

Trusted by developers at

WebMD
Mattle
Praktika.ai
Swiggy
AGI Inc
Harper
Heal
OpenRecovery
Merlin
Batteril
Thrive AI Health
FlockX
Athena
College Journey
Jiffy
Axialent
Steno AI
Amazon Web Services
WebMD
Mattle
Praktika.ai
Swiggy
AGI Inc
Harper
Heal
OpenRecovery
Merlin
Batteril
Thrive AI Health
FlockX
Athena
College Journey
Jiffy
Axialent
Steno AI
Amazon Web Services

Why Agents Fail

Agents don't fail because the model is bad. They fail because they don't have the right context.

Chat Memory

Chat-only. Blind to business data, app events, and what the user did yesterday.

Static RAG

Stale and incomplete. Doesn't reflect what just happened or how facts have changed.

Tool Calls

Slow and unpredictable. The LLM decides when to call them. It often guesses wrong.

Context is scattered across systems. Your agent sees pieces, not the picture.

End-to-End Context Engineering

Zep connects your data sources, builds a unified view of your users, and delivers assembled context to your agent. One pipeline. One API.

How Zep Works - Data flow diagram showing the transformation from raw data sources through knowledge graph construction to delivered context

Every Source

Chat history, CRM, app events, documents. Zep ingests from anywhere and builds a unified knowledge graph that stays current as data changes.

Chat
Documents
JSON

Built for Real-Time

Voice agents, video agents, live support. No latency issues.

<200ms
P95 Retrieval Latency

Three Lines of Code

Works with your favorite agent framework, or none at all.

example.py
# Add messages and get context
response = client.thread.add_messages(
    thread_id=thread_id,
    messages=messages,
    return_context=True
)
print(response.context)

# Returned Context

Emily Painter is a user with account ID Emily0e62 who uses digital
art tools for creative work. She maintains an active account with
the service, though has recently experienced technical issues with
the Magic Pen Tool. Emily values reliable payment processing and
seeks prompt resolution for account-related issues.


# These are the most relevant facts and their valid date ranges
# format: FACT (Date range: from - to)

  - Emily is experiencing issues with logging in.
    (2024-11-14 02:13:19+00:00 - present)
  - User account Emily0e62 has a suspended status due to payment
    failure. (2024-11-14 02:03:58+00:00 - present)
  - user has the id of Emily0e62 (2024-11-14 02:03:54 - present)
  - The failed transaction used a card with last four digits 1234.
    (2024-09-15 00:00:00+00:00 - present)
  - The reason for the transaction failure was 'Card expired'.
    (2024-09-15 00:00:00+00:00 - present)
  - user has the name of Emily Painter
    (2024-11-14 02:03:54 - present)
  - Account Emily0e62 made a failed transaction of 99.99.
    (2024-07-30 00:00:00+00:00 - 2024-08-30 00:00:00+00:00)

From Scattered Data to Ready Context

1

Ingest

Chat messages, JSON business data, documents. Zep extracts entities, relationships, and facts automatically.

2

Graph

A temporal knowledge graph that evolves with every interaction. When facts change, old ones are invalidated. History preserved, accuracy maintained.

3

Assemble

When your agent needs context, Zep retrieves what's relevant and formats it for your LLM. Token-efficient. Ready to use.

tobi lutke avatar
tobi lutke@tobi·Jun 18, 2025
I really like the term "context engineering" over prompt engineering. It describes the core skill better: the art of providing all the context for the task to be plausibly solvable by the LLM.
Andrej Karpathy avatar
Andrej Karpathy@karpathy·Jun 25, 2025
+1 for "context engineering" over "prompt engineering". People associate prompts with short task descriptions you'd give an LLM in your day-to-day use. When in every industrial-strength LLM app, context engineering is the delicate art and science of filling the context window
What Zep Delivers

From raw data to ready context

R

Robbie

2024-09-07 14:27

I only wear Adidas shoes. I love them!

Facts

  • Robbie only wears Adidas shoes.
  • Robbie strongly favors Adidas shoes.
R

Robbie

2024-10-14 09:12

My shoes fell apart and I need to return them. I'm super angry! I'll be wearing Nike going forward!

Facts

  • Robbie only wears Adidas shoes.
  • Robbie strongly favors Adidas shoes.
  • Robbie's Adidas shoes fell apart.
  • Robbie needs to return their shoes.
  • Robbie is angry about their Adidas shoes falling apart.
  • Robbie intends to wear Nike shoes in the future.

Agent Memory

Persistent context across sessions. Preferences, conversation history, business relationships. Always there when your agent needs it.

Explore Agent Memory
Graph RAG visualization showing connected business knowledge nodes

Graph RAG

Relationship-aware retrieval over dynamic data. Your business context, connected and current.

Discover Graph RAG
await client.context.createContextTemplate({
    templateId: "template1",
    template: `# USER PROFILE
%{user_summary}

# RELEVANT FACTS
%{edges limit=10}

# RELEVANT ENTITIES
%{entities limit=2 types=[person,organization]}`
});

Context Assembly

Pre-formatted context blocks optimized for LLMs. No manual prompt construction.

See Context Assembly

Zep is the State of the Art in Context Engineering

Zep is the current state-of-the-art in agent memory, excelling in the LongMemEval benchmark, a challenging evaluation that closely models enterprise use cases.

Read the Paper
100%+

Accuracy Improvements

Agents perform better when provided with the right context at the right time.

90%

Latency Reduction

Optimized context retrieval delivers the right information without overwhelming LLMs with irrelevant data.

98%

Token Efficiency

Smart context assembly reduces token usage while maintaining comprehensive understanding.

Zep is one of the most exciting things I've seen for real-world agent use cases in a long time. Their innovative approach is truly game-changing.
Ken Collins
Ken Collins
VP of Product, Torq and GenAI Expert
Zep just introduced a game-changing way for AI agents to remember and learn. Unlike other systems that only retrieve static documents, Zep uses a temporal knowledge graph to combine conversations and structured business data, keeping track of how things change over time.
Lior Sinclair
Lior Sinclair
Founder/CEO, AlphaSignal
Zep AI was instrumental in enabling the Sidekick's personalized experience through dynamic memory retrieval. Their innovative tech stack is powering groundbreaking projects like ArtPrize 2024, taking personalized AI experiences to the next level.
Mark Losey
Mark Losey
CTO at Flockx
Zep AI empowers AI systems to think and remember like humans. By organizing memories into structured episodes and extracting key insights, it builds smarter, more intuitive AI agents that revolutionize how businesses harness intelligence.
Vijay Morampudi
Vijay Morampudi
Senior Director - AI CoE, Axtria
Zep is one of the most exciting things I've seen for real-world agent use cases in a long time. Their innovative approach is truly game-changing.
Ken Collins
Ken Collins
VP of Product, Torq and GenAI Expert
Zep just introduced a game-changing way for AI agents to remember and learn. Unlike other systems that only retrieve static documents, Zep uses a temporal knowledge graph to combine conversations and structured business data, keeping track of how things change over time.
Lior Sinclair
Lior Sinclair
Founder/CEO, AlphaSignal
Zep AI was instrumental in enabling the Sidekick's personalized experience through dynamic memory retrieval. Their innovative tech stack is powering groundbreaking projects like ArtPrize 2024, taking personalized AI experiences to the next level.
Mark Losey
Mark Losey
CTO at Flockx
Zep AI empowers AI systems to think and remember like humans. By organizing memories into structured episodes and extracting key insights, it builds smarter, more intuitive AI agents that revolutionize how businesses harness intelligence.
Vijay Morampudi
Vijay Morampudi
Senior Director - AI CoE, Axtria

Customized for Your Domain

Zep adapts to your business through custom entity types and relationship models. These models enable precision recall of exactly the required context, so your agents understand your business domain, not just generic conversations.

Sales and Marketing

Store lead preferences, product interests, campaign interactions, and buying signals.

Your sales agents understand prospect history, pricing discussions, and engagement patterns to personalize outreach and close deals faster.

sales_and_marketing_entities.py
class Lead(EntityModel):
    """Represents a sales lead or prospect."""
    company_size = Field(
        description="startup, SMB, mid-market, enterprise"
    )
    budget_range = Field(
        description="Budget discussed or indicated"
    )
    decision_timeline = Field(
        description="Expected decision timeframe"
    )

Built for Teams, Proven at Scale

Deploy personalized agents in days, not months. Enterprise-grade compliance meets developer-friendly APIs.

For Developers

Ship features, not context pipelines. Three lines of code to production.

TypeScript
Python
Go
Context engineering with three lines of code
Ingest business data as JSON, text, or messages
Works with your favorite agent framework, or none at all

For Engineering Leaders

Ship faster without compromising on security or compliance.

SOC 2 Type II Certified
Enterprise compliance with SOC2 Type 2 and HIPAA
Days vs. months implementation without hiring scarce AI talent
100%+ accuracy improvements through personalized context
Powered by Graphiti

Open Source Foundation

Zep's temporal knowledge graph library is open source.

Graphiti GitHub repository - Build Real-Time Knowledge Graphs for AI Agents

Start shipping fast, reliable, and personalized agents

Free tier. No credit card. Full API access.

Get Started Free

Latest from the Zep Blog

Loading latest articles...