Skip to content

That's just a taste — their profile full of gems!

Visit profile
User avatar
Kenneth Mendoza
July 2298

Agents That Actually Remember

I’ve been thinking a lot about what actually makes an AI agent feel useful.

Not just “it remembers my last message,” but “it understands who I am, what I care about, and how those things connect.”

That’s the jump you get when you move from basic short-term memory into relational long-term memory.

With n8n + Zep, I can give an agent more than a rolling context window. I can give it a memory system that stores entities, preferences, relationships, and patterns over time.

So instead of only remembering the last few exchanges, the agent can understand things like:

  • what tools I use
  • what kind of content I make
  • what topics I care about
  • how different ideas connect to each other

That changes the quality of the response completely.

If I ask for content ideas, the agent doesn’t need me to restate my whole world. It can pull from what it already knows and give me something tailored. That’s the part that feels like the next evolution of agents.

But here’s the builder lesson:

Blindly adding long-term memory is a great way to burn tokens fast.

That’s the trap.

A lot of people wire in memory and assume more context = better agent. In practice, if you dump the full graph and full conversation history into every prompt, your costs climb fast and most of that context isn’t even relevant to the task.

So the smarter setup is a hybrid memory architecture.

I’d break it up like this:

Short-term memory handles recent conversation context.
Long-term memory handles durable facts, preferences, entities, and relationships.

That separation matters.

What I liked most here was the move away from relying only on the native memory integration and instead using HTTP requests to Zep directly. That gives way more control.

Instead of passing everything into the model, I can:

  • query the user graph directly
  • score for relevance
  • only return a few facts
  • set a threshold so low-signal memories don’t get injected

That’s the kind of implementation detail I love because it’s not flashy, but it’s what makes the system usable at scale.

In my builds, I’d much rather give the agent 3 highly relevant facts than 40 loosely related ones.

Same idea with conversation memory.

For short-term context, using a dedicated store like Postgres makes a lot of sense when I want tighter control over ordering and retrieval. Then I can let Zep focus on what it’s best at: building and maintaining the user knowledge graph.

That gives me a cleaner pattern:

recent context from one place, durable memory from another, merged right before inference.

Simple. Practical. Cheaper.

One detail I think more people should pay attention to is the session ID strategy.

That’s what makes this usable in real workflows.

If I map a Telegram chat ID, email address, CRM contact ID, or customer ID to the memory layer, the agent can maintain unique long-term memory per user. That’s where this gets really interesting for onboarding, support, education, recruiting, or sales follow-up.

Every user gets their own memory graph.
Every future interaction gets smarter.

That’s the unlock.

I also liked the very real reminder that you don’t need to be some deep backend engineer to make this work. A lot of the cleanup can happen with a code node, and honestly, that’s how I build too: inspect the JSON, shape it, keep moving.

No magic. Just good workflow design.

My big takeaway:

The future of agents isn’t just better models. It’s better memory design.

Not more memory.
Better memory.

The winning pattern looks a lot like this:

keep short-term memory tight, keep long-term memory structured, retrieve only what matters, and don’t pay tokens for context the model doesn’t need.

That’s how I’d build agents that feel more human without turning the prompt into a landfill.

If you’re building in n8n, this is absolutely a direction worth exploring.

#automation#nocode#aiautomation#aiagents#workflows#n8n#zep#agentmemory
Like
Dislike

24

10

Add a comment...