KaireonAI includes a built-in AI assistant accessible from every page in the platform. Open it by clicking the AI icon in the top navigation bar, or press Cmd+I (macOS) / Ctrl+I (Windows/Linux).The assistant can:
Query any entity — “Show me all active offers in the cross-sell category”
Analyze your setup — “Why didn’t customer C-1234 receive the home loan offer?”
Build new entities — “Create a qualification rule targeting customers with balance over $10,000”
Build V2 pipelines — “Create a V2 decision flow with diversity ranking and formula scoring”
Simulate changes — “What would happen if I lowered the email frequency cap to 2 per week?”
Generate content — “Write email copy for the premium card offer in an urgent tone”
Diagnose models — “Analyze model health and detect drift for my propensity model”
Search documentation — “How do I set up a contact policy?”
The AI assistant is built on the Vercel AI SDK and uses a three-layer architecture:
Context Router — Inspects the current page route and selects the appropriate system prompt and tool subset. This keeps the LLM focused on the user’s current task.
Tool Layer — 84 tools organized across 11 categories that call internal API routes on behalf of the user. Every tool output is PII-sanitized before reaching the LLM. Tool calling has been verified with Google Gemini.
Provider Layer — Supports 6 LLM providers (Google, Anthropic, OpenAI, Amazon Bedrock, Ollama, LM Studio) with per-tenant configuration stored in the database.
These 18 tools are available in every context, giving the assistant cross-module visibility regardless of which page you are on:listSchemas, listPipelines, listConnectors, listTransformTypes, listDecisionFlows, listOffers, listChannels, listContactPolicies, listModels, listExperiments, queryMetric, listAlerts, searchDocs, listBehavioralMetrics, listV2NodeTypes, listScoringMethods, listRankMethods, listGroupAllocationStrategies
Creation and mutation tools are added based on the current page context. For example, when on the Decision Flows page, you get the full V2 pipeline toolset plus mutation tools. When on the Algorithms page, you get model management and training tools.
Deep analysis tools that provide explainability, diagnostics, and simulation:
Tool
What It Does
explainDecision
Full decision funnel walkthrough: inventory, qualification, contact policy, scoring, ranking. Shows why a customer received or did not receive a specific offer.
traceCustomerJourney
Timeline of a customer’s interactions: offers shown, channels used, outcomes recorded, journey enrollments, experiment assignments.
compareOfferEligibility
Side-by-side comparison of 2-5 offers for a customer: which rules pass/fail, which policies block, and the resulting scores.
listCustomerSuppressions
All active contact policy suppressions affecting a customer: which rules are blocking, on which channels, and expiration.
analyzeQualificationFunnel
Decision funnel analysis identifying the biggest bottleneck rule and suggesting improvements.
analyzeContactPolicySuppression
Suppression rate analysis by rule type and channel with recommendations for over-aggressive policies.
analyzePolicyConflicts
Cross-entity conflict detection: contradictions, overlaps, and misconfigurations across offers, rules, policies, and experiments.
The assistant adapts its system prompt and available tools based on which page you are on. This keeps the LLM focused on your current task while always providing read-only cross-module visibility.
The call_flow node invokes another decision flow on the current candidate set. Max depth: 2 levels. Circular reference guard prevents infinite loops. optional=true (default) means the parent flow continues if the sub-flow errors. passContext=true shares the parent’s candidates. mergeMode=replace replaces parent candidates with sub-flow output.
The assistant includes a hybrid documentation search tool (searchDocs) that combines:
Local knowledge base — Keyword-based search over embedded platform documentation covering all features, fields, workflows, and V2 pipeline details
Mintlify MCP fallback — If the local match score is below threshold (score < 4), the assistant queries the external Mintlify docs at docs.kaireonai.com/mcp for additional context
When you ask “how to” questions or need guidance on platform features, the assistant automatically searches docs before answering.
The assistant can generate marketing content directly:
generateCreativeCopy — Generate copy for any channel (email, sms, push, in-app) with configurable tone (professional, friendly, urgent, casual) and max character length
generateSubjectLines — Generate 1-5 email subject line variants for an offer
generate_content_variants — Generate full content variants for A/B testing with channel-specific fields (subject line, headline, body, CTA) and configurable tone
Prompt injection defense — User messages are scanned for 7 injection patterns (e.g., “ignore previous instructions”, “you are now”, “system:”, “override instructions”) and matching text is replaced with [filtered]. Messages are truncated to 10,000 characters.
PII redaction — All tool outputs are recursively sanitized before the LLM sees them. Patterns detected and redacted: email addresses, SSN, credit card numbers, phone numbers, bank account numbers, AWS ARNs, database connection strings, and long base64 strings. Field names like password, secret, token, apiKey, ssn, creditCard, cvv, pin, privateKey are always redacted.
RBAC enforcement — The chat endpoint requires admin, editor, or viewer role. Mutation tools inherit the user’s role for downstream API calls.
Rate limiting — 30 requests per minute per user (configurable). Non-fail-open: requests beyond the limit return 429.
Tenant scoping — The tenantId is automatically injected into every tool call. The assistant cannot access data from other tenants.
Audit logging — Every chat interaction is logged with module, route, message count, and conversation ID.
Max tool steps — The LLM is limited to 5 sequential tool calls per message to prevent runaway execution.
Request timeout — Chat requests time out after 60 seconds.