FREE STUDY NOTES · DBX-GENAI

LangChain, LangGraph, DSPy or a plain client?

How to choose a framework for a generative AI application.

From Ultra Transcenders DBX-GENAI by Tony Rough (coming December 2026)

Databricks does not require any particular framework: Agent Bricks works with any framework or harness, and its CLI ships templates for LangGraph and the OpenAI Agents SDK. The choice rests on the shape of your control flow and the integration packages you want to use.

Library Fits when Databricks integration named on the pages Tracing call
LangChain You want composable prompts, models and parsers in a fixed sequence databricks-langchain: ChatDatabricks, DatabricksEmbeddings, VectorSearchRetrieverTool, UCFunctionToolkit mlflow.langchain.autolog()
LangGraph You need stateful, multi-actor workflows or a tool-calling loop create_react_agent with databricks-langchain; checkpointer from databricks_agentkit.langgraph mlflow.langchain.autolog()
OpenAI Agents SDK You want an agent runner with sessions and tools without a LangChain dependency databricks-openai: AsyncDatabricksOpenAI, McpServer mlflow.openai.autolog()
OpenAI-compatible client You want to write the loop yourself in plain Python databricks-openai: DatabricksOpenAI, VectorSearchRetrieverTool, McpServerToolkit mlflow.openai.autolog()
DSPy You want prompts optimised programmatically against a metric Example notebooks for classification, RAG and multi-agent use mlflow.dspy.autolog()

DSPy replaces hand-written prompts with modules that can learn from examples. A DSPy signature is a natural-language description of a module’s behaviour such as “question -> answer”, a program connects modules into a pipeline, and the compiler adjusts modules to meet a performance metric by generating better prompts or fine-tuning models. Don’t confuse this with an MLflow model signature, which defines the input and output schema of a logged model.

Model naming varies across the pages. ChatDatabricks(endpoint="databricks-claude-sonnet-4-5") appears in the agent examples, ChatDatabricks(model="system.ai.claude-sonnet-4-5") in the model query guide, and ChatDatabricks(model="<ai-gateway-endpoint>", use_ai_gateway=True) when routing through Unity Gateway (AI Gateway in the exam guide). Unity Gateway lets you swap models and attribute cost without rewriting agent code.

Common trap: LangChain is required for agents and chains on Databricks - the platform works with any framework, and one documented example runs the entire tool-calling loop with the OpenAI-compatible client alone.

Common trap: VectorSearchRetrieverTool must be out of date because Vector Search was renamed - the product became AI Search in June 2026, but the current pages still use this class name, so keep the class name exactly as documented.

Get the whole book

This note is one section of Ultra Transcenders DBX-GENAI: Databricks Generative AI Engineer Associate, an independent study guide that explains every topic the exam covers by technology, with comparison tables, diagrams and the common traps, plus a glossary linked to the Databricks documentation.

Amazon.co.ukKindle: coming soonPaperback: coming soon
Amazon.comKindle: coming soonPaperback: coming soon

Due on Amazon in December 2026, in Kindle and paperback editions.

About the book · DBX-GENAI terms in the glossary · All DBX-GENAI study notes

More DBX-GENAI study notes