Metadata-Version: 2.4
Name: memman
Version: 0.51.9
Summary: LLM-supervised persistent memory for Claude Code and Codex - fused keyword, vector and recency recall, with rerank and pluggable embeddings.
License: MIT
License-File: LICENSE
Keywords: ai,ai-agents,agent-memory,agents,llm,memory,long-term-memory,rag,embeddings,vector-search,semantic-search,claude,claude-code,codex,anthropic,openai,pgvector
Author: bissli
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Provides-Extra: postgres
Requires-Dist: click (>=8.1,<9.0)
Requires-Dist: httpx (>=0.27,<0.28)
Requires-Dist: numpy (>=1.26,<3)
Requires-Dist: pgvector (>=0.3,<0.6) ; extra == "postgres"
Requires-Dist: psycopg-pool (>=3.2,<4) ; extra == "postgres"
Requires-Dist: psycopg[binary] (>=3.2,<4) ; extra == "postgres"
Requires-Dist: tqdm (>=4.66,<5.0)
Project-URL: Documentation, https://github.com/bissli/memman/blob/master/docs/DESIGN.md
Project-URL: Homepage, https://github.com/bissli/memman
Project-URL: Repository, https://github.com/bissli/memman
Description-Content-Type: text/markdown

# memman

**Persistent memory for Claude Code and Codex.**

memman saves decisions, preferences, and project knowledge so the agent can find them in later sessions. The agent chooses what to remember and when to recall it. memman handles storage, search, and background processing.

Storing and recalling 1,000 memories costs **under $1** on the default models ([Cost](#cost)).

[![CI](https://github.com/bissli/memman/actions/workflows/ci.yml/badge.svg)](https://github.com/bissli/memman/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

## Features

- **The agent decides.** Claude Code's three lifecycle hooks deliver the session guide and remind the agent to recall. The Codex skill does the same. The agent runs every memory command itself, and no hook writes a memory.
- **Queued writes.** `remember` and `replace` return at once. A background worker adds a summary and an embedding and stores the text as written.
- **Hybrid recall.** Keyword matches, vector similarity, and recency, then a reranker over the best candidates.
- **Separate stores and branches.** Named stores keep projects apart. A branch layers over a store and ends with `store merge` or `store drop`.
- **SQLite or Postgres.** SQLite by default, Postgres with `memman[postgres]`.
- **Claude Code and Codex.** One CLI, and the same stores and worker for both.

## Quickstart

memman needs Python 3.11+ on Linux, macOS, or Windows under WSL2.

```bash
pipx install memman
memman install    # one OpenRouter key, a background worker, the hooks or skill
```

```bash
memman remember "The billing service retries failed requests at most three times."
# The worker stores the write on its next run, every 60 seconds by default.
memman recall "billing service retry limit"
memman replace <id> "The billing service retries batch requests four times and other requests three times."
```

[Installation](docs/USAGE.md#install-and-uninstall) covers Codex, headless installs, WSL2, upgrades, and Postgres.

## Cost

On the default models, summaries for 1,000 stored memories cost $0.17. MongoDB Atlas bills the embedding and rerank calls that OpenRouter forwards, so this table states no price for them.

| Step                                            | Default model                    | Cost            |
| ----------------------------------------------- | -------------------------------- | --------------- |
| Summaries for 1,000 memories                    | `~anthropic/claude-haiku-latest` | $0.17           |
| Embeddings for 1,000 memories and 1,000 queries | `voyageai/voyage-4-lite`         | billed by Atlas |
| Reranking for 1,000 recalls                     | `voyageai/rerank-3-lite`         | billed by Atlas |

[Cost](docs/USAGE.md#cost) lists the assumptions behind the figure.

## Documentation

- [Usage and reference](docs/USAGE.md): setup, commands, configuration, and troubleshooting.
- [Design and architecture](docs/DESIGN.md): responsibilities, storage, search, and integration.
- [Contributing](CONTRIBUTING.md): development setup, tests, and schema changes.

## License

[MIT](LICENSE)

