Home

OpenAI agent memory

OpenAI Agent Memory and Cross-Agent Recall

OpenAI agent workflows can use memory-like context from files, tools, databases, and orchestration state. A separate memory layer becomes useful when the same team needs durable recall across multiple agents, repos, and model providers.

What to keep outside the prompt

Long-lived project facts, workflow preferences, postmortem lessons, and unresolved migration notes are better stored as governed memory than repeatedly pasted into prompts.

  • Repo-specific decisions and test habits.
  • Human workflow preferences and approval rules.
  • Tool credentials status without storing the secrets themselves.
  • Links to source observations and issue history.

How to connect safely

A memory layer should connect through explicit tools or APIs. The agent should request memory for the current task, receive a small scoped brief, and expose what was used.

  • Use narrow retrieval by repo, task, and memory type.
  • Mask secrets before capture.
  • Log memory reads and writes.
  • Let users delete or correct memories.

Practical playbook

  1. Keep current task state in the agent runtime.
  2. Store durable context in Agentmemory.
  3. Retrieve only the smallest useful memory set.
  4. Review memory quality after important agent failures.

Related guides

Agentmemory githubClaude Code agent memoryAgent memory frameworkAgent memory survey