Skip to main content
AI modules let you connect an AI provider to a specific tenant so that LaraCopilot can handle calls intelligently without human intervention. Each module encapsulates a provider integration, a module type that defines what the AI does, and a JSON configuration block that carries provider-specific settings. Modules are tenant-scoped, so different tenants on the same platform can run different AI providers and behaviours independently.

Module Fields

Each AI module record holds the following fields:
config is stored and returned as a JSON object. When submitting via the admin panel form, enter valid JSON in the config textarea — the platform calls json_decode on the raw string before saving.

Module Types

The module_type field controls what the AI module actually does when attached to a call flow. Based on the platform’s AI sub-system, the following module types are supported:
For inbound lead qualification, use AiLeadAgent. For automated outbound prospecting, pair it with an AiLeadCampaign. Use AiLeadProduct when the AI needs product-aware context during a conversation.

Creating an AI Module

1

Open AI Modules in the admin panel

Navigate to AI → Modules and click New Module.
2

Select a tenant and set the basics

Choose the tenant_id from the dropdown. Enter a descriptive name, select the module_type that matches your use case, and choose the provider (e.g. openai, vapi). Set status to active when you are ready to enable the module.
3

Supply the provider config

In the Config textarea, enter a valid JSON object with the settings your provider requires. See the example below for a VAPI-backed lead agent.
config example — VAPI lead agent
4

Save and verify

Click Save. The module appears in the index with its tenant, module_type, provider, and status visible. Toggle status to inactive at any time to pause the module without deleting it.

Tenant Isolation

Every AI module is scoped to a single tenant via tenant_id. Modules from one tenant are never accessible to another tenant’s call flows or admin users. This lets you run different AI providers and prompt strategies per tenant on the same LaraCopilot instance.
Removing an AI module while it is referenced by an active call flow or campaign will cause those flows to fall back to default handling. Always deactivate (status: inactive) before deleting.