agmemory
Persistent memory system for AI agents — session notes, rolling state, and RAG search.
Features
- Session notes: Create structured markdown notes per session with metadata extraction
- Rolling state: Track focus, open items, decisions, pitfalls across sessions
- RAG search: BM25+ scoring with field-level weighting, query expansion, fuzzy matching
- MCP server: Expose all operations as MCP tools for AI agent integration
- CLI: Full-featured command-line interface
Installation
pip install agmemory
With optional features:
# Japanese tokenization support
pip install agmemory[japanese]
# Dense embedding search
pip install agmemory[dense]
# All extras
pip install agmemory[all]
Quick Start
CLI
# Initialize memory directory
memory init
# Create a session note
memory note new --title "Fix authentication bug"
# Search notes
memory search --query "authentication timeout"
# Show current state
memory state show
# Update state from a note
memory state from-note memory/2026-03-02/1830_fix-authentication-bug.md
MCP Server
Register in your .mcp.json:
{
"mcpServers": {
"memory": {
"command": "memory",
"args": ["serve"]
}
}
}
Or with uvx:
{
"mcpServers": {
"memory": {
"command": "uvx",
"args": ["agmemory", "serve"]
}
}
}
Upgrading
After upgrading the package, reconnect the MCP server to pick up new tool
parameters and schema changes. In Claude Code, run /mcp and select
reconnect; other MCP hosts may require restarting the server process.
Memory Directory Structure
memory/
├── _state.md # Rolling state
├── _index.jsonl # Lightweight search index
├── _rag_config.json # Search configuration
├── _vocab.json # Vocabulary cache for fuzzy matching
└── YYYY-MM-DD/
└── HHMM_slug.md # Session note
License
Apache-2.0
Metadata
Release files for agmemory 0.23.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agmemory-0.23.2.tar.gz | 372.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agmemory-0.23.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 518.4 kB
Release files / agmemory-0.23.2.tar.gz
| Download URL | agmemory-0.23.2.tar.gz |
|---|---|
| Size | 372.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce989c2a6e9a7854a998ba758ca15eff5fa336f91641aae1cff6a7cb13455d24
|
|
BLAKE2b-256 checksum How to use checksums |
14300b658391e8c70b46d4da1d2593430dad77fd316bc6c620f6848e6c27340f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.
Transparency logRelease files / agmemory-0.23.2-py3-none-any.whl
| Download URL | agmemory-0.23.2-py3-none-any.whl |
|---|---|
| Size | 145.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c893aa4a04abad36bb6cfa700c6a75ba5ba8f69f64d07f0035e7d9af9e5f92e
|
|
BLAKE2b-256 checksum How to use checksums |
b930603129527dbc7a72a485b7fca0551d3fdd3a58c3b7d3c8b63a829db2d1bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.
Transparency log