Skip to main content

Persistent memory system for AI agents — session notes, rolling state, and RAG search

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agmemory-0.18.1.tar.gz (363.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agmemory-0.18.1-py3-none-any.whl (143.3 kB view details)

Uploaded Python 3

File details

Details for the file agmemory-0.18.1.tar.gz.

File metadata

  • Download URL: agmemory-0.18.1.tar.gz
  • Upload date:
  • Size: 363.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agmemory-0.18.1.tar.gz
Algorithm Hash digest
SHA256 dad724fabf17dc9a1ab04954b513ec9244d34420aeba1f0a74d7cbd9b5c66068
MD5 e4bac3b2cc146c59f91b38663d87d1ed
BLAKE2b-256 a1c93a137c34f67d608f5df865aa603d2d2af17b10633048956fe866f15c77aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for agmemory-0.18.1.tar.gz:

Publisher: publish.yml on RK0429/agentic-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agmemory-0.18.1-py3-none-any.whl.

File metadata

  • Download URL: agmemory-0.18.1-py3-none-any.whl
  • Upload date:
  • Size: 143.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agmemory-0.18.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65b13792fc9eee861f7b13614c98c5f01b5e31d04b2e1342acdbc96a3765c7b7
MD5 b21a5d52e3dc287198903e26441fea95
BLAKE2b-256 7b4d3c8dc6cbc38587fdfaef26102e2802076cf65c7fa20c7e230c2d3bcffd4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for agmemory-0.18.1-py3-none-any.whl:

Publisher: publish.yml on RK0429/agentic-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page