From 7c125c7254971544ed9d1340cf3168592d528c0f Mon Sep 17 00:00:00 2001 From: khushalsonawat Date: Wed, 4 Mar 2026 00:10:10 +0530 Subject: [PATCH 1/2] feat: update OpenAPI spec for agent definition validation constraints Update createAgentDefinition request schema and AgentDefinition component schema to reflect new backend validation rules: - Required fields: agentName, agentType, languages, description, commitMessage, inbound - Added languages field (array, minItems: 1) - Added minLength/maxLength to agentName, description, commitMessage - Updated provider enum to include eleven_labs and others - Added contactNumber pattern (digits, 10-15 length) - Removed incorrect format: uuid from apiKey - Added default: true to inbound --- openapi.json | 54 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/openapi.json b/openapi.json index 5eaf4203..254115bb 100644 --- a/openapi.json +++ b/openapi.json @@ -186,29 +186,39 @@ }, "agentName": { "type": "string", + "minLength": 1, + "maxLength": 255, "description": "Name of the agent." }, "provider": { "type": "string", - "description": "Provider for the agent (e.g., vapi, retell).", - "enum": ["vapi", "retell"] + "description": "Provider for the agent. Required for outbound voice agents or when observability is enabled.", + "enum": ["vapi", "retell", "eleven_labs", "others"] }, "apiKey": { "type": "string", - "format": "uuid", - "description": "API key for the agent provider." + "description": "API key for the agent provider. Required for outbound agents." }, "assistantId": { "type": "string", - "description": "External identifier for the assistant." + "description": "External identifier for the assistant. Required for outbound agents." }, "description": { "type": "string", + "minLength": 1, "description": "Description for the first version of the agent." }, "language": { "type": "string", - "description": "Language of the agent ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) code, for example, `en` for English)." + "description": "Primary language of the agent ([ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) code, for example, `en` for English)." + }, + "languages": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "description": "List of supported languages (ISO 639-1 codes). At least one language is required." }, "knowledgeBase": { "type": "string", @@ -222,14 +232,17 @@ }, "contactNumber": { "type": "string", - "description": "Contact number for the agent including country code. For example, +1xxxxxxxxxx for USA, +91xxxxxxxxxx for India, etc." + "pattern": "^\\+?\\d{10,15}$", + "description": "Contact number for the agent including country code. Required for voice agents. For example, +1xxxxxxxxxx for USA, +91xxxxxxxxxx for India, etc." }, "inbound": { "type": "boolean", + "default": true, "description": "Specifies if the agent handles inbound communication." }, "commitMessage": { "type": "string", + "minLength": 1, "description": "Commit message for the initial version of the agent." }, "observabilityEnabled": { @@ -239,9 +252,11 @@ }, "required": [ "agentName", - "provider", - "language", - "contactNumber" + "agentType", + "languages", + "description", + "commitMessage", + "inbound" ] }, "examples": { @@ -2157,13 +2172,17 @@ "format": "uuid" }, "agent_name": { - "type": "string" + "type": "string", + "minLength": 1, + "maxLength": 255 }, "agent_type": { - "type": "string" + "type": "string", + "enum": ["voice", "text"] }, "contact_number": { - "type": "string" + "type": "string", + "pattern": "^\\+?\\d{10,15}$" }, "inbound": { "type": "boolean" @@ -2175,11 +2194,18 @@ "type": "string" }, "provider": { - "type": "string" + "type": "string", + "enum": ["vapi", "retell", "eleven_labs", "others"] }, "language": { "type": "string" }, + "languages": { + "type": "array", + "items": { + "type": "string" + } + }, "websocket_url": { "type": "string", "format": "uri", From 45cdfdb334cc5e7918e0ce38923cebe6a429d816 Mon Sep 17 00:00:00 2001 From: khushalsonawat Date: Wed, 4 Mar 2026 12:08:23 +0530 Subject: [PATCH 2/2] feat: document provider required for voice, outbound vapi-only Update provider description to note it's required for all voice agents and that outbound calls only support the vapi provider. --- openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.json b/openapi.json index 254115bb..0181b639 100644 --- a/openapi.json +++ b/openapi.json @@ -192,7 +192,7 @@ }, "provider": { "type": "string", - "description": "Provider for the agent. Required for outbound voice agents or when observability is enabled.", + "description": "Provider for the agent. Required for all voice agents. Outbound calls are only supported with the `vapi` provider.", "enum": ["vapi", "retell", "eleven_labs", "others"] }, "apiKey": {