Skip to main content

OMEM: trustworthy memory for AI agents

OMEM is a memory layer for AI agents that tracks beliefs over time and handles contradictions instead of silently overwriting them. This is the official Python SDK. It has no third-party dependencies, so it installs instantly and won't clash with anything else in your environment.

Install

pip install omem-infrastructure

The import is short:

from omem import Memory

Run a server in one command

Installing also gives you an omem-server command that starts the full OMEM server (engine and API) locally, with no extra setup:

omem-server

It runs on http://127.0.0.1:8787 and stores its data in an omem-data folder in your current directory. Use a different port with omem-server 9000.

Quickstart

from omem import Memory

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

# Remember a grounded fact. The agent and entity are created on first use.
mem.remember(agent="support-agent", about="customer:123",
             claim="prefers_annual_billing")

# Ask what's believed.
print(mem.believes(about="customer:123", claim="prefers_annual_billing"))
# -> BELIEVED_TRUE

# Contradictions. Simple negation needs no setup: `X` and `not:X` are paired
# for you, so this alone is enough to get a conflict rather than an overwrite.
mem.remember(agent="billing-agent", about="customer:123", claim="not:prefers_annual_billing")
print(mem.believes(about="customer:123", claim="prefers_annual_billing"))
# -> CONTRADICTED
mem.conflicts()   # both sides, their evidence, and a recommendation

# For claims that oppose each other without being a negation, say so once.
# OMEM never guesses this from wording: deciding that two sentences disagree is
# the judgment call that would stop a belief state being reproducible.
mem.contradict("prefers_annual_billing", "prefers_monthly_billing")

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

# See why something is believed, with the full provenance chain.
mem.why("a_...")

Cross-agent memory

Memory is private to an agent by default, and you decide 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")

# Shared across the whole project. Every agent can recall it.
mem.remember(agent="agent-a", about="acme", claim="tier=enterprise", scope="org")

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

# Promote an existing memory to a wider scope later.
mem.share(assertion_id="a_...", scope="org")

Use it as an MCP server

Installing also gives you an omem-mcp command that speaks MCP over stdio and exposes three safe tools: omem_recall, omem_observe, and omem_why.

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

Point your MCP client (such as Claude Desktop) at that command. The agent identity is fixed at the process level, so a model can't reach 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

How it fits together

Every method maps onto one operation or query in the OMEM engine. The SDK adds authentication, retries on 5xx errors, typed errors (OmemError.reason_code exposes codes like R_DANGLING), automatic registration of agents and entities, and cross-agent scope control. It doesn't invent any new memory behavior of its own; the engine remains the single source of truth.

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.2.14.tar.gz (1.2 MB 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.2.14-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omem_infrastructure-0.2.14.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for omem_infrastructure-0.2.14.tar.gz
Algorithm Hash digest
SHA256 6d365007c79ecb44128fbb8d4076f2e5e31504e88ee629e698b06cc672f35cfb
MD5 2f54b8d73e82d9ecdb2288d0d874470d
BLAKE2b-256 994ed290e1563fb9f4421d44d5554dc6095edf8f653788970ce7b61ff8702959

See more details on using hashes here.

Provenance

The following attestation bundles were made for omem_infrastructure-0.2.14.tar.gz:

Publisher: release.yml on troybrandonc-bit/Omem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for omem_infrastructure-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 bf5010ec7c3c8ec9374f42a0486910918bed449d32cde5d97a0d4ed27d78d1d2
MD5 f2f2bb6874ddf3652ce3ee56a89653d2
BLAKE2b-256 c233c33f34e88bf834943a4fd1a6472988fcf3fa1b767d53ea6985363ecea5b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for omem_infrastructure-0.2.14-py3-none-any.whl:

Publisher: release.yml on troybrandonc-bit/Omem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

This release

0.2.14 This release

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page