Prompt Buddy logoPrompt Buddy

vercel · Vercel AI SDK Docs

AI SDK Agents: Memory

Explains how to implement and manage memory for AI agents using the AI SDK, covering how to persist conversation history and context across multiple turns.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

AI SDK Agents: Memory

Explains how to implement and manage memory for AI agents using the AI SDK, covering how to persist conversation history and context across multiple turns.

When To Use

Use when you need to implement persistent conversation history or context management so an AI agent can remember previous interactions in a multi-turn session.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/ai-sdk-agents-memory-workflow-guide.mdA guide detailing three different approaches to implementing memory in AI SDK agents, including provider-defined tools and memory providers.Questions about a guide detailing three different approaches to implementing memory in AI SDK agents, including provider-defined tool...
examples/ai-sdk-agents-memory-tool-loop-agent.textA TypeScript code example demonstrating how to implement memory for a ToolLoopAgent using the AI SDK.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to implement memory for a ToolLoopAgent using the AI SDK.
examples/ai-sdk-agents-memory-letta-provider-installation.textThe installation command for the Letta provider package used to implement memory in AI SDK agents.Exact payloads, commands, or snippets shown in The installation command for the Letta provider package used to implement memory in AI SDK agents.
examples/ai-sdk-agents-memory-letta-cloud-toolloopagent.textA TypeScript code example demonstrating how to initialize a ToolLoopAgent using the Letta Cloud provider to implement agent memory.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to initialize a ToolLoopAgent using the Letta Cloud provider to implement...
examples/ai-sdk-agents-memory-letta-cloud-tool-loop-agent.textA TypeScript code example demonstrating how to implement a ToolLoopAgent using the Letta Cloud provider to manage agent memory via specific tools.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to implement a ToolLoopAgent using the Letta Cloud provider to manage age...
examples/ai-sdk-agents-memory-mem0-provider-installation.textThe shell command required to install the Mem0 Vercel AI provider package for AI SDK agents.Exact payloads, commands, or snippets shown in The shell command required to install the Mem0 Vercel AI provider package for AI SDK agents.
examples/ai-sdk-agents-memory-mem0-integration.textA TypeScript code example demonstrating how to integrate Mem0 with the AI SDK ToolLoopAgent to provide persistent memory.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to integrate Mem0 with the AI SDK ToolLoopAgent to provide persistent mem...
examples/ai-sdk-agents-memory-mem0-provider-usage.textAn example demonstrating how to use addMemories and retrieveMemories from the @mem0/vercel-ai-provider package to manage agent memory.Exact payloads, commands, or snippets shown in An example demonstrating how to use addMemories and retrieveMemories from the @mem0/vercel-ai-provider package to man...
examples/ai-sdk-agents-memory-supermemory-tools-installation.textThe installation command for the supermemory tools package used in AI SDK agents memory implementation.Exact payloads, commands, or snippets shown in The installation command for the supermemory tools package used in AI SDK agents memory implementation.
examples/ai-sdk-agents-memory-toolloopagent-supermemory.textA TypeScript code example demonstrating how to use the ToolLoopAgent with supermemoryTools to implement memory capabilities in an AI SDK agent.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use the ToolLoopAgent with supermemoryTools to implement memory capabi...
examples/ai-sdk-agents-memory-hindsight-installation-commands.textThe shell commands required to install the Hindsight AI SDK and client packages for implementing agent memory.Exact payloads, commands, or snippets shown in The shell commands required to install the Hindsight AI SDK and client packages for implementing agent memory.
examples/ai-sdk-agents-memory-hindsight-client-tool-loop-agent.textA TypeScript code example demonstrating how to implement agent memory using the HindsightClient and ToolLoopAgent within the AI SDK.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to implement agent memory using the HindsightClient and ToolLoopAgent wit...

What This Skill Covers

  • Memory lets your agent save information and recall it later. Without memory, every conversation starts fresh. With memory, your agent builds context over tim...
  • Main sections: Three Approaches, Provider-Defined Tools, Anthropic Memory Tool, Memory Providers, Letta.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://ai-sdk.dev/docs/agents/memory