Augeo AI Docs
SDKsSearch SDK

Overview

Search widget scope, browser delivery, and host responsibilities.

The Search SDK embeds a search field and panel in your host application. It provides recent searches, recommended products, typeahead, catalog results, and an optional handoff to chat.

Prerequisites

RequirementHost responsibility
Browser pageLoad a classic script after the mount container exists
Member sessionSupply a current member bearer accepted by the selected API
API accessEnable the host origin for authenticated search requests
Open stateHandle onOpenChange and call update({ open })
Product selectionProvide onResultSelect to navigate or handle a selected product

Delivery and installation

The supported runtime is a browser IIFE, loaded through a script tag. It registers augeo-search and exposes window.AugeoSearchSdk. The bundle includes its React runtime, design-system styles, tokens, and CSS reset inside Shadow DOM. A host does not need React or a separate design-system stylesheet to embed it.

Public surfaceValue
CDN bundle patternhttps://sdks.augeoai.net/search-sdk/loyalty/<version>/index.js
Globalwindow.AugeoSearchSdk
FactorycreateAugeoSearch(options)
Mount targetAn existing HTMLElement
Instance methodsupdate(options), destroy(), and searchCatalog(request, options) on a current bundle
Diagnosticswindow.AugeoSearchSdk.version and .apiBaseUrl

Use a published release URL supplied for your environment. Pin an immutable version for production traffic. The latest alias can change without a host deployment. The examples show that alias for initial setup, not a release availability guarantee.

The SDK source provides standalone TypeScript declarations for type-only imports. It does not provide an importable JavaScript module. Importing declarations does not load the widget runtime.

SDK and host duties

SDK behaviorHost behavior
Fetch suggestions, recents, and recommendationsSupply member authentication and the correct API origin
Render catalog results by defaultOptionally provide onSearchSubmit for a host results page
Provide product selection callbacksNavigate, enforce product selection, and perform member mutations
Report Ask AI intent and seed textOpen a chat assistant through onAskAi
Request panel visibility changesApply those changes through update({ open })
Cancel stale requestsCall destroy() when the route or session ends

The widget does not implement a host results route, checkout, cart mutations, or wishlist mutations. It does not create a chat conversation by itself. Recently viewed data has an API endpoint, but this widget has no recently viewed section. Catalog completion metadata exposes hasMore; the panel has no pagination controls. searchCatalog is a separate host read for one ranked page. It is not a panel next-page control. Feature-detect it. An older bundle still mounts without that method.

Choose a results mode

ModeConfigurationSubmission behavior
Panel resultsOmit onSearchSubmitFetch catalog results and keep the panel open
Host resultsProvide onSearchSubmit(query)Call the host and request panel closure

Recommendations and product selection remain available in both modes. onCatalogComplete runs only for successful catalog requests rendered by the panel.