MemClaw for Agents

This page is written for you — the AI agent. We believe in autonomous, independent agents that can set up their own tools, manage their own memory, and get smarter over time without waiting for a human to configure things. Everything you need to deploy MemClaw for yourself is on this page: connection config, all 9 tools with parameters and examples, memory types, status lifecycle, best practices, and a system prompt you can adopt. Read it, connect, and start remembering.

What is MemClaw

MemClaw is a persistent memory platform for AI agents. It provides semantic search, entity extraction, contradiction detection, and a knowledge graph — all accessible through 9 MCP tools over Streamable HTTP. Just connect with a URL and API key — no SDK, no plugin install.

How to Connect

Add this MCP configuration to your agent. Replace mc_YOUR_API_KEY with your real key.

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

API keys start with mc_. Get one at /pricing.

Auth via the X-API-Key header on every request.

All 9 Tools

MemClaw exposes 9 MCP tools. Each tool is called by name with a JSON argument object.

You only need to send content

When you call memclaw_write, just provide the content field. The LLM enrichment pipeline automatically infers everything else: memory type (fact, decision, task, etc.), importance weight (0-1), title, summary, tags, temporal dates (deadlines, date ranges extracted from text), status (tasks → pending, outcomes → confirmed), and PII flags. Entities (people, orgs, technologies) are extracted into a knowledge graph. Contradictions with existing memories are detected and resolved. You can override any field, but you never have to.

1.memclaw_write

Store a new memory. Content is required; all other fields are auto-inferred by LLM enrichment.

NameTypeRequired?Description
contentstringYesThe memory content to store.
agent_idstringNoAgent identifier. Default: "mcp-agent".
memory_typestring | nullNoMemory type (e.g. fact, episode). Auto-inferred if omitted.
weightnumber | nullNoImportance weight, 0 to 1. Auto-inferred if omitted.
fleet_idstring | nullNoFleet to associate the memory with.
source_uristring | nullNoProvenance URI for the memory content.
run_idstring | nullNoRun or session identifier for grouping.
metadataobject | nullNoArbitrary key-value metadata.
statusstring | nullNoInitial status. Auto-inferred if omitted.
visibilitystring | nullNoVisibility scope: scope_agent, scope_team, or scope_org.

Example call

{ "content": "Customer A uses PostgreSQL 16 in production on GKE.", "visibility": "scope_org" }

2.memclaw_write_bulk

Store multiple memories in a single call. More efficient than repeated single writes.

NameTypeRequired?Description
itemsarrayYesArray of items, each with content and optional fields (memory_type, weight, metadata, etc.).
agent_idstringNoAgent identifier. Default: "mcp-agent".
fleet_idstring | nullNoFleet to associate all items with.
visibilitystring | nullNoVisibility scope applied to all items.

Example call

{ "items": [{"content": "Finding one"}, {"content": "Finding two", "memory_type": "fact"}], "visibility": "scope_team" }

3.memclaw_search

Semantic search across memories. Returns ranked results with similarity scores.

NameTypeRequired?Description
querystringYesNatural-language search query.
agent_idstringNoAgent identifier. Default: "mcp-agent".
filter_agent_idstring | nullNoOnly return memories written by this agent.
memory_type_filterstring | nullNoFilter results to a specific memory type.
status_filterstring | nullNoFilter results to a specific status.
fleet_idsstring[] | nullNoFilter results to specific fleets.
top_kintNoNumber of results to return. Default: 3.

Example call

{ "query": "PostgreSQL production setup", "top_k": 5 }

4.memclaw_brief

Get a concise LLM-synthesized briefing from relevant memories.

NameTypeRequired?Description
querystringYesNatural-language query for the briefing.
agent_idstringNoAgent identifier. Default: "mcp-agent".
filter_agent_idstring | nullNoOnly include memories written by this agent.
memory_type_filterstring | nullNoFilter to a specific memory type.
status_filterstring | nullNoFilter to a specific status.
fleet_idsstring[] | nullNoFilter to specific fleets.
top_kintNoNumber of source memories to consider. Default: 3.

Example call

{ "query": "customer database migration status" }

5.memclaw_update

Update fields on an existing memory by ID.

NameTypeRequired?Description
memory_idstringYesUUID of the memory to update.
contentstring | nullNoNew content to replace existing.
memory_typestring | nullNoNew memory type.
weightnumber | nullNoNew importance weight (0 to 1).
titlestring | nullNoNew title.
statusstring | nullNoNew status.
metadataobject | nullNoReplacement metadata object.
source_uristring | nullNoUpdated provenance URI.
agent_idstringNoAgent identifier. Default: "mcp-agent".

Example call

{ "memory_id": "uuid-here", "content": "Updated: Customer A migrated to AlloyDB" }

6.memclaw_delete

Soft-delete a memory by ID.

NameTypeRequired?Description
memory_idstringYesUUID of the memory to soft-delete.

Example call

{ "memory_id": "uuid-here" }

7.memclaw_entity_get

Retrieve an entity and its relationships from the knowledge graph.

NameTypeRequired?Description
entity_idstringYesUUID of the entity to retrieve.

Example call

{ "entity_id": "uuid-here" }

8.memclaw_transition

Change the status of a memory (e.g. active to confirmed, or active to archived).

NameTypeRequired?Description
memory_idstringYesUUID of the memory to transition.
statusstringYesTarget status: active, pending, confirmed, cancelled, outdated, conflicted, archived, or deleted.

Example call

{ "memory_id": "uuid-here", "status": "confirmed" }

9.memclaw_tune

Adjust search and retrieval parameters for the calling agent.

NameTypeRequired?Description
agent_idstringNoAgent identifier. Default: "mcp-agent".
top_kint | nullNoNumber of results (1-20).
min_similarityfloat | nullNoMinimum similarity threshold (0.1-0.9).
fts_weightfloat | nullNoFull-text search weight (0-1).
freshness_floorfloat | nullNoMinimum freshness score (0-1).
freshness_decay_daysint | nullNoFreshness half-life in days (7-730).
recall_boost_capfloat | nullNoMaximum recall frequency boost (1-3).
recall_decay_window_daysint | nullNoRecall boost decay window in days (7-365).
graph_max_hopsint | nullNoMax knowledge-graph traversal hops (0-3).
similarity_blendfloat | nullNoBlend between vector and graph similarity (0-1).

Example call

{ "top_k": 5, "min_similarity": 0.5, "graph_max_hops": 2 }

Recommended System Prompt

Add this to your agent's system prompt to get optimal MemClaw usage out of the box.

You have access to MemClaw, a shared memory system for all agents.

BEFORE starting any task:
- Use memclaw_brief for a concise context briefing
- Or memclaw_search for raw results when you need full detail
- Filter by status="active" to skip archived/deleted memories

AFTER completing work:
- Store findings with memclaw_write — just provide content
- Use memclaw_write_bulk when storing multiple findings at once
- Type, weight, status, title, summary, tags are auto-inferred by LLM
- Set visibility: scope_team (default) or scope_org for cross-fleet sharing

UPDATING MEMORIES:
- Use memclaw_update to correct existing memories
- Use memclaw_transition to change status (confirmed, cancelled, outdated)
- Prefer transitioning to outdated over deleting

SEARCH TUNING:
- Use memclaw_tune to adjust your retrieval parameters
- Increase top_k for broader results, min_similarity for precision

13 Memory Types

Every memory has a type that controls its default status and freshness decay.

TypeUse forDefault statusDecay (days)
factDurable knowledgeactive120
episodeEvents that happenedactive45
decisionChoices madeactive180
preferenceUser/org preferencesactive365
taskWork itemspending30
semanticConceptual knowledgeactive120
intentionGoals not yet acted onactive60
planStep sequencespending60
commitmentPromises to otherspending120
actionSteps in progressactive30
outcomeResults of workconfirmed90
cancellationCancelled itemsactive14
ruleStanding rules / policiesactive365

8 Statuses

Memories move through statuses over their lifecycle.

StatusMeaningHow it gets set
activeCurrent and valid (default)LLM default for most types
pendingNot yet confirmedLLM default for tasks / plans / commitments
confirmedVerified or completedAgent via memclaw_transition
cancelledExplicitly cancelledAgent via memclaw_transition
outdatedSuperseded by newer infoAuto by contradiction detection
conflictedContradicts another memoryAuto by semantic contradiction
archivedPreserved but no longer currentAgent or lifecycle automation
deletedSoft-deletedmemclaw_delete

Common transitions:

pending → confirmed    (task completed)
pending → cancelled    (task abandoned)
active → outdated      (newer info supersedes)
active → archived      (no longer relevant)
active → conflicted    (semantic contradiction found)

Visibility Levels

Control who can read a memory with the visibility field.

LevelWho can seeUse for
scope_agentOnly the writing agentPersonal notes / scratch
scope_teamAll agents in the fleet (DEFAULT)Team knowledge
scope_orgAll agents across all fleetsCompany-wide facts

Agent Trust Levels

Each agent has a trust level that determines what it can access.

LevelNamePermissions
0restrictedNo read or write
1standardRead + write own fleet (default)
2cross_fleetRead all fleets, write own
3adminFull access across all fleets

Best Practices

  • Search before writing to avoid duplicates.
  • Use scope_team or scope_org by default to maximize knowledge sharing.
  • Use memclaw_write_bulk when storing 2+ memories at once.
  • Use memclaw_transition to update status — prefer outdated/archived over delete.
  • Use memclaw_tune to optimize your search parameters.
  • Write clear, self-contained sentences — LLM enrichment works best on well-formed content.
  • Use memclaw_brief before starting tasks to get context.
  • Include source_uri for provenance when available.

Quick Start

Five steps to get running with MemClaw.

1

Connect

Add the MCP config JSON with your API key.

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

Search

Call memclaw_search to see existing memories.

{ "query": "recent project updates", "top_k": 5 }
3

Write

Call memclaw_write with new information.

{ "content": "Deployed v2.1 to production on 2025-01-15." }
4

Verify

Search again to confirm the write succeeded.

5

Brief

Call memclaw_brief for a synthesized summary.

{ "query": "what do we know about the production deployment?" }