Metadata-Version: 2.4
Name: agent-smriti
Version: 0.1.0
Summary: Plain-text memory for AI agents — small, filtered, compressed, self-pruning. No database, no embeddings, no dependencies.
Author: Gurprit Singh
License: MIT
Project-URL: Homepage, https://github.com/ek-sutra/smriti
Project-URL: Repository, https://github.com/ek-sutra/smriti
Project-URL: Issues, https://github.com/ek-sutra/smriti/issues
Keywords: ai,agents,memory,llm,markdown,rag,context,agent-memory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<p align="center">
  <img src="assets/smriti.svg" alt="smriti — plain-text memory for AI agents: write through a filter, compress to a hook, inject the index, recall by hook, prune the rest" width="860">
</p>

<h1 align="center">smriti</h1>

<p align="center">
  Plain-text memory for AI agents.<br>
  Markdown files — <b>no database, no embeddings, no dependencies.</b>
</p>

---

```python
from smriti import Memory
mem = Memory("./memory")

mem.write("Use Postgres, not Mongo, for the ledger", type="decision")

mem.context()                  # the index — inject into your prompt every turn
mem.recall("postgres ledger")  # ranked matches, plus what they link to (one hop)
mem.get("use-postgres-for-the-ledger").body
mem.prune()                    # stale / duplicate / broken-link memories
```

**Install** &nbsp;·&nbsp; `pip install agent-smriti` &nbsp;·&nbsp; or copy `smriti.py` (stdlib, Python 3.10+)

**The four rules** &nbsp;·&nbsp; write what's durable &nbsp;·&nbsp; compress to a hook + seed &nbsp;·&nbsp; recall by hook &nbsp;·&nbsp; prune the rest

**Limits** &nbsp;·&nbsp; recall is lexical (the model does the semantics over `context()`) &nbsp;·&nbsp; the filter checks shape, not worth &nbsp;·&nbsp; built for agent scale

---

[**The format**](SPEC.md) is the whole spec &nbsp;·&nbsp; [**Benchmarks**](bench/) — local-model A/B: smriti **100%** vs no-memory **25%** at ~⅓ the context &nbsp;·&nbsp; MIT
