lakebase-setup

Configure Lakebase PostgreSQL persistence and grant service principal permissions.

Updated May 10, 2026
One-click install
npx skills add https://github.com/keqingli1129/agent-langgraph-one --skill lakebase-setup-keqingli1129
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lakebase-setup
Source: https://github.com/keqingli1129/agent-langgraph-one/tree/main/.claude/skills/lakebase-setup
Command: npx skills add https://github.com/keqingli1129/agent-langgraph-one --skill lakebase-setup-keqingli1129

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the friction of configuring Lakebase so your agent can persist memory reliably across sessions and threads, especially when you hit connection, permission, or migration errors.

Core Features & Use Cases

  • Provision or autoscaling setup: Supports both Lakebase instance models and guides you to provide the correct identifiers.
  • Databricks app wiring: Shows how to add the correct database or postgres resource in databricks.yml and map values into config.env.
  • Permission and migration troubleshooting: Addresses the most common failure mode by walking you through granting the app’s service principal Postgres permissions before running the app.
  • Use case: You want long-term user facts and/or short-term conversational memory for your Databricks agent template, and you need it to work after deployment rather than failing with permission denied or “failed to connect” errors.

Quick Start

Run the lakebase-setup skill to configure your Lakebase resource and then grant Postgres permissions to the app’s service principal before deploying and starting the agent.

Frequently Asked Questions about lakebase-setup

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

FAQPage Schema
How do I configure Lakebase for Databricks agent memory persistence?

Lakebase enables PostgreSQL-backed long-term and short-term agent memory by persisting chat history across sessions and threads. It integrates with Databricks agent templates to store user facts and conversational context reliably after deployment.

Why does my Databricks agent fail to connect to Lakebase with permission denied errors?

Your Databricks agent fails to connect to Lakebase with permission denied migration errors because the app's service principal lacks Postgres privileges. You must grant the service principal Postgres permissions via the provided grant workflow before deploying and starting the agent.

What's the best way to add PostgreSQL-backed persistence to a Databricks agent template?

The best way to add PostgreSQL-backed persistence to a Databricks agent template is configuring the Lakebase resource in databricks.yml and granting the service principal Postgres permissions before deployment. This ensures reliable long-term and short-term memory across sessions.

Do I need to set embedding environment variables when setting up Lakebase for agent memory?

Yes, you need matching embedding environment variables when setting up Lakebase for agent memory. Correct environment variables must align with your instance or autoscaling identifiers in databricks.yml to ensure PostgreSQL-backed persistence functions properly after deployment.

How do I grant a Databricks app service principal Postgres permissions for Lakebase?

To grant a Databricks app service principal Postgres permissions for Lakebase, run the lakebase-setup skill's grant workflow before deploying your agent. This addresses the most common failure mode where agents encounter permission denied or failed to connect errors.

Can I use Lakebase autoscaling instances for agent chat history persistence?

Yes, you can use Lakebase autoscaling instances for agent chat history persistence. The setup supports both provisioned instance models and autoscaling configurations, provided you supply the correct identifiers in databricks.yml and matching embedding environment variables.