Trusted by

SOLUTIONS

Purpose-Built for Agentic Scale

Traditional databases were designed for predictable, human-driven workloads. Agentic systems operate fundamentally differently.

Instant Branching for Explosive Scale

The Challenge

Agentic workloads don’t scale linearly; they multiply. This X tenents × Y agents × Z branches problem creates operational bottlenecks and cost explosions on traditional databases. When one agent action can trigger thousands of new instances, legacy architectures fall apart.

The Solution

  • Instant branching creates isolated environments in milliseconds
  • Elastic auto-scaling handles unpredictable spikes automatically
  • Scale-to-zero eliminates costs for idle databases
  • MySQL-compatible so you can build with the stack you know
Tested at scale

See how Manus 1.5 uses TiDB X to let agents ship full-stack apps at scale.

See how TiDB made it happen

Unified Backend for All AI Data

The Challenge

AI applications need vectors, transactions, and analytics — all at once, in real-time.
Stitching together databases creates a fragile stack with sync issues and operational drag.

The Solution

TiDB unifies your entire AI data stack:

  • Unified OLTP + OLAP + Vector engine in one system
  • Real-time consistency with strong ACID guarantees
  • Zero ETL lag and operational overhead of multiple systems
Proven in production

Dify consolidated hundreds of thousands of containers onto TiDB, cutting operational overhead by 90%.

See how Dify solved this

Pay-as-You-Go with Granular Control

The Challenge

Unpredictable AI usage can lead to runaway bills. Over-provisioning for peak loads is wasteful, and without granular visibility, you can’t track costs per-tenant or per-agent.

The Solution

TiDB gives engineering teams fine-grained control over cost and scale:

  • Pay-per-use model eliminates pre-provisioned waste
  • Request Unit (RU) metering provides cost visibility per agent, tenant, or branch
  • Copy-on-write storage keeps costs low across thousands of branches
TiDB Pricing

Pricing designed for modern platforms.

Check pricing

CUSTOMERS

Proven at Scale

Leading AI innovators are solving scaling challenges with TiDB.

General-Purpose AI Agents

“TiDB’s elastic architecture enabled us to migrate in two weeks, supporting users and massive ‘Context Engineering’ workloads for viral success.”

AI App Development Platform

“We consolidated our entire AI backend into TiDB—letting our engineers focus on building agent features instead of managing database complexity.”

Autonomous Marketing Automation

“TiDB’s unified architecture enabled AI agents to access complete, real-time user context for autonomous marketing decisions.”

Conversational Business Intelligence

“Unified HTAP + Vector engine enabled hybrid queries combining semantic understanding with SQL precision for real-time conversational analytics.”

Real-Time Event Analytics

“Real-time architecture enabled storing and aggregating survey data on the fly, eliminating processing overhead.”

DEMOS

Inspiration for Production

Explore interactive demos, deploy complete applications in our sandbox labs, and discover what the community is building.

Python SDK for TiDB AI

pip install pytidb

Semantic Search RAG
Build intelligent knowledge retrieval systems

Semantic Search & RAG

Create AI assistants that understand context and meaning, not just keywords, using vector embeddings and retrieval-augmented generation.


class Chunk(TableModel):
    __tablename__ = "chunks"

    id: int = Field(primary_key=True)
    text: str = Field()
    text_vec: list[float] = text_embed.VectorField(
        source_field="text",
    )
    meta: dict = Field(sa_type=JSON)

table = db.create_table(schema=Chunk, if_exists="overwrite")

results = (
    table.search(query_text)
    .debug(True)
    .filter({"meta.language": language})
    .distance_threshold(distance_threshold)
    .limit(query_limit)
    .to_list()
)

Image & Text Search
Search across visual and textual content

Image & Text Search

Enable multimodal search experiences where users can find images using text descriptions or discover similar visual content effortlessly.


class Pet(TableModel):
    __tablename__ = "pets"

    id: int = Field(primary_key=True)
    breed: str = Field()
    image_uri: str = Field()
    image_name: str = Field()
    image_vec: Optional[List[float]] = embed_fn.VectorField(
        distance_metric=DistanceMetric.L2,
        source_field="image_uri",
        source_type="image",
    )

results = (
    table.search(query="fluffy orange cat")
    .distance_metric(DistanceMetric.L2)
    .limit(limit)
    .to_list()
)

Hybrid Search
Combine semantic and keyword search power

Hybrid Search

Get the best of both worlds by merging traditional full-text search with modern vector similarity for comprehensive, accurate results.


# Define table schema
class Document(TableModel):
    __tablename__ = "documents"

    id: int = Field(primary_key=True)
    text: str = FullTextField()
    text_vec: list[float] = embed_fn.VectorField(
        source_field="text",
    )
    meta: dict = Field(sa_type=JSON)

query = (
    table.search(query_text, search_type="hybrid")
    .distance_threshold(0.8)
    .fusion(method="rrf")
    .limit(limit)
)

Auto Embedding
Automatically generate vector representations for data

Auto Embedding

Transform your text, images, and documents into searchable vectors without manual preprocessing or complex embedding pipeline setup.


# Define embedding function
embed_func = EmbeddingFunction(
    model_name="tidbcloud_free/amazon/titan-embed-text-v2"
    # No API key required for TiDB Cloud free models
)

class Chunk(TableModel):
    __tablename__ = "chunks"

    id: int = Field(primary_key=True)
    text: str = Field(sa_type=TEXT)
    text_vec: list[float] = embed_func.VectorField(source_field="text")

table = db.create_table(schema=Chunk, if_exists="overwrite")

# Insert sample data - embeddings generated automatically
table.bulk_insert([
    Chunk(text="TiDB is a distributed database that supports OLTP, OLAP, HTAP and AI workloads."),
    Chunk(text="PyTiDB is a Python library for developers to connect to TiDB."),
    Chunk(text="LlamaIndex is a Python library for building AI-powered applications."),
])

Real-time Vector Search
Power recommendation systems with live data updates

Real-time Vector Search

Automatically embed product data and deliver personalized recommendations that update in real-time as your inventory changes, without complex pipelines.


class Product(TableModel):
    __tablename__ = "products"

    id: int = Field(primary_key=True)
    name: str = Field(sa_type=TEXT)
    description: str = Field(sa_type=TEXT)
    description_vec: list[float] = embed_func.VectorField(
        source_field="description"
    )
    category: str = Field(sa_type=TEXT)
    price: float = Field()

table = db.create_table(schema=Product, if_exists="overwrite")

# App-1 is inserting strings and vectors are auto-generated in real-time
table.insert(Product(
    name="Professional Basketball",
    description="High-quality basketball for professional and amateur players",
    category="Sports",
    price=29.99
))

# App-2 is searching at once using semantic similarity with user preferences
recommendations = (
    table.search(user_profile)
    .distance_threshold(distance_threshold)
    .limit(5)
    .to_list()
)

Semantic Search & RAG

Create AI assistants that understand context and meaning, not just keywords, using vector embeddings and retrieval-augmented generation.


class Chunk(TableModel):
    __tablename__ = "chunks"

    id: int = Field(primary_key=True)
    text: str = Field()
    text_vec: list[float] = text_embed.VectorField(
        source_field="text",
    )
    meta: dict = Field(sa_type=JSON)

table = db.create_table(schema=Chunk, if_exists="overwrite")

results = (
    table.search(query_text)
    .debug(True)
    .filter({"meta.language": language})
    .distance_threshold(distance_threshold)
    .limit(query_limit)
    .to_list()
)

Image & Text Search

Enable multimodal search experiences where users can find images using text descriptions or discover similar visual content effortlessly.


class Pet(TableModel):
    __tablename__ = "pets"

    id: int = Field(primary_key=True)
    breed: str = Field()
    image_uri: str = Field()
    image_name: str = Field()
    image_vec: Optional[List[float]] = embed_fn.VectorField(
        distance_metric=DistanceMetric.L2,
        source_field="image_uri",
        source_type="image",
    )

results = (
    table.search(query="fluffy orange cat")
    .distance_metric(DistanceMetric.L2)
    .limit(limit)
    .to_list()
)

Hybrid Search

Get the best of both worlds by merging traditional full-text search with modern vector similarity for comprehensive, accurate results.


# Define table schema
class Document(TableModel):
    __tablename__ = "documents"

    id: int = Field(primary_key=True)
    text: str = FullTextField()
    text_vec: list[float] = embed_fn.VectorField(
        source_field="text",
    )
    meta: dict = Field(sa_type=JSON)

query = (
    table.search(query_text, search_type="hybrid")
    .distance_threshold(0.8)
    .fusion(method="rrf")
    .limit(limit)
)

Auto Embedding

Transform your text, images, and documents into searchable vectors without manual preprocessing or complex embedding pipeline setup.


# Define embedding function
embed_func = EmbeddingFunction(
    model_name="tidbcloud_free/amazon/titan-embed-text-v2"
    # No API key required for TiDB Cloud free models
)

class Chunk(TableModel):
    __tablename__ = "chunks"

    id: int = Field(primary_key=True)
    text: str = Field(sa_type=TEXT)
    text_vec: list[float] = embed_func.VectorField(source_field="text")

table = db.create_table(schema=Chunk, if_exists="overwrite")

# Insert sample data - embeddings generated automatically
table.bulk_insert([
    Chunk(text="TiDB is a distributed database that supports OLTP, OLAP, HTAP and AI workloads."),
    Chunk(text="PyTiDB is a Python library for developers to connect to TiDB."),
    Chunk(text="LlamaIndex is a Python library for building AI-powered applications."),
])

Real-time Vector Search

Automatically embed product data and deliver personalized recommendations that update in real-time as your inventory changes, without complex pipelines.


class Product(TableModel):
    __tablename__ = "products"

    id: int = Field(primary_key=True)
    name: str = Field(sa_type=TEXT)
    description: str = Field(sa_type=TEXT)
    description_vec: list[float] = embed_func.VectorField(
        source_field="description"
    )
    category: str = Field(sa_type=TEXT)
    price: float = Field()

table = db.create_table(schema=Product, if_exists="overwrite")

# App-1 is inserting strings and vectors are auto-generated in real-time
table.insert(Product(
    name="Professional Basketball",
    description="High-quality basketball for professional and amateur players",
    category="Sports",
    price=29.99
))

# App-2 is searching at once using semantic similarity with user preferences
recommendations = (
    table.search(user_profile)
    .distance_threshold(distance_threshold)
    .limit(5)
    .to_list()
)

Community Contributions

Discover amazing projects built by our community. From developer tools to production applications, see what’s possible with TiDB’s AI-powered capabilities.

FamCare

By Pratik Sharma

AI-powered RAG for healthcare management. Uses TiDB to organize documents, create smart schedules, and power family health chat.

React, TypeScript, Python
healthcare
RAG
AutoIR: Agentic Incident Response

By Younes Laaroussi

Serverless incident response system using TiDB vector search to ingest logs, triage incidents, and generate explainable reports.

Node.js, TypeScript
devops
AWS
vector-search
AI Member of Parliament

By Jianzhi Wang

Event-driven agentic system that automates workflows by finding similar past cases with TiDB vector search and generating appeal letters.

Python
government
ai-agents
vector-search
Heydesk

By Manasseh Zwane

Agentic customer support platform using a custom .NET SDK for TiDB Vector Search to power intelligent ticket routing and real-time chat.

C#, .NET 9, React, TypeScript
customer-support
real-time chat
vector-search
ElitOrcAI

By N DIVIJ

AI clinical decision support that analyzes medical images and uses TiDB for vector similarity search on cases to provide diagnostic guidance.

TypeScript, Next.js
healthcare
medical-imaging
ai-diagnosis

Join Our Growing Community

Connect with developers building the future with TiDB.

Github stars
39.4K

GitHub stars

Community Members
25K

Community Members

Contributor
900+

Contributors

Projects
500+

Projects

Hands-On Labs & Tutorials

Get hands-on with TiDB through our curated sandbox projects. Deploy complete applications in minutes and explore AI-powered database capabilities.

60 Min
Beginner
Vector Search with Jupyter

Learn to build AI apps with vector embeddings, RAG, hybrid search, and GraphRAG using TiDB Cloud Starter in 60 minutes.

Python
Jupyter
Vector Search
RAG

90 Min
Intermediate
RAG + Text2SQL with OpenAI

Build intelligent apps that retrieve information and translate natural language to SQL using OpenAI models and TiDB Cloud Starter.

Python
OpenAI
Streamlit
Text2SQL

60 Min
Advanced
GraphRAG AI Agent with OpenAI

Create advanced AI agents with graph-enhanced retrieval and tool calling capabilities using OpenAI and TiDB Cloud Starter integration.

Python
OpenAI
DSPy
GraphRAG

90 Min
Intermediate
RAG + Text2SQL with Bedrock

Develop AI applications with Amazon Bedrock models for retrieval-augmented generation and natural language query translation capabilities.

Python
AWS Bedrock
Streamlit
Text2SQL

90 Min
Intermediate
Unified AI Storage (Amazon Bedrock)

Experience the simplicity of using TiDB as single storage solution versus managing multiple databases for GenAI applications.

Python
AWS Bedrock
PyTiDB

90 Min
Intermediate
Unified AI Storage (OpenAI)

Compare multi-database complexity with TiDB’s unified approach for GenAI applications using OpenAI models and simplified development workflows.

Python
OpenAI
OpenAI

ECOSYSTEM

Integrations

Production-ready integrations for every stage of your AI pipeline.

Quick start: copy paste your Connection String into listed integrations.

Explore All Integrations

Cloud Platform Support

awsazureGoogle_cloud

Resources

Build on the Right Foundation

For Developers

  • TiDB Cloud Starter (Serverless)
  • 25 GiB storage included
  • Deploy your first agent in 5 minutes

Start for Free

OR

For Platform Builders

Talk to Our AI Infrastructure Experts

  • Architecture review
  • Solve your specific scaling challenges
  • Migration planning & dedicated support

Book Architecture Review