SereneDB
> use cases

Database use cases for search, analytics and AI agents

SereneDB is an open-source database for real-time search analytics. It combines search-engine capabilities, analytical query processing and a PostgreSQL-compatible SQL interface over the same tables.

Eleven workloads, in the same three groups as the site menu. Every one of them runs on the same engine.

one index · one query
-- one index: a text analyzer and an ivf column
CREATE INDEX movies_idx ON movies
    USING inverted(id, title english, overview english,
                   embedding ivf (metric = 'cosine'));

-- search selects the rows, GROUP BY aggregates them
SELECT genre, COUNT(*) AS matches,
       ROUND(AVG(vote_average), 2) AS avg_rating
FROM   movies_idx
WHERE  overview @@ 'space'
GROUP BY genre
ORDER BY matches DESC, genre;
from the quick startdocs/quick-start →
Two statements from the SereneDB quick start. The first creates one inverted index on the movies table with a text analyzer on the title and overview columns and an IVF vector index on the embedding column. The second selects the movies whose overview matches 'space' and groups them by genre, returning the count and average rating per genre.
> Analytics & data · 4 use cases

Analytics & data

Aggregations run on the same engine as search, over native tables, files in object storage and attached databases.

Aggregate fresh data, no nightly job

A search predicate and a GROUP BY in one statement. New rows become searchable at the next index refresh: every second by default, or on VACUUM (REFRESH_TABLE).

Vectorized scans over columnar data

GROUP BY, GROUPING SETS and window functions in plain SQL, with filters and projections pushed down into Parquet scans.

Index object storage in place

An inverted index over a view on Parquet, CSV, JSON, ORC or Iceberg, on disk or S3. The files stay the source of truth; REINDEX picks up changes.

Query remote sources where they live

CREATE SERVER names a remote PostgreSQL or ClickHouse you query as server.schema.table. Index a view over one of its tables and the rows stay in the remote engine.

> AI & agents · 3 use cases

AI & agents

Retrieval for models and agents, in SQL over the PostgreSQL wire protocol.

Agent-ready SQL, scoped with GRANT

An agent connects over the Postgres wire protocol on port 7890, as a role you GRANT exactly what it may read; ai_embed embeds its query text inside the statement.

Retrieval layer for grounded answers

Chunks, embeddings and metadata in one table and one index. langchain-serenedb implements LangChain's VectorStore, with BM25 as the lexical half of hybrid retrieval.

Search over docs and knowledge bases

Serene Docs Search indexes a Git repo, folder, website or S3 bucket into SereneDB. BM25 works with no model; hybrid search, cited answers and an MCP server are opt-ins.

SearchBench

Our open benchmark: 92 search, aggregation and join queries over log-shaped data, with every engine adapter published.

See the results →

Get started

Quick start →Download SereneUI →
> one engine

One engine under all eleven

The eleven use cases above are three pieces used in different combinations: one SQL engine, one inverted index and the PostgreSQL wire protocol in front of both.

01 · sql

One SQL engine

Tables, joins, aggregates and window functions, in a dialect that closely follows PostgreSQL. The few exceptions are listed on the compatibility page.

02 · index

One inverted index

Analyzed text, verbatim and range fields, IVF vectors and geo in one CREATE INDEX … USING inverted, and a query may constrain any subset of them. That is the index’s shape, not the breadth of its vector features: the one documented ANN index is IVF, and quantization applies to L2 and inner product only.

03 · protocol

The Postgres wire protocol

Protocol v3.0 on port 7890: most PostgreSQL clients, drivers and tools connect without code changes. Compatibility stops at the protocol and the dialect: CREATE ROLE … REPLICATION is accepted and has no effect.

One engine is also one machine: no replication, no failover and no managed service.

> faq

Frequently Asked Questions

About the hub as a whole. Each use-case page answers its own questions.

Three groups: search (full-text, vector, hybrid and Postgres-compatible search), analytics over native tables, data lakes and attached databases, and retrieval for AI agents, RAG and documentation. SereneDB is a search-OLAP database, and the pages here stay with those workloads.

In SereneDB, yes: one inverted index carries a text analyzer over the text columns and an IVF index over the embedding, and a GROUP BY runs over the rows a search predicate selects, in one statement. The limits: the one documented ANN index is IVF, and the index is eventually consistent, refreshed every second by default.

Search and vector retrieval alone do not. In SereneDB both are indexes on ordinary SQL tables, so full-text, vector and filter conditions sit in the same statement as joins and aggregates, and JSON documents are indexed the same way as relational columns. This hub covers search, analytics and AI retrieval; key-value caching is outside it.

> get started

Get Started with SereneDB

A single binary, from the Docker image or the Linux install script. Connect with psql on port 7890, load a dataset, index it for full-text and vector search and query it; the quick start does it in one session.