Long-term memory for OpenAI agents
Add persistent, structured memory to agents built with the OpenAI Agents SDK. Your agents remember across sessions and reason over connected knowledge.
Why This Works
The OpenAI Agents SDK supports external tools. HyperMemory registers as a set of tools — store, recall, find related, traverse — that your agent can call during execution. Instead of relying on the context window alone, your agent has access to an always-available knowledge graph that grows with every interaction.
Quick Setup
Register HyperMemory tools with your OpenAI agent:
from openai import agents
import httpx
# Define HyperMemory tools for the agent
memory_tools = agents.MCPServerTool(
server_url="https://api.hypermemory.io/mcp",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
agent = agents.Agent(
name="Research Assistant",
instructions="Use HyperMemory to store and recall knowledge.",
tools=[memory_tools]
)
response = agents.Runner.run_sync(
agent=agent,
input="What do we know about the competitor's pricing?"
)Use Case
A sales team builds an OpenAI-powered agent that handles prospect research. With HyperMemory, the agent stores every interaction, company detail, and competitive insight. When a rep asks "What objections did Acme Corp raise last quarter?", the agent recalls the exact context — not a keyword search, but the connected web of interactions, people, and outcomes.