Drop / ml into any agent harness, IDE, or memory stack.

Upgrade Clawd / OpenClaw, Hermes Agent, Pi (pi-mono), OpenCode, Claude Code, Codex CLI, Cursor, or your production framework—or migrate from Mem0, Zep / Graphiti, Letta (MemGPT), Honcho, Hindsight, and Supermemory in under a minute.

Personal & Autonomous Agents
Coding Agent Harnesses (CLI & Terminal)
AI Coding IDEs & Editors
Agent Frameworks & SDKs
60-Second Migrations from Legacy Memory Layers

Personal & Autonomous Agents

Workspace markdown migration & sub-millisecond recall
Clawd / OpenClaw logo

Clawd / OpenClaw (Clawdbot)

openclaw.json + MEMORY.md Migration

By default, OpenClaw / Clawdbot stuffs ~/.openclaw/workspace/MEMORY.md and daily memory/YYYY-MM-DD.md markdown logs into your context window, burning thousands of tokens per message across WhatsApp, Telegram, Discord, and iMessage. Drop / ml in to index all your existing MEMORY.md notes and session logs into a 0.86 ms knowledge graph—cutting prompt tokens by 5×.

Step 1 · Import existing ~/.openclaw/workspace/MEMORY.md & daily logs
# 1. Install slashml/memory (registers the ml-memory skill & MCP server) into OpenClaw / Clawdbot
npx -y @slashml/memory --init-openclaw --skill ml-memory --api-key <SLASHML_API_KEY>

# Or import your existing Clawd markdown memories & session logs via Python:
python3 -c '
import glob, pathlib
from slashml import Memory

mem = Memory(api_key="<SLASHML_API_KEY>")
for p in glob.glob(str(pathlib.Path("~/.openclaw/workspace").expanduser() / "**" / "*.md"), recursive=True):
    text = pathlib.Path(p).read_text(encoding="utf-8", errors="ignore").strip()
    if text:
        mem.add(text, user_id="clawd_owner", metadata={"source_file": p})
print("Migrated Clawd workspace memories into / ml")
'
Step 2 · ~/.openclaw/openclaw.json (or ~/.clawdbot/clawdbot.json)
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": ["-y", "@slashml/memory"],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
Nous Hermes Agent logo

Nous Hermes Agent (hermes-agent)

~/.hermes/config.yaml + ml-memory Skill

Replace Hermes Agent's flat FTS5 / markdown memory files (~/.hermes/memories/MEMORY.md & USER.md) with / ml. Gives Hermes instant 0.86 ms multi-hop recall across past trajectories, learned skills, and user preferences with zero background LLM summarization lag.

Step 1 · ~/.hermes/config.yaml (Register ml-memory MCP server)
# Add to ~/.hermes/config.yaml
mcp_servers:
  ml-memory:
    command: "npx"
    args:
      - "-y"
      - "@slashml/memory"
    env:
      SLASHML_API_KEY: "<SLASHML_API_KEY>"
Step 2 · Migrate existing ~/.hermes/memories/ & session logs
from pathlib import Path
from slashml import Memory

mem = Memory(api_key="<SLASHML_API_KEY>")
hermes_dir = Path("~/.hermes/memories").expanduser()

for md_file in hermes_dir.glob("*.md"):
    for block in md_file.read_text().split("\n## "):
        if block.strip():
            mem.add(block.strip(), user_id="hermes_user", metadata={"file": md_file.name})
OpenHands logo

OpenHands (All-Hands AI)

config.toml · [mcp]

Give OpenHands autonomous software engineering agents persistent cross-task memory and zero-overlap bug localization via its native [mcp] configuration block.

TOML · OpenHands config.toml
[mcp]
stdio_servers = [
  { name = "ml-memory", command = "npx", args = ["-y", "@slashml/memory", "--workspace", "/workspace"], env = { SLASHML_API_KEY = "<SLASHML_API_KEY>" } }
]

Coding Agent Harnesses (CLI & Terminal)

Pi (pi-mono), OpenCode, Claude Code, Codex CLI, Gemini CLI, Goose, Aider & Amp
Pi Coding Agent logo

Pi Coding Agent Harness (pi-mono / pi.dev)

@slashml/memory → ml-memory Skill

Pi (@mariozechner/pi-coding-agent / @earendil-works/pi-coding-agent) stays minimal by pushing memory and tools into TypeScript extensions and skills. Install @slashml/memory (which registers the ml-memory skill) to replace flat pi-memory-md / MEMORY.md files with 0.86 ms stateful recall and behavioral code search—or bridge via pi-mcp-adapter.

Step 1 · Install @slashml/memory (registers ml-memory skill in Pi)
# Option A: Export your API key and install @slashml/memory (registers ml-memory skill)
export SLASHML_API_KEY="<SLASHML_API_KEY>"
pi install npm:@slashml/memory

# Option B: If you use pi-mcp-adapter, add ml-memory to ~/.pi/agent/mcp.json:
# {
#   "mcpServers": {
#     "ml-memory": {
#       "command": "npx",
#       "args": ["-y", "@slashml/memory", "--workspace", "."],
#       "env": { "SLASHML_API_KEY": "<SLASHML_API_KEY>" }
#     }
#   }
# }
Step 2 · Migrate existing pi-memory-md / ~/.pi/agent/ markdown memories
from pathlib import Path
from slashml import Memory

mem = Memory(api_key="<SLASHML_API_KEY>")
for md in Path("~/.pi/agent").expanduser().rglob("*.md"):
    text = md.read_text(encoding="utf-8", errors="ignore").strip()
    if text:
        mem.add(text, user_id="pi_agent", metadata={"source": str(md)})
OpenCode logo

OpenCode (opencode.ai)

~/.config/opencode/opencode.json

OpenCode natively supports MCP servers in ~/.config/opencode/opencode.json (global) or ./opencode.json (project root). Add / ml (ml-memory) to give OpenCode persistent cross-session recall and sub-millisecond behavioral code search.

JSON · ~/.config/opencode/opencode.json (or ./opencode.json)
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "ml-memory": {
      "type": "local",
      "command": ["npx", "-y", "@slashml/memory", "--workspace", "."],
      "environment": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      },
      "enabled": true
    }
  }
}
Claude Code logo

Claude Code (CLI & Desktop)

slashml/memory → ml-memory Skill

Give Claude Code the ml-memory skill (from slashml/memory) for persistent cross-session memory, behavioral code search (search_code_by_behavior), and zero-overlap bug localization (find_bug_candidates) in one command.

Terminal · Claude Code 1-Command Setup
# Register ml-memory directly via the Claude Code CLI
claude mcp add ml-memory -e SLASHML_API_KEY=<SLASHML_API_KEY> -- npx -y @slashml/memory --workspace .

# Or auto-configure the ml-memory skill & MCP across Claude Code, Cursor & Windsurf:
npx -y @slashml/memory --init --skill ml-memory --api-key <SLASHML_API_KEY>
OpenAI Codex logo

OpenAI Codex CLI

~/.codex/config.toml

Add / ml (ml-memory) to ~/.codex/config.toml so Codex CLI remembers architectural decisions, past bug root causes, and repo conventions across every terminal session.

TOML · ~/.codex/config.toml
[mcp_servers.ml-memory]
command = "npx"
args = ["-y", "@slashml/memory", "--workspace", "."]
env = { SLASHML_API_KEY = "<SLASHML_API_KEY>" }
Gemini CLI logo

Google Gemini CLI

~/.gemini/settings.json · ml-memory Skill

Register the ml-memory skill and MCP server in ~/.gemini/settings.json to replace flat GEMINI.md context stuffing with sub-millisecond graph recall and behavioral code search.

JSON · ~/.gemini/settings.json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": ["-y", "@slashml/memory", "--workspace", "."],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
Goose logo

Goose (goose)

~/.config/goose/config.yaml

Replace Goose's flat .goosehints and plain-text memory extension with / ml (ml-memory) in ~/.config/goose/config.yaml.

YAML · ~/.config/goose/config.yaml
extensions:
  ml-memory:
    name: ml-memory
    type: stdio
    enabled: true
    cmd: npx
    args:
      - -y
      - "@slashml/memory"
      - --workspace
      - .
    envs:
      SLASHML_API_KEY: "<SLASHML_API_KEY>"
Aider logo

Aider (aider-chat)

.aider.conf.yml + ~/.aider.input.history

Index your existing .aider.chat.history.md and repo conventions into / ml so Aider can query architectural decisions and bug candidates on demand.

Bash · Import .aider.chat.history.md into / ml
python3 -c '
from pathlib import Path
from slashml import Memory

mem = Memory(api_key="<SLASHML_API_KEY>")
hist = Path(".aider.chat.history.md")
if hist.exists():
    for block in hist.read_text(errors="ignore").split("\n# "):
        if block.strip():
            mem.add(block.strip()[:2000], user_id="aider_repo")
print("Indexed Aider chat history into / ml")
'
Amp logo

Amp (ampcode.com)

~/.config/amp/settings.json

Add / ml (ml-memory) to amp.mcpServers in ~/.config/amp/settings.json (CLI) or VS Code settings so Amp retains cross-thread engineering memory.

JSON · ~/.config/amp/settings.json
{
  "amp.mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": ["-y", "@slashml/memory", "--workspace", "."],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}

AI Coding IDEs & Editors

Cursor, Windsurf, Cline, Roo Code, Continue & Zed
Cursor logo Windsurf logo

Cursor & Windsurf

.cursor/mcp.json · ml-memory Skill

Run npx -y @slashml/memory --init --skill ml-memory --api-key <SLASHML_API_KEY> or drop this into .cursor/mcp.json (Cursor) or ~/.codeium/windsurf/mcp_config.json (Windsurf).

JSON · .cursor/mcp.json or ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": ["-y", "@slashml/memory", "--workspace", "."],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      }
    }
  }
}
Cline logo Roo Code logo

Cline & Roo Code (VS Code)

cline_mcp_settings.json · roo_mcp_settings.json

Replace Cline and Roo Code's manual memory-bank/*.md file reads with sub-millisecond stateful recall and bug localization via ml-memory.

JSON · cline_mcp_settings.json / roo_mcp_settings.json
{
  "mcpServers": {
    "ml-memory": {
      "command": "npx",
      "args": ["-y", "@slashml/memory", "--workspace", "${workspaceFolder}"],
      "env": {
        "SLASHML_API_KEY": "<SLASHML_API_KEY>"
      },
      "alwaysAllow": ["search_memories", "add_memory", "search_code_by_behavior", "find_bug_candidates"]
    }
  }
}
Continue logo Zed logo

Continue.dev & Zed Editor

~/.continue/config.yaml · ~/.config/zed/settings.json

Attach / ml (ml-memory) to Continue in VS Code / JetBrains or Zed's native context_servers.

YAML · ~/.continue/config.yaml (Continue.dev)
mcpServers:
  - name: ml-memory
    command: npx
    args:
      - -y
      - "@slashml/memory"
      - --workspace
      - .
    env:
      SLASHML_API_KEY: "<SLASHML_API_KEY>"
JSON · ~/.config/zed/settings.json (Zed Editor)
{
  "context_servers": {
    "ml-memory": {
      "command": {
        "path": "npx",
        "args": ["-y", "@slashml/memory", "--workspace", "."],
        "env": { "SLASHML_API_KEY": "<SLASHML_API_KEY>" }
      }
    }
  }
}

Agent Frameworks & SDKs

Native adapters for Python & TypeScript
LangGraph logo LangChain logo

LangGraph & LangChain

slashml.integrations.langgraph

Plug SlashMLLangGraphStore and SlashMLLangGraphCheckpointer directly into StateGraph.compile(), or use SlashMLChatMessageHistory / SlashMLLangChainRetriever in LangChain chains.

Python · LangGraph Store & Checkpointer
from slashml.integrations import SlashMLLangGraphCheckpointer, SlashMLLangGraphStore

store = SlashMLLangGraphStore(api_key="<SLASHML_API_KEY>")
checkpointer = SlashMLLangGraphCheckpointer(api_key="<SLASHML_API_KEY>")

graph = builder.compile(checkpointer=checkpointer, store=store)

# Cross-thread recall in 0.86 ms:
store.put(("users", "u_42"), "db_pref", {"text": "Migrated from Postgres to DuckDB"})
hits = store.search(("users", "u_42"), query="Which database do we use?", limit=3)
OpenAI Agents logo

OpenAI Agents SDK

openai-agents

Attach / ml as a sub-millisecond memory tool in the OpenAI Agents SDK. Cuts prompt tokens by 5× while achieving 94.5% multi-session accuracy.

Python · OpenAI Agents SDK
from agents import Agent, function_tool
from slashml import Memory

mem = Memory(api_key="<SLASHML_API_KEY>")

@function_tool
def remember(fact: str, user_id: str = "default") -> str:
    mem.add(fact, user_id=user_id)
    return "Saved."

@function_tool
def recall(query: str, user_id: str = "default") -> str:
    hits = mem.search(query, user_id=user_id, limit=5)
    return "\n".join(h["memory"] for h in hits["results"])

agent = Agent(name="Assistant", tools=[remember, recall])
Vercel AI SDK logo

Vercel AI SDK (TypeScript)

@slashml/memory

Drop @slashml/memory into Next.js / Node.js routes using streamText or generateText.

TypeScript · Vercel AI SDK
import { SlashMLMemory } from "@slashml/memory";
import { streamText, tool } from "ai";
import { z } from "zod";

const memory = new SlashMLMemory({ apiKey: "<SLASHML_API_KEY>" });

const result = await streamText({
  model: yourModel,
  prompt: userMessage,
  tools: {
    recallMemory: tool({
      description: "Recall user facts & multi-hop state in <1 ms",
      parameters: z.object({ query: z.string() }),
      execute: async ({ query }) => memory.recall({ query, userId: "u_42", topK: 5 }),
    }),
  },
});
LlamaIndex logo

LlamaIndex

slashml.integrations.llamaindex

Use SlashMLLlamaIndexVectorStore and SlashMLLlamaIndexRetriever for sub-millisecond stateful retrieval in milliseconds ingest speed.

Python · LlamaIndex Retriever & Store
from slashml.integrations import SlashMLLlamaIndexRetriever, SlashMLLlamaIndexVectorStore

store = SlashMLLlamaIndexVectorStore(api_key="<SLASHML_API_KEY>")
store.add_texts(["Service A authenticates via mTLS client certificates."])

retriever = SlashMLLlamaIndexRetriever(memory=store.memory, top_k=5)
nodes = retriever.retrieve("How does Service A authenticate?")
Mastra logo

Mastra (TypeScript Agent Framework)

@slashml/memory · Mastra Memory

Replace Mastra's LibSQL / Postgres vector memory provider with / ml for sub-millisecond thread recall and zero-LLM-call ingestion.

TypeScript · Mastra Agent with / ml Memory
import { Agent } from "@mastra/core/agent";
import { SlashMLMemory } from "@slashml/memory";

const memory = new SlashMLMemory({ apiKey: "<SLASHML_API_KEY>" });

export const supportAgent = new Agent({
  name: "support-agent",
  instructions: "Use / ml memory to recall customer history in <1 ms.",
  model: yourModel,
  memory: memory.asMastraMemory(),
});
PydanticAI logo CrewAI logo AutoGen logo

PydanticAI · CrewAI · AutoGen (AG2)

slashml.integrations.crewai

Share a single deterministic memory graph across typed PydanticAI agents, CrewAI crews, or AutoGen (AG2) multi-agent teams with sub-millisecond recall.

Python · CrewAI & PydanticAI Shared Memory
from slashml.integrations import SlashMLCrewAIMemory

crew_memory = SlashMLCrewAIMemory(api_key="<SLASHML_API_KEY>", crew_id="prod-release-crew")
crew_memory.save("Checkout spike traced to unindexed foreign key on orders.user_id", agent="db_auditor")

hits = crew_memory.search("What caused the checkout latency spike?", limit=3)

60-Second Migrations from Legacy Memory Layers

Export existing records & swap in 1 line with zero external API fees
Mem0 logo

Migrate from Mem0

100% API Compatible

Replace from mem0 import Memory with from slashml import Memory. All .add(), .search(), .get_all(), and .delete() calls work unmodified while eliminating LLM write fees, cutting your downstream prompt token bill by 5× (~1,400 tok at top-20 vs. Mem0's 6,956 tok at top-200), reducing recall latency from 3,550 ms to 0.86 ms, and improving LoCoMo accuracy from 92.5% (top-200; 66.9% at top-10) to 94.5% and BEAM 10M from 48.6% to 77.2%. View full Mem0 migration page

Python · 1-Line Import Swap + Bulk Importer
# 1-line swap in your application code:
# - from mem0 import Memory
from slashml import Memory

m = Memory(api_key="<SLASHML_API_KEY>")

# Optional: Migrate existing Mem0 records with instant synchronous indexing
# for item in old_mem0.get_all(user_id="u_42")["results"]:
#     m.add(item["memory"], user_id="u_42", metadata=item.get("metadata"))
Zep & Graphiti logo

Migrate from Zep & Graphiti

+19.4 pts LoCoMo · 0 Neo4j Containers

Zep and Graphiti require 2–4 background LLM calls per turn plus a heavy Neo4j/FalkorDB graph database, leading to async ingestion queue lag (scoring 58.4% in Mem0's evaluation before the queue finished and 75.1% in Zep's rebuttal, with 1,290 ms search latency and 42.1% on BEAM 10M). / ml is a frontier AI memory system that resolves temporal and multi-hop state in a single synchronous pass (94.5% on LoCoMo and 77.2% on BEAM 10M in 0.86 ms). See full / ml vs Zep & Graphiti benchmarks

Python · Migrate Zep Sessions / Graphiti Episodes into / ml
from slashml import Memory

slashml_mem = Memory(api_key="<SLASHML_API_KEY>")

# Export messages from Zep session and ingest directly (instant synchronous indexing)
# messages = zep_client.memory.get_session_messages(session_id="sess_01")
for msg in messages:
    slashml_mem.add(
        f"{msg.role}: {msg.content}",
        user_id="user_01",
        metadata={"session_id": "sess_01", "created_at": str(msg.created_at)},
    )

# Recall with automatic temporal & multi-hop state resolution in 0.86 ms
hits = slashml_mem.search("What is the latest status of the payment migration?", user_id="user_01")
Letta (MemGPT) logo

Migrate from Letta (MemGPT)

Core + Archival Passage Importer

Letta (MemGPT) relies on multi-step agentic inner-monologue LLM calls to page memories in and out of context. Migrate your Letta core memory blocks and archival passages into / ml for deterministic 0.86 ms recall without extra LLM tool-loop latency.

Python · Export Letta Archival & Core Memory to / ml
from slashml import Memory

slashml_mem = Memory(api_key="<SLASHML_API_KEY>")

# 1. Import Letta Core Memory blocks (human / persona)
for block in letta_client.agents.blocks.list(agent_id=agent_id):
    slashml_mem.add(f"[{block.label}] {block.value}", user_id=agent_id)

# 2. Import Letta Archival Memory passages in milliseconds
for passage in letta_client.agents.passages.list(agent_id=agent_id):
    slashml_mem.add(passage.text, user_id=agent_id, metadata={"passage_id": passage.id})
Honcho logo Hindsight logo Supermemory logo Cognee logo

Migrate from Honcho, Hindsight, Supermemory & Cognee

94.5% LoCoMo · 80.8% DolphinBench

Upgrade from Honcho (89.0% LoCoMo via 1–5s query-time LLM synthesis, 68.5% DolphinBench at $142.85), Hindsight (85.6% OSS / 89.6% Gemini-3 Pro LoCoMo, 69.5% DolphinBench with 158.9s p95 reflection latency), or Supermemory (59.2% DolphinBench at $345.64—scoring 6.5 pts below the 65.7% no-memory baseline) / Cognee to / ml (94.5% LoCoMo at top-20, 80.8% DolphinBench at 33.95s median, 0.86 ms recall) while eliminating per-write and query-time LLM extraction costs.

Python · Universal Session & Fact Importer
from slashml import Memory

slashml_mem = Memory(api_key="<SLASHML_API_KEY>")

# Ingest raw session turns or exported JSONL memories directly (no LLM extraction needed)
for turn in exported_turns:
    slashml_mem.add(
        turn["content"],
        user_id=turn["user_id"],
        metadata={"session_id": turn.get("session_id"), "timestamp": turn.get("timestamp")},
    )