Skip to main content

AI Features โ€” v2.0

LeadHub v2.0 introduces three flagship AI features that turn your CRM from a passive lead store into an active lead engine:

FeatureWhat It Does
LeadBotEmbeddable AI chatbot for your website โ€” qualifies visitors, captures leads, books meetings 24/7
AI SDRAutonomous follow-up agent that works leads over email, SMS, and WhatsApp on a smart cadence
Visual Flow BuilderDrag-and-drop canvas for building automations visually โ€” same engine, beautiful interface

All three features run on shared hosting (no Redis, no Supervisor, no build step). They degrade gracefully when no OpenAI key is configured.


Setting Up AIโ€‹

Adding Your OpenAI API Keyโ€‹

  1. Go to Settings โ†’ AI & Integrations.
  2. Enter your OpenAI API Key (starts with sk-).
  3. Click Save & Verify โ€” the system sends a test request to confirm the key is valid.

Each tenant manages their own key. The super admin's key is never shared with tenants.

If no key is configured, LeadBot shows a friendly "unavailable" message to visitors, and AI SDR falls back to a plain templated sequence. No features break โ€” they simply run without AI.


AI Spend Capsโ€‹

To prevent runaway API costs, you can set per-tenant spending limits:

  1. Go to Settings โ†’ AI & Integrations โ†’ Spend Limits.
  2. Set a Daily Cap and/or Monthly Cap (in USD).
  3. When a cap is reached, AI features pause for the remainder of that period and resume automatically when the counter resets.

Usage Ledgerโ€‹

Settings โ†’ AI & Integrations โ†’ Usage shows a full log of every AI request:

ColumnDescription
DateWhen the request was made
FeatureLeadBot, AI SDR, or other
ModelOpenAI model used
Tokens In / OutPrompt and completion token counts
Cost (USD)Calculated cost for that request
Running TotalCumulative spend this month

This gives you full visibility into AI costs before your OpenAI invoice arrives.


Requirementsโ€‹

  • OpenAI API key (required for AI responses; graceful fallback without one)
  • PHP 8.4+ (already required by LeadHub)
  • Cron job โ€” the 15-minute cron used for queues also drives AI SDR ticks
  • No Redis, no Supervisor, no npm/Node.js required

Super Admin: Per-Tenant AI Controlsโ€‹

Super admins can view and override AI settings for any tenant:

  1. Super Admin โ†’ Tenants โ†’ [tenant] โ†’ Edit.
  2. The AI Settings tab shows the tenant's current spend, caps, and key status.
  3. You can set a hard monthly cap at the tenant level from here โ€” useful for limiting resource usage on lower-tier plans.