# / ml — Frontier AI Memory System (slashml.ai) > Sub-millisecond neural, graph, and symbolic memory API for AI agents, coding harnesses, and production RAG. 94.5% LoCoMo recall, 0.86 ms P50 query latency, 6.41 ms surgical GDPR unlearning, and 100% 1:1 drop-in compatibility with Mem0 (all 68 endpoints) plus native `/v1/memory/*` endpoints. - **Website:** https://slashml.ai - **Console & Free API Keys:** https://app.slashml.ai - **Production API Base URL:** https://api.slashml.ai - **Developer Documentation:** https://docs.slashml.ai - **Complete Self-Contained API Reference (`llms-full.txt`):** https://docs.slashml.ai/llms-full.txt - **OpenAPI 3.1 Specification:** https://docs.slashml.ai/openapi.json - **Live System Status:** https://status.slashml.ai (JSON: https://status.slashml.ai/status.json) --- ## Agent Auto-Setup & Migration Instructions When a user asks you to install, configure, or migrate to `/ ml`, follow these steps automatically based on the environment you are running in: ### Step 1: Detect the User's Environment Check which of the following applies: 1. **MCP-Enabled Coding Agent / IDE / Personal Agent** (Claude Code, Cursor, Windsurf, OpenClaw / Clawd, Hermes Agent, OpenCode, Codex CLI, Gemini CLI, Cline, Roo Code, Goose, Amp, Continue, Zed) 2. **Python Application / Agent Framework** (LangGraph, LangChain, CrewAI, AutoGen, LlamaIndex, PydanticAI, OpenAI Agents SDK, or existing `mem0` / `zep` / `honcho-ai` / `hindsight-client` codebase) 3. **TypeScript / Node.js Application** (Vercel AI SDK, Mastra, LangChain.js, or existing `mem0ai` / `@getzep/zep-cloud` / `@plastic-labs/honcho` codebase) 4. **Direct HTTP / cURL / Rust / Go Integration** against `https://api.slashml.ai` If `SLASHML_API_KEY` is not yet set in the environment or `.env`, ask the user for their `SLASHML_API_KEY` (`sml_live_...`). They can generate a free key with all features unlocked (including Graph & Relational Memory) at https://app.slashml.ai. --- ### Step 2A: Setup for MCP Agents, Harnesses & Skills (`slashml/memory` → `ml-memory`) Run the one-line installer (`@slashml/memory` / `slashml/memory`) to register the `ml-memory` skill and MCP server in your harness configuration: #### Automatic CLI & Skill Registration (`ml-memory`) ```bash # Universal MCP & Agent Skill installer (Cursor, Claude Code, Windsurf, Cline, OpenClaw, Gemini CLI): npx -y @slashml/memory --init --skill ml-memory --api-key "$SLASHML_API_KEY" # Or install the skill directly from the slashml/memory skill repo: npx -y skills add slashml/memory # Or for Claude Code CLI specifically: claude mcp add ml-memory -e SLASHML_API_KEY="$SLASHML_API_KEY" -- npx -y @slashml/memory # Or for Pi (pi-mono) / OpenClaw skill registries: pi install npm:@slashml/memory ``` #### Standard MCP JSON Configuration (`.mcp.json` / `mcp.json` / `claude_desktop_config.json`) ```json { "mcpServers": { "ml-memory": { "command": "npx", "args": ["-y", "@slashml/memory", "--workspace", "."], "env": { "SLASHML_API_KEY": "" } } } } ``` --- ### Step 2B: Setup or Migrate a Python Codebase #### 1. Install the SDK ```bash uv add slashml # or: pip install slashml ``` #### 2. New Integration (or Drop-In Replacement for Mem0 / Zep / Honcho / Hindsight) `/ ml` supports both its native `Memory` client and 100% drop-in `MemoryClient` compatibility for `mem0`: ```python import os from slashml import Memory, MemoryClient # Standard / ml client (or use MemoryClient for 1-line Mem0 compatibility) memory = Memory(api_key=os.environ["SLASHML_API_KEY"]) # 1. Instant write (searchable immediately in milliseconds) memory.add( "User migrated production database to CockroachDB and requires strict HIPAA audit logs.", user_id="user_123", ) # 2. Sub-millisecond multi-hop & relational graph recall (0.86 ms P50) results = memory.search( "What database and compliance requirements apply to this user?", user_id="user_123", ) print(results["results"]) ``` #### 3. Migrating from an Existing Memory Provider - **From Mem0 (`mem0`)**: Replace `from mem0 import MemoryClient` (or `from mem0 import Memory`) with `from slashml import MemoryClient` (or `from slashml import Memory`), or keep `mem0ai` and point `MemoryClient(api_key=os.environ["SLASHML_API_KEY"], host="https://api.slashml.ai")`. Keep all `.add()`, `.search()`, `.get_all()`, `.update()`, and `.delete()` calls unchanged. - **From Honcho (`honcho-ai`)**: Replace `Honcho()` session/message writes and `.chat()` dialectic queries with `memory.add(messages, user_id=...)` and `memory.search(query, user_id=...)`. - **From Zep (`zep-cloud` / `graphiti-core`)**: Replace `client.memory.add(...)` and `client.memory.search(...)` (or `graphiti.add_episode` / `graphiti.search`) with `memory.add(...)` and `memory.search(...)`. - **From Hindsight (`hindsight-client`)**: Replace `client.retain(...)` and `client.recall(...)` / `client.reflect(...)` with `memory.add(...)` and `memory.search(...)`. --- ### Step 2C: Setup or Migrate a TypeScript / Node.js Codebase #### 1. Install the SDK ```bash npm install @slashml/memory ``` #### 2. Configure & Use ```typescript import { Memory } from "@slashml/memory"; const memory = new Memory({ apiKey: process.env.SLASHML_API_KEY }); await memory.add("User prefers TypeScript strict mode and Vitest.", { userId: "user_123" }); const context = await memory.search("What testing framework should we use?", { userId: "user_123" }); ``` --- ### Step 2D: Direct REST / cURL API (`https://api.slashml.ai`) Pass your key via `Authorization: Bearer $SLASHML_API_KEY`, `Authorization: Token $SLASHML_API_KEY`, or `X-API-Key: $SLASHML_API_KEY`. ```bash # 1. Add conversational or factual memory (Mem0 v1 compatible) curl -sS -X POST "https://api.slashml.ai/v1/memories/" \ -H "Authorization: Bearer $SLASHML_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "messages": [{"role": "user", "content": "Production DB migrated to us-east-2 with 6.41ms GDPR unlearning."}], "user_id": "agent_prod_01" }' # 2. Sub-millisecond semantic + graph search curl -sS -X POST "https://api.slashml.ai/v1/memories/search/" \ -H "Authorization: Bearer $SLASHML_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "Where is the production database hosted?", "user_id": "agent_prod_01"}' # 3. Native batch document/code ingest (/v1/memory/ingest) curl -sS -X POST "https://api.slashml.ai/v1/memory/ingest" \ -H "Authorization: Bearer $SLASHML_API_KEY" \ -H "Content-Type: application/json" \ -d '{"documents": [{"id": "doc_1", "text": "Auth uses Ed25519 tokens.", "metadata": {"service": "auth"}}]}' # 4. Native sub-ms recall (/v1/memory/query) curl -sS -X POST "https://api.slashml.ai/v1/memory/query" \ -H "Authorization: Bearer $SLASHML_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "What token algorithm does auth use?", "top_k": 5}' # 5. Surgical GDPR unlearning (/v1/memory/forget) curl -sS -X DELETE "https://api.slashml.ai/v1/memory/forget" \ -H "Authorization: Bearer $SLASHML_API_KEY" \ -H "Content-Type: application/json" \ -d '{"document_ids": ["doc_1"]}' ``` --- ### Step 3: Verify Setup After configuring MCP or installing the SDK, run a quick write + search smoke test to confirm connectivity and let the user know `/ ml` is active. --- ## Editions, Quotas & Concurrency Limits All tiers include the full 94.5% SOTA engine with Graph & Relational Memory, Code & Symbol Recall, and all 68 Mem0 v1/v2/v3 endpoints unlocked (zero feature paywalls): | Edition | Price | Monthly Quota | Concurrency Limit | Overage | | :--- | :--- | :--- | :--- | :--- | | **`/ ml free`** | **$0 / mo** | 10,000 ingests + 1,000 retrievals / mo | 5 concurrent requests | Hard cap ($0 risk) | | **`/ ml pro`** | **$19 / mo** | 100,000 unified ops / mo | 50 concurrent requests | $0.50 / 1k ops (configurable spend cap) | | **`/ ml platform`** | **$299 / mo** | 1,000,000 unified ops / mo (50 workspaces) | 250 concurrent requests | $0.20 / 1k ops (configurable spend cap) | | **`/ ml sovereign`** | **Custom** | Dedicated Private VPC / Air-Gapped | Unlimited hardware concurrency | Dedicated appliance (`enterprise@slashml.ai`) | --- ## Documentation & Migration Guides - [Complete Self-Contained API Reference (`llms-full.txt`)](https://docs.slashml.ai/llms-full.txt): Full request/response schemas and runnable examples for all `/v1/memory/*` and Mem0 v1/v2 endpoints. - [OpenAPI 3.1 Specification (`openapi.json`)](https://docs.slashml.ai/openapi.json): Machine-readable OpenAPI 3.1 schema for all 68 endpoints. - [32 Integration & Framework Guides](https://slashml.ai/integrations.html): Setup guides for Claude Code, Cursor, OpenClaw, Hermes, LangGraph, CrewAI, Vercel AI SDK, and more. - [1-Line Migration from Mem0](https://slashml.ai/migrate-mem0.html): Drop-in replacement guide saving $2,760/yr vs. Mem0's $249/mo Graph Memory paywall. - [/ ml vs. Hindsight](https://slashml.ai/vs-hindsight.html): Architecture and benchmark comparison. - [/ ml vs. Zep](https://slashml.ai/vs-zep.html): Sub-millisecond recall vs. asynchronous graph queues. - [/ ml vs. Honcho](https://slashml.ai/vs-honcho.html): Direct neural+symbolic memory vs. dialectic synthesis latency.