Table of Contents
- Overview
- Architecture
- Prerequisites
- Live Chat Widget Setup
- Shopper Agent Admin UI
- Storefront Widget Integration
- Testing Your Implementation
- API Reference
- Troubleshooting
Quick Start
Implementation involves three main areas of configuration:| Step | What You Do | Time Estimate |
|---|---|---|
| 1. Live Chat Widget Setup | Create inbox, configure webhook to Kibo backend, get site token | 15-30 minutes |
| 2. Admin UI Configuration | Review/customize playbooks, enable tools, configure safety settings | 30-60 minutes |
| 3. Storefront Integration | Add environment variables, create widget component, deploy | 1-2 hours |
Overview
Kibo Shopper Agent is an AI-powered conversational platform that provides intelligent customer service and shopping assistance. The platform enables:- Customer Service Agents: Handle order inquiries, returns, cancellations, and complaints
- Shopper Assistants: Guide customers through product discovery and purchases
- Live Agent Handoff: Seamlessly escalate to human agents via Kibo Helpdesk
- Multi-Tenant Support: Configure different agents per tenant and site
Key Components
| Component | Purpose |
|---|---|
| Kibo Helpdesk | Customer messaging platform for live chat and bot integration |
| Shopper Agent Admin | Web UI for managing agents, playbooks, and tools |
| Storefront Widget | Customer-facing chat interface embedded in storefronts |
| Tool Runtime | Backend APIs that execute commerce operations |
Architecture
Message Flow
- Customer sends message via Kibo Helpdesk widget
- Kibo Helpdesk forwards message to webhook endpoint
- Chat Middleware routes to the AI engine
- AI engine determines intent and calls appropriate tools
- Tool Runtime executes commerce operations (orders, products, etc.)
- Response flows back through the chain to customer
Prerequisites
Before starting, ensure you have:Accounts and Access
- Kibo Commerce tenant with API access
- Access to Shopper Agent Admin UI (provided by Kibo)
- Kibo Helpdesk account (provided by Kibo)
Information You’ll Need
| Item | Description | Where to Get It |
|---|---|---|
| Kibo Tenant ID | Your Kibo tenant identifier | Kibo Admin Console |
| Kibo Site ID | Target site identifier | Kibo Admin Console |
| Kibo API Credentials | Client ID and Shared Secret | Kibo Developer Portal |
| Shopper Agent Admin URL | URL for the Admin UI | Provided by Kibo |
| Shopper Agent Backend URL | Webhook endpoint URL | Provided by Kibo |
| Kibo Helpdesk Instance | Helpdesk URL and credentials | Provided by Kibo |
What Kibo Provides
The following are managed by Kibo and pre-configured for your tenant:- Cloud infrastructure
- AI agents and configuration
- Backend services (Chat Middleware, Tool Runtime)
- Agent definitions and base playbooks
Live Chat Widget Setup
Kibo Helpdesk serves as the messaging platform that connects customers with your AI agents. Your Kibo Helpdesk instance will be provisioned and configured by Kibo.Step 1: Access Your Kibo Helpdesk Instance
Your Kibo representative will provide you with access credentials and the URL for your Helpdesk instance.Step 2: Create an Inbox
- Log into Kibo Helpdesk
- Go to Settings > Inboxes
- Click Add Inbox
- Select Website as the channel type
- Configure:
- Website Name: Your storefront name
- Website Domain: Your storefront domain
- Widget Color: Match your brand
- Click Create Inbox
Step 3: Get Your Site Token
After creating the inbox:- Go to Settings > Inboxes
- Click on your inbox
- Navigate to Configuration tab
- Copy the Website Token (this is your
HELPDESK_SITE_TOKEN)
Step 4: Configure Webhook Integration
This connects Kibo Helpdesk to the Kibo Agentic backend.- Go to Settings > Integrations > Webhooks
- Click Add Webhook
- Configure:
- Webhook URL:
https://your-agentic-backend.com/webhook/chat/helpdesk - Events to Subscribe:
message_createdconversation_updatedconversation_status_changed
- Webhook URL:
- Click Add Webhook
Step 5: Configure Agent Bot
- Go to Settings > Integrations > Agent Bots
- Create a new agent bot:
- Name:
Kibo AI Assistant - Outgoing URL:
https://your-agentic-backend.com/webhook/chat/helpdesk
- Name:
- Assign the bot to your inbox
Step 6: Enable Custom Attributes
Custom attributes allow session tracking between Kibo Helpdesk and Kibo Commerce.- Go to Settings > Custom Attributes
- Create a new attribute:
- Name:
kibo-session-id - Display Name:
Kibo Session ID - Type:
Text - Applies To:
Conversation
- Name:
Kibo Helpdesk Configuration Summary
| Setting | Value | Where to Find |
|---|---|---|
| Site Token | HELPDESK_SITE_TOKEN | Inbox > Configuration |
| Base URL | Your Kibo Helpdesk URL | Provided by Kibo |
| Account ID | Number shown in URL | Settings page |
| Inbox ID | Number shown in inbox settings | Inbox > Settings |
Shopper Agent Admin UI
The Admin UI is used to configure agents, playbooks, tools, and safety settings.Accessing the Admin UI
Navigate to your Shopper Agent Admin deployment:Step 1: Authentication
- Log in with your credentials
- Your user context will determine which GCP project and agents you can access
Step 2: Agent Selection
- From the Dashboard, click Agents
- Your configured agents will be listed
- Select the agent you want to configure
Step 3: Playbook Configuration
Playbooks define the conversational behavior of your agent.Creating a Playbook
- Navigate to Playbooks in the agent menu
- Click Create Playbook
- Configure:
- Display Name: Descriptive name (e.g., “Order Status Handler”)
- Goal: What the playbook accomplishes
- Instructions: Step-by-step conversation flow
Playbook Instruction Syntax
Key Playbook Features
| Feature | Syntax | Description |
|---|---|---|
| Tool Reference | ${TOOL:ToolName} | Calls a configured tool |
| Playbook Reference | ${PLAYBOOK:PlaybookName} | Transfers to another playbook |
| Parameters | Input/Output definitions | Pass data between steps |
Step 4: Tool Configuration
Tools connect your agent to backend functionality.Available Tool Types
| Type | Use Case |
|---|---|
| OpenAPI | REST APIs with OpenAPI specification |
| Function | Custom functions with schema |
| Data Store | RAG-based document retrieval |
| Connector | Pre-built integrations |
Creating an OpenAPI Tool
- Navigate to Tools in the agent menu
- Click Create Tool
- Select OpenAPI as the type
- Configure:
- Display Name: Tool name (e.g., “Get Order Status”)
- OpenAPI Spec: Paste your OpenAPI/Swagger specification
- Authentication: Configure as needed
Tool Authentication Options
| Method | Configuration |
|---|---|
| API Key | Key name and value |
| OAuth 2.0 | Client ID, Secret, Token URL, Scopes |
| Bearer Token | Token value |
| Service Agent | GCP service account |
Step 5: Safety Settings
Configure content safety to protect users and your brand.- Navigate to Settings in the agent menu
- Configure Safety Filters:
| Filter | Recommended Level |
|---|---|
| Hate Speech | Block Some |
| Dangerous Content | Block Few |
| Sexually Explicit | Block Some |
| Harassment | Block Some |
-
Configure Banned Phrases:
- Add phrases that should never appear in responses
- Choose partial or exact match
-
Enable Prompt Security (recommended):
- Protects against prompt injection attacks
Step 6: Set Start Playbook
- From the Playbooks list, find your main entry playbook
- Click the menu and select Set as Start Playbook
- This playbook will be the first to handle conversations
Storefront Widget Integration
The widget embeds Kibo Helpdesk into your storefront for customer interactions.Step 1: Environment Configuration
Add to your storefront’s.env.local file:
Step 2: Next.js Configuration
Ensurenext.config.js exposes the variables:
Step 3: Create the Helpdesk Widget Component
Createcomponents/core/HelpdeskWidget/HelpdeskWidget.tsx:
Step 4: Create the Session API Endpoint
Createpages/api/create-chat-session.ts:
Step 5: Add Widget to Layout
In yourDefaultLayout.tsx:
Testing Your Implementation
Test 1: Admin UI Agent Testing
- Log into Shopper Agent Admin
- Select your agent
- Navigate to Agent Testing
- Select your site from the dropdown
- Send test messages:
- “What’s my order status?”
- “I want to return an item”
- “Help me find a product”
- Verify:
- Responses are contextually appropriate
- Tools are being called correctly
- No safety filter blocks on normal queries
Test 2: Kibo Helpdesk Integration
- Open Kibo Helpdesk dashboard
- Go to your inbox
- Trigger a test conversation via the widget
- Verify in Kibo Helpdesk:
- Message appears in inbox
- Bot responds appropriately
- Custom attribute
kibo-session-idis set
Test 3: Storefront Widget
- Navigate to your storefront
- Log in as a customer
- Click the chat widget
- Start a conversation
- Verify:
- Widget loads correctly
- Messages send and receive
- Agent responds with relevant information
- Order lookups work with real data
Test 4: End-to-End Verification
Complete this checklist to verify your full implementation:-
Session Creation
- Open browser Developer Tools (Network tab)
- Start a new conversation in the widget
- Verify
/api/create-chat-sessionreturns a session ID
-
Kibo Helpdesk Custom Attributes
- In Kibo Helpdesk dashboard, open a test conversation
- Check that
kibo-session-idattribute is populated
-
Tool Functionality
- Ask the agent about an existing order
- Verify it returns real order data from your Kibo tenant
-
Safety Filters
- Test that normal queries are not blocked
- Verify banned phrases (if configured) are filtered
Test Scenarios to Try
| Scenario | Example Query | Expected Behavior |
|---|---|---|
| Order lookup | ”What’s the status of my last order?” | Returns order details |
| Product search | ”Show me red dresses under $100” | Returns matching products |
| Return request | ”I want to return my recent purchase” | Initiates return flow |
| Store inventory | ”Is this available at a store near me?” | Shows nearby inventory |
| Handoff | ”I want to speak to a human” | Transfers to live agent |
API Reference
This section documents APIs relevant to your storefront integration. The backend Tool Runtime APIs and Admin APIs are used internally and do not require direct integration.Storefront Session API
Your storefront needs to call the Kibo Chat Session API to create sessions. This is typically done through a proxy endpoint in your Next.js API routes. Create Session (called by your/api/create-chat-session endpoint)
Kibo Helpdesk Webhook URL
Configure this URL in Kibo Helpdesk settings (you don’t call it directly):Available Agent Tools
The following tools are available to agents and can be enabled/disabled in the Admin UI:| Tool | Description |
|---|---|
| GetOrderStatus | Retrieve order status and details |
| CancelOrder | Cancel a customer order |
| CreateReturnLabel | Initiate a return process |
| FindOrderByShipmentNumber | Search orders by shipment tracking |
| ProductSearch | Search the product catalog |
| GetProductDetails | Get detailed product information |
| NearbyProductInventory | Check inventory at nearby locations |
| GetCart | Retrieve shopping cart contents |
| AddToCart | Add items to cart |
| InitiateCheckout | Start the checkout process |
Environment Variables Reference
Storefront Environment Variables
These are the environment variables you need to configure in your headless storefront:| Variable | Required | Description |
|---|---|---|
HELPDESK_SITE_TOKEN | Yes | Website token from your Kibo Helpdesk inbox |
HELPDESK_BASE_URL | Yes | Your Kibo Helpdesk URL (provided by Kibo) |
KIBO_API_HOST | Yes | Your Kibo API host |
KIBO_CLIENT_ID | Yes | Your application client ID |
KIBO_SHARED_SECRET | Yes | Your application shared secret |

