Memory SDK for AI Agents  secure by design

AI memory designed to capture what matters

UMA turns conversations, documents, decisions, and feedback into usable knowledge.
Knowledge your agents can trust, is memory secured by design. UMA builds layered defenses into the core architecture: provenance, source-trust scoring, injection detection for memory-poisoning protection (OWASP ASI06), and vector and embedding defense (OWASP LLM08) and more.

A secure option

Persistent memory for agents, secured, and under your control


Agents improve the same way good assistants do: by learning your preferences, decisions, feedback, and way of working over time. All this information must be stored in a governed memory layer, not spread across tools and files, or inside systems you do not control.

UMA keeps memory inside your architecture: persistent, structured, and protected so agents can improve using clean, trusted knowledge over time.

UMA security is a property of the design, not a feature. The architecture enforces explicit ownership boundaries, tracks provenance through every write, hashes content for integrity, and follows secure coding practices.

UMA is the first Apache-2.0 memory runtime where three OWASP Agentic Security Initiative and six of the OWASP LLM Top 10 controls are part of the architecture, not middleware: Memory & Context Poisoning (ASI06) defense via input and file scanning, trust scoring, and quarantine at every storage boundary; Identity & Privilege Abuse (ASI03) defense via mandatory ownership scoping on every artifact enforced at the SQL and vector layers; Unexpected Code Execution, ingest path (ASI05) defensevia MIME validation, and HTML/Markdown sanitization before chunking.

Every write is scanned against a configurable injection-pattern catalog, scored for trust, and hashed for integrity. Suspicious content is quarantined — not silently dropped — and remains reviewable through a management API. Every retrieval is owner-scoped and trust-gated. The architecture is the defense.



The architecture

UMA is Unified Memory Architecture

Why Unified?
UMA combines the strongest memory ideas into one governed runtime:

salient memory consolidation from Mem0, recursive summarization from MemGPT, cognitive memory types from neuroscience, and OWASP ASI06 defense from the first commit.

UMA makes memory a first-class application layer. It is owned by the app, organized by memory type, lifecycle-aware, and observable.

Effective agent memory requires multiple layers, inspired by human cognition but implemented with pragmatic tools, to achieve security, simplicity and power in practice.

UMA memory architecture diagram

PLUGGABLE BACKENDS

Designed for trust

Memory poisoning is a real attack.
UMA is built to resist it.

designed to protect the integrity of the memory from the start: the defenses live inside the canonical write and read paths.

Provenance

Every artifact carries its lineage.

Where the memory came from, who wrote it, what it derives from, when it was created. Provenance is a runtime invariant — not a debugging convenience.

Injection Detection

Injection attempts don't get stored silently.

Fifteen rule families, seventy-two patterns, validated at 100% recall and zero false positives on a representative corpus. Every memory write is scanned — turn, document, bootstrap import.

Trust Scoring

Every artifact is scored at the moment it is written.

UMA classifies the origin at write time and attaches a trust_score that travels with the artifact permanently. The score survives schema migrations and directly shapes retrieval ranking.

Two-layer injection gate

The same scan runs twice — once before the LLM sees anything, once before storage.

UMA exposes a pre-LLM gate that runs before any model call. Then it runs the same scan a second time at the storage boundary as defense-in-depth; on high severity it raises InjectionDetectedError and nothing reaches the storage layer.

Cryptographic integrity

Tamper protection on every write.

Every memory artifact carries a SHA-256 hash over its canonical content, computed at write time. If a record is tampered with after the fact, the hash no longer matches. Lite provides on-demand verification through the management API.

Quarantine

Suspicious writes are preserved, not dropped.

High-severity hits are quarantined out of retrieval. A small management API lets operators list, reinstate, or purge — with an audit trail. You see what tried to enter your memory.

Ingest boundary hardening

The boundary is defended.

MIME consistency checks before parsing. Executables masquerading as documents are rejected, not stored. HTML and Markdown are sanitized of active payloads before chunking.

Independent academic research (SuperLocalMemory, Bhardwaj 2026) arrives at the same architectural conclusions UMA implements. The OWASP Agent Memory Guard project recommends every primitive UMA ships across ASI01, ASI04, ASI06, and ASI09 — UMA builds them into the canonical read and write paths instead of bolting them on.
For full details, see the Security by Design section and the complete OWASP coverage table in the docs

the six lanes

Memory designed to evolve

Combines source evidence, extracted facts, lived episodes, learned procedures, compiled knowledge, and short term working memory, plus associative links into separate lanes that work together.
That separation makes agent memory more realistic, more auditable, and easier to govern as it grows.

01 - Raw

The source of truth UMA can always return to.

Original conversations, documents, uploads, and evidence are preserved as captured, so every derived memory can be audited, explained, or rebuilt.

02 - Semantic

The claim layer: facts the system can search, score, and cite.

UMA extracts structured facts from raw evidence while keeping provenance back to the source chunks that support them.

03 - Episodic

The timeline of what happened, when, and in which context.

Some questions need event memory, not similarity search: what changed in a session, what was decided, or what happened on Tuesday.

04 - Procedural

The memory of how work gets done.

Workflows, instructions, playbooks, and learned procedures behave differently from facts, so UMA stores and retrieves them as their own memory kind.

05 - Working memory

Active memory for conversation state.

Working memory holds the conversation history needed to keep context across turns. When the history size exceed the context window, UMA can compress older history into a concise summary, preserving the key goals, decisions, facts, and constraints the agent still needs.

06 - Wiki

The readable memory layer: durable summaries built from evidence.

Semantic memory stores individual claims; Wiki turns many claims and source events into coherent pages a human can read, review, version, and refresh when the underlying evidence changes.

The graph

Connects them all.

The memory entities become nodes. The relationships between them become typed edges. The graph stores the relationships between them, so a single retrieval can follow a thread across lanes.
Not bundled. Optional, plug in your own backend.

How you use it

Two ways to consume UMA.

Import the Python package directly into your agent, or run the bundled MCP server for any MCP-compatible client.

Embed it in your agent

pip install UMA into your project and call it directly. SQLite + LanceDB, embedded, ready to run.

  • Developers building an agent or agentic app in Python
  • Single-process apps where memory lives with the code
  • Teams evaluating UMA without infrastructure
or

Run it as an MCP server

UMA ships a full MCP server (mcp/server.py) exposing retrieve, ingest, scan, and management operations over stdio JSON-RPC.

  • Memory for Claude Desktop Claude Code, or Cursor
  • Ingest documents, recall context, and query memory across sessions
  • Works with any MCP-compatible client — no custom integration needed
Developer experience

Designed for the developer first.

Clean integration paths, pluggable backends, observable retrieval, scoped memory, and predictable runtime behavior.

To get up to speed fast, UMA ships four agent skill files under .claude/skills/ — covering the API, memory lanes, configuration, and architecture overview. Claude Code loads them automatically, so you can ask questions about the codebase and get accurate, grounded answers from the start. No separate onboarding docs to hunt for.

Quick start guide
Or ask your
assistant
Open source · Apache 2.0 · OWASP ASI06 memory-poisoning defense built in  beta

Start building with UMA

Clone it, break it, tell us where it bends. UMA Lite runs locally in a few lines — no managed service, no signup, no waiting list.

Two ways in: embed it as a library in your agent, or run the MCP server and point your tools at it.

Questions? Just ask your coding assistant. The interactive docs live in the repo and will explain the API, walk you through the lanes, or help you write integration code on the spot.

The architecture is stable and the public API is small on purpose. Security isn't behind a paywall or a roadmap — it's in the code, Apache-2.0, reviewable line by line.

From memory to agentic experience

Meet Animus.

Animus is our secure fork of OpenClaw, supercharged by UMA’s memory architecture.
UMA is the memory layer. Animus is the agent environment built to show what effective memory makes possible.
We kept what makes OpenClaw powerful, then added the hardening, approval flows, and memory architecture required for production-grade deployments.

© UMA by Memory Engineering · All rights reserved.