Skip to main content
स्मृति — smriti by Darshankumar Joshi

🪷 स्मृति

smriti

Vedic Smriti tradition

Sacred Memory — the 18 Smritis

Multi-backend caching for LLM agents: memory, disk, Redis-compatible interface. TTL, LRU, semantic cache.

Python Zero Dependencies Vedic Arsenal License

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

  1. Fork the repo
  2. Create feature branch (git checkout -b fix/your-fix)
  3. Add tests — zero dependencies only
  4. Open a PR

🪷 Built by Darshankumar Joshi · @thedarshanjoshi

"कर्मण्येवाधिकारस्ते मा फलेषु कदाचन" Your right is to action alone, never to its fruits. — Bhagavad Gita 2.47

Vedic Arsenal · GitHub · Twitter

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)

Source distribution for smriti-cache 0.1.0
File Size Uploaded
smriti_cache-0.1.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for smriti-cache 0.1.0
File Interpreter ABI Platform
smriti_cache-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page