Memory layer for AI agents in one 258 KB binary

Memora is a clean-room Mem0-compatible memory engine written 100% in Mora (.mr). Run it as a native REST server, an MCP stdio/HTTP server, a CLI, or a Mora library without Python or Docker.

Measured Head-to-Head Benchmarks

Workload: 500 memory inserts with 500 history audit rows, top-10 cosine search (8D vector), 50 updates, and scope deletion on Linux x86_64.

Metric Memora Native Memora Interpreter Mem0 Python (SQLiteManager)
CLI Cold-Start 2.90 ms - 52.15 ms (stdlib only)
500 Inserts + History 85 ms 68 ms 296 ms
Top-10 Cosine Search 2 ms 46 ms 4 ms
50 Updates 1 ms 2 ms 10 ms
Scope Delete 1 ms 1 ms 1 ms
Total Workload 89 ms 117 ms 311 ms

Total 500-Memory Workload (Lower is Faster)

Memora Native 89 ms
Memora Interpreter 117 ms
Mem0 Python (SQLiteManager) 311 ms

Reproduce locally: bash compare/run_compare.sh

How Memory Reconciliation Works

Memora ports Mem0's fact-extraction and deduplication pipeline so agent memory stays concise instead of appending duplicate transcripts.

  1. 01

    Scope & Extract

    Validates user_id, agent_id, or run_id. When infer=true, calls your OpenAI-compatible LLM to extract structured facts in the input language.

  2. 02

    Embed & Retrieve

    Embeds each fact via HTTP and queries SQLite WAL for the top-K closest existing memories in the same scope using pure-Mora cosine similarity.

  3. 03

    Reconcile Decisions

    Maps UUIDs to short integer IDs and asks the LLM to output ADD, UPDATE, DELETE, or NONE actions, preventing duplicate or stale facts.

  4. 04

    Persist & Audit

    Applies mutations atomically to SQLite and appends every state transition to the Mem0-compatible history table for full auditability.

Four Ways to Run Memora

Use one compiled binary as a REST server, MCP server, or CLI, or import the engine directly into your Mora (.mr) project.

memora serve
mora build --native -o memora
./memora serve --addr 127.0.0.1:8000

curl -s -X POST http://127.0.0.1:8000/memories \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","content":"I like nasi goreng"}],"user_id":"alice"}'

Roadmap

  • v0.1 Shipped: Core engine, SQLite WAL store, OpenAI-compat HTTP, REST API, MCP server, CLI, and EN/ID i18n.
  • v0.2 Planned: GraphStore entity/relation extraction, Reranker trait, and advanced metadata operators ($in, $gt, $lt, $ne).
  • v0.3 Planned: HTTP adapters for Qdrant, pgvector, and Neo4j, plus optional lightweight dashboard.
  • v1.0 Release gate: Cross-platform native binaries (Linux, macOS, Windows PE64) and Mora Registry package.

Open-Source License & Attribution

Memora is licensed under Apache License 2.0 by MuaraAI.

Memora is a clean-room port in Mora (.mr) inspired by and compatible with Mem0 (github.com/mem0ai/mem0, Copyright 2023 Taranjeet Singh, Apache-2.0).

Support open-source development by MuaraAI: