Metadata-Version: 2.5
Name: memx-eval
Version: 0.1.0
Summary: Vendor-agnostic harness for evaluating memory systems, with failure diagnostics.
Project-URL: Homepage, https://github.com/vivek9patel/memx
Project-URL: Issues, https://github.com/vivek9patel/memx/issues
Author: Vivek Patel
License: MIT License
        
        Copyright (c) 2026 Vivek Patel
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: litellm>=1.35
Requires-Dist: pydantic>=2.6
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Provides-Extra: mem0
Requires-Dist: mem0ai>=0.1; extra == 'mem0'
Provides-Extra: providers
Requires-Dist: mem0ai>=0.1; extra == 'providers'
Requires-Dist: supermemory>=3.0; extra == 'providers'
Provides-Extra: streaming
Requires-Dist: ijson>=3.2; extra == 'streaming'
Provides-Extra: supermemory
Requires-Dist: supermemory>=3.0; extra == 'supermemory'
Description-Content-Type: text/markdown

# memx

Vendor-agnostic harness for evaluating memory systems: it scores answers **and** classifies *why* a question failed.

Ingest conversational sessions into a backend (any adapter), ask benchmark questions, judge the answers, then on each FAIL snapshot the store and assign a stage: extraction, conflict resolution, mutation, or retrieval. Inspect one case with `memx debug`.

A run ingests the **full official history** on each case (LoCoMo conversation or LongMemEval haystack) before asking selected questions. `--limit` / `--random` only choose which questions to score.

## What a run gives you

- Pass/fail per question (LLM judge)
- A **Diagnostic Summary** of FAIL counts by stage
- `.memx/last_run.json` with gold, candidate, retrieval, state diff, and diagnosis
- `memx debug` for one record: question, gold, provider answer, retrieved facts, stage badge, state diff

![Diagnostic Summary after a hosted run](website/public/shots/01-summary-table.png)

![memx debug on a FAIL](website/public/shots/04-debug-question.png)

Passes are not classified. If the judge failed but the store and retrieval look correct, the stage is **No Failure** (often answer synthesis, not memory).

## Failure stages

| Stage | Meaning |
| --- | --- |
| 1 Extraction | Needed fact never entered the store |
| 2 Conflict resolution | Two relevant truths both ACTIVE, no `supersedes` link |
| 3 Mutation | Conflict linked, old row still ACTIVE |
| 4 Retrieval | Store looks correct; search missed the fact |

Details: [docs/diagnostics.md](docs/diagnostics.md).

## Install

Python 3.11+. The PyPI name is `memx-eval`; the CLI and import stay `memx`.

```bash
pip install memx-eval
pip install "memx-eval[providers]"   # Mem0 + SuperMemory SDKs
```

From this repo: `pip install -e ".[dev]"` (or `".[mem0]"` / `".[supermemory]"` / `".[providers]"`).

## Quick start

```bash
export SUPERMEMORY_API_KEY=...   # or MEM0_API_KEY and --adapter mem0
memx datasets pull locomo
memx run --dataset locomo --adapter supermemory --limit 5 --random
```

See [docs/adapters.md](docs/adapters.md).

Docs: [docs/README.md](docs/README.md). Local site:

```bash
cd website && npm install && npm run dev
```

http://localhost:3000. `npm run build` writes `website/out/` (set the host project root to `website/`; the build still reads `../docs`).

```bash
pytest tests/ -v
```

MIT. See `LICENSE`.
