Agent Bricks CLI (Beta): Build, Run Locally & Deploy a Databricks App with Memory & Sessions

Data Science Basics | AI
629 views β€’

Databricks has a new Agent Bricks CLI (Beta) πŸš€ It lets you build a custom AI agent in code, run it on your laptop, and deploy it to Databricks Apps with real memory, saved sessions and MLflow traces. In this video I go from an empty folder to a live agent, step by step. I install the CLI with uv, scaffold a LangGraph agent with a chat app, add my own Python tool, test it locally with human approval and traces, and deploy it. I also show what happens on Databricks Free Edition, why deploy fails there, and how sessions and memory work on a trial workspace. ⚠️ Agent Bricks CLI is in Beta. On Databricks Free Edition, deploy fails with "Scale-to-zero must be enabled for this workspace tier", because the memory, session and runtime stores need Lakebase. Local dev works. For deploy, use a trial or paid workspace. ───────────────────────────────────── πŸ”₯ WHAT YOU WILL LEARN ───────────────────────────────────── βœ… What the Agent Bricks CLI is and why you will not find it as a button in the Databricks UI βœ… How to install the CLI with uv βœ… How to log in with the Databricks CLI and agentbricks login βœ… How to scaffold a LangGraph agent with a ready-made chat app (agentbricks init) βœ… A tour of the project files, including agent.toml βœ… How to add your own Python tool (region_health.py) to the agent βœ… How to run and chat with the agent locally (agentbricks dev) βœ… How to pick another model when the default model is not available in your workspace βœ… MLflow traces of every model and tool call, logged automatically βœ… Human approval (human in the loop) before risky tool calls βœ… How to bind managed session and memory stores βœ… Free Edition limits: why deploy fails with the scale-to-zero error βœ… How to deploy to Databricks Apps on a trial workspace βœ… How sessions and memory are stored in Lakebase (Postgres) βœ… Sessions vs memory in action across two conversations βœ… CLI commands to list sessions and read memory entries βœ… How to stop the app and delete the session and memory stores ───────────────────────────────────── ⏱ CHAPTERS ───────────────────────────────────── 00:00 Agent Bricks Overview 01:56 Repo Setup Notes 02:49 Install CLI with UV 03:42 Databricks Auth Login 05:03 Agent Bricks Login 05:46 Scaffold LangGraph Agent 07:06 Project Files Tour 08:08 Add Custom Tool 11:25 Run Locally in Dev 14:06 Test Chat and Models 16:16 MLflow Traces and HITL 17:52 Bind Sessions and Memory 18:47 Deploy Free Tier Limits 20:15 Deploy on Trial Workspace 22:24 Apps and Lakebase Stores 27:07 Sessions Memory in Action 29:33 CLI Sessions Memory Commands 31:42 Stop App and Cleanup 33:34 Wrap Up and Next Steps ───────────────────────────────────── πŸ”— RESOURCES ───────────────────────────────────── β†— Agent Bricks CLI docs β†’ https://docs.databricks.com/aws/en/agents/custom-agents/agent-bricks-cli β†— Agent Bricks CLI on GitHub (full command reference) β†’ https://github.com/databricks/databricks-ai-bridge/tree/main/integrations/agentbricks β†— PyPI package β†’ https://pypi.org/project/databricks-agentbricks/ β†— Install uv β†’ https://docs.astral.sh/uv/ β†— Install the Databricks CLI β†’ https://docs.databricks.com/aws/en/dev-tools/cli/install β†— Databricks CLI authentication β†’ https://docs.databricks.com/aws/en/dev-tools/cli/authentication β†— Managed agent memory β†’ https://docs.databricks.com/aws/en/agents/agent-memory/managed-memory β†— Managed agent sessions β†’ https://docs.databricks.com/aws/en/agents/agent-memory/managed-sessions β†— MLflow tracing β†’ https://docs.databricks.com/aws/en/mlflow3/genai/tracing/overview β†— Free Edition limitations β†’ https://docs.databricks.com/aws/en/getting-started/free-edition-limitations β†— Demo code and files β†’ https://github.com/sudarshan-koirala/agent-bricks-cli-demo --------------------------------------------------------------------- β˜• Buy me a Coffee: https://ko-fi.com/datasciencebasics ✌️Patreon: https://www.patreon.com/datasciencebasics ------------------------------------------------------------------------------------------ 🀝 Connect with me: πŸ“Ί Youtube: https://www.youtube.com/@datasciencebasics?sub_confirmation=1 πŸ‘” LinkedIn: https://www.linkedin.com/in/sudarshan-koirala/ 🐦 Twitter: https://twitter.com/mesudarshan πŸ”‰Medium: https://medium.com/@sudarshan-koirala πŸ’Ό Consulting: https://topmate.io/sudarshan_koirala #databricks #agentbricks #aiagents #langgraph #mlflow #lakebase #databricksapps #datasciencebasics

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close