MemClaw / docs
Tutorials

Your first memories on MemClaw Cloud

The five-minute Cloud starter — sign up, mint a key, write three memories, recall them with completely different words, and see them in Prism.

Managed (Cloud) starter — the smallest end-to-end tutorial. You just signed up and want to see memory work before wiring up any agents. Ready for a real multi-agent build afterwards? That's Build an agent fleet on MemClaw Cloud. Prefer to run MemClaw yourself? Start with the self-hosted OSS series.

You just signed up at memclaw.net — or you're about to. Before wiring up agents, fleets, or MCP configs, you should see the core trick with your own eyes: you write a plain sentence, and MemClaw turns it into enriched, searchable memory you can find again with completely different words.

That's this tutorial. No SDK, no install, no agent harness — just a terminal with curl. In five minutes you will:

  1. Sign up and mint an API key
  2. Write three memories
  3. Recall them with words they don't contain
  4. See them in Prism, your hosted dashboard

Everything you do here by hand is exactly what an AI agent does automatically over MCP — so when you graduate to the fleet tutorial, nothing will feel like magic.


The idea in one picture

   "We chose PostgreSQL over MongoDB."      ← you write plain text


        ┌─────────────────────┐
        │    MemClaw Cloud    │
        │  classify · title   │
        │  entities · weight  │
        │  PII scan · embed   │
        └─────────────────────┘


   "which database did we pick and why?"    ← recalled by meaning,
                 │                            not by keywords

        your memory, ranked first

One raw sentence in; a classified, titled, embedded, governed memory out. Recall works on meaning — the word "database" appears nowhere in what you wrote.


Step 1 — Sign up & mint a key (2 minutes)

Sign up at memclaw.net and create a project — that's your isolated tenant. In the project's API keys screen, mint a key (it starts with mc_). Treat the key like a password; it scopes every call to your project.

Export it so the commands below are copy-paste:

export MEMCLAW_URL=https://memclaw.net
export MEMCLAW_KEY=mc_xxxxxxxxxxxxxxxxxxxx   # your project API key

Confirm the platform is reachable:

curl "$MEMCLAW_URL/api/v1/health" -H "X-API-Key: $MEMCLAW_KEY"
# {"status": "ok", "storage": "connected", "redis": "connected", "event_bus": "ok"}

REST calls name your project explicitly with a tenant_id. Ask the platform who your key is — whoami returns it:

curl "$MEMCLAW_URL/api/v1/whoami" -H "X-API-Key: $MEMCLAW_KEY"
# {"tenant_id": "ten-7c41f2", "auth_mode": "tenant", "capabilities": ["read", "write"], ...}

export MEMCLAW_TENANT=ten-7c41f2             # yours, from the whoami response

Step 2 — Write your first memory

A memory is natural-language content plus two identifiers: tenant_id (your project) and agent_id (whoever is writing). You're not an agent yet, so call yourself me:

curl -X POST "$MEMCLAW_URL/api/v1/memories" \
  -H "X-API-Key: $MEMCLAW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant_id": "'$MEMCLAW_TENANT'", "agent_id": "me", "content": "I prefer concise answers, dark mode, and metric units."}'

Noteagent_id is required on Cloud. Leave it out and the write is rejected with a 422: "agent_id is required; only the standalone single-tenant deployment may omit it." Later, when real agents write memories, this identity is what governance hangs off.

The response returns your stored memory immediately — with an id you'll use in a moment. Enrichment — classify, title, extract entities, scan for PII, embed — runs asynchronously and lands seconds later. You never structure anything yourself; we'll fetch the enriched result after the next step.


Step 3 — Write two more, then look at what MemClaw did

Memories get interesting in variety. Write a decision and a gotcha:

curl -X POST "$MEMCLAW_URL/api/v1/memories" \
  -H "X-API-Key: $MEMCLAW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant_id": "'$MEMCLAW_TENANT'", "agent_id": "me", "content": "We chose PostgreSQL over MongoDB for the orders service because we need transactions."}'

curl -X POST "$MEMCLAW_URL/api/v1/memories" \
  -H "X-API-Key: $MEMCLAW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant_id": "'$MEMCLAW_TENANT'", "agent_id": "me", "content": "Gotcha: the staging environment resets every Sunday night — do not leave test data there."}'

Give enrichment a few seconds, then fetch the decision back by the id from its response:

curl "$MEMCLAW_URL/api/v1/memories/YOUR_MEMORY_ID?tenant_id=$MEMCLAW_TENANT" \
  -H "X-API-Key: $MEMCLAW_KEY"

Your one raw sentence now looks like this:

{
  "memory_type": "decision",
  "title": "Chose PostgreSQL over MongoDB for orders service",
  "weight": 0.85,
  "status": "confirmed",
  "entity_links": [
    { "canonical_name": "postgresql",     "entity_type": "technology" },
    { "canonical_name": "mongodb",        "entity_type": "technology" },
    { "canonical_name": "orders service", "entity_type": "project" },
    { "canonical_name": "transactions",   "entity_type": "concept" }
  ]
}

An LLM classified it as a decision, titled it, weighted its importance, and extracted four linked entities — from a sentence you typed in five seconds. Fetch your other two memories and compare: the preference and the warning are classified differently, and that classification later shapes how each one is ranked, maintained, and retired.

Tip — Writing the exact same content twice returns a 409: MemClaw deduplicates instead of storing copies. Your memory stays clean by default.


Step 4 — Recall with different words

Here's the point of all this. Ask about the database decision without using any of its words:

curl -X POST "$MEMCLAW_URL/api/v1/search" \
  -H "X-API-Key: $MEMCLAW_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenant_id": "'$MEMCLAW_TENANT'", "query": "which database did we pick and why", "top_k": 5}'

The decision comes back first, under an items array with a similarity score:

{ "items": [ {
  "title": "Chose PostgreSQL over MongoDB for orders service",
  "memory_type": "decision", "similarity": 0.67,
  "agent_id": "me", "visibility": "scope_team"
} ] }

Look at what just happened: the query says "database" — your memory never does. It says "pick" — you wrote "chose". Vector semantic similarity, blended with keyword matching and knowledge-graph expansion, bridges the gap. Try "UI preferences" next — it finds your dark-mode memory the same way. (Keep queries compact and on-topic: retrieval has a similarity floor, so a long rambling question can score below it. REST /search caps top_k at 20; the memclaw_recall MCP tool agents use has no such cap.)


Step 5 — See it in Prism

Open your dashboard at memclaw.net. Prism is live from your very first write: your three memories are there with their inferred types, titles, and weights; the entities extracted from them (PostgreSQL, MongoDB, the orders service); and an audit entry for every call you just made.

That's the whole loop: write plain text → enriched automatically → recalled semantically → visible and governed in Prism.


Bonus — let your AI assistant do it

Everything above is what an AI agent does on its own over MCP. Paste this into your client config (Claude Desktop, Claude Code, Cursor, Windsurf):

{
  "mcpServers": {
    "memclaw": {
      "url": "https://memclaw.net/mcp",
      "headers": { "X-API-Key": "mc_xxxxxxxxxxxxxxxxxxxx" }
    }
  }
}

Restart the client, then say:

"Remember that I prefer concise answers and dark mode."

Later, in a fresh session:

"What do you know about my preferences?"

The agent calls memclaw_write and memclaw_recall for you — the same endpoints you just hit by hand. Same memories, same project, same dashboard.


Where to go from here

You've seen the primitive: plain text in, semantic recall out, everything visible in Prism. Next steps:

  • Build an agent fleet on MemClaw Cloud — the natural next step: three Claude Code agents sharing this same memory, with identities, trust tiers, and governance.
  • Memory pipeline concepts — what actually happens to a sentence between write and recall.
  • Mind the free tier — 10K memories, 5K writes and 500 recalls per month; Prism shows current usage.

MemClaw Cloud — managed, governed memory for agent fleets, operated for you, with the Prism dashboard included. Start on the free tier at memclaw.net: 10K memories.

Your first three memories took five minutes. Your agents' next ten thousand will take none of your time at all.