Announcing dotAI Search in the SDK: a new client.ai.search() method in the @dotcms/client SDK that puts working semantic search in any headless dotCMS project in under 15 minutes — available now to all Evergreen headless customers at no additional charge.
Developers building headless apps on dotCMS have had access to dotAI's semantic search, but using it meant going directly against REST endpoints — hand-rolling authentication, request payloads, response parsing, and loading UI for every project. The result: AI search was either skipped to avoid the overhead or built as a one-off integration that was expensive to maintain. Meanwhile, AI search is no longer optional — it understands intent rather than exact terms, surfacing the right content even when the words don't match.
What's New
One method, typed and clean. client.ai.search() handles authentication, request construction, and response parsing behind a typed interface. Pass a query string and configuration; get back search results.
A working reference implementation. The dotCMS Next.js starter ships an AI search implementation built on a React hook pattern, with two modes out of the box: full-text search with loading and error states built in, and a related-content sidebar based on the current page. Both support analytics callbacks. Angular support is on the roadmap.
PDF and file content is searchable. The dotAI backend indexes file assets including PDFs, so document-heavy sites get full AI search coverage without custom extractors.
Why It Matters
Every hour spent on REST plumbing was an hour not spent on the experience end users actually see. Standardized SDK usage means consistent patterns across projects, demo-ready AI search for any headless setup, and a lower support burden — issues follow predictable patterns and resolve faster.
How to Get Started
dotAI Search in the SDK is available now for all Evergreen headless customers at no additional charge. Here's the path to a working implementation:
Enable dotAI on your dotCMS instance and configure an OpenAI API key in the dotAI app settings.
Create an embedding index in Dev Tools → dotAI → Manage Embeddings/Indexes. Configure which content types should be included and build the index.
Update to the latest `@dotcms/client` SDK: `npm install @dotcms/client@latest`.
Call `client.ai.search()` in your application, or copy the search implementation from the dotCMS Next.js starter as a starting point.
Note: the current release supports OpenAI only. Multi-vendor support (bringing AI search to all configured dotAI model providers) is targeted for end of Q1 2026.
To get started, see the documentation for `@dotcms/client` and the AI Search implementation in the dotCMS Next.js starter. If you're an Evergreen customer and want help setting up your first index, reach out to your CSM.