Registry / llm-agents / databricks-agents

databricks-agents

JSON →
library1.12.0pypypi✓ verified 25d ago

The Databricks Agents SDK provides tools and interfaces for building AI agents within the Databricks platform. It facilitates the creation, deployment, and management of agents that can leverage various tools, LLMs, and integrate with MLflow for logging and tracing. The current version is 1.9.4, with frequent updates aligned with the evolving AI and MLflow ecosystems.

pip install databricks-agents
INSTALL
IMPORT
SIG · DATABRICKS-AGENTS
D
databricks-agents
llm-agentspythonv1.12.0
Install
22.9s avg
Import
Disk
316MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.12.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 25.1s
py 3.11
✓ —
✓ 25.7s
py 3.12
✓ —
✓ 21.3s
py 3.13
✓ —
✓ 19.4s
py 3.9
✕ build_error
✕ timeout
316MB installed
● package 316MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChatAgent
from databricks.agents import ChatAgent
from databricks.agents import ChatAgent

This quickstart demonstrates how to set up a `ChatAgent` using a Databricks-served LLM. It highlights the requirement for Databricks host, token, and an LLM serving endpoint, typically configured via environment variables. The agent is initialized with the LLM and can then process chat prompts. Ensure your Databricks workspace has a suitable model serving endpoint deployed for the `DatabricksLLM`.

import os from databricks.agents.chat.agent import ChatAgent from databricks.agents.providers.databricks import DatabricksLLM # Ensure these environment variables are set for Databricks connectivity # export DATABRICKS_HOST="https://<your-workspace-url>" # export DATABRICKS_TOKEN="dapi<your-token>" # export DATABRICKS_LLM_ENDPOINT="<your-model-serving-endpoint>" (e.g., 'databricks-mixtral-8x7b-instruct') databricks_host = os.environ.get('DATABRICKS_HOST', 'https://your-workspace.cloud.databricks.com') databricks_token = os.environ.get('DATABRICKS_TOKEN', 'YOUR_DATABRICKS_TOKEN') llm_endpoint = os.environ.get('DATABRICKS_LLM_ENDPOINT', 'databricks-mixtral-8x7b-instruct') # Initialize a Databricks-backed LLM provider llm = DatabricksLLM( endpoint=llm_endpoint, host=databricks_host, api_token=databricks_token, temperature=0.1 ) # Create a ChatAgent agent = ChatAgent( llm=llm, # Add tools as needed, e.g., tools=[DollyTool()] verbose=True ) # Interact with the agent response = agent.chat("What is the capital of France?") print(f"Agent response: {response}") # Example with a follow-up question response_follow_up = agent.chat("And what is its most famous landmark?") print(f"Agent follow-up response: {response_follow_up}")
Debug
Known issues
gotchaThe `databricks-agents` library requires a Databricks workspace and a deployed LLM serving endpoint to function correctly, even for basic usage. It is not designed for standalone, local-only operation without a Databricks backend.
fix
Ensure you have access to a Databricks workspace, an appropriate Databricks Model Serving endpoint deployed (e.g., for Mixtral, Llama 2), and configure `DATABRICKS_HOST`, `DATABRICKS_TOKEN`, and `DATABRICKS_LLM_ENDPOINT` environment variables or pass them directly.
affects: All versions
gotchaThe library heavily integrates with the LangChain ecosystem. Breaking changes or significant API shifts in underlying LangChain components (e.g., `langchain_core`, `langchain-community`) can indirectly impact usage patterns or require code adjustments in `databricks-agents` applications.
fix
Regularly consult the `databricks-agents` and LangChain documentation, and pin your `langchain` related dependencies to specific minor versions to avoid unexpected changes. Test your agent implementations thoroughly after any dependency updates.
affects: All versions, particularly with new LangChain releases
gotchaFor optimal logging, tracing, and experiment tracking, `databricks-agents` is designed to work seamlessly with MLflow. While not strictly mandatory, users who skip MLflow integration might miss out on valuable debugging and performance monitoring capabilities.
fix
Familiarize yourself with MLflow's LLM logging capabilities. Ensure MLflow is configured in your environment or explicitly enabled in your agent's context to leverage automatic logging of prompts, responses, and tool calls.
affects: All versions
Upgrade
Version history
1.12.0latest on PyPI · released Aug 21, 2026
Audit
Dependencies
openaioptionalRequired for using OpenAI LLMs with Databricks Agents.
anthropicoptionalRequired for using Anthropic LLMs (e.g., Claude) with Databricks Agents.
google-generativeaioptionalRequired for using Google Generative AI LLMs with Databricks Agents.
llama-indexoptionalRequired for using LlamaIndex integrations.
huggingface-huboptionalRequired for using Hugging Face models.
Agent activity
40 hits · last 30 days
node
36
Bingbot
1
OpenAI (training)
1
Resources
databricks-agents — pip install databricks-agents · libregistry