Skip to content

mnemoverse/mnemoverse-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PyPI version Python versions License: MIT Research: SLoD arXiv

Mnemoverse Python SDK

Persistent memory for AI agents. Not vector search — statistical learning backed by Hebbian associations.

Installation

pip install mnemoverse

Quick Start

from mnemoverse import MnemoClient

client = MnemoClient(api_key="mk_live_YOUR_KEY")

# Store a memory
result = client.write(
    "Retry with exponential backoff fixed the timeout issue",
    concepts=["retry", "backoff", "timeout"]
)

# Query — Hebbian associations expand "timeout" → "retry", "backoff"
memories = client.read("how to handle timeouts?")

# Report outcome — the system learns what works
client.feedback(
    atom_ids=[item.atom_id for item in memories.items],
    outcome=1.0,
    query_concepts=memories.query_concepts
)

Async Client

from mnemoverse import AsyncMnemoClient

async with AsyncMnemoClient(api_key="mk_live_YOUR_KEY") as client:
    result = await client.write("async memory", concepts=["async"])
    memories = await client.read("what about async?")

Features

  • Circuit breaker — 5 failures → open → 30s half-open → probe
  • Retry with backoff — 3 attempts, rate-limit-aware
  • Sync + asyncMnemoClient for scripts, AsyncMnemoClient for FastAPI
  • Type-safe — Pydantic models, full type hints

Methods

Method Description
write(content, concepts, domain, metadata) Store a memory
write_batch(items) Store up to 500 memories
read(query, top_k, domain) Query with Hebbian expansion
feedback(atom_ids, outcome) Report success/failure
stats() Memory statistics
health() API health check

Documentation

License

MIT

About

Python SDK for Mnemoverse — persistent memory API for AI agents. Works with Claude, Cursor, ChatGPT, and any MCP client.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages