Agent memory v7

Preview

Agent memory is a preview capability. Behavior may change before general availability.

Agent memory is a durable, Postgres-native memory layer for AI agents, built into the AIDB extension. Memories are stored in your Postgres database, and you create and query them with SQL. They stay in your database, with secure, local storage and controlled access.

Without memory, each new conversation starts from nothing, and users have to repeat their preferences, history, and context. Agent memory gives an agent a durable memory of past conversations that it can search later. Memories live next to your application data, are protected by your existing Postgres roles and grants, and are available to any agent that can reach the database.

Read Understanding agent memory to learn how agent memory works, which components it needs, and who is responsible for each task.

Key features

  • Per-actor memory - Memories belong to an actor, and you scope searches by actor ID.
  • Session and agent scoping - Narrow searches and deletions to a single session or agent.
  • Namespaces - Keep memory configuration and data separate for each application or workload. See Scoping memory with namespaces.
  • Safe retries - An idempotency key lets the database recognize a retried event instead of storing it twice.
  • Auditable deletion - Deletion accepts a reason that is recorded for auditing, which supports erasure requests and data retention policies.
  • SQL first - Add, search, list, and delete memories with the aidb_memory SQL functions. See Managing memories.
  • Native agent tools - AIDB agents can add and search memories with native tools. See Using agent memory with agents and tools.

In this section

If you're new to agent memory, read these pages in order.

PageWhat it covers
Understanding agent memoryHow agent memory works, its components, key concepts, and who does what
Installing agent memoryInstalling AIDB and understanding the Agent Memory Server
Configuring agent memorySetting up the server, models, and namespace, and advanced settings
Managing memoriesAdding memories, checking status, and searching, listing, and deleting them
ExampleA worked example that adds a conversation and searches it
Using session memoryReading the current conversation back in order, and carrying context between conversations
Scoping memory with namespacesSeparating memory by application or workload
SQL referenceThe aidb_memory functions, catalog views, and configuration parameters
  • Agents, which covers building in-database agents.
  • Tools and Native tools, which cover the tools agents can call.
  • Knowledge bases, which cover searching your own data rather than conversation history.
  • Installing AIDB, which covers installing the extension that agent memory is built into.