🪷 स्मृति
smriti
Vedic Smriti tradition
Sacred Memory — the 18 Smritis
Multi-backend caching for LLM agents: memory, disk, Redis-compatible interface. TTL, LRU, semantic cache.
Formerly agent-cache — Part of the Vedic Arsenal: 100 production-grade Python libraries for LLM agents, each named from the Vedas, Puranas, and Mahakavyas.
The Vedic Principle
The eighteen Smritis — sacred texts of remembered law and tradition — preserved the Vedic wisdom across millennia without digital storage. Pure memory, encoded in verse, passed from guru to shishya.
smriti brings this sacred memory architecture to LLM agents. Semantic cache, exact cache, TTL-aware LRU — the agent remembers what it has learned. The TF-IDF similarity matching finds the memory that feels like the current question, even if the words differ.
Smriti means "that which is remembered." Every cached response is a memory. Every cache hit is the agent drawing on its accumulated wisdom rather than asking the universe the same question twice.
How It Works
flowchart LR
A[Input] --> B[smriti]
B --> C{Process}
C -- Success --> D[Output]
C -- Error --> E[Handle]
E --> B
style B fill:#6b21a8,color:#fff
Installation
pip install smriti
Or from source:
git clone https://github.com/darshjme/smriti.git
cd smriti && pip install -e .
Quick Start
from smriti import *
# See examples/ for full usage
The Vedic Arsenal
smriti is one of 100 libraries in darshjme/arsenal — each named from sacred Indian literature:
| Sanskrit Name | Source | Technical Function |
|---|---|---|
smriti |
Vedic Smriti tradition | Sacred Memory — the 18 Smritis |
Each library solves one problem. Zero external dependencies. Pure Python 3.8+.
Contributing
- Fork the repo
- Create feature branch (
git checkout -b fix/your-fix) - Add tests — zero dependencies only
- Open a PR
🪷 Built by Darshankumar Joshi · @thedarshanjoshi
"कर्मण्येवाधिकारस्ते मा फलेषु कदाचन" Your right is to action alone, never to its fruits. — Bhagavad Gita 2.47
Metadata
Release files for smriti-cache 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smriti_cache-0.1.0.tar.gz | 1.6 MB | Without provenance | Details for smriti_cache-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smriti_cache-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for smriti_cache-0.1.0-py3-none-any.whl |
Total release size: 1.6 MB
Release files / smriti_cache-0.1.0.tar.gz
| Download URL | smriti_cache-0.1.0.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff65b653c57e678fc5bc3f2a1ba5bacc5786133ad18869f869c32dd97dd93c6e
|
|
BLAKE2b-256 checksum How to use checksums |
f452afc0af17ec03d75cb6ac7069d6f9dec56f77e187546f8934cb648d840924
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / smriti_cache-0.1.0-py3-none-any.whl
| Download URL | smriti_cache-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84782fc0831eebf4c63b0863e3bc1c8a73c27e3c29de9a008c1925deca172a08
|
|
BLAKE2b-256 checksum How to use checksums |
b543e5ee4a67d784f94a130ed839309ab12b7d98c95e48a692fe56e5cf66c39e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for smriti-cache 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.