About

HyperCrux.com is the home of HyperCrux, a small database where every record has four handles. You can look a record up by its key, query it with SQL, follow its links to other records, or find it by how close its vector is to a question. All four reach the same records, in one SQLite file, so they always agree.

Why It Exists

Apps that use AI tend to spread one set of facts across three systems. The records sit in a regular database. Their embeddings sit in a vector database, so the app can search by meaning. The connections between them sit in a graph database. Every change then has to be copied from one to the others, and sooner or later a copy goes missing. Search finds a document that was deleted. A link points at a record that isn’t there. For a small team, that’s three systems to run and a sync job to babysit, often for a few thousand documents.

HyperCrux keeps a single copy. A record’s fields, its links and its vector live together and change together, in one transaction.

How It’s Built

  • On SQLite. The file is an SQLite database. Records are rows in ordinary tables, and SQLite looks after crash safety and locking.
  • Rules inside the file. The rules that tie keys, rows, links and vectors together are SQLite triggers stored in the file. A Python script that inserts or deletes rows with plain SQL keeps them in step as surely as HyperCrux’s own code does.
  • Exact search. Vector search compares the question with every vector that passes the filter. Results are exact, and filters and transactions need nothing special. The cost is a size ceiling, and the test results say where it is.
  • Library or binary. In Go, HyperCrux is a package you import. For everything else there’s the hypercrux command.
  • Tested by breaking it. The tests kill writing processes at random moments and then check every record, link and vector against the last committed transaction.

License

All the code is open source under the Apache License 2.0, on GitHub. You can use it, change it and build it into your own products.

Questions People Ask

Is it really free?

Yes. HyperCrux is free to use, and the code is free to take under the Apache License 2.0.

What’s a multi-model database?

A database that stores data in more than one shape, such as tables, key-value pairs, graphs and vectors, and lets you query each shape its own way. The explainer goes through what each shape is good for, and what it costs to keep them in one place.

How many vectors can it hold?

As many as fit on the disk, but search time grows with the number it compares. On a two-core cloud machine, an exact search took about 42 milliseconds among 10,000 vectors of 384 values, and about 0.4 seconds among 100,000. Past about a hundred thousand vectors per table, a database with an approximate index will answer faster.

Which languages can use it?

Go programs embed it directly. Any language can run the hypercrux command, which reads and writes JSON. Any language with SQLite can also read and write the file itself, because the rules live in the file; the repository has a Python example that needs nothing but the standard library.

Where do the vectors come from?

From an embedding model of your choice, such as one from OpenAI, Cohere or the open-source sentence-transformers family. HyperCrux stores and compares vectors. It doesn’t make them.

Can several programs use one file at once?

Yes, on one machine. Many processes can read and write the same file at the same time. Keep the file on a local disk, because SQLite’s locking doesn’t work over network file systems.

Can I suggest something?

Please do. The contact page has the address.