Skip to main content

OMEM — Trustworthy memory for AI agents

The official Python SDK for OMEM: a temporal, contradiction-aware memory layer for AI agents. Zero third-party dependencies (stdlib only), so it installs instantly and never conflicts.

Install

pip install omem

Quickstart

from omem import Memory

mem = Memory(api_key="omem_sk_...", project="proj_...")

# Remember a grounded fact (auto-creates the agent + entity on first use).
mem.remember(agent="support-agent", about="customer:123",
             claim="prefers_annual_billing")

# Ask the engine what's believed — it resolves contradictions for you.
print(mem.believes(about="customer:123", claim="prefers_annual_billing"))
# -> BELIEVED_TRUE

# Recall everything known about an entity, with provenance.
for m in mem.recall(about="customer:123")["memories"]:
    print(m["proposition"], m["state"])

# Explain WHY something is believed (full provenance chain).
mem.why("a_...")

Cross-agent memory

Memory is private to an agent by default; you choose what to share.

# private to one agent (only agent-a can recall it)
mem.remember(agent="agent-a", about="acme", claim="secret_deal=1",
             scope="agent:agent-a")

# organisation-wide (every agent in the project can recall it)
mem.remember(agent="agent-a", about="acme", claim="tier=enterprise", scope="org")

# a named team
mem.remember(agent="agent-a", about="acme", claim="ae=jane", scope="team:sales")

# promote an existing memory later
mem.share(assertion_id="a_...", scope="org")

Use as an MCP server (any MCP-compatible agent)

Installing the package also gives you an omem-mcp command that speaks MCP over stdio, exposing three safe tools (omem_recall, omem_observe, omem_why):

OMEM_API_KEY=omem_sk_... OMEM_BASE_URL=https://... OMEM_AGENT=support-agent omem-mcp

Point your MCP client (Claude Desktop, etc.) at that command. The agent identity is fixed at the process level, so a model cannot spoof its way into another agent's private memory.

Self-healing

# report a failure and let OMEM's policy-gated recovery loop handle it
mem.healing.report(component="db-pool", error_type="ECONNRESET")
mem.healing.handle(error={"component": "db-pool", "error_type": "ECONNRESET"})
mem.healing.health()   # aggregated component health

Notes

Every verb maps onto a frozen OMEM engine operation or query. The SDK adds authentication, retries on 5xx, typed errors (OmemError.reason_code exposes R_DANGLING etc.), auto-registration of agents/entities, and cross-agent scope control. It introduces no new memory semantics.

Download files

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

Source Distribution

omem_infrastructure-0.1.1.tar.gz (211.8 kB view details)

Uploaded Source

Built Distribution

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

omem_infrastructure-0.1.1-py3-none-any.whl (239.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omem_infrastructure-0.1.1.tar.gz
  • Upload date:
  • Size: 211.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for omem_infrastructure-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dea6018c55271fe3119cb3ebad7eec62f2d4f354bd4399452ca7b156a9143cb5
MD5 89e5cca2077a9129b76a3c240e95de20
BLAKE2b-256 8b666a2425ffd1de8739d95aeee3ccc725ac9b1cf4d2426c56efc7493a2cb3cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for omem_infrastructure-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d9bd22413d7264e2b2255cac6e7c937266169175417717f0739c40fe7c7ee54
MD5 337ad2472ed3cc9eb5b1debc88868cf0
BLAKE2b-256 53d230a96e8e0fdcbfcc9f769451f54961428261e7dc267d5af01b7bd00c04d6

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