TiDB for AI
TiDB provides data and workspace capabilities for building AI applications and running AI agent workflows.
- For application development, you can use SQL or Python SDK for TiDB AI (
pytidb) with structured data, vector search, full-text search, hybrid search, and AI-powered retrieval. - For AI agents and automation, you can use TiDB Cloud CLI (
ti) to manage TiDB Cloud Starter instances and SQL workflows, and use TiDB Cloud Filesystems as persistent, shared storage across local machines, CI jobs, and ephemeral agent sandboxes. Filesystems also support mounted workspaces, Git workflows, journals, and delegated secrets.
Get started
Choose a path based on what you want to build:
Build AI applications with TiDB
Use the pytidb SDK or SQL to connect to TiDB, search and retrieve data, and build AI-powered applications.
Connect to TiDB
Search & retrieval
Vector search
Full-text search
Hybrid search
Auto embeddings
Image search
Reranking
Work with data
Application examples
Build agent and automation workflows with TiDB Cloud CLI
The TiDB Cloud CLI (ti) lets users, scripts, CI jobs, and AI agents manage TiDB Cloud from a terminal. Use it to automate TiDB Cloud Starter and SQL operations or to keep files and workspaces available independently of the machines and sandboxes that use them.
Integrations
Connect TiDB to embedding providers, AI frameworks, application libraries, cloud services, and AI development tools.
Reference
Technical reference documentation for TiDB's AI and vector search features.