Ask in your words. Get rows back.
None of these tickets say “login”. The ids are Postgres primary keys.
Connect with what you already use.
Antfly speaks the Postgres wire protocol and the Postgres dialect. Point psql or your driver at it and write the SQL you already know.
On Antfly Cloud, connections are TLS: the instance ID is the username and a Cloud API key is the password. On your own server, turn on the listener with authentication and put TLS in front of it. For typed queries from TypeScript, use Kysely.
PGPASSWORD="$ANTFLY_API_KEY" psql \
"postgresql://INSTANCE_ID@PGWIRE_HOST:5432/default?sslmode=verify-full"SELECT c.name, count(*) AS open_tickets
FROM tickets t
JOIN customers c ON c.id = t.customer_id
WHERE t.status = 'open'
GROUP BY c.name
ORDER BY open_tickets DESC
LIMIT 10;- Joins, CTEs (recursive too), window functions, subqueries, UNION / INTERSECT / EXCEPT
- INSERT … ON CONFLICT, UPDATE … FROM, DELETE … USING, RETURNING, MERGE
- Prepared statements, cursors, savepoints, EXPLAIN ANALYZE
- Tested in CI with pgx, node-postgres, psycopg, asyncpg, and SQLx
Three ways to work with your Postgres.
Follow a table as it changes.
Antfly backfills a table from a consistent snapshot, then follows its inserts, updates, and deletes through logical replication, and picks up where it left off after a restart. Indexes and models run as rows land, so a mirrored table is searchable by meaning as soon as it arrives.
Join live Postgres without copying it.
Name a Postgres table or view in a query, and Antfly filters, aggregates, and joins it at request time. Join full-text hits to live Postgres rows, or a mirrored table to a live lookup, in one request.
Bring search into Postgres.
The antfly_postgres extension adds an antfly index type, the @@@ operator, and keyword, semantic, and hybrid search functions to Postgres 13 through 18, so your application searches Antfly in SQL without leaving Postgres.
The architecture your security team wants.
Antfly mirrors from a logical replication slot, with a database user you grant REPLICATION, the way a read replica does. It never writes to your tables, and your application keeps talking to Postgres.
The same SQL, in one file.
Antfly Lite runs inside your process from a single .aflite file, the way SQLite does, with nothing to operate. It runs the same Postgres-dialect SQL as a server, through SQLx in Rust or Kysely in TypeScript, and search is a relation you join and filter in SQL.
When the app outgrows one file, move it to a server.
let mut db = AntflyConnectOptions::new("app.aflite").connect().await?;
sqlx::query::<Antfly>("INSERT INTO people (id, name) VALUES ($1, $2)")
.bind(1_i64).bind("Ada").execute(&mut db).await?;Still Postgres.
- Transactions and constraints
- Your application's writes
- Backups and recovery
- One vector column, compared directly (pgvector)
Now Antfly.
- Words and meaning in one ranked answer
- The PDFs, images, and calls the rows point at, processed by the models
- A knowledge graph the models build from rows and files
- Agents asking, over MCP
Keep your Postgres.
Or see the tickets table doing real work, or start with Antfly Lite.