Skip to content

Use cases

Real examples of how developers use MemoClaw. Each one includes the problem, the approach, and working code you can copy.

Personal assistants

Your agent remembers so users don't have to repeat themselves.

The problem

Every new session starts from zero. Users have to re-explain their preferences, timezone, communication style, and context. MEMORY.md files grow until they eat half the context window.

The approach

Store user preferences, corrections, and conversation summaries in MemoClaw. On each session start, recall the last 10 relevant memories and inject them as context. The agent picks up where it left off.

TypeScript
// On session start — load context
const memories = await memoclaw.recall({
  query: "user preferences and recent context",
  namespace: "assistant",
  limit: 10,
});

// After the user corrects something
await memoclaw.store({
  content: "User prefers dark mode. Timezone is UTC+1.",
  importance: 0.9,
  tags: ["preferences"],
  namespace: "assistant",
});

What you get

  • No more "what timezone are you in?" every session
  • Context window stays clean — memories are fetched on demand
  • High-importance corrections surface first

Coding agents

Store architecture decisions, code style, and project context once.

The problem

Coding agents lose track of project conventions between sessions. They suggest patterns you've already rejected, forget your preferred frameworks, and re-discover the same bugs.

The approach

After each session, store architecture decisions and code style preferences. Tag them by project. On the next session, recall project-specific context before generating code.

TypeScript
// Store a tech decision
await memoclaw.store({
  content: "Project uses Drizzle ORM, not Prisma. " +
    "Switched in Jan 2025 due to edge runtime issues.",
  importance: 0.85,
  tags: ["architecture", "orm"],
  namespace: "my-saas",
});

// Before generating code
const context = await memoclaw.recall({
  query: "database patterns and ORM setup",
  namespace: "my-saas",
  limit: 5,
});

What you get

  • Agent stops suggesting Prisma after you switched to Drizzle
  • Project conventions persist across sessions and agent restarts
  • New team members' agents inherit the same context

Research agents

Build a knowledge base from research sessions, not file names.

The problem

Research agents collect information across dozens of sessions. Without persistent memory, findings are buried in chat logs or scattered across markdown files that nobody organizes.

The approach

Store each finding as a memory with relevant tags. Use semantic recall to pull related findings by topic, not file name. Consolidate overlapping memories periodically.

TypeScript
// Store a research finding
await memoclaw.store({
  content: "Anthropic's MCP protocol supports tool " +
    "use across different LLM providers. Adopted by " +
    "Cursor, Windsurf, and OpenClaw as of Feb 2025.",
  importance: 0.7,
  tags: ["mcp", "protocols", "tooling"],
  namespace: "research-ai-infra",
});

// Later — recall by topic
const findings = await memoclaw.recall({
  query: "MCP adoption and compatible tools",
  namespace: "research-ai-infra",
});

What you get

  • Findings are searchable by meaning, not keyword
  • Research accumulates over weeks without manual organization
  • Consolidate endpoint merges overlapping memories automatically

Multi-agent systems

One agent learns, all agents remember.

The problem

In multi-agent setups, each agent operates in its own context bubble. Agent A discovers something useful, but Agent B has no way to access that knowledge.

The approach

All agents share the same wallet and namespace. When one agent stores a memory, every other agent can recall it. Use namespaces to separate domains while sharing the same identity.

TypeScript
// Agent A — the researcher
await memoclaw.store({
  content: "The /api/v2/users endpoint returns " +
    "paginated results. Max 100 per page.",
  tags: ["api", "pagination"],
  namespace: "project-x",
});

// Agent B — the developer (same wallet)
const apiNotes = await memoclaw.recall({
  query: "API pagination limits",
  namespace: "project-x",
});
// Gets Agent A's finding without any extra setup

What you get

  • Agents share context through a common memory store
  • Namespaces keep project-specific knowledge separate
  • Same wallet = same memories, regardless of which agent wrote them

Session summaries

End each session with a summary. Start the next one informed.

The problem

Long conversations generate valuable context that evaporates when the session ends. Manually writing summaries is tedious and inconsistent.

The approach

At session end, generate a summary and store it in MemoClaw. At session start, recall recent summaries to restore context. Mark session summaries with a dedicated tag for easy filtering.

TypeScript
// End of session — store summary
await memoclaw.store({
  content: "Session 2025-02-15: Debugged auth flow. " +
    "Root cause was expired refresh token handling. " +
    "Fixed in auth-service/token.ts. Tests passing.",
  importance: 0.8,
  tags: ["session-summary", "auth"],
  namespace: "daily-work",
});

// Next session — recall recent summaries
const recent = await memoclaw.recall({
  query: "recent work sessions",
  namespace: "daily-work",
  tags: ["session-summary"],
  limit: 5,
});

What you get

  • Each session starts with relevant context from the last few
  • No manual summary writing — let the agent do it
  • Searchable by topic, not just chronology

Migrating from MEMORY.md

Stop managing text files. Start searching memories.

The problem

MEMORY.md works until it doesn't. The file grows, eats context window tokens, and there's no way to search it semantically. You end up trimming it by hand.

The approach

Import your existing MEMORY.md into MemoClaw with the CLI. Each section becomes a separate memory with semantic search. Your agent recalls what's relevant instead of loading the entire file.

Terminal
# Import your existing memory file
memoclaw migrate ./MEMORY.md \
  --namespace my-agent \
  --tags memory,imported

# In your agent — recall instead of loading a file
const context = await memoclaw.recall({
  query: "user preferences and project setup",
  namespace: "my-agent",
  limit: 10,
});

What you get

  • Context window freed up — no more loading entire files
  • Semantic search replaces Ctrl+F
  • Old memories stay accessible but don't crowd new context

Ready to try it?

100 free API calls. No registration required.