txtai is a free, open source machine learning infrastructure project written in Python and released under Apache-2.0. It has 12,956 GitHub stars, 891 forks and 9 open issues, and was last pushed 2 days ago. On this registry it ranks #14 of 57 tracked projects in Machine Learning Infrastructure, with 5 head-to-head comparisons available. It gained 8 stars over the last 3 tracked days.

What is txtai?

What it is

txtai is an all-in-one AI framework for semantic search, LLM orchestration and language model workflows, written in Python and released under the Apache-2.0 license. It lives in the Python machine learning ecosystem and is built on Hugging Face Transformers, Sentence Transformers and FastAPI. The core component is an embeddings database, which is a union of vector indexes (both sparse and dense), graph networks and relational databases. That foundation enables vector search and also serves as a knowledge source for large language model applications.

The concrete problem it solves is fragmentation. New vector databases, LLM frameworks and everything in between appear daily, and assembling them into a working semantic search or retrieval augmented generation stack takes time. txtai provides one framework that covers embeddings, indexing, search, pipelines, workflows and agents, so a developer can go from install to a running search application in minutes. It runs locally, which means data does not need to be shipped off to disparate remote services, and it scales from micromodels up to large language models.

Key capabilities

  • Vector search with SQL, object storage, topic modeling, graph analysis and multimodal indexing.
  • Embeddings for text, documents, audio, images and video.
  • Pipelines powered by language models that run LLM prompts, question-answering, labeling, transcription, translation and summarization.
  • Workflows that join pipelines together and aggregate business logic, as simple microservices or multi-model workflows.
  • Agents that connect embeddings, pipelines, workflows and other agents to autonomously solve complex problems.
  • Web and Model Context Protocol (MCP) APIs, with bindings for JavaScript, Java, Rust and Go.
  • Batteries-included defaults, with local execution or scale-out through container orchestration.

Who uses it and how

  • Teams building semantic, similarity or neural search applications that need meaning-based retrieval rather than keyword matching.
  • Developers assembling retrieval augmented generation (RAG) processes over their own document collections.
  • Engineers running LLM prompt, question-answering, transcription, translation and summarization pipelines as microservices.
  • Builders of autonomous agents that chain embeddings, pipelines and workflows together.
  • Application developers in JavaScript, Java, Rust or Go who consume txtai through the built-in API and language bindings.

Getting started

Install with pip or run the Docker image, then index and search in a few lines of Python. A YAML config such as app.yml can be served with uvicorn "txtai.api:app", and over 70 example notebooks and applications are available for learning by example.

When to use it β€” and when not to

txtai is a strong fit when a single framework for embeddings, search, pipelines and agents is preferable to stitching together separate vector database and LLM tooling, and when local execution matters

project readme (upstream, from github) β€” read inline

All-in-one AI framework

Version GitHub last commit GitHub issues Join Slack Build Status Coverage Status

txtai is an all-in-one AI framework for semantic search, LLM orchestration and language model workflows.

architecture architecture

The key component of txtai is an embeddings database, which is a union of vector indexes (sparse and dense), graph networks and relational databases.

This foundation enables vector search and/or serves as a powerful knowledge source for large language model (LLM) applications.

Build autonomous agents, retrieval augmented generation (RAG) processes, multi-model workflows and more.

Summary of txtai features:

  • πŸ”Ž Vector search with SQL, object storage, topic modeling, graph analysis and multimodal indexing
  • πŸ“„ Create embeddings for text, documents, audio, images and video
  • πŸ’‘ Pipelines powered by language models that run LLM prompts, question-answering, labeling, transcription, translation, summarization and more
  • β†ͺ️️ Workflows to join pipelines together and aggregate business logic. txtai processes can be simple microservices or multi-model workflows.
  • πŸ€– Agents that intelligently connect embeddings, pipelines, workflows and other agents together to autonomously solve complex problems
  • βš™οΈ Web and Model Context Protocol (MCP) APIs. Bindings available for JavaScript, Java, Rust and Go.
  • πŸ”‹ Batteries included with defaults to get up and running fast
  • ☁️ Run local or scale out with container orchestration

txtai is built with Python 3.10+, Hugging Face Transformers, Sentence Transformers and FastAPI. txtai is open-source under an Apache 2.0 license.

[!NOTE]

NeuML is the company behind txtai and we provide AI consulting services around our stack. Schedule a meeting or send a message to learn more.

We're also building an easy and secure way to run hosted txtai applications with txtai.cloud.

Why txtai?

why why

New vector databases, LLM frameworks and everything in between are sprouting up daily. Why build with txtai?

  • Up and running in minutes with pip or Docker
# Get started in a couple lines
import txtai

embeddings = txtai.Embeddings()
embeddings.index(["Correct", "Not what we hoped"])
embeddings.search("positive", 1)
#[(0, 0.29862046241760254)]
  • Built-in API makes it easy to develop applications using your programming language of choice
# app.yml
embeddings:
    path: sentence-transformers/all-MiniLM-L6-v2
CONFIG=app.yml uvicorn "txtai.api:app"
curl -X GET "http://localhost:8000/search?query=positive"
  • Run local - no need to ship data off to disparate remote services
  • Work with micromodels all the way up to large language models (LLMs)
  • Low footprint - install additional dependencies and scale up when needed
  • Learn by example - notebooks cover all available functionality

Use Cases

The following sections introduce common txtai use cases. A comprehensive set of over 70 example notebooks and applications are also available.

Semantic Search

Build semantic/similarity/vector/neural search applications.

demo

Traditional search systems use keywords to find data. Semantic search has an understanding of natural language and identifies results that have the same meaning, not necessarily the same keywords.

search search

Get started with the following examples.

Notebook Description
Introducing txtai ▢️ Overview of the functionality provided by txtai Open In Colab
Similarity search with images Embed images and text into the same space for search Open In Colab
Build a QA database Question matching with semantic search Open In Colab
Semantic Graphs Explore topics, data connectivity and run network analysis Open In Colab

LLM Orchestration

Autonomous agents, retrieval augmented generation (RAG), chat with your data, pipelines and workflows that interface with large language models (LLMs).

llm

See below to learn more.

Notebook Description
Prompt templates and task chains Build model prompts and connect tasks together with workflows Open In Colab
Integrate LLM frameworks Integrate llama.cpp, LiteLLM and custom generation frameworks Open In Colab
Build knowledge graphs with LLMs Build knowledge graphs with LLM-driven entity extraction Open In Colab
Parsing the stars with txtai Explore

readme truncated β€” read the full docs on github

Frequently asked questions

Is txtai free to use?

txtai is open source under the Apache-2.0 licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does txtai do?

πŸ’‘ All-in-one AI framework for semantic search, LLM orchestration and language model workflows

What is txtai written in?

txtai is primarily written in Python. Its source is publicly available at https://github.com/neuml/txtai, and it has 12,956 GitHub stars.