agent-openai-memory

Persist multi-turn conversation history using OpenAI Agents SDK Sessions and Databricks Lakebase.

183|146|Updated Jun 6, 2024
One-click install
npx skills add https://github.com/databricks/app-templates --skill agent-openai-memory-databricks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-openai-memory
Source: https://github.com/databricks/app-templates/tree/main/agent-openai-agents-sdk-long-running-agent/.claude/skills/agent-memory
Command: npx skills add https://github.com/databricks/app-templates --skill agent-openai-memory-databricks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables agents to remember past interactions, providing a more natural and context-aware conversational experience by persisting conversation history.

Core Features & Use Cases

  • Stateful Conversations: Automatically stores and retrieves conversation history using Databricks Lakebase.
  • Session Management: Utilizes session_id to link messages to the correct conversation thread.
  • Use Case: Building a customer support chatbot that remembers previous queries and user details across multiple interactions to provide personalized assistance.

Quick Start

Use the agent-openai-memory skill to enable conversation history for your agent.

Frequently Asked Questions about agent-openai-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add stateful memory to an OpenAI agent for persistent conversation history?

Persistent conversation memory is enabled for OpenAI agents by using Sessions backed by Databricks Lakebase. This automatically manages and stores multi-turn dialogue history to solve stateless interactions.

Do I need a Databricks Lakebase instance to store OpenAI agent conversation history?

Yes, a configured Databricks Lakebase instance is required. It acts as the backing storage to automatically manage and retrieve the multi-turn dialogue history for your agent sessions.

How does session management work for OpenAI agents with persistent memory?

Session management uses a unique session_id to link messages to the correct conversation thread. This allows the agent to automatically retrieve past interactions and maintain context across multiple turns.

What dependencies are required to enable OpenAI agent memory with Databricks Lakebase?

You need the databricks-openai[memory] dependency installed. This package provides the necessary session persistence and retrieval functionality required to back the OpenAI Agents SDK Sessions.

Can I use this agent memory approach for a customer support chatbot that remembers user details?

Yes, this approach is designed for use cases like customer support chatbots. It remembers previous queries and user details across multiple interactions to provide personalized, context-aware assistance.

Why does my OpenAI agent forget previous interactions in a multi-turn dialogue?

OpenAI agents forget interactions because they are stateless by default. You can solve this by implementing persistent conversation memory using OpenAI Agents SDK Sessions backed by Databricks Lakebase.