AI & Intelligence Module
AI & Intelligence Module
The Intelligence module is the AI engine of the platform. It powers the AI assistant, semantic search, AI-generated content, and a tool registry that lets you register custom business tools for the AI to call.
AI Assistant (Admin Chat)
A floating AI chat button is available throughout the admin panel. Ask the assistant anything about your store data:
- "Show me the top 5 products by revenue this month"
- "How many orders are currently in Processing status?"
- "Draft a product description for this coffee grinder"
- "What was the refund rate last quarter?"
The assistant has read access to your live store data and responds with real answers, not general knowledge.
Semantic Search
The Intelligence module powers pgVector-based semantic search across products, blog posts, and docs:
- Customers searching for "running shoes for flat feet" will find relevant results even if no product title contains those exact words
- Embeddings are generated when content is created or updated, and stored in PostgreSQL with the pgVector extension
- Enable semantic search per content type under Settings → Intelligence → Semantic Search
AI Content Drafting
The AI assistant can draft and improve content directly in the admin panel:
- Product Descriptions — Provide a product name and key specs; the AI generates a compelling description
- Blog Posts — Provide a topic and outline; the AI drafts a full post for you to refine
- Email Templates — Describe the email purpose; the AI writes the body
- Doc Pages — Requires the
intelligence.docs.tools.usepermission
Tool Registry
Developers can register custom tools that the AI can call during a conversation. This allows the AI to perform actions (not just answer questions):
// Example: register a tool that checks inventory
Intelligence::registerTool(
name: 'check_stock',
description: 'Check the current stock level for a product SKU',
parameters: ['sku' => 'string'],
handler: fn($params) => Inventory::getStock($params['sku'])
);
Registered tools appear in the AI's toolset and are automatically available in the admin chat.
Configuration
Configure the AI model and keys under Settings → Intelligence:
- AI provider and model (compatible with OpenAI-compatible APIs)
- Embedding model for pgVector search
- Context window size and response streaming toggle
- Permission gates per tool category
