oracle-ai-developer-hub

Agent Memory

Documentation

A collection of notebooks demonstrating how to build memory-augmented AI agents on top of Oracle AI Database as the unified memory core for AI agents.

What is Agent Memory?

Agent memory is what separates a stateless LLM call from an agent that learns, adapts, and stays coherent across turns, sessions, and runs. It is the substrate that lets an agent:

Practical agent memory is rarely a single store. It is a small set of access patterns layered over the same backend:

Memory type What it holds Typical access pattern
Conversation / thread memory Turn-by-turn dialogue history for a single run Append + ordered read
Episodic memory Discrete events the agent participated in Time-ranged search
Semantic memory Durable facts and learned knowledge Vector + keyword search
Procedural memory How-to knowledge, routines, tool-use patterns Lookup by task
Working memory Scratchpad for the current step Read/write within a run
Entity memory Facts scoped to a user, customer, or object Scoped queries

Oracle AI Database — the unified memory core

Oracle AI Database is the unified memory core for AI agents. Rather than stitching together a vector DB, a key-value store, a graph DB, and a relational store — each with its own client, consistency model, and ops surface — Oracle AI Database serves all of these access patterns from a single converged engine:

The notebooks in this folder use the oracleagentmemory (OAMP) Python package, which is the AI-Agent Memory Package built on top of Oracle AI Database. OAMP wraps the database as a memory backend with a consistent API for users / agents, memories, and threads — the three primitives behind every notebook in this folder.

Notebooks

# Name Description Framework Open Notebook Open in Colab
01 Deep Research Agent Build a deep research agent for human genome exploration that uses Tavily for live web search and stores running conversation + durable findings in Oracle AI Database. Demonstrates the OpenAI Agents SDK Session protocol implemented against an Oracle-backed memory store. OpenAI Agents SDK · Tavily · OAMP Open Notebook Open In Colab
02 Supply Chain Assistant A supply chain assistant that tracks and updates shipment cargo through in-process tools and an MCP server. Uses Oracle AI Agent Memory to persist shipment records, operational notes, and conversation history across restarts. Claude Agent SDK · MCP · OAMP Open Notebook Open In Colab
03 Mortgage Approval Workflow A deterministic mortgage approval workflow modeled as a StateGraph with prebuilt create_agent nodes. Uses Oracle AI Agent Memory so a workflow that fails mid-stage can resume from the last persisted state instead of restarting. LangGraph · OAMP Open Notebook Open In Colab
04 OAMP Benchmarks Quantifies the practical benefits of Oracle AI Agent Memory over naive flat-history memory along three axes: token consumption per turn, wall-clock latency, and response quality (LLM-as-a-judge). Runs the same 80-turn scripted conversation through three agents. OAMP · LiteLLM · OpenAI Open Notebook Open In Colab
05 OAMP Developer Guide A hands-on, step-by-step guide to the oracleagentmemory package. Builds an agent memory system from scratch — connection, the three primitives (users/agents, memories, threads), manual vs. automatic LLM-powered extraction, vector search, context cards, and scoping. OAMP · LiteLLM Open Notebook Open In Colab
06 Support Assistant Copilot An end-to-end customer-support copilot that follows one damaged-delivery case from setup through knowledge ingestion, agent tool use, context-card compaction, preference correction, cross-user isolation, TTL/retention, and teardown. Demonstrates background extraction, pluggable embeddings (OpenAI by default or an in-database ONNX model), vector search, metadata inheritance and filtering, and chunked semantic indexing. OpenAI Agents SDK · OAMP Open Notebook Open In Colab
07 Short-Term vs Long-Term Agent Memory Lifecycle walkthrough for active thread state, summaries, typed durable memory, metadata and thread scope, context cards, updates, TTL, and deletion in Oracle AI Agent Memory 26.6. OAMP 26.6 Open Notebook Open In Colab

Getting Started

If you are new to Oracle AI Agent Memory, the recommended order is:

  1. Start with the Developer Guide (05) — learn the API surface and the three core primitives.
  2. Run the Benchmarks (04) — see the cost, latency, and quality differences vs. naive memory.
  3. Pick a framework example — OpenAI Agents SDK (01), Claude Agent SDK (02), or LangGraph (03), depending on your stack.

Prerequisites

Further Reading