agent-memory

Integrate long-term and short-term memory into LangGraph agents with Databricks Lakebase.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires databricks-langchain, and includes references (resource) components.

What problem does it solve?

This Skill enables agents to remember past interactions and user preferences, leading to more personalized and context-aware conversations.

Core Features & Use Cases

  • Long-Term Memory: Persist user facts and conversation history across sessions using Databricks Lakebase.
  • Short-Term Memory: Maintain conversation history within a single session using AsyncCheckpointSaver.
  • Use Case: An agent can remember a user's preferred name, team, or past requests, allowing for a continuous and more helpful interaction without the user needing to repeat information.

Quick Start

Use the agent-memory skill to add long-term memory capabilities to your agent by following the setup instructions in the SKILL.md file.

Frequently Asked Questions about agent-memory

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

FAQPage Schema
How do I add long-term memory to a LangGraph agent?

To add long-term memory to a LangGraph agent, you can use Databricks Lakebase to persist user facts and conversation history across multiple sessions. This requires configuring Lakebase resources and specific Python dependencies.

What's the best way to maintain conversation history within a LangGraph session?

The best way to maintain conversation history within a LangGraph session is using AsyncCheckpointSaver for short-term memory. This retains context throughout the active interaction without needing external storage.

Do I need databricks-langchain to use agent memory features?

Yes, you need the databricks-langchain dependency to integrate memory capabilities into your LangGraph agents. You must also configure specific Lakebase resources and environment variables for full memory management.

How does an agent remember user preferences across different sessions?

An agent remembers user preferences across sessions by leveraging Databricks Lakebase for long-term memory. This allows the agent to recall previously stored user facts like preferred names, teams, or past requests.

Can I use AsyncCheckpointSaver with Databricks Lakebase for agent memory?

Yes, you can use AsyncCheckpointSaver with Databricks Lakebase to provide both short-term and long-term memory. AsyncCheckpointSaver handles within-session history while Lakebase handles cross-session persistence.

Why does my LangGraph agent forget user facts between sessions?

Your LangGraph agent forgets user facts between sessions because it lacks long-term memory configuration. You must integrate Databricks Lakebase to persist user facts and conversation history across sessions permanently.