neuml/txtai
A Python embeddings database for vector, SQL, and graph retrieval in self-hosted RAG
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
txtai is a Python 3.11+ framework whose core is an embeddings database combining dense and sparse vector indexes, a relational layer, and graph networks. In the embedded path, an application uses txtai.Embeddings() to index a corpus and query it in-process. The retrieval layer can serve semantic search directly or supply context to RAG, with SQL and graph search available alongside vector retrieval.
The model stack uses Hugging Face Transformers and Sentence Transformers. Pipelines wrap individual model tasks; workflows compose those tasks with application logic. An optional agent layer built on smolagents can call embeddings, pipelines, and workflows. FastAPI provides the Web API service path, and a separate MCP API serves compatible clients. A search application does not need to adopt the workflow or agent layer.
Key Capabilities & Differentiators
txtai supports embeddings for text, documents, audio, images, and video. The model guide lists all-MiniLM-L6-v2 for embeddings and BLIP for image captioning. Its RAG examples cover citations, graph-backed search, and context from SQL or the web. These are useful when answers need to draw on structured records or related entities rather than only the nearest text chunks.
The release notes show several distinct retrieval options: v9.13.0 introduced LEMUR learned multi-vector retrieval and expanded late-interaction support; v9.14.0 added native ONNX vectors and RaBitQ and Zvec Sparse ANN backends; v9.15.0 added a Milvus Lite sparse ANN backend. Model pipelines also cover transcription, translation, and summarization, while integrations with llama.cpp and LiteLLM provide different routes to generation. Backend selection should be based on corpus-specific retrieval quality and operating cost, not the number of available options.
Trade-offs & Limitations
txtai and Pinecone overlap at vector retrieval, not at the application boundary. A managed vector service is a more direct fit when the application already owns ingestion and model orchestration and the main goal is to offload vector index operations. txtai is the better fit when you want to run retrieval in an application process or combine vector search, SQL, graphs, and language-model processing under your own deployment.
The broader scope means more choices to validate: model quality, index backend, enabled dependencies, and how resource-intensive tasks are isolated from search traffic. Docker packaging does not by itself establish high availability or index recovery. For a production rollout, test retrieval relevance, concurrent query behavior during index updates, and recovery from a lost instance. Apache-2.0 covers txtai itself; model licenses and provider terms require separate review.
Hardware & Deployment Guide
Install with pip install txtai in a Python 3.11+ virtual environment, adding optional dependencies for the selected backend or pipeline. For a Web API deployment, set embeddings.path in app.yml and launch CONFIG=app.yml uvicorn "txtai.api:app". Docker is an alternative for self-hosting. An offline deployment needs model artifacts available locally and must avoid external model and retrieval providers.
For production, plan where to persist model artifacts and index data. Measure indexing throughput, memory use, and query latency separately from generation; the selected model and concurrency determine whether GPU capacity is warranted. v9.15.0 added OpenAI client providers and changed SQL queries, graph search, indexing, workflows, and RAG, so test representative queries and workflows before rolling out the upgrade.
Python teams building self-hosted knowledge search or RAG that needs vector, SQL, or graph retrieval alongside document and model workflows.
You already have ingestion and orchestration and primarily want a managed vector index, or your production requirements depend on high availability and recovery guarantees you have not validated in a self-hosted deployment.
Quick Start & Installation
CONFIG=app.yml uvicorn "txtai.api:app" curl -X GET "http://localhost:8000/search?query=positive"
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| txtai ★ | 13.8k | +33 | Python | Apache-2.0 | A Python embeddings database for vector, SQL, and graph retrieval in self-hosted |
| LightRAG | 41k | +110 | Python | MIT | Graph-backed RAG for cross-document retrieval and multimodal indexing |
| zvec | 16.3k | +29 | C++ | Apache-2.0 | In-process C++ vector database for local hybrid retrieval |
| weaviate | 17k | +17 | Go | — | Go vector database for filtered hybrid retrieval in production RAG stacks |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/neuml/txtai.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about txtai
Should I embed txtai in my application or call it as a service?
txtai.Embeddings() when indexing and search should run inside an existing Python process. For a service boundary, configure the embedding model under embeddings.path in app.yml and launch CONFIG=app.yml uvicorn "txtai.api:app". The Web API exposes search through /search?query=...; MCP is a separate integration option for compatible clients.Do I need a GPU, and how should I size the host?
all-MiniLM-L6-v2 embedding model, then measure indexing throughput and query latency on representative data. Index size and retained content affect storage and memory; local generation, model choice, and concurrency can materially increase RAM or VRAM demand. There is no single hardware minimum for every txtai configuration.Can we use txtai commercially and keep data on premises?
When should we choose txtai over Pinecone?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy