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.0.tar.gz (12.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.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omem_infrastructure-0.1.0.tar.gz
  • Upload date:
  • Size: 12.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.0.tar.gz
Algorithm Hash digest
SHA256 3bea4e17533fad45193bd4c8c3cc37fc20c5f86f06c98ea1650946c7f2d942f7
MD5 b68beddb45723716f5fb472238fbe88e
BLAKE2b-256 f0537edb86f30e457497205214c1ede20cdfd21588d4abb91fce0830080d48ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for omem_infrastructure-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61fcc49f43cedadfd63bad1130ac4e44280c9fbf08dcdeebb7b27dd6e711359f
MD5 12b69f203ff9c109a17a948239974cd6
BLAKE2b-256 c61cd71812d4e94db59f1a030faa1f8b4eff4a2faf6fa1e957b1ecb12a4f9ef7

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