"I built a portable memory layer for AI agents so you don't have to"

작성자

카테고리:

← 피드로
DEV Community · PARIKSHIT SHARMA · 2026-08-15 개발(SW)

PARIKSHIT SHARMA

markdown

I built a portable memory layer for AI agents so you don’t have to

AI agents are everywhere now. But they still struggle with one thing: memory.

Most agent frameworks store memory in a vector database, but that’s not enough. A vector DB just stores embeddings; it doesn’t understand memory types, consolidation, forgetting, or portability.

So I built Mneme — a portable memory layer for AI agents.

What does Mneme do?

  • Structured memory: episodic (what happened), semantic (facts/preferences), procedural (how to behave).
  • Semantic recall: find relevant memories using local embeddings (FastEmbed).
  • Consolidation: deduplicate and summarise memories over time.
  • Forgetting: delete memories with full audit trail.
  • Portability: export/import your agent’s entire memory to a .mneme file.
  • Access control: multi‑agent scoping with explicit shared memory grants.
  • Local‑first: SQLite backend, zero‑config.

Installation


bash
pip install mneme-memory
Usage
python
import mneme

memory = mneme.Store(agent_id="my-agent", backend="memory.db")
memory.remember("User prefers email over Slack", memory_type="semantic")
context = memory.recall("How does the user like to be contacted?")
print(context)
That's it. Three verbs: remember, recall, forget.

Why not just use a vector DB?
A vector DB gives you similarity search, but not:

Memory types (episodic vs semantic vs procedural)

Consolidation (episodic → semantic summarization)

Controlled forgetting + audit trail

True portability across frameworks

Mneme is not a database; it's a memory layer that can sit on top of SQLite or Postgres.

Performance
Retrieval precision@1: 1.00 on synthetic test

Recall latency: 7.34 ms average

Write latency: 0.088 ms

Check it out
GitHub: https://github.com/GamingBoyOfficial/Mneme

PyPI: https://pypi.org/project/mneme-memory/

What's next?
I'm planning to add HNSW vector index, TypeScript SDK, and more adapters. Let me know what you think!

Enter fullscreen mode Exit fullscreen mode

원문에서 계속 ↗