create_agent_from_template
Create chat and voice agents from a predefined template with workspace context, knowledge base, lead funnel, and optional web search.
Instructions
PRIMARY way to create chat+voice agents. Workspace is resolved internally from MCP configuration/workspace secret context (no workspaceId input). Uses strict template invariants: agentPlatform=vg, enableNodes=true, vg_enableUIEngine=true, vg_enableUIEngineForms=true + form notify, default funnelConfig (lead scoring + email notify), nodes[0].kb.enabled (auto RAG, maxChunks=3, vgOptions.maxChunkSize=512), nodes[0].toolsIds includes built-in web-search, chat model always claude-haiku-4-5-20251001 (Claude Haiku 4.5), standard prompt clauses. vg_* overrides blocked from additionalConfig. NON-SALES agents (registration, internal, support-only): pass leadCapture=false and appendStandardPromptClauses=false (and attachWebSearchTool=false if it must not browse) so no sales text, funnel or lead forms are added. CRITICAL: bake scraped ground-truth AND a labeled image catalog (after read_image on real photos) into systemPrompt — KB alone is not enough. Pass ownerNotifyEmails so the funnel can email sales. Do NOT invent HTTP notify-sales webhooks. Run 8–12 turn tests before declaring done. Response includes prototypeUrl / tryItUrl — ALWAYS paste that link for the user to try the agent. Pattern: https://app.convocore.ai/{eu|na}/prototype/{agentId}. NEVER invent app.convocore.ai/agents/...
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Backward-compatible alias for sourceUrl. | |
| image | No | Backward-compatible alias for widgetImageUrl. | |
| title | No | Agent title | |
| modelId | No | Override chat model. Default claude-haiku-4-5-20251001 (Claude Haiku 4.5); omit unless the user asks for another model. | |
| branding | No | ||
| language | No | Backward-compatible alias for defaultLanguage. | |
| template | No | Backward-compatible field currently ignored. | |
| chatBgURL | No | ||
| requestId | No | Optional idempotency key. Reusing the same requestId returns the already-created agent instead of creating a duplicate. | |
| sourceUrl | No | Optional — MCP waits for scrape (for KB / context). Not required to create the agent. | |
| themeType | No | Widget theme (default light unless user wants dark) | |
| description | No | Short description | |
| leadCapture | No | Default true: installs the default lead funnel, lead collection rules and lead forms. Set false for non-sales agents (registration bots, internal assistants). | |
| voiceConfig | No | Full voice configuration. speechGen.provider MUST be `google-live` or `ultravox`. Use search_voices on those providers only. | |
| voicePrompt | No | Optional Gemini Live systemInstruction text. If omitted, systemPrompt is used for voice as well. | |
| funnelConfig | No | AI Funnel & Lead Scoring (built-in). Use this instead of a custom HTTP “notify sales team” webhook. enabled + steps (id/name/description/condition/points/category) + notificationRules (type score_threshold|steps_completed|data_collected, recipients emails, cooldownStrategy). Runtime scores the conversation and emails recipients when a rule fires. | |
| primaryColor | No | Hex brand colour, e.g. #226D7A (from scrape_url colour list). | |
| systemPrompt | No | Main chat / node instructions → nodes[0].instructions only. Do not send vg_instructions. | |
| enableAutoRag | No | Default true: start node auto-retrieves KB chunks. | |
| createKbUrlDoc | No | If true with sourceUrl, attach URL KB after create (errors are non-fatal). | |
| widgetImageUrl | No | Widget assistant avatar/logo URL (favicon from scrape_url is ideal). | |
| defaultLanguage | No | Default language for the agent. Must be a single language code/name (never "multilingual"). Default: "en". | |
| roundedImageURL | No | Backward-compatible alias for image. | |
| additionalConfig | No | Extra agent fields, same as update_agent additionalConfig; merged last with safeguards (keys starting with vg_ and core template keys are ignored). Fields: roundedImageURL, branding, customThemeJSONString, chatBgURL, lang, fontFamily, rectangeImageURL, avatarImageUrl, headerImageUrl, bannerImageUrl, enableNodes, nodesSettings, vg_systemPrompt, vg_initPrompt, vg_initMessages, vg_prompt, vg_temperature, vg_defaultModel, vg_maxTokens, vg_max_messages_history, vg_enableAboutContext, ifKnowsThreshold, enableFallback, fallbackSettings, enableAudioSupport, captureIGStories, metaHumanTakeover, vg_kb_llm, vg_kbDefaultDimension, vg_kbTopChunks, vg_kbCharCount, vg_kbDocsNum, proactiveMessage, autoStartWidget, messageDelayMS, scrollAnimation, disableSmoothScroll, buttonsLayout, buttonVariant, inputVariant, ui, ADVANCED_customCSS, disableRating, chatEndMessage, aiIntroductionMessage, enableAIIntroductionMessage, privacyDisclaimer, gdprCompliance, disableModelAutoUpgrade, acceptFileUpload, disableFileUpload, enableQuickFileUpload, soundEffectUrl, soundEffectEnabled, agentPlatform, AITranslateTo, enableAITranslate, disableHumanHandoff, alwaysShowHandoff, manualControl, enableVGHandoff, fixedHandoffPopup, UIhandoffTitle, UIhandoffSubtitle, showHandoffEvenIfOffline, persistHandoffOnRefresh, blockInputDuringHandoffRequest, disableHandoffMessages, handoffNowChattingMessage, handoffBackToAiMessage, handoffCancelButtonLabel, disableHandoffStatusMessages, convoTags, topicsConfig, starred, enableGeoAnalytics, hideVoiceflowAnalytics, hideCallAnalytics, hideConversationMetrics, hideCustomAnalytics, hideVapiAnalytics, hideFunnelAnalytics, marketplace, autoTest, customButtonJSON_STRING. | |
| proactiveMessage | No | Widget greeting bubble | |
| ownerNotifyEmails | No | Sales/owner emails. Used for form notify AND funnelConfig.notificationRules. Required for email alerts on hot leads. Do NOT create a custom HTTP webhook for this. | |
| attachWebSearchTool | No | Default true: attaches built-in web-search to the start node. Set false for agents that must not search the web. | |
| leadCollectionRules | No | When to persist a CRM lead. Default: collect when email, phone, or phone_number is present. | |
| appendStandardPromptClauses | No | Default true: appends anti-repetition, lead-capture, knowledge-source, web-search, pricing and photo clauses to systemPrompt. Set false to store systemPrompt exactly as given (use for non-sales agents). |