MCPcopy Index your code
hub / github.com/databendlabs/databend

github.com/databendlabs/databend @v1.2.927-nightly

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.927-nightly ↗ · + Follow
35,090 symbols 146,001 edges 3,843 files 2,623 documented · 7% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Databend

Enterprise Data Warehouse for AI Agents

Large-scale analytics, vector search, full-text search — with flexible agent orchestration and secure Python UDF sandboxes. Built for enterprise AI workloads.

☁️ Try Cloud🚀 Quick Start📖 Documentation💬 Slack

CI Status Platform

databend

💡 Why Databend?

Databend is an open-source enterprise data warehouse built in Rust.

Core capabilities: Analytics, vector search, full-text search, auto schema evolution — unified in one engine.

Agent-ready: Sandbox UDFs for agent logic, SQL for orchestration, transactions for reliability, branching for safe experimentation on production data.

📊 Core Engine

Analytics, vector search, full-text search, auto schema evolution, transactions. | 🤖 Agent-Ready

Sandbox UDF + SQL orchestration. Build and run agents on your enterprise data. | | 🏢 Enterprise Scale

Elastic compute, cloud native. S3/Azure/GCS. | 🌿 Branching

Git-like data versioning. Agents safely operate on production snapshots. |

Databend Architecture

⚡ Quick Start

1. Cloud (Recommended)

Start for free on Databend Cloud — Production-ready in 60 seconds.

2. Local (Python)

Ideal for development and testing. Requires Python 3.12 or 3.13 and databend-driver 0.34.0 or later:

pip install "databend-driver[local]>=0.34.0"
from databend_driver import connect

conn = connect("databend+local:///./local-state")
print(conn.query_row("SELECT 'Hello, Databend!'").values())

3. Docker

Run the full warehouse locally:

docker run -p 8000:8000 datafuselabs/databend

🤖 Agent-Ready Architecture

Databend's Sandbox UDF enables flexible agent orchestration with a three-layer architecture:

  • Control Plane: Resource scheduling, permission validation, sandbox lifecycle management
  • Execution Plane (Databend): SQL orchestration, issues requests via Arrow Flight
  • Compute Plane (Sandbox Workers): Isolated sandboxes running your agent logic
-- Define your agent logic
CREATE FUNCTION my_agent(input STRING) RETURNS STRING
LANGUAGE python HANDLER = 'run'
AS $$
def run(input):
    # Your agent logic: LLM calls, tool use, reasoning...
    return response
$$;

-- Orchestrate agents with SQL
SELECT my_agent(question) FROM tasks;

🚀 Use Cases

  • AI Agents: Sandbox UDF + SQL orchestration + branching for safe operations
  • Analytics & BI: Large-scale SQL analytics — Learn more
  • Search & RAG: Vector + full-text search — Learn more

🤝 Community & Support

Contributors are immortalized in the system.contributors table 🏆

📄 License

Apache 2.0 + Elastic 2.0 | Licensing FAQ


Enterprise warehouse, agent ready

🌐 Website🐦 Twitter

Extension points exported contracts — how you extend this code

SExprVisitor (Interface)
Visitor for SExpr nodes (synchronous version) [7 implementers]
src/query/sql/src/planner/optimizer/ir/expr/visitor.rs
Keyable (Interface)
# Safety All functions must be implemented correctly. [7 implementers]
src/common/hashtable/src/traits.rs
FromToProto (Interface)
Defines API to convert from/to protobuf meta type. [122 implementers]
src/meta/proto-conv/src/traits.rs
DiagnosticsQueryExecutor (Interface)
(no doc) [1 implementers]
tests/sqllogictests/src/diagnostics.rs
Interpreter (Interface)
Interpreter is a trait for different PlanNode Each type of planNode has its own corresponding interpreter [176 implementers]
src/query/service/src/interpreters/interpreter.rs
NativeType (Interface)
Sealed trait implemented by all physical types that can be allocated, serialized and deserialized by this crate. All O(N [8 …
src/common/column/src/types/native.rs
AppErrorMessage (Interface)
Output message for end users, with sensitive info stripped. [50 implementers]
src/meta/app/src/app_error.rs
VisitorMut (Interface)
Visitor hooks for mutable AST traversal. Returning `Continue` lets the walker descend into children automatically. Retu [10 …
src/query/ast/src/visit.rs

Core symbols most depended-on inside this repo

to_string
called by 6113
src/common/statistics/src/datum.rs
clone
called by 5612
src/query/service/src/physical_plans/physical_plan.rs
map
called by 2442
src/query/sql/src/planner/semantic/type_check/literal.rs
clone
called by 2347
src/query/storages/common/cache/src/providers/memory_cache.rs
map
called by 2013
src/query/expression/src/property.rs
push
called by 1994
src/query/storages/common/index/src/hnsw_index/common/fixed_length_priority_queue.rs
clone
called by 1979
src/query/sql/src/planner/plans/scalar_expr.rs
into
called by 1892
src/query/expression/src/filter/select_expr.rs

Shape

Method 20,660
Function 8,672
Class 4,538
Enum 794
Interface 385
Route 41

Languages

Rust97%
Python3%
C1%
Java1%
TypeScript1%

Modules by API surface

src/query/settings/src/settings_getter_setter.rs253 symbols
src/query/sql/tests/it/framework/lite_context.rs240 symbols
src/query/service/tests/it/storages/fuse/operations/commit.rs184 symbols
src/query/service/tests/it/sql/exec/get_table_bind_test.rs184 symbols
src/query/expression/src/types/decimal.rs171 symbols
src/common/metrics/src/metrics/storage.rs152 symbols
src/common/base/src/base/ordered_float.rs137 symbols
src/query/ast/src/parser/statement.rs132 symbols
src/query/sql/src/planner/plans/scalar_expr.rs122 symbols
src/query/expression/src/schema.rs106 symbols
src/query/expression/src/utils/date_helper.rs102 symbols
src/meta/app/src/schema/table/mod.rs99 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Datastores touched

(mysql)Database · 1 repos
metastoreDatabase · 1 repos

For agents

$ claude mcp add databend \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page