Your first memory in five minutes
Store a belief, query it, and see why it’s believed. Every snippet below is real and runs against the same API the dashboard uses.
Install and start the server
Step 1: Install and start the server
One package, no dependencies. Or run it straight from a clone — same server, same port, same first-run key. From source the dashboard needs building once (cd web && OMEM_STATIC=1 npm run build); in the wheel it is already bundled.
pip install omem-infrastructureomem-server # or: omem-server 9000Create a client
Step 2: Create a client
The first run prints a project id and an API key. There is no signup call and nothing to configure — paste them straight in.
from omem import Memorymem = Memory(api_key="omem_sk_...",base_url="http://127.0.0.1:8787",project="proj_...")Remember a belief
Step 3: Remember a belief
`about` is any entity id you choose. `claim` is a token, not a sentence — OMEM normalises spelling, so three spellings of one claim stay one claim.
mem.remember(agent="support-bot",about="customer:alice",claim="prefers_annual_billing")Query what it believes
Step 4: Query what it believes
Returns a four-valued state: BELIEVED_TRUE, BELIEVED_FALSE, CONTRADICTED, or UNKNOWN.
mem.believes(about="customer:alice",claim="prefers_annual_billing")# -> 'BELIEVED_TRUE'Contradict yourself
Step 5: Contradict yourself
The part a vector store cannot do. Tell OMEM two claims disagree, then assert the second one. Nothing is overwritten and nothing is lost.
mem.contradict("prefers_annual_billing","prefers_monthly_billing")mem.remember(agent="sales", about="customer:alice",claim="prefers_monthly_billing")mem.believes(about="customer:alice",claim="prefers_annual_billing")# -> 'CONTRADICTED'Ask why
Step 6: Ask why
Both claims are still on record. Pass an assertion id to get the chain that led there — which agent said it, when, and on what basis.
beliefs = mem.about("customer:alice")mem.why(beliefs[0]["id"])# -> {'state': ..., 'provenance': [...]}
See it in the dashboard
Your belief appears live in the memory explorer. Open the “why” view to trace its provenance and scrub through time. Both need omem-server running locally.