# Mastra Memory

> Mastra Memory system guide - storage backends, message history, observational memory, working memory, semantic recall, and thread management. Covers Memory class options (lastMessages, semanticRecall, workingMemory schemas, observationalMemory), resourceId/threadId scoping, listing and resuming a user's threads, and per-user conversation state at scale.

- Skill: `artsmc-claude-dev-agents/mastra-memory` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add artsmc-claude-dev-agents/mastra-memory`
- Raw SKILL.md: https://api.skillmd.com/api/skills/artsmc-claude-dev-agents/mastra-memory/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: artsmc (https://skillmd.com/u/artsmc-claude-dev-agents)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/artsmc-claude-dev-agents/mastra-memory

---


# Mastra Memory System Development

Comprehensive guide for configuring Mastra memory systems. Covers storage backends, message history, observational memory (auto fact extraction), working memory (structured state), semantic recall (embedding-based), and thread management. Memory features are configured via options, not processor classes.

## Usage

```bash
/mastra-memory
```

Provides context for:
- `Memory` class constructor with options-based config
- Storage backends (LibSQLStore, PostgresStore, UpstashStore)
- `options.lastMessages` for message history
- `options.semanticRecall` for embedding-based recall
- `options.workingMemory` for structured state
- `options.observationalMemory` for fact extraction
- Thread management and cloning
- Agent integration via `memory` property

