Skip to main content

Official Python SDK for Memory Intelligence. Structured, verifiable memory for AI.

Project description

Memory Intelligence API

Memory without meaning is just storage.

This API turns raw content (text, conversations, images) into structured meaning. Searchable, explainable, provenance-tracked. No black box. No hallucinations.

For Python backends: FastAPI, Django, Flask, Lambda, Cloud Functions.


Installation

pip install memoryintelligence

Get your API key: memoryintelligence.io/beta


Quick Start

from memoryintelligence import MemoryIntelligence

mi = MemoryIntelligence.from_env()          # reads MI_API_KEY

# Turn content into a structured, verifiable memory
note = mi.capture(
    "Discussed pricing with ACME. They prefer quarterly billing.",
    source="sales_call",
)

# Ask by meaning, not keywords
for hit in mi.ask("what did ACME say about billing?"):
    print(f"{hit.score:.2f}  {hit.summary}")

# Every memory has a receipt
if mi.verify(note.id):
    print("intact")

Upgrading from MemoryClient? The flat MemoryIntelligence client above is the recommended surface. The older MemoryClient (the mi.umo.* namespace, with multi-tenant user_ulid) still works for advanced use, and EdgeClient still serves regulated on-premise deployments, but MemoryClient is deprecated and will be removed in a future major. See Core Operations for the full eight-verb surface.


What It Does

  • Processes → Extracts entities, topics, relationships, sentiment
  • Searches → Returns ranked results with explainability
  • Matches → Compares memories for relevance/similarity
  • Explains → Shows why results matched (semantic, temporal, graph)
  • Deletes → GDPR-compliant data removal with audit trail

No vector database setup. No chunking strategies. No embedding models to manage.


Security: API Keys Are Server-Only

Your API key grants full account access. Keep it server-side.

✅ Backend (environment variable):

mi = MemoryIntelligence.from_env()   # reads MI_API_KEY

❌ Never hardcoded:

# Don't - visible in logs/code
mi = MemoryIntelligence(api_key='mi_sk_live_...')

For web apps: Use your API key in the backend, build your own endpoints with your auth, let your frontend call those.


What Makes This Different

Others Memory Intelligence
Store text, embed, hope Extract meaning first
"Here are similar chunks" "Here's why this matched"
No audit trail Cryptographic provenance
Your data = their model training We never train on your data

Setting the standard for memory.


Core Operations

Eight verbs, mapped one-to-one onto the public API:

note    = mi.capture(content, source="notes")   # POST   /v1/process
hits    = mi.ask(query, limit=5)                 # POST   /v1/memories/query
note    = mi.get(umo_id)                          # GET    /v1/memories/{id}
notes   = mi.list(limit=20)                       # GET    /v1/memories
proof   = mi.verify(umo_id)                        # GET    /v1/memories/{id}/proof
why     = mi.explain(umo_id)                        # GET    /v1/memories/{id}/explain
receipt = mi.forget(umo_id)                        # DELETE /v1/memories/{id}
notes   = mi.batch(["note one", "note two"])       # POST   /v1/batch
note    = mi.upload("meeting.mp3")                 # POST   /v1/upload

Results come back as small typed objects (Memory, Match, Proof, Receipt), each with a .raw escape hatch and item access, so note.id when it is clean and note["quality_score"] when you need a field we did not surface.


Async Support

An async twin of the flat client (AsyncMemoryIntelligence) is on the roadmap. Until then, the async surface is the older AsyncMemoryClient (the mi.umo.* namespace, deprecated alongside MemoryClient):

from memoryintelligence import AsyncMemoryClient

async with AsyncMemoryClient.from_env() as mi:
    results = await mi.umo.search(query, user_ulid="01ABC...")

Error Handling

from memoryintelligence import (
    MIError, AuthenticationError, NotFoundError, RateLimitError, ValidationError,
)

try:
    hits = mi.ask(query)
except AuthenticationError:
    ...                       # API key invalid or expired
except NotFoundError:
    ...                       # no memory with that id
except RateLimitError:
    ...                       # the client already retried with backoff
except ValidationError as e:
    ...                       # request shape was wrong
except MIError as e:
    print(e.status, e)        # any API error carries its status

Typed Everywhere

Full Pydantic models. Type hints on every method. No dict soup.

from memoryintelligence import Memory, Match, Proof

Examples & Docs


Support


Memory Intelligence™ — Setting the standard for memory.

Built by somewhere

Project details


Download files

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

Source Distribution

memoryintelligence-0.1.1.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

memoryintelligence-0.1.1-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file memoryintelligence-0.1.1.tar.gz.

File metadata

  • Download URL: memoryintelligence-0.1.1.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for memoryintelligence-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3bfd5c195690384e4781f65bd45aceaf9a5f451847e0f74429e5379e1701d1a7
MD5 21596a627ebc86aa252e3e07a58781f1
BLAKE2b-256 26884428d5ffe2659fbe5acf889f9569556700ebbe3d65d11fc381f704e62c46

See more details on using hashes here.

File details

Details for the file memoryintelligence-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for memoryintelligence-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c58be5fbc52b509fe1e6944c4d098f8b1b3e149eec18fd17d2e9bd319733f72f
MD5 893c5e5260656d7636890c9fc0d7d6e3
BLAKE2b-256 b0d73850f16597e4ace439ed9e71134f45201ea945c9b5bdb2501e88d6c6cfcd

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 Pingdom Monitoring Sentry Error logging StatusPage Status page