Skip to main content

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, since, until, order_by, exclude_author) Semantic search — "what do I know about X"
recent(domain, since, until, exclude_author, limit, cursor) Newest-first feed — "what happened lately"
feedback(atom_ids, outcome) Report success/failure
stats() Memory statistics
health() API health check

Every method exists on both MnemoClient (sync) and AsyncMnemoClient (async).

Search or feed?

read() answers what do I know about X and ranks by relevance. recent() answers what happened lately and is complete within one scope by construction — nothing is skipped, which a semantic search cannot promise. Reach for recent() to resume after a break or to catch up on a shared room.

from mnemoverse import MnemoClient

client = MnemoClient(api_key="mk_live_...")

# Catch up on a shared room. Rooms are SEPARATE stores: pass the address as
# `domain`, or an unscoped feed will not cover them.
page = client.recent(domain="xroom:room_01ABC", since="2026-08-01T00:00:00Z", limit=20)
for item in page.items:
    print(item.created_at, item.content)

if page.next_cursor:
    page = client.recent(domain="xroom:room_01ABC", cursor=page.next_cursor)

Read items carry created_at and provenance (who wrote it, where from).

Documentation

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnemoverse-0.2.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

mnemoverse-0.2.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file mnemoverse-0.2.0.tar.gz.

File metadata

  • Download URL: mnemoverse-0.2.0.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mnemoverse-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5abd0dc437a622c83ebdd84fd6bb2ab2e3d5283c65c1c662f4bae494d8f748bc
MD5 959808a2a9faba031aa5bad87e852394
BLAKE2b-256 61876e1dc6fd36662c34f0dc5c858c332b1dbfc6ca8ac86e99d6a568e385ad24

See more details on using hashes here.

File details

Details for the file mnemoverse-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mnemoverse-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mnemoverse-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd86ee0dac553169e8089279e9ed726f4c79e9dca48f30482e2f76a9e6190169
MD5 2dccebbd6a0aa3d88ec1a69476797ca3
BLAKE2b-256 349755e14d908bb75e8821efd80e6f570261fa1a2ace496660fb87cf33b9b7b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page