Metadata-Version: 2.5
Name: nomem-ai
Version: 0.3.0
Summary: Not Only Memory — a transparent, token-budgeted, LLM-free memory layer for agentic and RAG applications.
Project-URL: Homepage, https://saswattulo.github.io/NoMem/
Project-URL: Documentation, https://saswattulo.github.io/NoMem/
Project-URL: Repository, https://github.com/saswattulo/NoMem
Project-URL: Issues, https://github.com/saswattulo/NoMem/issues
Project-URL: Changelog, https://github.com/saswattulo/NoMem/blob/main/CHANGELOG.md
Author-email: Saswat Tulo <tulosaswat@gmail.com>
License:                                  Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or Derivative
                  Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work, excluding
                  those notices that do not pertain to any part of the Derivative
                  Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and do
                  not modify the License. You may add Your own attribution notices
                  within Derivative Works that You distribute, alongside or as an
                  addendum to the NOTICE text from the Work, provided that such
                  additional attribution notices cannot be construed as modifying
                  the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright 2026 Saswat Tulo
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
License-File: LICENSE
Keywords: agent-memory,agents,context,context-engineering,llm,mcp,mem0-alternative,memory,rag
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: mcp>=1.2; extra == 'all'
Requires-Dist: model2vec>=0.4; extra == 'all'
Requires-Dist: numpy>=1.24; extra == 'all'
Requires-Dist: tiktoken>=0.5; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.39; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: build>=1; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Provides-Extra: embed
Requires-Dist: model2vec>=0.4; extra == 'embed'
Requires-Dist: numpy>=1.24; extra == 'embed'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.1; extra == 'langchain'
Provides-Extra: mcp
Requires-Dist: mcp>=1.2; extra == 'mcp'
Provides-Extra: openai
Requires-Dist: tiktoken>=0.5; extra == 'openai'
Description-Content-Type: text/markdown

# NoMem — Not Only Memory

A transparent, token-budgeted **memory layer for agentic and RAG applications**.
Framework-neutral core, local-first (SQLite), and — by design — **no LLM
anywhere in the pipeline**: no API key, no model download, no per-message
model calls. Memory is stored verbatim, indexed with deterministic rules, and
assembled at read time.

> Context engineering is the real bottleneck for agents: overflowing windows,
> incoherent long conversations, and black-box "memory" you can't inspect.
> NoMem gives you a hard token budget and a full audit trail of every decision.

**Docs:** https://saswattulo.github.io/NoMem/ ·
**PyPI:** [`nomem-ai`](https://pypi.org/project/nomem-ai/) ·
**Status:** `v0.3`: core engine, hybrid retrieval, LLM-free facts and
contradictions, an HTTP API and an MCP server. See the [roadmap](#roadmap),
[benchmarks](#benchmarks) and [NoMem vs Mem0](#nomem-vs-mem0).

## Why NoMem

- **Hard token budget.** Context is *guaranteed* to fit `max_tokens`. No more
  manual counting or overflow errors.
- **Fully transparent.** Every message kept, dropped, retrieved, or summarised
  is logged with the reason and the token cost. No black boxes.
- **No LLM in the memory layer.** Tools like mem0, Zep and Letta call an LLM on
  every write to extract, merge and summarise memories. NoMem replaces each of
  those jobs with rules, hashes and ranking, so writes take well under a
  millisecond and cost nothing, and every memory is something that was
  actually said.
- **Three memory tiers.** Core (persona + known facts) → Working (recent
  conversation) → Archival (everything, retrieved on demand).
- **Lightweight & local-first.** One SQLite file. Zero required dependencies.
  Runs offline in seconds.
- **Harness-neutral.** A clean core with thin adapters (LangChain, LlamaIndex,
  raw provider loops) — not tied to any one framework.

## Install

```bash
pip install nomem-ai              # core: zero dependencies
pip install "nomem-ai[openai]"    # exact local token counts via tiktoken
pip install "nomem-ai[anthropic]" # exact token counts via the Anthropic API
pip install "nomem-ai[embed]"     # optional vector retrieval (Model2Vec, CPU-only)
pip install "nomem-ai[mcp]"       # the MCP server
```

The PyPI name is `nomem-ai` (`nomem` belongs to an unrelated project); you
still `import nomem`. From source: `pip install -e .`

## Quickstart

```python
from nomem import NoMem

mem = NoMem(
    max_tokens=120,
    core="You are a concise travel assistant.",
    user_id="saswat",
    session_id="trip-planning",
)

mem.add_user("I'm planning a trip to Tokyo, early March, budget ~$2000.")
mem.add_assistant("Great — cherry blossoms start late March, so you may be early.")
mem.add_user("Let's stay in Shinjuku. Any food I must try?")

result = mem.build_context(query="where am I staying and what's my budget?")

print(result.text)        # prompt string, guaranteed <= max_tokens
print(result.messages)    # structured form for chat APIs
print(result.tokens_used) # exact
print(result.explain())   # the full transparency log
```

`result.explain()` prints exactly what happened and why. Here's the trace from
the fuller demo (`python examples/basic_usage.py`), where the budget forces
drops and retrieval pulls an already-dropped fact back in:

```
context: 102/120 tokens, 5 messages
-----------------------------------
core             core         15t [105 left]  included fixed core memory
retrieved        archival     31t [0 left]  user message #3 (matched by keyword#1)
skipped          archival      0t [0 left]  user message #7 (already in the recent window)
skipped          archival      0t [0 left]  user message #5 (already in the recent window)
skipped          archival      0t [0 left]  assistant message #6 (already in the recent window)
dropped          archival     24t [0 left]  assistant message #4 (would exceed 31-tok archival budget)
retrieval        archival     31t [0 left]  retrieved 1 of 5 match(es) for query
added            working      16t [58 left]  user message #7
added            working      22t [36 left]  assistant message #6
added            working      18t [18 left]  user message #5
dropped          working      24t [18 left]  assistant message #4 (needs 24, 18 left)
dropped          working      17t [18 left]  assistant message #2 (needs 17, 18 left)
dropped          working      14t [18 left]  user message #1 (needs 14, 18 left)
budget_exhausted working       0t [18 left]  3 older message(s) dropped to fit the budget
```

(Exact token numbers depend on the `TokenCounter` in use.)

## The three tiers

| Tier         | What it holds                                              | Storage                          | Scope                 |
| ------------ | ---------------------------------------------------------- | -------------------------------- | --------------------- |
| **Core**     | Fixed persona/rules + a "Known facts" card                 | `slots` + `facts` tables         | `user_id`             |
| **Working**  | Recent conversation (budget-enforced window)               | `messages` (+ optional summary)  | `user_id`+`session_id`|
| **Archival** | Every message, verbatim, retrieved on demand               | `messages` + FTS5 + annotations  | `user_id`+`session_id`|

Everything lives in one local SQLite file (or `:memory:`).

## How it works without an LLM

**Write path: store verbatim, annotate with rules.** `add()` stores the message
exactly as written, then attaches deterministic annotations beside it:
entities, keyphrases, resolved dates ("yesterday", "two weeks ago",
"7 May 2023", anchored to the message's own timestamp), an importance score,
duplicate hashes, and first-person **slot facts** such as
`location = Berlin` or `allergy = peanuts`. A new value for a single-valued
slot closes the old one (`valid_to`, `closed_by`) instead of deleting it, so
history is kept. Pass `timestamp=` to import an existing transcript.

**Read path: decide at query time.** `build_context(query=...)` assembles, in
one hard budget:

1. **Core** persona, then a **Known facts** card with the slot facts the query
   asks about (`facts_ratio`, default 10% of the budget). Ask "what do I do
   for a living?" and it finds `job: backend engineer` with no shared keyword.
2. **Retrieved memories**, each shown with its date. Several rankers propose
   candidates and Reciprocal Rank Fusion merges them: FTS5 BM25 keywords,
   entities (ignoring ones that appear everywhere), dates in the question,
   slot facts, optional vectors, and the turns either side of a strong hit.
   An importance prior re-orders the result and duplicates are collapsed.
   A memory that a later one contradicts carries a conflict marker quoting
   the other side with its date (see [Contradictions](#contradictions)).
3. **Recent conversation**, newest first, as a contiguous window.
4. Optionally, an **extractive summary** of turns that just fell out of the
   window (`summary_ratio`, off by default): the most informative sentences,
   quoted with dates, never paraphrased.

`result.explain()` shows every decision, including which rankers found each
memory (`matched by keyword#1, entity#1, slot#1`).

| Knob | Default | What it does |
| --- | --- | --- |
| `retrieval_top_k` | 5 | Memories considered per query |
| `archival_ratio` | 0.3 | Budget share reserved for retrieved memories (unused rolls over) |
| `archival_max_ratio` | 0.8 | How far that share may stretch for a direct match that doesn't fit, taking tokens from the oldest recent turns; never past `max_tokens`. Set to `archival_ratio` for a fixed slice |
| `facts_ratio` | 0.1 | Most the Known-facts card may use (unused rolls over) |
| `summary_ratio` | 0.0 | Budget share for the extractive summary (off by default) |
| `retrieval` | `RetrievalConfig()` | Ranker weights, RRF k, importance and recency priors |
| `annotate` | `True` | Rule-based annotation on write |
| `embedder` | `None` | Optional vector ranker |

```python
mem.add_user("I live in Pune.")
mem.add_user("I moved to Bangalore last week!")
mem.facts()          # current facts: location = Bangalore
mem.fact_history()   # Pune too, with when it stopped being true
mem.search_hits("where did I live before?")  # hits with scores and reasons
mem.remember("preferred name", "Sas")         # pin a fact yourself
```

See `examples/facts_demo.py` and `examples/retrieval_demo.py`.

### Contradictions

People change their minds, addresses and flight times. NoMem doesn't pick a
winner or rewrite anything: when a newer memory changes an older one, both
are kept, linked as a *conflict*, and shown together with their dates so the
agent's own model decides. Three deterministic detectors run on write:

| Detector | Catches | Example |
| --- | --- | --- |
| `slot` | A single-valued fact gets a new value, or a like is negated | "I live in Pune" ... "I moved to Bangalore" |
| `frame` | The same sentence with a different number, time, date or name | "I have 2 kids" ... "I have 3 kids" |
| `update` | An update cue ("moved", "postponed", "now", "actually", "instead" ...) plus a shared topic word and a changed value of the same type, from the same speaker | "My flight leaves at 9am" ... "Actually my flight got moved to 11am" |

Recency only decides direction: the later memory is marked as the update.
Retrieved memories then read:

```
- [5 Jan 2026] user: My flight leaves at 9am on Friday. [CONFLICT: changed on 25 Jan 2026 (flight: 09:00 -> 11:00); user said "Actually my flight got moved to 11am."]
```

and the Known-facts card says `location: Bangalore (since 20 Mar 2026; before
that Pune, said 1 Mar 2026)`. `mem.conflicts()` lists every pair with both
texts, dates, the detector and a confidence. With an embedder, vector
neighbours add candidates and raise confidence. Tune or turn it off with
`NoMem(conflicts=ConflictConfig(...))`.

The rules aim for precision: on real LoCoMo chat they flag 2 pairs in 5,882
turns. On a fresh held-out set of 25 updates and 25 look-alike controls,
written before the latest rule changes and never tuned on, they catch 19/25
with 0 false flags. Topic words match across singular and plural, weekday
schedules ("on Tuesdays") are compared by name, and a short plain statement
whose wording changes after a strong cue ("my commute is by car" ... "I
commute by train now instead") counts too. Still missed: numbers written as
words ("two cars"), ordinals ("the 7th floor"), and brand names in lower
camel case ("iPhone").

### Optional vectors

The core is model-free. For semantic matching, pass an embedder (an
embedding model, never a generative one):

```python
from nomem import NoMem, Model2VecEmbedder
mem = NoMem(embedder=Model2VecEmbedder())  # minishlab/potion-base-8M by default
```

`Model2VecEmbedder` is the recommended default: ~8M parameters, CPU-only,
~30 MB, fast enough to embed every message on write (~0.4 ms each). On
LoCoMo it lifts search recall@5 from 56.8% to 58.6% and context recall from
57.6% to 59.7%. The vector ranker is a light tie-breaker by default
(`weights["vector"] = 0.15`): static embeddings are weaker than keyword
matching on their own (41.7% recall@5 vector-only) and pull recall *down*
at equal weight. `SentenceTransformerEmbedder` takes any sentence-transformers
model (raise the vector weight for a stronger encoder); subclass `Embedder`
for anything else. `HashingEmbedder` (character n-grams, no model) exists for
offline use and tests.

## HTTP API and MCP server

```bash
nomem serve --db memory.db                 # JSON API on http://127.0.0.1:8420
nomem mcp --db ~/.nomem/memory.db          # MCP server over stdio
claude mcp add nomem -- nomem mcp --db ~/.nomem/memory.db   # Claude Code
```

The HTTP API (`/v1/messages`, `/v1/context`, `/v1/search`, `/v1/facts`,
`/v1/conflicts`) uses the standard library only and takes an optional bearer
token (`--api-key` or `$NOMEM_API_KEY`). The MCP server gives any client
`remember`, `recall`, `search_memory`, `list_facts`, `pin_fact` and
`list_conflicts` tools. Both serve many users and sessions from one SQLite
file through `MemoryService`. See the [server docs](https://saswattulo.github.io/NoMem/server/).

## Design choices

- **Pluggable token counting.** `TokenCounter` interface with `OpenAICounter`
  (exact, local via tiktoken), `AnthropicCounter` (exact via API), and a
  zero-dependency `ApproxCounter` fallback.
- **No LLM, by design.** Nothing in NoMem calls a language model: not on
  write, not on read, not for compaction. Facts, dates, entities and
  importance come from deterministic rules; compaction is *extractive* (it
  quotes the most informative sentences, with dates, and never paraphrases),
  so every line in the context can be traced back to something actually said.
  There is no `LLMCompactor`, and there won't be one.
- **Local-first, expandable.** SQLite today; in-memory and vector-DB backends
  behind the same store interface later.

## Benchmarks

Measured without any LLM (`python benchmarks/run_all.py`; details and every
step in [`benchmarks/TRAJECTORY.md`](benchmarks/TRAJECTORY.md)). LoCoMo: did
the evidence turn for each of 1,531 answerable questions land in the top-5
search results, and in a 1,000-token context? LongMemEval (`longmemeval_s`,
470 answerable questions, each over its own ~500-turn history): did the
evidence session land in the top 5 sessions, and the evidence turn in the
top 5 turns and the 1,000-token context?

| | v0.1 (FTS5 only) | v0.2 (hybrid, LLM-free) | v0.2 + Model2Vec |
| --- | --- | --- | --- |
| LoCoMo search recall@5 | 50.9% | 56.8% | 58.6% |
| LoCoMo context recall | 52.5% | 58.1% | 59.9% |
| LongMemEval session recall@5 | | 89.9% | 92.1% |
| LongMemEval turn recall@5 | | 52.7% | 55.9% |
| LongMemEval context recall | | 50.0% | 53.2% |
| Query latency at 50k messages (p50) | 190 ms | 3-5 ms | 7-10 ms |
| Planted facts recalled at 50k messages | 7/8 | 8/8 | 8/8 |
| Updated facts caught, fresh held-out (false flags) | | 19/25 (0/25) | 19/25 (0/25) |
| Write throughput | | ~4,000 msg/s | ~1,500 msg/s |
| Write cost | 0 model calls | 0 model calls | 1 embedding (no generative model) |

## Roadmap

- **M1 — Core engine** ✅ Token-budgeted working memory, SQLite persistence,
  user/session scoping, full transparency log.
- **M2 — Archival retrieval** ✅ FTS5 keyword search wired into `build_context`.
- **M3 — LLM-free memory** ✅ Rule-based annotations (entities, dates,
  keyphrases, importance), bi-temporal slot facts with supersession, hybrid
  retrieval with RRF, a Known-facts card, an extractive compactor, optional
  embedders, and a benchmark harness.
- **M3.5 — Contradictions** ✅ Slot, frame, update-cue and wording-change conflict detection;
  both memories surfaced with dates and a conflict marker; updated-facts
  benchmark.
- **M3.6 — Packaging** ✅ PyPI (`nomem-ai`), `nomem serve` HTTP API, `nomem mcp`
  MCP server, docs site.
- **M4 — Adapters & polish** LangChain `BaseMemory` adapter, tool-output
  isolation helper, demo notebook.
- **M5 — Optional encoders** GLiNER entities and a co-occurrence graph with
  Personalized PageRank, cross-encoder reranking (`nomem[ner]`,
  `nomem[rerank]`), pluggable pattern packs for other languages.

## Development

```bash
pip install -e ".[dev]"
pytest
```

## License

[Apache-2.0](LICENSE)
