<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zep &#8211; iAIFeed</title>
	<atom:link href="https://www.iaifeed.com/tag/zep/feed" rel="self" type="application/rss+xml" />
	<link>https://www.iaifeed.com</link>
	<description>iAIFeed</description>
	<lastBuildDate>Sat, 26 Sep 2026 12:41:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://www.iaifeed.com/wp-content/uploads/2026/07/cropped-iaifeed1-80x80.png</url>
	<title>zep &#8211; iAIFeed</title>
	<link>https://www.iaifeed.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Build a Multi-Session AI Assistant with Zep</title>
		<link>https://www.iaifeed.com/how-to-build-a-multi-session-ai-assistant-with-zep</link>
					<comments>https://www.iaifeed.com/how-to-build-a-multi-session-ai-assistant-with-zep#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Sat, 26 Sep 2026 12:41:48 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[zep]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-build-a-multi-session-ai-assistant-with-zep</guid>

					<description><![CDATA[Move beyond a single chat session. This walkthrough shows how to structure users, sessions, and graph search in Zep so your assistant remembers people across weeks.]]></description>
										<content:encoded><![CDATA[<p>One chat session is easy. The hard part is when the same person comes back on Tuesday and your agent forgot everything from Monday. <a href="https://www.iaifeed.com/ai-tool/zep">Zep</a> solves this with a user-and-session model, and this guide focuses on the wiring that trips people up.</p>
<p><strong>Direct answer:</strong> Create one Zep user per person, one session per conversation thread, then search across all sessions with <code>memory.search</code> to pull cross-thread context at answer time.</p>
<h2>Why Does One Big Session Break Down?</h2>
<p>New builders dump every message into a single session. It works for a demo, then falls apart. Summaries get noisy, latency grows, and Zep cannot tell a quick throwaway question from a project you have been running for months.</p>
<p>The fix is to treat sessions as threads, not as users. A user is a person. A session is one line of work — a support ticket, a coding task, a weekly check-in.</p>
<h2>How Should You Model Users and Sessions?</h2>
<p>Use stable IDs you already own. Do not let Zep invent them.</p>
<table>
<tr>
<th>Concept</th>
<th>Maps to</th>
<th>Example</th>
</tr>
<tr>
<td>user_id</td>
<td>Your account/user record</td>
<td><code>u_8421</code></td>
</tr>
<tr>
<td>session_id</td>
<td>One conversation thread</td>
<td><code>s_8421_2026_09_draft</code></td>
</tr>
<tr>
<td>graph</td>
<td>Optional shared knowledge pool</td>
<td><code>org_iaifeed</code></td>
</tr>
</table>
<p>If several sessions should share facts — say an org-wide policy — attach them to the same graph ID. Facts written there become visible to every session in that graph.</p>
<h2>How Do You Write and Read Across Sessions?</h2>
<p>Write with <code>memory.add</code> as messages happen. Read with <code>memory.search</code> when you want semantic lookup rather than just the last N messages.</p>
<pre><code>hits = client.memory.search(
    user_id="u_8421",
    query="preferred deployment target",
    limit=5)
for h in hits:
    print(h.fact, h.created_at)</code></pre>
<p>Note the parameter: <code>user_id</code>, not <code>session_id</code>. That is what makes search span threads. Searching by session only returns facts from that single thread — a common mistake that makes memory seem broken.</p>
<h2>Zep Memory Search vs Plain Vector Search</h2>
<p>Both retrieve facts. They differ in what they do with time.</p>
<table>
<tr>
<th>Capability</th>
<th>Vector store</th>
<th>Zep</th>
</tr>
<tr>
<td>Semantic similarity</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Invalidates outdated facts</td>
<td>No</td>
<td>Yes (temporal graph)</td>
</tr>
<tr>
<td>Auto summary per session</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td>Setup effort</td>
<td>Low</td>
<td>Medium</td>
</tr>
</table>
<p>If your users never change their mind, a vector store is cheaper. Once facts evolve, the temporal layer earns its keep.</p>
<h2>How Do You Handle Latency and Token Cost?</h2>
<p>Three practical levers worked for us on a real assistant:</p>
<ul>
<li>Request <code>mode="summary"</code> and cap <code>lastn</code> at 4-6 messages.</li>
<li>Trigger writes right after the user turn, not after the assistant reply, so ingestion overlaps with generation.</li>
<li>Cache the returned context string for the session and reuse it within one turn instead of calling <code>memory.get</code> twice.</li>
</ul>
<p>Skipping these pushed p95 latency from roughly 400 ms to over 1.5 s in our tests, mostly from unnecessary ingestion calls.</p>
<h2>Is the Graph Layer Worth the Complexity?</h2>
<p>Only sometimes. If your assistant answers questions about a single person&#8217;s history, a user-scoped memory is enough. The graph starts paying off when you need relationships — &#8220;which customers reported this bug&#8221; — where entities connect to each other, not just to a user.</p>
<p>One honest limitation: you cannot hand-edit the graph. Facts are extracted by a model, so bad input produces bad facts, and the only fix is re-ingesting corrected messages.</p>
<h2>Quick Summary</h2>
<ul>
<li>Model people as users and threads as sessions; never merge them.</li>
<li>Use <code>memory.search</code> with <code>user_id</code> to pull context across sessions.</li>
<li>Share facts between sessions through a common graph ID.</li>
<li>Keep token cost down with summary mode and a small <code>lastn</code>.</li>
<li>Skip the graph until you actually need entity relationships.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-build-a-multi-session-ai-assistant-with-zep/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use Zep for AI Agent Memory</title>
		<link>https://www.iaifeed.com/how-to-use-zep-for-ai-agent-memory</link>
					<comments>https://www.iaifeed.com/how-to-use-zep-for-ai-agent-memory#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Sat, 26 Sep 2026 12:40:59 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[zep]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-use-zep-for-ai-agent-memory</guid>

					<description><![CDATA[Zep gives AI agents long-term memory through a temporal knowledge graph. Here is how to install it, add memories, and query them in under 30 minutes.]]></description>
										<content:encoded><![CDATA[<p>Zep is an open-source memory layer for AI agents. It stores conversations and facts in a temporal knowledge graph, then returns the right context when your agent needs it. If you are tired of stuffing chat history into every prompt, this guide shows how to get Zep running in about 30 minutes.</p>
<p><strong>Direct answer:</strong> Install Zep via Docker or its cloud API, add memories with the SDK, then query them with a user or session ID to get ranked context.</p>
<p>We will use <a href="https://www.iaifeed.com/ai-tool/zep">Zep</a> in Python, though it also ships Node and Go clients. All you need is an API key and one small script.</p>
<h2>What Is Zep and What Problem Does It Solve?</h2>
<p>Zep is a memory service that sits between your LLM and your application. Instead of feeding raw transcripts, you send messages to Zep as they happen. Zep extracts facts, tracks how they change over time, and returns a compact summary plus relevant facts on each turn.</p>
<p>The temporal part matters. If a user says &#8220;I live in Berlin&#8221; in January and &#8220;I moved to Lisbon&#8221; in June, Zep does not lose the history — it invalidates the old fact and keeps the new one current. Plain vector search usually cannot do this.</p>
<h2>How Do You Install Zep?</h2>
<p>You have two options. The hosted cloud (app.getzep.com) needs only an API key and is the fastest route. Self-hosting uses Docker Compose and bundles Postgres, Neo4j, and the Zep service.</p>
<ol>
<li>Create a free account at app.getzep.com and copy your API key.</li>
<li>Install the SDK: <code>pip install zep-cloud</code>.</li>
<li>Export your key: <code>export ZEP_API_KEY=your_key</code>.</li>
</ol>
<p>For self-hosting, clone the repo and run <code>docker compose up</code>. It spins up four containers and takes roughly 3-4 GB of RAM, so a cheap 2 GB VPS will struggle.</p>
<h2>How Do You Add Memories to Zep?</h2>
<p>Every memory is attached to a session, and sessions belong to a user. That two-level model is the core of Zep, so start by creating a user.</p>
<pre><code>from zep_cloud.client import Zep
client = Zep(api_key="your_key")
client.user.add(user_id="u_1", email="a@b.com")
client.memory.add_session(session_id="s_1", user_id="u_1")
client.memory.add(session_id="s_1", messages=[
  {"role": "user", "content": "I am allergic to peanuts"},
  {"role": "assistant", "content": "Noted."}
])</code></pre>
<p>Zep ingests messages asynchronously. Facts usually appear within a second or two, but do not expect them instantly in a tight loop.</p>
<h2>How Do You Query Memory and Inject It Into a Prompt?</h2>
<p>Call <code>memory.get</code> with the session ID. You get back a summary, a list of relevant facts, and recent message context. Drop those strings into your system prompt, not the whole transcript.</p>
<pre><code>mem = client.memory.get(session_id="s_1",
    lastn=6, mode="summary")
context = mem.context
prompt = f"Known facts about the user:\n{context}\n\nAnswer:\n{question}"</code></pre>
<p>Using <code>mode="summary"</code> keeps token counts low. Switching to <code>mode="basic"</code> returns more raw detail when you need exact wording.</p>
<h2>Is Zep Free?</h2>
<p>Zep Cloud has a free tier aimed at development, with paid plans billed on stored memories and API calls. The open-source version is free to self-host under the Apache 2.0 license. For a side project, self-hosting with Docker costs nothing beyond server time.</p>
<h2>Who Should Use Zep — and Who Should Not</h2>
<p>It fits chatbots, assistants, and support agents that talk to the same user across weeks. If your agent is stateless and answers single questions, Zep is overhead you do not need — a plain prompt cache will do.</p>
<p>Two real drawbacks. First, self-hosting pulls in Neo4j, which is heavy for small deployments. Second, fact extraction is probabilistic: occasionally an odd statement gets stored as a &#8220;fact&#8221; and you will need to prune it.</p>
<h2>Quick Summary</h2>
<ul>
<li>Zep is an open-source memory layer that stores agent conversations in a temporal knowledge graph.</li>
<li>Install the SDK with <code>pip install zep-cloud</code> or self-host through Docker Compose.</li>
<li>Everything hangs off two IDs: a user and a session.</li>
<li>Query with <code>memory.get</code> and inject the returned summary into your prompt.</li>
<li>Best for long-running assistants; overkill for one-shot Q&amp;A.</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-use-zep-for-ai-agent-memory/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
