Skip to main content

TypeScript SDK Reference

The @moorcheh-ai/memanto SDK for Node.js / TypeScript boots a local Memanto server on demand via uvx and exposes an ergonomic client.

Prerequisites

  • Node.js 20+
  • uvx on PATH — install uv (which ships uvx)

Installation

Quick Start

On the first call, the SDK:
  1. Picks a free port and spawns uvx memanto serve --port <port>.
  2. Polls /health until the server is ready.
  3. Creates the agent (if autoCreate is enabled — default true) and activates a session.
  4. Sends the request with the session token attached.
When close() is called (or the Node process exits), the server is sent SIGTERM.

Memanto Client

Constructor

Memory Write Methods

Memory Read Methods

Analysis Methods

action is one of: keep_old | keep_new | keep_both | remove_both | manual.

Agent & Session Lifecycle

Diagnostics

Framework Integrations

The SDK ships pre-built memory tools for three agent frameworks, each behind its own subpath import so unused framework code never enters your bundle: Each exposes recallMemory, rememberMemory, and answerMemory tools backed by this same Memanto client. The corresponding framework package (ai, @mastra/core, or openai) plus zod are optional peer dependencies — install only the ones you use.

Versioning

The npm package version tracks the matching PyPI release. Pin the server version with:

License

MIT