Skip to main content

Mastra + Memanto

Mastra Add persistent memory to any Mastra agent with three ready-made tools, shipped as part of the @moorcheh-ai/memanto TypeScript SDK.

Prerequisites

  • Node.js 20+
  • Moorcheh API key (or an on-prem Memanto backend — see On-Prem)
  • @mastra/core and zod installed in your app (optional peer dependencies of @moorcheh-ai/memanto)

Install

@mastra/core and zod are optional peer dependencies of @moorcheh-ai/memanto — install them yourself in the host app; createMemantoMastraTools fails fast with a clear error if they’re missing.

Quick Start

createMemantoMastraTools returns an object with three Mastra tools — pass it straight into an agent’s tools map.

Available Tools

ToolBacked byDescription
recallMemoryRecallSemantic search over stored memories. query (required), limit (1-50), type (filter by memory type).
rememberMemoryRememberPersist a durable fact/preference/decision/instruction. content (required), type (optional — server auto-classifies if omitted), title, tags.
answerMemoryGenerate AI AnswerRAG-synthesized answer over stored memories. question (required), limit (1-100).

Options

Memory Types

type fields are constrained to Memanto’s 13 supported types via a shared MEMORY_TYPES export:
See the Memory Types Reference for what each type means.

On-Prem

The integration talks to Memanto through the Memanto client, so it works identically against an on-prem backend — no code changes, just configure the backend once with the CLI. See On-Prem Overview and the TypeScript SDK Reference.

Next Steps