Airgentic Help
This guide explains how to add Site Search to your website.
Start with the standard Airgentic script tag. Airgentic support will provide your account and service IDs.
Add the Airgentic script tag to your website, usually before the closing </body> tag:
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
defer></script>
Replace:
YOUR_ACCOUNT_IDYOUR_SERVICE_IDwith the values for your Airgentic service.
For more script tag options, see Website Integration: Script Tag.
Overlay search can use an existing search input or button on your website.
Example:
<input id="site-search" type="search" placeholder="Search">
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
data-search-input-id="site-search"
defer></script>
When a visitor clicks the existing search input, Airgentic opens the search overlay.
Inline search embeds search results directly into a page.
Create a search results page on your website, such as /search, and point site-wide search forms to that page using standard URL parameters:
<form action="/search" method="get">
<input type="search" name="query" placeholder="Search">
<button type="submit">Search</button>
</form>
When a visitor searches for engineering, the browser opens /search?query=engineering. Airgentic reads that query, renders the results, and keeps the page URL updated as the visitor changes scopes, filters, sort order, or pagination.
Add a container where the search UI should appear:
<div data-airgentic="search"></div>
Then include the standard Airgentic script tag on the same page:
<script id="airgentic-script"
src="https://chat.airgentic.com/_js/airgentic-1.4.js"
data-account-id="YOUR_ACCOUNT_ID"
data-service-id="YOUR_SERVICE_ID"
defer></script>
Inline search must be enabled for your service before the container will render a search experience.
If the service has Search Fields configured as filters in Search Configuration > Fields, the inline search page can show those filters alongside results. Use Search Configuration > Filters to tune filter behaviour, Scopes to control which category tabs appear and which filters each tab shows, and Result Cards to control result layouts and metadata badges. This is the recommended setup for larger search pages that need category tabs, multiple filters, and richer result cards.
Airgentic search uses a single migration-friendly DOM with stable Airgentic classes and common search/Bootstrap-style classes. If your existing website already has search styles, Airgentic support can load that stylesheet into the search experience and then use the Airgentic-managed style.css for any final overrides. See Styling Site Search.
Some websites may need to place search elements in separate parts of the page.
Future/advanced layout example:
<div data-airgentic="search-input"></div>
<div data-airgentic="search-scopes"></div>
<div data-airgentic="search-facets"></div>
<div data-airgentic="search-sort"></div>
<div data-airgentic="search-ai-answer"></div>
<div data-airgentic="search-ask"></div>
<div data-airgentic="search-results"></div>
<div data-airgentic="search-pagination"></div>
The search-ask slot is optional and is only used when the Ask tab is enabled in Search Configuration. This approach is advanced and may require Airgentic support. It uses the same bookmarkable URL parameters as the single-container inline search page, so existing search forms can still submit to /search?query=.... For most services, start with the single search container and configure categories, filters, Ask tab behaviour, AI answer behavior, and search styling in the admin console.
When testing on localhost, current-site filtering may behave differently because your browser URL is not the same host as the indexed website.
For example, local testing might use:
http://localhost:8001
while indexed pages use:
www.example.com
Use staging or production URLs when testing This site search context behaviour.