Agent Bricks CLI (Beta): Build, Run Locally & Deploy a Databricks App with Memory & Sessions
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