# xmemory

> Define what gets extracted, stored, and updated using schemas as your programming language. Written by developers or agents, executed by xmemory, and evolved alongside your workflows.

Canonical page: https://xmemory.ai/

## Programmable memory  
for agentic systems

Define what gets extracted, stored, and updated using schemas as your programming language. Written by developers or agents, executed by xmemory, and evolved alongside your workflows.

[Request access](#try-it-out)

## Why xmemory is different

### Program your memory

Schemas are the programming language for memory. Define what to extract, what to exclude, and how records relate and update. xmemory applies that specification to memory operations.

### Build with developers and agents

Write schemas directly or have an agent author them from your workflow. Inspect the specification, test it against real inputs, and refine the rules that shape your memory.

### Evolve with your workflow

Change your memory logic as your application changes. Developers and agents can revise schemas, test extraction behaviour, and migrate existing memory as requirements evolve.

[Read more](https://xmemory.ai/why/)

## Your workflow changes  
Your memory code evolves

Start with a customer's current subscription. When your workflow needs scheduled upgrades,  
extend the schema and test the new extraction rules.

01 / Current subscriptions

### Define what “current” means

XMD field excerpt

```
current_plan:
  type: str
  description: >-
    The customer's active plan.
    Exclude scheduled changes.
```

For “Acme is on Basic and upgrades to Pro on 1 October 2026,” the current plan is **Basic**.

02 / Add scheduled upgrades

### Extend the same memory model

Keep current\_plan; add these XMD fields

```
scheduled_plan:
  type: str
  description: >-
    A confirmed future plan change.
    Exclude hypothetical upgrades.
effective_on:
  type: str
  description: >-
    Scheduled change date, YYYY-MM-DD.
```

The same input should now also extract **scheduled\_plan: Pro** and **effective\_on: 2026-10-01**.

Developers or agents make the change. Test current, scheduled, and hypothetical upgrades, then review the migration before applying it to existing memory.

[See how to test and evolve a schema](https://xmemory.ai/xmd/#generate-validate-and-test)

## Key use cases

Define the memory your agents need, from recurring project tasks to shared team workflows.

### Reliable state for agents

Define the plans, task states, research findings, and tool knowledge your agents share. Evolve that memory model as your workflows grow and change.

### Memory for your agent tools

Connect xmemory to Claude Code, Codex, the Claude app, or ChatGPT. Build structured memory for recurring tasks and ongoing projects, and share it across your team so agents can reuse knowledge across tools and sessions.

### Governed agentic workflows

Make memory rules explicit and operations reviewable. Inspect stored records, trace reads and writes, and test schema changes before applying them to your workflow.

## Measurements

### Measured against real memory failure modes

We evaluate whether systems can store, update, deduplicate, and retrieve facts and relationships reliably, not just whether they can recall similar text.\*

xmemory97.10%

Mem0 (no graph) 87.24%

Cognee86.18%

Mem0 (graph) 86.07%

Supermemory80.49%

Zep80.16%

\* Read more about measurement methodology and open benchmarks in our [white paper](https://arxiv.org/abs/2604.27906).

### Token consumption

Lower token use than text-based memory by optimising reads.

2x+ fewer tokens

Assuming 10 reads per write,  
10 write tokens per 5 read tokens for xmemory,  
and 5 write tokens per 12 read tokens for typical text-based storage architecture.

### Integrate into your stack

[](https://xmemory.ai/n8n/) [](https://xmemory.ai/langchain/) [](https://xmemory.ai/google-adk/) [](https://xmemory.ai/pydantic/) [](https://xmemory.ai/mastra-ai/) [](https://xmemory.ai/openai-agents/) [](https://xmemory.ai/claude-agent-sdk/) [](https://xmemory.ai/codex/)

## Quickstart

Please install xmemory using [this prompt](https://xmemory.ai/agent-onboarding-prompt.txt)

## Our blog

October 20, 2026

### [Agents that learn from past runs:  
an independent evaluation with Toloka](https://xmemory.ai/toloka-agent-memory-evaluation/)

Across 11 models, lessons from past runs raised scores, including on tasks not used to write them, and compact answers cut the bill by 26%.

September 21, 2026

### [Judging every field for a tenth of a cent:  
TypeSafe's Jev on our extraction benchmark](https://xmemory.ai/jev-per-field-extraction-judge/)

A cheap per-field judge caught invented values almost perfectly and recovered 81% of the accuracy gap in an extraction cascade.

September 17, 2026

### [xmemory + Temporal: Long-running agents.  
Durable execution. Durable memory.](https://xmemory.ai/xmemory-temporal-partnership/)

xmemory and Temporal are partnering to bring reliable execution and shared, structured state to developers building long running agents.

September 7, 2026

### [Paper Review Series:  
Anthropic's FLT Formalization and the Case for Shared State](https://xmemory.ai/paper-review-anthropic-fermat-shared-state/)

What the FLT formalization and Prove2Me teach us about retrieval, accepted state, and programmable agent memory.

August 12, 2026

### [Paper Review Series:  
NVIDIA NOOA and Prime Intellect's Prime Agent](https://xmemory.ai/paper-review-nvidia-nooa-and-prime-intellect-prime-agent/)

What two frontier-agent projects reveal about the shift from transient context to explicit, typed, and verified state.

June 26, 2026

### [Schema Evolution:  
Engineer Your Memory, Don't Just Store It](https://xmemory.ai/schema-evolution/)

Schema is the programming language for memory - easy to create, and kept perfectly fit by a schema evolution engine.

May 7, 2026

### [Chasing AI memory SOTA:  
Beating the Benchmark, Missing the Point](https://xmemory.ai/chasing-sota-in-ai-memory/)

Why benchmark leadership can be misleading for AI memory, and what reliability metrics should measure instead.

March 27, 2026

### [Should Agents Adapt to Systems - or Should Systems Adapt to Agents?](https://xmemory.ai/should-agents-adapt-to-systems-or-should-systems-adapt-to-agents/)

As business logic moves into prompts, the boundary between agent reasoning and system-owned semantics needs to become much cleaner.

March 18, 2026

### [Schema as the Core of Reliability in AI Memory](https://xmemory.ai/schema-as-the-core-of-reliability/)

The core idea behind xmemory and why text-only memory misses many complex memory request types.

[Read latest post →](https://xmemory.ai/toloka-agent-memory-evaluation/)

## Resources

> Image: Does agent memory actually help? Toloka and xmemory tested 11 models to compare quality and cost.

Toloka

### Toloka and xmemory test what memory does for AI agents

[Read](https://toloka.ai/blog/toloka-and-xmemory-test-what-memory-does-for-ai-agents/)

> Image: Preview of the xmemory white paper

xmemory white paper

### From Unstructured Recall to Schema-Grounded Memory

[Read](https://arxiv.org/abs/2604.27906)

Featuring xmemory

> Image: Preview of the Bessemer Venture Partners article AI Infrastructure Roadmap: Five frontiers for 2026

Bessemer Venture Partners

### AI Infrastructure Roadmap: Five frontiers for 2026

[Read](https://www.bvp.com/atlas/ai-infrastructure-roadmap-five-frontiers-for-2026)

Featuring xmemory

> Image: Preview of the Andreessen Horowitz article Why We Need Continual Learning

Andreessen Horowitz

### Why We Need Continual Learning

[Read](https://a16z.com/why-we-need-continual-learning/)

## FAQ

What exactly can I control?

Your XMD schema defines the objects, fields, allowed values, identity keys, and relationships in memory. Its descriptions instruct extraction: what qualifies, what to exclude, how to interpret evidence, and how to normalise values. Developers or agents can author those rules, inspect stored records, and test extraction before persisting inputs. See the [XMD guide](https://xmemory.ai/xmd/) for the programming language and examples.

How does memory evolve when my workflow changes?

Maintain your schema alongside your workflow code. Developers and agents can revise extraction instructions, add fields or relationships, and test the new behaviour against representative inputs. Validate the revised schema and review a migration dry run before applying changes to existing memory. xmemory also provides tools to suggest schema improvements. Read about [schema evolution](https://xmemory.ai/schema-evolution/) and the [validation and migration workflow](https://xmemory.ai/xmd/#generate-validate-and-test).

How is xmemory different from MCP over Postgres?

You define the memory model and extraction rules in schemas that developers and agents can write, test, and evolve. xmemory executes that specification through the pipeline that turns natural-language agent input into structured, validated records:

-   Schema extraction and mapping
-   Validation and type enforcement
-   Deduplication and stateful updates
-   Relations and queryable state
-   Provenance and observability
-   Schema creation and evolution
-   Async write queues to unlock agentic workflows while keeping latency low

MCP exposes database tools; you still need to implement the extraction and memory update pipeline. With xmemory, you maintain the schema that governs memory behaviour, while the engine runs that pipeline. For the deeper architectural argument, see [Should Agents Adapt to Systems - or Should Systems Adapt to Agents?](https://xmemory.ai/should-agents-adapt-to-systems-or-should-systems-adapt-to-agents/).

What if I don’t have a schema yet?

You can write the schema yourself, have your agent author it, or generate a starting point from a workflow description. Every path gives you an explicit specification to inspect and test:

-   You can start with loose schemas, then move toward normalized, structured data as you learn more about the use case.
-   xmemory can generate a starting XMD schema from historic data or a workflow description. Review its extraction rules and test representative inputs before using it for writes.
-   Developers and agents can revise that schema as requirements change, testing behaviour and reviewing migrations before applying updates.

See [How xmemory works](https://xmemory.ai/integration-overview/) for the full flow, then use the [XMD guide](https://xmemory.ai/xmd/) when you want to review or improve extraction.

Why not just use text memory or vector memory?

Text and vector memory can retrieve relevant context. Schemas let you also specify what qualifies as a fact, how it is represented, and how records relate and update. xmemory uses those instructions to extract and validate structured records that you can inspect and query. Natural-language instructions still guide extraction; the memory specification is explicit, testable, and maintained alongside your workflow. For the fuller argument, read [Schema as the Core of Reliability in AI Memory](https://xmemory.ai/schema-as-the-core-of-reliability/).

What is the place for xmemory in my stack?

xmemory is external storage that agents use like a database or file store to save and retrieve context. Agents can create memory instances themselves, define schemas for a task on the fly, or use fixed instances for longer-lived context. It can reliably replace an agentic system of record, or run as a sidecar validation engine with periodic sync to the system of record, so people can review updates before they merge. The simple rule is: whenever agents need to save and retrieve text information, that layer can be xmemory. You can jump straight to the [integration guides](https://xmemory.ai/integration-overview/#integration-guides) in [How xmemory works](https://xmemory.ai/integration-overview/).

## Try it out

Tell us what your agents need to remember and how that memory should behave. We’ll help you define the schema and connect xmemory to your workflow.
