Practical overview
When it fits
Use ToucanDB when an application needs local vector persistence and retrieval, especially for semantic search or a RAG workflow, and can operate within its single-process database ownership model.
Who it is for
- Python developers building local semantic search or RAG features.
- Application teams that need vector storage and retrieval without operating a separate database server.
- Developers who want to supply vectors directly or connect an available embedding adapter.
Documented uses
- Persist, index, and retrieve high-dimensional vectors.
- Search vectors by similarity, including searches filtered by metadata.
- Index documents and retrieve source-attributed context for an application-provided RAG generator.
- Use embedding retrieval as application memory.
Requirements & limits
The repository identifies the project as open source under the MIT license. Python 3.10 or newer is required.
- SQLite provides durable persistence while FAISS supplies the search index; the README describes FAISS state as rebuildable.
- The database is embedded and one process owns a database directory at a time.
- The RAG pipeline is in the core package, while Sentence Transformers and OpenAI adapters use optional extras.
- The core RAG pipeline accepts an injected generator rather than requiring a particular LLM framework.
- Flat search is exact; HNSW and IVF are approximate and have distinct memory, tuning, and workload trade-offs.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Store and search vectors directly
Create a collection, upsert supplied vectors, and search it with a metadata filter.
Before you start
- Python 3.10 or newer.
- Install the core toucandb package.
- Provide vectors with consistent dimensions and a collection schema.
Steps
Open a ToucanDB database at a local path.
Create a collection schema with its dimensions and selected index type.
Upsert vectors with IDs and optional metadata.
Search with a SearchQuery containing a query vector, result count, and optional metadata filter.
Expected outcome
The application receives matching vector records from its collection.
Guide limitations
- ToucanDB is embedded, not a distributed service, and a database directory has one owning process at a time.
- Approximate index types trade exactness or memory and tuning requirements differently from flat search.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- ToucanDB/ToucanDB · Official homepage title · retained in its source language

