pytidb

Connect to TiDB from Python and build vector search features.

24|14|Updated Feb 23, 2023
One-click install
npx skills add https://github.com/pingcap/agent-rules --skill pytidb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytidb
Source: https://github.com/pingcap/agent-rules/tree/main/skills/pytidb
Command: npx skills add https://github.com/pingcap/agent-rules --skill pytidb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pytidb, python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides Python tooling to connect to TiDB from Python, model tables, and build vector/full-text/hybrid search features, enabling AI-powered apps with nearby memory and RAG capabilities. It guides you through templates and examples to accelerate development, reduce boilerplate, and keep credentials safe via environment variables.

Core Features & Use Cases

  • ORM-like experience: Interact with TiDB using Python classes and SQLAlchemy-inspired patterns.
  • Vector/full-text/hybrid search: Build semantic search for app data and AI tasks.
  • Agent-oriented examples: RAG, memory, and text-to-sql workflows to accelerate AI apps.
  • Use Case: Spin up a quick starter that connects, creates a table with auto-embedded vectors, inserts sample data, and runs a semantic search.

Quick Start

Use the pytidb skill to connect to TiDB from Python using pytidb, configure env vars, and run a quickstart template that creates a table with auto-embedding and performs a vector search.