DEV Community

MarsH
MarsH

Posted on • Originally published at agentrecall.cloud

Your AI Agent Forgets Everything Between Sessions — Here's the Fix

Your AI Agent Forgets Everything Between Sessions — Here's the Fix

You build an AI agent. It's brilliant in one conversation. Then the session ends, and it forgets everything. The user's name, their preferences, the bug you just fixed, the context you spent 20 minutes building. Gone.

This is the #1 problem with AI agents today. Not accuracy. Not speed. Memory.

AgentRecall fixes this. It's an open-source memory SDK that gives your agents persistent, intelligent memory across sessions. Three lines of code.

The Problem

Every AI agent framework has the same blind spot: memory.

Session 1: "I prefer dark mode, use tabs not spaces, my API key is xxx"
Session 2: "What theme should I use?" → Agent has no idea.
Enter fullscreen mode Exit fullscreen mode

You can hack together a solution with vector stores, but then you're managing embeddings, similarity thresholds, and context windows. That's infrastructure work, not agent work.

The Fix

AgentRecall is a drop-in memory layer for any AI agent. It handles storage, search, classification, and relevance scoring — so your agent remembers what matters and forgets what doesn't.

Python:

from agentrecall import MemoryStore

store = MemoryStore()
store.remember("User prefers dark mode, tabs over spaces", agent="my-agent")
memories = store.recall("What theme should I use?", agent="my-agent")
# → returns the preference, scored by relevance
Enter fullscreen mode Exit fullscreen mode

Node.js:

import { MemoryStore } from "agentrecall";

const store = new MemoryStore();
await store.remember("User prefers dark mode, tabs over spaces", { agent: "my-agent" });
const memories = await store.recall("What theme should I use?", { agent: "my-agent" });
// → returns the preference, scored by relevance
Enter fullscreen mode Exit fullscreen mode

That's it. SQLite by default. No servers, no config, no infrastructure.

What Makes It Different

Semantic Recall

Not keyword matching. When your agent searches for "UI preferences," it finds "dark mode" and "tabs over spaces" — because the SDK understands meaning, not just words.

Confidence Decay

Memories fade over time unless reinforced. That bug fix from 3 months ago? Lower priority. The preference the user mentioned yesterday? Top of the list. This mimics how human memory works.

Auto-Classification

Memories are automatically tagged as preferences, corrections, facts, or temporal. Your agent can filter by category — search only corrections when debugging, only preferences when personalizing.

Graph Relationships (Cloud)

The cloud version uses Neo4j to build a knowledge graph. Memories aren't just documents — they're connected. "User works at Company X" links to "Company X uses AWS" links to "AWS costs $400/mo." Traverse the graph to find insights no vector store can.

Multi-Agent Support

Multiple agents share the same memory store with isolated namespaces. Your support agent and your coding agent can both use AgentRecall without stepping on each other's memories.

Cloud vs Local

Open Source Cloud
Price Free $3/agent/month
Storage SQLite (local) Managed hosting
Search Keyword + optional embeddings Semantic + graph
Features Full SDK Dashboard, AI processing, graph memory
Privacy Data never leaves your machine Encrypted, SOC2-ready

Start local. Move to cloud when you need graph relationships or a team dashboard.

Real Use Cases

Customer Support Agent — Remembers every customer interaction. When a customer returns, the agent pulls up their history, open issues, and preferences. No more "can you repeat that?"

Coding Agent — Remembers your project conventions, past debugging sessions, and architectural decisions. "How did we fix the last auth bug?" → instant answer.

Personal Assistant — Remembers your schedule patterns, communication preferences, and recurring tasks. Gets smarter every session.

Multi-Agent Workflows — Agent A researches, Agent B writes code, Agent C reviews. All share context through AgentRecall. No information lost between handoffs.

Getting Started

1. Install

# Python
pip install agentrecall-sdk

# Node.js
npm install agentrecall-ai-sdk
Enter fullscreen mode Exit fullscreen mode

2. Store a memory

from agentrecall import MemoryStore

store = MemoryStore()
store.remember("User is building a SaaS for AI agents", agent="builder")
Enter fullscreen mode Exit fullscreen mode

3. Recall when needed

memories = store.recall("What is the user working on?", agent="builder")
# → "User is building a SaaS for AI agents" (score: 0.95)
Enter fullscreen mode Exit fullscreen mode

Cloud Mode (optional)

from agentrecall import CloudClient, AgentMemoryConfig

config = AgentMemoryConfig(
    cloud_url="https://api.agentrecall.cloud",
    api_key="your-key"
)
client = CloudClient(config)
client.remember("Important context", agent="my-agent")
memories = client.recall("What context do I have?", agent="my-agent")
Enter fullscreen mode Exit fullscreen mode

Under the Hood

AgentRecall uses a hybrid scoring algorithm:

relevance = semantic_similarity × confidence × importance × recency
Enter fullscreen mode Exit fullscreen mode
  • Semantic similarity — How closely does the memory match the query?
  • Confidence — Decays over time unless the memory is accessed or reinforced
  • Importance — High/medium/low, set by you or auto-classified
  • Recency — Newer memories score higher, all else being equal

This means the most relevant, recent, and important memories surface first. Not just the ones that happen to share keywords.

What's Next

We're building toward a future where every AI agent has persistent memory by default. Not as an afterthought. Not as a vector store you bolt on. As a core primitive.

Try it now:


AgentRecall is open source (MIT). Python and Node.js SDKs, local-first, zero config. Built because I got tired of my agents having amnesia.

Top comments (0)