Overview
The AI Chat Extension SDK (@sleek/ai-chat-extension-sdk) enables browser extensions to integrate intelligent, context-aware AI chat capabilities. The SDK automatically detects shopping-related websites and queries (Google, ChatGPT) and provides users with a beautiful chat interface featuring AI-powered recommendations and your offers.
Key capabilities
- Automatic query classification: Detects shopping intent on supported platforms (Google Search, ChatGPT)
- Platform controls: Choose which platforms to enable (Google or ChatGPT. Google is enabled by default).
- Chat badge: Displays suggested prompts when shopping queries are detected
- Chat panel: Full-featured sidebar with AI conversation interface
- Event system: Comprehensive events for all user interactions
- Data integration: Display offer redirect urls and cashback offers in conversations
- Full customization: Brand colors, logos, and UI styling
Extension Permissions
The correct extension permissions must be requested for the SDK to function. SDK requires the following permissions be requested by your browser extension:tabsscripting
Host permissions (manifest v3 only)
In addition to permissions for extensions using manifest v3, SDK requires your extension to operate on the correct URLs in the browser. In manifest v2, you specify host permissions along with other API permissions in thepermissions
array.
Installation
Configure npm registry
Add the Sleek registry to your
.npmrc file:.npmrc
Contact [email protected] to receive your authentication token.
Configure manifest permissions
Update your
manifest.json to include required permissions:The SDK automatically registers the required content scripts at runtime using the
scripting API. You do not need to manually add content scripts or web-accessible resources to your manifest.Quick start
Here’s a minimal example to get the SDK running in your browser extension:Advanced usage
Manually initializing chat on a tab
You can programmatically initialize the chat on a specific tab using theinitializeChatOnTab method:
query(required): The search query contextinitialMessage(optional): An initial message to send when the chat opens
Getting help
- Email support: [email protected]
- Sales inquiries: [email protected]

