Labsco
kraklabs logo

MIE - Memory Intelligence Engine

β˜… 42

from kraklabs

Persistent knowledge graph MCP server that gives AI agents shared memory across sessions and providers. Stores facts, decisions, entities, and events with typed relationships.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup
<p align="center"> <h1 align="center">MIE - Memory Intelligence Engine</h1> </p> <p align="center">Stop re-explaining yourself to every AI agent. MIE gives all your agents β€” Claude, ChatGPT, Cursor, Gemini β€” a shared, persistent knowledge graph they can read and write. Decisions, context, facts, and relationships survive across sessions, tools, and providers.</p> <p align="center"> <img src="docs/mie-demo.gif" alt="MIE Demo" width="600"> </p> <p align="center"> <a href="https://goreportcard.com/report/github.com/kraklabs/mie"><img src="https://goreportcard.com/badge/github.com/kraklabs/mie" alt="Go Report Card"></a> <a href="https://github.com/kraklabs/mie/releases"><img src="https://img.shields.io/github/v/release/kraklabs/mie" alt="Latest Release"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-blue" alt="License"></a> </p>

The Problem

You explained your entire architecture to Claude. Two hours of context, decisions, tradeoffs. Next day, new conversation β€” it knows nothing. So you explain it again. Then you switch to Cursor for implementation. Zero context. You open ChatGPT to brainstorm a different angle. Blank slate.

Every AI agent you use is brilliant but amnesiac. And none of them talk to each other.

MIE fixes this. One knowledge graph. Every agent reads from it. Every agent writes to it. Your decisions, your context, your rules β€” always available, everywhere.

How It Works

You: "We chose PostgreSQL over DynamoDB because we need ACID
      transactions for the payments module. Alternative was Aurora
      but too expensive at current stage."

          Claude stores this via MIE
                    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              MIE Knowledge Graph             β”‚
β”‚                                              β”‚
β”‚  Decision: PostgreSQL over DynamoDB          β”‚
β”‚  Rationale: ACID transactions for payments   β”‚
β”‚  Alternatives: [DynamoDB, Aurora]            β”‚
β”‚  Entities: payments-module, PostgreSQL       β”‚
β”‚  Status: active                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    ↓
    Next week, in Cursor, different project:
    "What database did we choose and why?"
    β†’ Cursor queries MIE, gets full context instantly

No copy-pasting. No "as I mentioned before." No starting from zero.

Why Not Just Use Claude's Memory / ChatGPT's Memory?

Platform MemoryMIE
Cross-agent❌ Claude doesn't know what you told ChatGPTβœ… All agents share the same graph
Structured❌ Flat text summariesβœ… Typed nodes: facts, decisions, entities, events
Queryable❌ Basic keyword recallβœ… Semantic search, graph traversal, conflict detection
Portable❌ Locked to one providerβœ… Your data, your machine, exportable
Relationships❌ Noneβœ… "This decision relates to this entity and was triggered by this event"
History❌ Overwrites silentlyβœ… Invalidation chains β€” see what changed and why

What Gets Stored

MIE isn't a chat log. It stores structured knowledge as a graph:

Facts β€” Things that are true about your world. "Our API uses JWT with RS256 signing." Β· "The team is 6 engineers across 3 timezones."

Decisions β€” Choices with rationale and alternatives. "Chose Go over Rust for CIE because of CGO CozoDB bindings. Alternatives: Rust, Python."

Entities β€” People, companies, projects, technologies. "Kraklabs β€” independent software and AI lab." Β· "CIE β€” Code Intelligence Engine."

Events β€” Timestamped occurrences. "Launched v0.4.0 on 2026-01-15." Β· "Client demo scheduled for March 10."

Topics β€” Recurring themes that connect everything. "Architecture" Β· "Security" Β· "Product Strategy"

These connect through typed relationships β€” a decision references entities, relates to topics, and may be triggered by events. When an agent queries "what do you know about our security decisions?", MIE traverses the graph and returns structured context, not keyword matches.

MCP Tools

MIE exposes 12 tools through the Model Context Protocol:

ToolWhat it does
mie_analyzeSurfaces related context before storing β€” the agent decides what's worth remembering
mie_storeWrites facts, decisions, entities, events, and relationships to the graph
mie_bulk_storeBatch store up to 50 nodes with cross-references β€” ideal for importing knowledge from files or git history
mie_getRetrieve a single memory node by ID with full details
mie_querySemantic search, exact lookup, or graph traversal across all node types
mie_listList and filter nodes with pagination
mie_updateInvalidate outdated facts, update statuses β€” with full history preserved
mie_deleteRemove nodes with cascade (embedding + edges) or remove individual relationships
mie_conflictsDetect contradictions in stored knowledge
mie_exportExport the full graph as JSON or Datalog
mie_repairRebuild HNSW indexes and clean orphaned embeddings
mie_statusGraph health, node counts, usage metrics

Zero Server-Side Inference

Unlike other memory solutions that run an LLM on the server to classify what to store, MIE uses an agent-as-evaluator pattern. The server provides context; your agent (which is already running an LLM) decides what matters. This means zero additional inference cost β€” your memory layer doesn't burn tokens.

This philosophy extends to importing: when you ask your agent to "import knowledge from this repo", the agent reads your files, ADRs, or git history directly and uses mie_bulk_store to persist what it extracts. MIE stays as a pure storage engine β€” the connected agent IS the LLM.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Any MCP Client                     β”‚
β”‚  Claude Β· Cursor Β· ChatGPT* Β· etc   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ MCP (JSON-RPC over stdio)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MIE Server  (one per MCP client)   β”‚
β”‚  12 tools Β· semantic search Β·       β”‚
β”‚  graph traversal Β· conflicts        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Unix domain socket
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MIE Daemon  (shared singleton)     β”‚
β”‚  Manages exclusive DB lock Β·        β”‚
β”‚  Serves multiple clients            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Datalog queries
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CozoDB (embedded)                  β”‚
β”‚  Graph DB Β· HNSW vectors Β· ACID     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       + Ollama (optional, local embeddings)

ChatGPT via custom GPT Actions pointing to MIE Cloud (coming soon).

Multiple MCP clients (Claude, Cursor, etc.) can run simultaneously β€” the daemon holds the exclusive database lock and multiplexes access. The daemon starts automatically on first use or can be managed manually via mie daemon.

Memory Lifecycle

 Store                    Query                     Evolve
 ─────                    ─────                     ──────
 Your agent learns   β†’    Next session, any    β†’    Facts change.
 something new.           agent queries MIE         Old ones get
 It stores a fact,        for context before        invalidated, not
 a decision, or an        responding. Full          deleted. The graph
 entity β€” with            graph of related          keeps history of
 confidence scores        knowledge returns         what was known
 and relationships.       in milliseconds.          and when.

CLI

mie init                    # Create config with defaults
mie init --interview        # Interactive project bootstrapping
mie --mcp                   # Start as MCP server (auto-starts daemon)
mie daemon start            # Start daemon in background
mie daemon start --foreground  # Start daemon in foreground (for debugging)
mie daemon stop             # Stop running daemon
mie daemon status           # Check if daemon is running
mie status                  # Show graph statistics
mie export                  # Export memory graph
mie import -i backup.json   # Import from JSON or Datalog
mie reset --yes             # Delete all data
mie query "<cozoscript>"    # Raw Datalog query (debug)

Use With CIE

MIE pairs naturally with CIE (Code Intelligence Engine). Run both as MCP servers:

{
  "mcpServers": {
    "cie": { "command": "cie", "args": ["--mcp"] },
    "mie": { "command": "mie", "args": ["--mcp"] }
  }
}

CIE gives your agent deep understanding of your codebase. MIE gives it memory of everything else β€” decisions, architecture, people, events. Together, your agent knows your code and remembers why it's built that way.

Roadmap

  • Import from ADRs, markdown, and git history (agent-driven self-import)
  • Git post-commit hook β€” auto-capture decisions from commits
  • Browser extension β€” auto-capture knowledge from claude.ai, chatgpt.com, gemini
  • MIE Cloud β€” sync across devices, team shared memory
  • ChatGPT integration via custom GPT Actions
  • Web UI for exploring and managing your knowledge graph

Join the waitlist: kraklabs.com/mie

License

MIE is dual-licensed:

Contributing

We welcome contributions. See contributing.md for guidelines.


Built by Kraklabs Β· Makers of CIE and MIE