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:
FieldTypeRequiredDescription
tenant_idintegerYesThe tenant this module belongs to
namestringYesA human-readable label for the module, max 255 chars
module_typestringYesThe functional role of the module (see below), max 100 chars
providerstringYesThe AI provider to use (e.g. openai, vapi), max 100 chars
statusstringYesWhether the module is active or inactive, max 50 chars
configJSON objectNoProvider-specific configuration key/value pairs
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:
module_typeDescription
AiLeadAgentA voice AI agent that answers inbound calls, converses with callers, and qualifies them as leads. Configurable with voice_name, language, llm_model, system_prompt, and an optional handoff_destination for live agent transfer.
AiLeadCampaignAn outbound dialling campaign that pairs an AI lead agent with a target DID and source number. Drives automated outreach to a list of contacts and tracks outcomes per call.
AiLeadProductAssociates the module with a specific product offering defined by product_type and api_scope, allowing the AI to present or qualify callers against a product catalogue.
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
{
  "vapi_assistant_id": "asst_abc123",
  "voice_name": "nova",
  "language": "en-US",
  "llm_model": "gpt-4o",
  "handoff_destination": "+18005550100",
  "mcp_enabled": false
}
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.