Mnemon (__init__.py)

Mnemon · analytics, execution-cache, agent-caching, token-savings, learning-system, ai

Mnemon -- execution caching and system learning for AI agents. Zero code changes. One import line. Gets smarter with every run. Saves tokens on every cache hit. Usage: import mnemon m = mnemon.init() # auto-detects tenant, patches frameworks result = m.run( goal="weekly security

"""
Mnemon -- execution caching and system learning for AI agents.

Zero code changes. One import line.
Gets smarter with every run. Saves tokens on every cache hit.

Usage:
    import mnemon
    m = mnemon.init()          # auto-detects tenant, patches frameworks

    result = m.run(
        goal="weekly security audit for Acme Corp",
        inputs={"client": "Acme Corp", "week": "March 17-21"},
        generation_fn=my_expensive_function,
    )
    print(result["tokens_saved"])

Architecture by Mahika Jadhav (smartass-4ever).
"""

import asyncio
import atexit
import hashlib
import logging
import os

from mnemon.core.models import MNEMON_VERSION as __version__
import time
from typing import Any, Callable, Dict, List, Optional

from mnemon.core.models import (
    ExperienceSignal, Signal

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key