Agentmem logo

Agentmem

Stores and searches persistent agent memory in one local SQLite file through MCP, Python, CLI, or HTTP.

Install Agentmem

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "agentmem": {
      "command": "uvx",
      "args": [
        "agentmem-lite"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx agentmem-lite

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The agentmem MCP server gives AI agents persistent memory in a local SQLite database, with hybrid keyword and semantic search. It exposes 16 MCP tools for storing, recalling, updating, organizing, and extracting memories, and supports namespaces, memory tiers, version history, and maintenance operations. Run it over stdio with a configured database path, or use its Python API, CLI, or optional REST API. Reach for it when agents need information to survive across sessions without cloud services or a separate database server.

Use cases

  • Persist agent context between sessions
  • Search project facts with hybrid retrieval
  • Isolate memories by user or project namespace
  • Track changing facts with version history
  • Extract entities and decisions from conversations

Key features

  • SQLite-based persistent memory
  • Hybrid keyword and semantic search
  • Five memory tiers with expiration
  • Namespace isolation
  • Entity and conversation extraction
  • MCP, CLI, Python, and REST interfaces

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · agentmem-lite (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars10Stargazers on the source repository.
Last commit9mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Agentmem works

What agentmem MCP server does

The agentmem MCP server stores agent memory in a SQLite file and makes that data available across sessions. It supports five memory tiers: core for permanent facts, procedural for behavioral rules, learned for discovered knowledge, episodic for events, and working for short-lived task state. Working memories expire after 24 hours by default; learned and episodic memories can be compacted after 90 days.

Search combines SQLite FTS5 keyword matching with vector similarity, then applies adaptive ranking and an optional recency boost. The package can use a best-quality embedding setup, a smaller hash-based setup, or a standard-library-only mode. It also supports namespace filtering for separate users, agents, or projects.

How it works

The agentmem MCP server runs as a stdio process and reads or writes the configured SQLite database. Start it with python -m agentmem --db memory.db, then point an MCP client at that command and database path. A single database can hold memories in multiple namespaces, with prefix matching available when recalling data.

Each stored memory can be updated through a supersedes chain rather than silently overwritten. The history operation follows those versions. Regex-based extraction identifies entities such as URLs, IP addresses, ports, email addresses, environment variables, paths, mentions, hashtags, and money amounts. Conversation processing can extract facts, decisions, TODOs, configuration values, and preferences from supplied chat messages without using an LLM.

Setup and configuration

Install the package with one of the available dependency profiles:

  • pip install agentmem-lite[all] for sqlite-vec and model2vec support.
  • pip install agentmem-lite for sqlite-vec with hash embeddings.
  • pip install agentmem-lite --no-deps for the standard-library-only mode.
  • pip install -e ".[all]" when installing from a source checkout.

The MCP launch command accepts the database location through --db. The same package includes a CLI for initialization, imports, searching, maintenance, conversation processing, statistics, and export. An optional HTTP service can be started with agentmem serve-http --port 8422 or the agentmem-http command; it provides REST endpoints and CORS support.

Tools and capabilities

The agentmem MCP server exposes these tools:

  • remember, recall, and save_state for writing, searching, and preserving current task state.
  • today, forget, unarchive, and stats for retrieval and memory administration.
  • compact and consolidate for archiving old low-value entries and merging near duplicates.
  • update_memory and history for tracking changing facts.
  • related and entities for entity-based discovery.
  • get_procedures and add_procedure for behavioral rules.
  • process_conversation for extracting memory from chat history.

The Python API also imports Markdown files, while the REST interface exposes 14 endpoints corresponding to most of these operations.

Limitations and notes

Semantic search quality depends on the selected embedding backend, while the zero-dependency mode uses no external embedding package. Working-memory expiration and other cleanup behavior require the relevant maintenance operations or configured defaults. The MCP interface is documented for stdio; HTTP is provided separately as a REST API.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agentmem

agentmem is an MCP server that connects AI agents to a local SQLite memory store. Its main tools support hybrid recall, remembering data, saving task state, updating and tracing facts, managing procedures, finding entities, consolidating memories, and extracting information from conversations.

Install it with pip using `agentmem-lite[all]`, `agentmem-lite`, or `agentmem-lite --no-deps`. The first option provides sqlite-vec and model2vec, the second uses hash embeddings, and the last uses only the Python standard library.

Configure the client to run `python -m agentmem --db /path/to/memory.db`. The server uses stdio, and the database path is supplied as the `--db` argument in the MCP server configuration.

Yes. The documented deployment uses one local SQLite file and does not require a cloud service or separate database server. You can also install a zero-dependency mode with `--no-deps`.

Use namespaces when storing and recalling memories, such as `user/alice` or `project`. Recall accepts a namespace filter, and prefix matching can search a group such as `user` while leaving unrelated namespaces out.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgentmem AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agentmem?style=directory)](https://allmcps.com/mcp/agentmem)
HTML Embed
<a href="https://allmcps.com/mcp/agentmem"><img src="https://allmcps.com/api/badge/agentmem?style=directory" alt="Agentmem on AllMCPs" /></a>