meml

🧠 explainable memory & information evolution · written in Zig

A local, explainable memory and information-evolution runtime for agents. MEML stores observations as subject–predicate–object triples, retrieves them with explainable activation, and records how information is corroborated, contradicted, superseded, and used by decisions. It ships as a zero-dependency binary plus a Zig-library IEL façade, MCP servers, Skills, and plugins for Claude Code, Codex, Pi, DeepSeek Harness, WorkBuddy, and CodeBuddy.

Install the CLI

$ curl -fsSL https://mindon.dev/meml/install | bash
Installs meml to ~/.meml/bin and adds it to your PATH. Pin a version with curl -fsSL https://mindon.dev/meml/install | bash -s -- v0.3.0.

Quick Start

The CLI speaks a JSON-lines protocol: each request is a JSON object with an op field, each response is one JSON line.

# Record an observation (subject–predicate–object triple)
meml '{"op":"observe","subject":"alice","predicate":"likes","object":"coffee"}'

# Retrieve related memory with explainable activation
meml '{"op":"activate","query":"coffee","details":true}'

# Persist memory to a local state file
meml '{"op":"persist","path":".meml/state.json"}'

# Batch mode: read requests from a file, or pipe them in
meml --file requests.jsonl
echo '{"op":"ping"}' | meml

Also available as an embeddable library: run zig fetch --save git+https://github.com/mindon/meml to add it to a Zig project.

Information Evolution (IEL)

The Zig-library façade meml.iel.Evolution extends MEML from retained memory to auditable information lifecycle: information kind, trust, retention, source, observed time, modeled validity interval, immutable evolution events, and decision dependencies.

Boundary: IEL is currently a Zig-library API. The CLI and .meml DSL intentionally expose no IEL-specific operations. MEML15 persists immutable evolution events beside a current materialized view; it is not a general event-sourcing runtime rebuilt from a complete external event stream. Read the IEL guide for details.

Agent Integrations

Give any non-Zig agent a local long-term memory. The Skill teaches the agent how to use MEML; the plugin wires up a read-only meml_recall tool. Install both in one step each.

Install the Skill

$ curl -fsSL https://mindon.dev/meml/install-skill | bash
Downloads the meml-agent-memory Skill and copies it into detected hosts. For CodeBuddy and WorkBuddy it prepares the standard skills/<name>/SKILL.md plugin layout under ~/.meml/integrations.

Install the Plugin

$ curl -fsSL https://mindon.dev/meml/install-plugin | bash
Downloads integrations/ to ~/.meml/integrations, registers the meml MCP server for CodeBuddy, Claude Code and Codex when their CLIs are available, and prepares a compatible local plugin for WorkBuddy. Requires Node.js.

CodeBuddy & WorkBuddy

The plugin installer creates a compatible local plugin at ~/.meml/integrations/codebuddy/meml-plugin. CodeBuddy is registered automatically when its CLI is available; otherwise launch the plugin explicitly:

# CodeBuddy
codebuddy --plugin-dir ~/.meml/integrations/codebuddy/meml-plugin

# WorkBuddy (the same plugin layout)
workbuddy --plugin-dir ~/.meml/integrations/codebuddy/meml-plugin

In CodeBuddy, the Skill is called from the plugin namespace as /meml-memory:meml-agent-memory. In WorkBuddy, enable the local plugin directory through its plugin manager. Restart or reload plugins after installation.

Supported hosts

Host Integration
Claude Code Plugin + Skill + MCP server
Codex MCP server (config.toml)
Pi Plugin (index.ts) + Skill
DeepSeek Harness Plugin (cordis.yml) + Skill
WorkBuddy Compatible local plugin + Skill + MCP
CodeBuddy Plugin + Skill + MCP server

Full per-host setup: github.com/mindon/meml/tree/main/integrations.

Ops Reference

The CLI exposes these operations:

ping  observe  assert  remember  infer  link  unlink  support  contradict
transition  supersede  generalize  procedure  predict_procedure
select_procedures  compare_procedures  activate  feedback
consolidate  auto_consolidate  signals  backend  persist  recover  exec
set_verifier  clear_verifier  set_plasticity_policy

IEL deliberately has no CLI operations: use the Zig-library meml.iel.Evolution API when an application needs auditable information evolution.

More