# agentmem

Keeps long-term agent memory inside a single SQLite database using hybrid search. It saves facts, decisions, and rules across sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 6
- Author: oxgeneral
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/oxgeneral/agentmem
- Updated: 2026-02-28
- HTML: https://affpapa.org/en/nevibecode/mcp/oxgeneral-agentmem

## What it does

The server stores persistent context inside a single SQLite database file. Queries run on a hybrid engine. It pairs FTS5 keyword matching with vector embeddings, applying recency weighting to keep fresh facts on top. Namespaces isolate data across projects, and five memory tiers classify everything from permanent setup details to temporary notes.

The package exposes 16 MCP tools alongside an HTTP REST service with 14 endpoints. It scans dialogue turns to pull out decisions, IP addresses, URLs, and environment variables without manual formatting. Fact updates stay auditable through revision chains, while near-duplicate entries merge using the `consolidate` tool.

Running it requires Python. The complete setup with vector search takes 12MB, but it can also operate purely on standard library modules without extra dependencies. Memory marked as `learned` or `episodic` auto-compacts after 90 days, so keep non-expiring rules strictly in the `core` tier.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- persist working state and decisions between chat sessions
- pass behavioral rules into system prompts via `get_procedures`
- search stored memories using hybrid keyword and semantic ranking
- extract IP addresses, URLs, and action items from conversation logs
- merge duplicate memory records with `consolidate`

## Example prompts
- Remember in the `core` tier under namespace `infra` that our production server IP is `10.0.0.1`.
- Use `recall` to find our earlier decisions about database indexing.
- Run `save_state` to store my current progress before context compression happens.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

## Other versions with the same name
- [agentmem · thezenmonster](https://affpapa.org/en/nevibecode/mcp/agentmem.md) — ★ 6

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
