neuml/txtai
AI EngineeringAn all-in-one Python framework for semantic search, RAG pipelines, LLM workflows and agents built on an embeddings database.
What it is
txtai is a Python framework centered on an embeddings database: a union of sparse and dense vector indexes, graph networks and relational databases. On top of that index it provides semantic search, pipelines that call language models, workflows that chain pipelines together, and agents that connect embeddings, pipelines and workflows. It targets developers building search, retrieval-augmented generation (RAG) or multi-model NLP applications who want to run locally rather than send data to separate services Introducing txtai.
The framework is built on Python 3.11+, Hugging Face Transformers, Sentence Transformers and FastAPI, and is Apache-2.0 licensed. Bindings exist for JavaScript, Java, Rust and Go, which talk to the same built-in HTTP API txtai repository.
Quick start
Install with pip and index a small set of strings:
pip install txtai
import txtai
embeddings = txtai.Embeddings()
embeddings.index(["Correct", "Not what we hoped"])
embeddings.search("positive", 1)
# [(0, 0.29862046241760254)]
The defaults load the sentence-transformers/all-MiniLM-L6-v2 embedding model; no model path is required. To expose the same index over HTTP, create app.yml and start the FastAPI app:
embeddings:
path: sentence-transformers/all-MiniLM-L6-v2
CONFIG=app.yml uvicorn "txtai.api:app"
curl -X GET "http://localhost:8000/search?query=positive"
These two snippets come from the README's "Why txtai?" section. The install guide covers optional dependencies, conda, minimal installs, running from source and containers; the examples page has over 70 notebooks, including quickstart scripts for agents and RAG.
What you can build
- Semantic search over text, documents, audio, images and video, including multimodal indexing and search image search example.
- LLM orchestration: RAG, prompt templates, task chains and knowledge-graph extraction prompt templates and task chains.
- Agents built on the smolagents framework, with support for Hugging Face, llama.cpp and OpenAI/Claude/AWS Bedrock via LiteLLM agent quickstart.
- Language-model workflows for extractive QA, summarization, transcription, translation and text-to-speech workflow example.
Constraints
- Python 3.11 or newer is required; a virtual environment is recommended.
- The optional components (LLM backends, audio, image and translation pipelines) need extra dependencies beyond the base
pip install txtai; check the install guide before assuming a pipeline works out of the box. - Models are loaded from the Hugging Face Hub or a local directory and downloaded on first use, so an initial run needs network access and disk space. Recommended models are listed in the README, and model paths are optional because defaults exist.
- The framework is small-footprint by design, but LLMs and multi-model workflows shift the real resource cost to the selected models rather than to txtai itself.
HotRepo's take
On the Python daily list for 2026-11-08 the project recorded 57 new stars, ranked 7th in that day's Python list; it has 13,126 stars and 978 forks overall, so it is a long-running project rather than a newcomer. Earlier Hacker News threads from 2022-2023 announced releases 5.0 through 5.2 and discussed prompt-driven vector search Prompt-driven vector search with LLMs. In that thread a maintainer clarified that the demo used local Hugging Face FLAN-T5 models with a Faiss vector store rather than GPT embeddings maintainer reply, which matches the framework's local-first design. The low comment counts on those threads (1 to 5 comments) suggest discussion was thin, so the stars and the example-heavy documentation are the more useful signals of adoption here.
Written by AI from the project's README, updated . The project's own docs are the source of truth.