🦜🔗 Databricks LangChain Integration
The databricks-langchain package provides seamless integration of Databricks AI features into LangChain applications. This repository is now the central hub for all Databricks-related LangChain components, consolidating previous packages such as langchain-databricks and langchain-community.
Installation
From PyPI
pip install databricks-langchain
From Source
pip install git+https://git@github.com/databricks/databricks-ai-bridge.git#subdirectory=integrations/langchain
Key Features
- LLMs Integration: Use Databricks-hosted large language models (LLMs) like Llama and Mixtral through
ChatDatabricks. - Vector Search: Store and query vector representations using
DatabricksVectorSearch. - Embeddings: Generate embeddings with
DatabricksEmbeddings. - Genie: Use Genie in Langchain.
- Deep Agents Sandbox: Run Deep Agents shell and filesystem tools inside a Databricks sandbox with
DatabricksSandbox(installdatabricks-langchain[deepagents]). - Sandbox Tool: Run shell commands in a Databricks sandbox from any LangChain or LangGraph agent with
DatabricksSandboxTool(installdatabricks-langchain[sandbox]). - Sandbox Session: Provision, wait for, and auto-delete a sandbox for that tool with the
DatabricksSandboxSessioncontext manager, keeping sandbox lifecycle in your application rather than the model.
Getting Started
Use LLMs on Databricks
from databricks_langchain import ChatDatabricks
llm = ChatDatabricks(endpoint="databricks-meta-llama-3-1-70b-instruct")
Use a Genie Space as an Agent (Preview)
Note: Requires Genie API Private Preview. Contact your Databricks account team for enablement.
from databricks_langchain.genie import GenieAgent
genie_agent = GenieAgent(
"space-id", "Genie",
description="This Genie space has access to sales data in Europe"
)
Contribution Guide
We welcome contributions! Please see our contribution guidelines for details.
License
This project is licensed under the MIT License.
Thank you for using Databricks LangChain!
Metadata
Release files for databricks-langchain 0.22.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| databricks_langchain-0.22.0.tar.gz | 40.2 kB | Without provenance | Details for databricks_langchain-0.22.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| databricks_langchain-0.22.0-py3-none-any.whl | Python 3 | none | any | Details for databricks_langchain-0.22.0-py3-none-any.whl |
Total release size: 87.5 kB
Release files / databricks_langchain-0.22.0.tar.gz
| Download URL | databricks_langchain-0.22.0.tar.gz |
|---|---|
| Size | 40.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd5f0265b42cd70f170d73afed7e58cd7753bf34fe647723af9f9e3d2116c62
|
|
BLAKE2b-256 checksum How to use checksums |
691e1ab5bd046bf46adcd80415921a1e07cd554688ec8ab02e8baf9ee6d9161c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / databricks_langchain-0.22.0-py3-none-any.whl
| Download URL | databricks_langchain-0.22.0-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79d75b23f3fdd70951fddd1fffbd86db534264f192a4e662404052d129a6a77d
|
|
BLAKE2b-256 checksum How to use checksums |
54fa9739bf9223e52fcb5ff97b7e9839eeef0aa93aa70abd4ebd316382419818
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for databricks-langchain 0.22.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.