MemorySync
Official SDK

Vercel AI SDK + MemorySync

Long-term memory for generateText and streamText with one wrapLanguageModel call, on AI SDK v6 and v7.

Overview

Install memorysync-ai-sdk and wrap any model once: recalled context is injected before each generation and the exchange persists verbatim after it, streaming included. Standalone helpers cover hand-wired setups, five structured tools give agents explicit memory, and one build supports AI SDK v6 and v7 — the current major no other memory vendor supports.

Setup status and requirements

Supported version
memorysync-ai-sdk 1.0.0 (npm)
Last setup review
2026-08-23
Permissions
A MemorySync API key with read and write scopes.
Limits
Requires the ai package v6 or v7 (Node 18+; ai v7 itself requires Node 22+). JavaScript/TypeScript only — Python agents use the LangChain, LangGraph or CrewAI integrations.
Open setup documentation →

Capabilities

Quick Start

import { generateText, wrapLanguageModel } from "ai";
import { openai } from "@ai-sdk/openai";
import { createMemorySyncMiddleware } from "memorysync-ai-sdk";
const model = wrapLanguageModel({
model: openai("gpt-4o-mini"),
middleware: createMemorySyncMiddleware({ userId: "customer-7" }),
});
const { text } = await generateText({ model, prompt: "Book my usual trip." });

Use Cases

Next.js chatbots that remember users

AI SDK agents with explicit memory tools

Adding memory to an existing app without changing call sites

Explore More

Built for production AI systems

Build AI systems that remember

MemorySync provides the infrastructure layer for persistent memory, adaptive retrieval, and enterprise AI intelligence.

Start free. No credit card required.