{"library":"txtai","type":"library","category":null,"description":"All-in-one AI framework: embeddings database, semantic search, LLM orchestration, RAG, pipelines and agents. Current version: 9.7.0 (Mar 2026). TWO packages on PyPI: 'txtai' (full local library) and 'txtai.py' (thin API client for remote txtai server). Most tutorials use the full 'txtai' package. Core API: Embeddings class. index() rebuilds entire index. upsert() adds/updates without full rebuild. Content storage must be enabled for SQL queries and content retrieval.","language":"python","status":"active","version":"9.7.0","tags":["txtai","embeddings","semantic-search","rag","vector-database","llm","python"],"last_verified":"Tue Jun 09","install":[{"cmd":"pip install txtai","imports":["from txtai import Embeddings\n\n# Default model (all-MiniLM-L6-v2)\nembeddings = Embeddings()\n\n# Or specify model explicitly\nembeddings = Embeddings(path='sentence-transformers/all-MiniLM-L6-v2')\n\n# index() — builds NEW index, overwrites existing\nembeddings.index(['Correct answer', 'Wrong answer', 'Maybe'])\n\n# search returns list of (id, score) tuples\nresults = embeddings.search('positive', 1)\nprint(results)  # [(0, 0.298)] — id=0 is 'Correct answer'","from txtai import Embeddings\n\n# Enable content storage to retrieve text from search results\nembeddings = Embeddings(content=True)\n\n# Index with dict documents\nembeddings.index([\n    {'id': 0, 'text': 'Python is a programming language'},\n    {'id': 1, 'text': 'JavaScript runs in browsers'},\n    {'id': 2, 'text': 'Rust is fast and safe'},\n])\n\n# Now search returns dicts with text\nresults = embeddings.search('compiled language', 1)\nprint(results[0]['text'])  # 'Rust is fast and safe'\n\n# Can also use SQL\nresults = embeddings.search(\n    \"SELECT text, score FROM txtai WHERE similar('web language') LIMIT 1\"\n)"]},{"cmd":"pip install txtai[all]","imports":[]},{"cmd":"pip install txtai[api]","imports":[]},{"cmd":"pip install txtai.py","imports":[]}],"homepage":"https://txtai.ai","github":"https://github.com/neuml/txtai","docs":"https://github.com/neuml/txtai","changelog":null,"pypi":"https://pypi.org/project/txtai/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":29,"avg_install_s":46.2,"avg_import_s":23.08,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/txtai/compatibility"}}