Agent Recall

Your AI agent forgets everything between sessions

Agent Recall gives your coding agents persistent memory. Facts, people, decisions — remembered across every session. Open source, local-first, MCP native.

v0.2.2321 testsMITPython 3.10+py.typed
pip install 'agent-recall[mcp]'
agent-recall generate acme-project
--- Agent Briefing: acme-project ---

Key People:
  Alice — Lead Engineer, prefers async
  Bob — Product Manager, owns roadmap

Recent Decisions:
  API migration approved (Feb 12)
  Auth service blocked — waiting on Alice

Active Context:
  Sprint 14, 3 days remaining
  Focus: auth service unblock
Works withClaude CodeCursorWindsurfClineAny MCP client

Context that compounds

1

Without memory

> Who is Alice?

I don't have any context about Alice.

Every session starts from zero.

2

Session 1 saves facts

create_entities: Alice (person)

set_slot: role = "Lead Engineer"

add_observation: "prefers async"

Agent saves what it learns through MCP tools.

3

Session 2 starts smart

Agent Briefing loaded

Alice — Lead Engineer

Prefers async communication

API migration approved Feb 12

Context compounds. Every session builds on the last.

How it works

1

Agent saves facts

Your agent calls MCP tools to save entities, observations, and relations as it works. Nine tools for full CRUD.

2

Stored in SQLite

Everything persists in a local SQLite database with WAL mode. Scoped by project — same person, different context per scope.

3

Briefing at startup

Next session, an AI-generated briefing loads automatically. Key people, recent decisions, active context — summarized, not dumped.

Quick Start

1. Install

pip install 'agent-recall[mcp]'
agent-recall init

2. Add to your editor

.mcp.json (Claude Code, Cline) or editor settings (Cursor, Windsurf)

{
  "mcpServers": {
    "memory": {
      "command": "python3",
      "args": ["-m", "agent_recall.mcp_server"]
    }
  }
}

3. Auto-briefing hook

claude_code_hooks.json — loads briefing at session start

{
  "hooks": {
    "SessionStart": [{
      "type": "command",
      "command": "agent-recall brief"
    }]
  }
}

4. Verify

agent-recall status
Database: ~/.agent-recall/frames.db
Entities: 27
  client: 11, person: 8, company: 1
  concept: 2, entity: 3, topic: 2

Scoped Memory

Same person, different contexts per project. Alice is "Engineer" at Acme, "Consultant" at BetaCorp. Data stays isolated by scope hierarchy.

AI Briefings

Summaries, not data dumps. Reads 147 facts, generates key people, current tasks, recent decisions. Bring your own LLM.

Multi-Agent Ready

Built for agencies. Scope hierarchy lets each agent read/write within its scope chain while sharing one knowledge base.

Local-First

SQLite on your machine. WAL mode for concurrent access. Your data stays yours — no cloud, no vendor lock-in.

MCP Native

Nine tools over Model Context Protocol. Works with any MCP client — Claude Code, Cursor, Windsurf, Cline.

Full History

Bitemporal tracking — know what was true when, not just what's true now. Full temporal history on every slot.

Code examples

Python API

from agent_recall import MemoryStore, ScopedView

with MemoryStore() as store:
    alice = store.resolve_entity("Alice", "person")
    store.set_slot(alice, "role", "Lead Engineer", scope="acme")
    store.add_observation(alice, "Prefers async", scope="acme")

    view = ScopedView(store, ["global", "acme"])
    entity = view.get_entity("Alice")
    print(entity["slots"]["role"])  # "Lead Engineer"

CLI

$ agent-recall init
Database initialized: ~/.agent-recall/frames.db

$ agent-recall set Alice person role Engineer
Alice.role = Engineer

$ agent-recall search "engineer"
  Alice (person)
  Boris Bederman (person)

$ agent-recall generate my-agent --force
Generated: ~/.agent-recall/context_cache/my-agent.md

9 MCP tools your agent gets

create_entitiesadd_observationscreate_relationssearch_nodesopen_nodesread_graphdelete_entitiesdelete_relationsdelete_observations

Multi-agent YAML config

hierarchy:
  agency:
    children: [client-a, client-b]

briefing:
  backend: cli
  model: sonnet
  adaptive: true

agents:
  coordinator:
    model: opus
  client-a:
    template: client

Bring Your Own LLM

from agent_recall import generate_briefing, LLMResult

def my_llm(prompt, model, timeout):
    response = call_your_api(prompt)
    return LLMResult(
        text=response.text,
        input_tokens=0,
        output_tokens=0
    )

generate_briefing(
    "my-agent",
    llm_caller=my_llm,
    force=True
)

How it compares

FeatureAgent RecallMem0ZepLangGraph
DeploymentLocal SQLiteCloud-firstSelf-hostedPostgres/SQLite
Multi-tenantScope hierarchyUser IDsOrg-basedThread-based
AI BriefingsBuilt-inNoNoNo
MCP IntegrationNative (9 tools)Yes (OpenMemory)NoNo
Temporal queriesBitemporalNoNoNo
CostFree foreverFree tier + paidSelf-hostFree
LicenseMITApache 2.0*Apache 2.0Apache 2.0

* Apache 2.0 with feature gating on some capabilities

Born in production

Extracted from a real system running 30+ concurrent AI agents in production. Not a weekend experiment — battle-tested infrastructure that handles real workloads daily.

321

tests

12

modules

WAL

SQLite mode

30+

agents in production

Tech stack

PythonSQLiteMCPFastMCPYAMLJinja2Clickpy.typed

Give your agents persistent memory

Open source. Local-first. MIT licensed. One pip install away.

pip install 'agent-recall[mcp]'