Mema

Mema is a memory backend for agentic systems. It gives agents a persistent long-term memory that survives sessions, model swaps, and framework changes — so every deployment starts where the last one stopped, instead of starting over.

Why memory is infrastructure

An agent without memory is a demo. It re-asks questions you already answered, forgets decisions it made last week, and cannot explain why it knows what it knows. Mema treats memory as a first-class service: written once, queried many times, auditable at any point in time.

Mema sits below your agents and above your storage. Your framework keeps reasoning; Mema keeps what was learned.

Memory consolidation

When the user moves, the memory moves with them

Mema never silently overwrites. A new fact is recorded, the contradiction is resolved, and the stale memory is demoted — provenance intact.

memory_001 · user.location · rev 1active

I live in Mauritius

memory_002 · user.location · rev 2pending

I live in England

> new fact captured from conversation

Core Capabilities

  • Dual-mode Recall: Episodic records of what happened, semantic facts distilled from it — retrieved together with a single query.
  • Memory Consolidation: Background pass that merges duplicates, resolves contradictions, and promotes durable facts over stale transcripts.
  • Full Provenance: Every memory carries its source, confidence, and revision history. Nothing enters the store unattributed.
  • Framework-Agnostic: REST and MCP endpoints that plug into any agent runtime — no vendor SDK lock-in, no framework rewrite.
  • Scoped Tenancy: Namespaced stores per user, agent, and team, with isolation enforced at the query layer.

Memory Worlds

A world is a living container for everything a person or team knows. You fill it, and agents read from it.

  • Drop chats: Import conversation histories — pasted transcripts, exported chat logs, support threads. Mema parses them into episodic memories, speaker by speaker.
  • Drop files: PDFs, notes, specs, repositories. Documents are chunked, embedded, and filed into the world with their source attached.
  • Connect agents: Point any number of agents at the same world. They read from it, write to it, and come back smarter — a support bot, a research agent, and a coding agent can all share one brain.
  • Scoped access per agent: Every connection carries its own read/write grants. An agent can be read-only on one world, read-write on another.
  • Worlds are portable: Export a world as plain records and import it elsewhere. Your memory is data, not a hostage.

One world, many agents. One agent, many worlds — a personal world per user, a team world per project, a public world per domain.

Memory worlds

Drop chats and files in. Connect agents out.

A world is a container you fill: transcripts, documents, notes. Any number of agents can read from it and write to it — one brain, shared.

Drop in
chat · support thread
spec.pdf
notes.md
world · mauritius0 memories
world · london0 memories
Connect out
support-bot
research-agent
coder

> world created

Architecture

Mema is stateless at the API tier and pluggable at the storage tier. Embeddings, metadata, and raw records live behind a common interface: run it on SQLite for a single box, or on Postgres and a vector store for production scale. Consolidation and retrieval are separate processes, so ingestion never blocks the agent loop.

Security Protocol

  • Encryption at Rest: All records encrypted at rest, with per-namespace keys.
  • Scoped Access Tokens: Read and write scopes issued per agent, revocable without redeploying the workload.
  • Audit Trail: Immutable log of every write, read, and consolidation event — exportable for compliance review.
  • Self-Hostable: Run entirely inside your own infrastructure. No memory leaves your perimeter.

Getting Started

Deploy Mema with a single container, point your agent's memory calls at it, and start writing. The API is small on purpose: remember, recall, forget, consolidate. Everything else is your agent's job.