Interakt & Hygraph

AI Search for Hygraph: Open Source, Self-Hosted, No Per-Query Fees

Products and content in one search solution, an AI assistant that answers only from your own content, and no bill that rises as your traffic grows.

Hygraph structures your content.

Interakt makes it searchable and answerable, in one search box and one AI assistant across products, guides and policies.

It's open source and self-hosted, so you avoid per-query fees, choose your own AI model, and keep your data in your own environment.

Read on to see how it works, and how little code it actually takes.




Type "waterproof jacket for Scottish winter" into Meridian's search box. What is the result?

An FAQ about taped seams, a buying guide to waterproof ratings, and two rain jackets in one ranked list.

That is unremarkable until you notice the FAQ and the jackets live in different indexes, and on most sites in different search products entirely.

Meridian is a demo site we built on Hygraph: apparel and outdoor supply, 159 products and a hundred-odd pieces of editorial. Search and chat come from Interakt, our MIT-licensed search and AI chat platform.

The whole thing is public here.

ALERT: If you just want to go to the fast view at what we did, look at this video

One search box instead of a catalogue and a magazine

A Hygraph site is almost never just a catalogue. Meridian is 159 products, but it is also 32 guides and how-tos, 20 journal posts, 42 FAQs and 6 policy pages.

That split is normal, and so is what usually happens to it: the products get a search product, the editorial gets whatever the CMS ships, and a customer who asks one question gets half an answer.

We gave Interakt two indexes:

  • one for products, and

  • one for everything else

Then we attached both to a single search experience.

Results come back fused with Reciprocal Rank Fusion, so the ranking does not care which index a document came from. On top of that: autocomplete, tabs for Everything / Products / Guides & help, and a facet sidebar with live counts for type, brand, product line, colour, size, rating and availability.

Take a look at how it looks and works from the following video.

An AI assistant that answers from your content, not from model memory

The chat widget sits bottom-right on every page. It is a script tag and one init() call. There's no npm package and no framework and it renders inside a shadow root, so the site's CSS cannot break it and it cannot break the site's.

What makes it useful is that it is not answering from model memory. Every answer is grounded in the same indexes the search box reads, through tools generated from them.

Ask for a waterproof jacket under $300 and it queries the product index.

Ask how you return a jacket and it queries the content index and answers from the returns policy.

That second question is the one worth asking of any assistant demo. It is what reveals whether the thing is wired to the whole site or only the easy half.

Three routes into the index, for three different people

Keeping search current is three separate problems, because three different people have it:

  1. A developer wants a terminal. There is a CLI that re-feeds everything.

  2. Hygraph itself wants nothing. A signed webhook fires on publish, unpublish and delete, and nobody operates it.

  3. An editor wants neither.

So we built a page into Hygraph Studio using the App Framework: a "Re-feed all content" button that appears under App views in the content editor, reports what it did in a table, and fires a native Hygraph toast when it finishes. All 264 documents, in about six seconds.

The button and the CLI call the same function: A re-feed triggered from Studio and one triggered from a terminal cannot drift apart and start producing different documents.

Publish in Hygraph, searchable within seconds

Most of the time, though, nobody presses anything. An editor publishes a guide and it is searchable before she has switched tabs. Unpublish it and it is gone. Restore it and it is back.

The webhook is signed and verified against the raw request body. Intent comes from the operations like; publish, unpublish, delete and never from the payload, because a delete still ships the full pre-delete entry. A handler that inspected the body would cheerfully re-index something that had just stopped existing, leaving search results pointing at 404 pages. Deletes go through the bulk endpoint, which is idempotent, so a replayed webhook is harmless rather than a failure.

The cost question is a question about pricing models

This is where open source stops being a philosophical position.

The search products usually bolted onto a headless CMS, like Algolia, Coveo, a hosted Elastic will meter two things: records indexed, and queries served. Both go up precisely when the site does what it exists to do. You publish more, so you pay more. More people read you, so you pay more. The meter is pointed at your own success.

Interakt is MIT-licensed. It runs as one Docker image against Postgres with pgvector and either Elasticsearch or Azure AI Search. Self-host it and the marginal cost of a query is compute you already run. If you don't want to host it - reach out and we find a solution that works for you and your business.

Two things follow that matter as much as the meter does. You choose the AI provider, most likely from OpenAI, Anthropic, Azure OpenAI, Google Vertex, HuggingFace, or Ollama on your own hardware and you can switch it per experience from the admin, without touching code. And your catalogue and your customers' queries never leave your environment, which for regulated sectors settles the question on its own.

Want the technical version?

Most of the integration to Interakt was not Hygraph-specific, why would it be?

Beside that Custom app for Hygraph we make it easy to push all data - it's pretty basic and most developers or AI tools can do that for you really fast.

If you want to take a look at this specific demo implementation - check it out below.

Contact Us

Image of Roland Villemoes

Roland Villemoes

CTO

Mobile: +1-646-637-2936

Email: rv@alpha-solutions.com