# ThreadwingDB > ThreadwingDB is a database built for AI agents. It combines keyword search, semantic search and an entity graph, follows the links between records to find every fact a question needs, and returns cited evidence that fits a token budget. ## Why it exists Most databases keep data for people who already know it. Agents don't: they need to know what a column means, what values it holds and how records connect. ThreadwingDB and its Bookkeeper agent keep data that way. ## Measured results - 62.4% of multi-hop questions found both facts in the top 10, on 5.23M Wikipedia articles and 7,405 BEIR HotpotQA questions. S3 vector storage 49.1%, hybrid 41.6%, vector 32.8%, BM25 32.5%. - 86.0% both facts found on a live 300k playground, against 67.2% for plain search, at about 33 ms p50. - nDCG@10 0.402 against 0.379 on org data: 1.25M records across 19 BEIR datasets. - p50 65 ms and p99 113 ms on 5.23M records on one CPU. - Cold queries take 1 round trip where S3 vector storage designs take 3 to 4: modelled 2.4 to 3.1 times faster cold reads and 4 times faster writes on S3 Standard. - Index 0.35 GB against 5.44 GB for HNSW (15 times smaller). ## How a query works 1. Route and scan: nearest cells with 1-bit then 8-bit codes, alongside a keyword index. 2. Fuse: both rankings merge into seed records. 3. Connect: follow entity links, names in the question and one vector hop. 4. Score: weights learned online from feedback. 5. Pack: the best evidence, cited, to a token budget. ## The Bookkeeper agent (Wingo) For SQLite, PostgreSQL, MySQL and SQL Server sources, it reads the schema, indexes real values, describes every table, turns rows into records with foreign keys as links, and re-checks every 5 minutes. ## Security Every request is authenticated. API keys are per tenant with reader, writer or admin roles; only a SHA-256 of each secret is stored. Agents get reader keys. A storage profile runs with no language models, no connectors and no sign-up. ## FAQ ### What is an agent database? An agent database stores data so AI agents can find, connect and trust it. Instead of returning a flat list of matches, ThreadwingDB follows links between records and returns cited evidence that fits a token budget. ### Is ThreadwingDB a vector database? It uses vectors, but it does more than return the nearest matches. It combines them with keyword search and an entity graph, then follows links across records to gather the evidence a question needs. ### What does the Bookkeeper agent do? Wingo, the Bookkeeper, onboards each data source in the background: it reads the schema, indexes the real values, describes every table, turns rows into records with foreign keys as links, and re-checks the source every 5 minutes. ### Which databases can it connect to? SQLite, PostgreSQL, MySQL and SQL Server. Connect with a read-only login: sessions are also forced read-only, private hosts need an allowlist and credentials are encrypted at rest. ### What happens when the answer isn't in my data? Answers cite the records they use. When the evidence isn't there, the answer says so instead of making something up. ### Can an agent change or delete my data? Not with a reader key, which is what agents should get. Writes need a separate writer key, held by the service that records events. ### Does it need a language model? No. Search, filters, aggregates and the entity graph work in the storage profile with no language models. Grounded answers are optional.