MemorySync
Official SDK

OpenAI Agents SDK + MemorySync

The first drop-in Session implementation: durable history across restarts and handoffs, plus long-term memory.

Overview

Install openai-agents-memorysync and pass session=MemorySyncSession(...) to Runner.run: session items are kept server-side in MemorySync conversation history exactly as the SDK wrote them, survive restarts and deploys, and follow multi-agent handoffs. The transcript is never listed or recalled as memories; the durable facts in user messages go to long-term memory automatically, and assistant replies are not stored. memory_instructions adds a memory block to the system prompt each time the SDK builds it (by default the user’s newest facts, or recall against a prompt you supply), and five structured tools give agents explicit memory. No other memory vendor implements the SDK’s Session protocol.

Setup status and requirements

Supported version
openai-agents-memorysync 1.1.0 (PyPI)
Last setup review
2026-10-01
Permissions
A MemorySync API key with read and write scopes; pop_item/clear_session need delete permission.
Limits
Python 3.10+. Install openai-agents alongside it. Python only — TypeScript agents use the Vercel AI SDK or Mastra integrations.
Open setup documentation →

Capabilities

Quick Start

from agents import Agent, Runner
from openai_agents_memorysync import MemorySyncSession
agent = Agent(name="Assistant", instructions="You are a helpful assistant.")
session = MemorySyncSession("thread-42", user_id="customer-7")
result = await Runner.run(agent, "Book my usual trip.", session=session)

Use Cases

Agents that remember users across sessions and deploys

Multi-agent handoff flows with shared history

Replacing SQLite/Redis session infrastructure with a managed service

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.