Skip to main content

Plain-text memory for AI agents — small, filtered, compressed, self-pruning. No database, no embeddings, no dependencies.

Project description

smriti — plain-text memory for AI agents: write through a filter, compress to a hook, inject the index, recall by hook, prune the rest

smriti

Plain-text memory for AI agents.
Markdown files — no database, no embeddings, no dependencies.


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  ·  pip install agent-smriti  ·  or copy smriti.py (stdlib, Python 3.10+)

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

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


The format is the whole spec  ·  Benchmarks — local-model A/B: smriti 100% vs no-memory 25% at ~⅓ the context  ·  MIT

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

agent_smriti-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

agent_smriti-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file agent_smriti-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for agent_smriti-0.1.0.tar.gz
Algorithm Hash digest
SHA256 36e7681b608626ea4cafae166fa7fb885e5b7e1df438de55869c25f405c1be5d
MD5 36fcaef820d4835df82712d724631051
BLAKE2b-256 f50f23aa054fc16fccb50e1708e89ee636b826301ec7ede46f833d706f708382

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_smriti-0.1.0.tar.gz:

Publisher: publish.yml on ek-sutra/smriti

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

File details

Details for the file agent_smriti-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for agent_smriti-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2901f03992db83fef68eb3046932eaeb299af6ad48dc8903446b41a3d2dbc58
MD5 5e260ad8e69f87df79b366ee95d60e68
BLAKE2b-256 d13050d3997d190c4157a58aa2dddcedf68ec3795f733c5a95d23b900a5ccfbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_smriti-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ek-sutra/smriti

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