Build an AI agent memory system that stores, connects, and recalls information through a single database.
Search a large collection of articles by text similarity, links, and categories without managing multiple databases.
Replace a multi-database stack like Milvus plus Neo4j plus PostgreSQL with a single PostgreSQL instance.
Run filtered semantic search over connected documents with sub-5-millisecond query times.
| consultingfuture4200/tridb | 1ncendium/aibuster | aaronmayeux/ha-hurricane-tracker | |
|---|---|---|---|
| Stars | 5 | 5 | 5 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 4/5 | 3/5 | 2/5 |
| Audience | developer | ops devops | general |
Figures from each repo's GitHub metadata at analysis time.
Requires Docker to build and run a custom PostgreSQL image with the TriDB C extensions loaded.
TriDB is a database tool that combines three common search tasks into a single system running on PostgreSQL. Those three tasks are: finding similar text (like searching for related paragraphs), following connections between items (like links between Wikipedia articles), and filtering results by attributes (like only showing items from a certain category). Normally, teams use three separate databases for these tasks and merge the results in their application code. TriDB does all three inside one PostgreSQL process instead. The core idea is that when you run a search combining all three tasks, TriDB keeps the intermediate results small throughout the process. In a typical multi-database setup, each system produces its own list of results, those lists get passed around between programs, and then trimmed down. TriDB avoids that back-and-forth by handling everything in one query plan under one transaction manager. The project traces its lineage to academic database research, specifically papers called VBASE, Chimera, and AkasicDB. You can try it with Docker using a single build and run command, which starts a PostgreSQL instance with the TriDB extensions loaded. There is also a Python-based demo that shows how it could work as memory for AI agents, where you store information, connect it, and recall it later through a standard interface. The README includes benchmark comparisons against a common multi-database approach using Milvus, Neo4j, and PostgreSQL together. On a corpus of 200,000 Wikipedia articles, TriDB reports median query times of 2.2 milliseconds versus 44.3 milliseconds for the three-system approach, with identical answers returned. The README is notably transparent about limitations. It openly states that plain SQL within the same PostgreSQL instance can come within 16 microseconds of the TriDB operator for certain query types, meaning the main advantage is using one system instead of three rather than faster individual searches. It also lists benchmarks that have not yet been completed. The project is written in C and Python, runs on stock PostgreSQL 16 or 17 with pgvector, and is released under the MIT license. The full README is longer than what was shown.
TriDB is a database tool that runs inside PostgreSQL to combine text similarity search, relationship mapping, and attribute filtering in a single system, eliminating the need to manage three separate databases.
Mainly Python. The stack also includes C, Python, PostgreSQL.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.