Run a valid voice-agents.attach_agent_to_number call through the same SDK surface used by every toolkit.

Minimal tool call

ts
import { Eyeball } from "@eyeball/sdk";

const eyeball = new Eyeball({
  apiKey: process.env.EYEBALL_API_KEY!,
  baseUrl: process.env.EYEBALL_EXECUTOR_URL!,
});

const output = await eyeball.tools.run(
  "voice-agents.attach_agent_to_number",
  {
  "agentId": "example_agentId",
  "phoneNumber": "+12025550123",
  "transportConnectionId": "example_transportConnectionId"
},
  { userId: "demo_user",
  idempotencyKey: "docs:voice-agents.attach_agent_to_number:demo-1" },
);
console.log(output);

The model receives canonical output. Your application retains the execution envelope through tools.execute or the execution APIs when it needs IDs, status, versions, and latency.

Supported canonical tools

ToolPurposeExecutionEffectVersion
voice-agents.attach_agent_to_numberBind an inbound Twilio number to a resolved immutable agent revision and transport connection.sync or asyncmutation1.0.0
voice-agents.buy_numberAcquire a provider telephone number into owned inventory. The new number is initially unbound.sync or asyncmutation1.0.0
voice-agents.create_voice_agentCreate revision 1 of a portable voice-agent definition. The definition contains references and policy only, never provider credentials.sync or asyncmutation1.0.0
voice-agents.create_web_sessionCreate a LiveKit-backed browser or app session pinned to one immutable voice-agent revision and return only the end user's short-lived join grant.asyncmutation1.0.0
voice-agents.delete_voice_agentTombstone a stable voice-agent resource while retaining immutable revisions needed by sessions and transcript policy.sync or asyncdestructive mutation1.0.0
voice-agents.detach_numberRemove an Eyeball agent binding while retaining the provider-owned telephone number. Reassignment is detach followed by attach.sync or asyncmutation1.0.0
voice-agents.get_agent_sessionRetrieve one pinned agent session and an incremental page of gap-free ordered events.sync or asyncread1.0.0
voice-agents.get_session_transcriptBuild the normalized transcript artifact for a session, including surfaced tool-call turns.sync or asyncread1.0.0
voice-agents.get_voice_agentRetrieve one immutable voice-agent revision. When revision is omitted, resolve the active revision.sync or asyncread1.0.0
voice-agents.list_agent_sessionsList agent sessions visible in the current trusted project and user scope.sync or asyncread1.0.0
voice-agents.list_numbersList provider-owned telephone numbers with their current Eyeball agent-binding status.sync or asyncread1.0.0
voice-agents.list_voice_agentsList stable voice-agent resources as summaries; full prompts and definitions are intentionally omitted.sync or asyncread1.0.0
voice-agents.release_numberPermanently return an unbound telephone number to its provider. Bound numbers must be detached first.sync or asyncdestructive mutation1.0.0
voice-agents.send_session_messageRun one text-chat turn against a new or existing pinned session. This is asynchronous by nature and deduplicates by clientMessageId.asyncmutation1.0.0
voice-agents.start_agent_callStart an outbound phone session pinned to one voice-agent revision. This is asynchronous by nature.asyncmutation1.0.0
voice-agents.stop_agent_sessionRequest stop for a phone, web, or chat session through the same pinned lifecycle and return its updated state.sync or asyncdestructive mutation1.0.0
voice-agents.update_voice_agentAppend an immutable revision using optimistic expected-revision concurrency. Existing revisions and pinned sessions are unchanged.sync or asyncmutation1.0.0

Only the rows above are implemented. A capability tool omitted by this manifest returns not_supported; eyeball never synthesizes provider parity.

Supported canonical triggers

This manifest does not implement a canonical trigger.

Input and output schemas

voice-agents.attach_agent_to_number

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:attach_agent_to_number:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "phoneNumber",
    "transportConnectionId"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "phoneNumber": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transportConnectionId": {
      "type": "string",
      "minLength": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:attach_agent_to_number:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "bindingId",
    "agentId",
    "revision",
    "phoneNumber"
  ],
  "properties": {
    "bindingId": {
      "type": "string",
      "minLength": 1
    },
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "phoneNumber": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    }
  }
}
voice-agents.buy_number

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice_telephony:buy_number:1.0.0:voice-agents",
  "type": "object",
  "description": "Telephone number to acquire and its optional provider label.",
  "additionalProperties": false,
  "required": [
    "phoneNumber"
  ],
  "properties": {
    "phoneNumber": {
      "type": "string",
      "description": "Telephone number to acquire in E.164 form.",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "friendlyName": {
      "type": "string",
      "description": "Optional human-readable provider label.",
      "minLength": 1
    },
    "transportConnectionId": {
      "type": "string",
      "description": "Provider connection used by composed voice-agent inventory tools; direct provider tools use the execution connection.",
      "minLength": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice_telephony:buy_number:output:1.0.0:voice-agents",
  "type": "object",
  "description": "The newly acquired unbound number.",
  "additionalProperties": false,
  "required": [
    "number"
  ],
  "properties": {
    "number": {
      "type": "object",
      "description": "One provider-owned telephone number with its Eyeball agent-binding state.",
      "additionalProperties": false,
      "required": [
        "numberId",
        "phoneNumber",
        "friendlyName",
        "provider",
        "bindingStatus",
        "createdAt"
      ],
      "properties": {
        "numberId": {
          "type": "string",
          "description": "Provider-stable owned-number identifier.",
          "minLength": 1
        },
        "phoneNumber": {
          "type": "string",
          "description": "Owned telephone number in E.164 form.",
          "pattern": "^\\+[1-9][0-9]{7,14}$"
        },
        "friendlyName": {
          "type": "string",
          "description": "Human-readable provider label.",
          "minLength": 1
        },
        "provider": {
          "type": "string",
          "description": "Provider toolkit that owns the number.",
          "minLength": 1
        },
        "bindingStatus": {
          "type": "string",
          "description": "Whether the number is currently attached to an Eyeball voice agent.",
          "enum": [
            "unbound",
            "bound"
          ]
        },
        "binding": {
          "type": "object",
          "description": "Pinned agent binding when bindingStatus is bound.",
          "additionalProperties": false,
          "required": [
            "bindingId",
            "agentId",
            "revision",
            "transportConnectionId"
          ],
          "properties": {
            "bindingId": {
              "type": "string",
              "description": "Stable binding identifier.",
              "minLength": 1
            },
            "agentId": {
              "type": "string",
              "description": "Bound voice-agent identifier.",
              "minLength": 1
            },
            "revision": {
              "type": "integer",
              "description": "Immutable agent revision pinned by the binding.",
              "minimum": 1
            },
            "transportConnectionId": {
              "type": "string",
              "description": "Twilio connection selected by the binding.",
              "minLength": 1
            }
          }
        },
        "createdAt": {
          "type": "string",
          "description": "Time the provider acquired the number.",
          "format": "date-time"
        }
      }
    }
  }
}
voice-agents.create_voice_agent

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:create_voice_agent:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "$ref": "#/$defs/agentDraft"
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:create_voice_agent:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "$ref": "#/$defs/agentDefinition"
    }
  }
}
voice-agents.create_web_session

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:create_web_session:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "transportConnectionId",
    "participantIdentity"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "transportConnectionId": {
      "type": "string",
      "minLength": 1
    },
    "roomName": {
      "type": "string",
      "minLength": 1
    },
    "participantIdentity": {
      "type": "string",
      "minLength": 1
    },
    "participantName": {
      "type": "string",
      "minLength": 1
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    },
    "script": {
      "type": "array",
      "description": "Optional deterministic caller script passed to the mock Pipecat runtime. It is runtime input and never becomes part of the agent definition.",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "caller"
            ],
            "properties": {
              "caller": {
                "type": "string",
                "minLength": 1
              },
              "delayMs": {
                "type": "integer",
                "minimum": 0
              },
              "durationMs": {
                "type": "integer",
                "minimum": 0
              },
              "dtmf": {
                "type": "string",
                "pattern": "^[0-9A-D*#wW]+$"
              },
              "hangup": {
                "type": "boolean"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "expect_tool_call"
            ],
            "properties": {
              "expect_tool_call": {
                "type": "string",
                "minLength": 3
              },
              "input": {
                "type": "object",
                "additionalProperties": true
              },
              "result": true,
              "error": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "not": {
              "required": [
                "result",
                "error"
              ],
              "properties": {
                "result": true,
                "error": true
              }
            }
          }
        ]
      }
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:create_web_session:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "session",
    "joinGrant",
    "transcriptArtifactId"
  ],
  "properties": {
    "session": {
      "$ref": "#/$defs/session"
    },
    "joinGrant": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "roomUrl",
        "participantToken",
        "expiresAt"
      ],
      "properties": {
        "roomUrl": {
          "type": "string",
          "format": "uri"
        },
        "participantToken": {
          "type": "string",
          "minLength": 1
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "transcriptArtifactId": {
      "type": "string",
      "minLength": 1
    }
  }
}
voice-agents.delete_voice_agent

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:delete_voice_agent:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "expectedRevision"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:delete_voice_agent:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "deletedAt"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "deletedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
voice-agents.detach_number

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:detach_number:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "phoneNumber"
  ],
  "properties": {
    "phoneNumber": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:detach_number:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "phoneNumber",
    "bindingStatus"
  ],
  "properties": {
    "phoneNumber": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "bindingStatus": {
      "const": "unbound"
    },
    "detachedBindingId": {
      "type": "string",
      "minLength": 1
    }
  }
}
voice-agents.get_agent_session

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:get_agent_session:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sessionId"
  ],
  "properties": {
    "sessionId": {
      "type": "string",
      "minLength": 1
    },
    "afterSequence": {
      "type": "integer",
      "minimum": 0,
      "default": 0
    },
    "eventLimit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 50
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:get_agent_session:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "session",
    "events",
    "nextSequence"
  ],
  "properties": {
    "session": {
      "$ref": "#/$defs/session"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/event"
      }
    },
    "nextSequence": {
      "type": "integer",
      "minimum": 0
    }
  }
}
voice-agents.get_session_transcript

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:get_session_transcript:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sessionId"
  ],
  "properties": {
    "sessionId": {
      "type": "string",
      "minLength": 1
    },
    "includePartial": {
      "type": "boolean",
      "default": false
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:get_session_transcript:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "artifact"
  ],
  "properties": {
    "artifact": {
      "$ref": "#/$defs/transcriptArtifact"
    }
  }
}
voice-agents.get_voice_agent

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:get_voice_agent:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:get_voice_agent:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "$ref": "#/$defs/agentDefinition"
    }
  }
}
voice-agents.list_agent_sessions

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:list_agent_sessions:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "cursor": {
      "type": "string",
      "minLength": 1
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:list_agent_sessions:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sessions"
  ],
  "properties": {
    "sessions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/session"
      }
    },
    "nextCursor": {
      "type": "string",
      "minLength": 1
    }
  }
}
voice-agents.list_numbers

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice_telephony:list_numbers:1.0.0:voice-agents",
  "type": "object",
  "description": "Optional number filter and pagination controls.",
  "additionalProperties": false,
  "properties": {
    "phoneNumber": {
      "type": "string",
      "description": "Optional exact E.164 telephone-number filter.",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transportConnectionId": {
      "type": "string",
      "description": "Provider connection used by composed voice-agent inventory tools; direct provider tools use the execution connection.",
      "minLength": 1
    },
    "pageSize": {
      "type": "integer",
      "description": "Maximum number of numbers to return in one page.",
      "minimum": 1,
      "maximum": 100,
      "default": 50
    },
    "pageToken": {
      "type": "string",
      "description": "Opaque continuation token from a previous numbers page.",
      "minLength": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice_telephony:list_numbers:output:1.0.0:voice-agents",
  "type": "object",
  "description": "Owned telephone-number inventory and binding status.",
  "additionalProperties": false,
  "required": [
    "numbers"
  ],
  "properties": {
    "numbers": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One provider-owned telephone number with its Eyeball agent-binding state.",
        "additionalProperties": false,
        "required": [
          "numberId",
          "phoneNumber",
          "friendlyName",
          "provider",
          "bindingStatus",
          "createdAt"
        ],
        "properties": {
          "numberId": {
            "type": "string",
            "description": "Provider-stable owned-number identifier.",
            "minLength": 1
          },
          "phoneNumber": {
            "type": "string",
            "description": "Owned telephone number in E.164 form.",
            "pattern": "^\\+[1-9][0-9]{7,14}$"
          },
          "friendlyName": {
            "type": "string",
            "description": "Human-readable provider label.",
            "minLength": 1
          },
          "provider": {
            "type": "string",
            "description": "Provider toolkit that owns the number.",
            "minLength": 1
          },
          "bindingStatus": {
            "type": "string",
            "description": "Whether the number is currently attached to an Eyeball voice agent.",
            "enum": [
              "unbound",
              "bound"
            ]
          },
          "binding": {
            "type": "object",
            "description": "Pinned agent binding when bindingStatus is bound.",
            "additionalProperties": false,
            "required": [
              "bindingId",
              "agentId",
              "revision",
              "transportConnectionId"
            ],
            "properties": {
              "bindingId": {
                "type": "string",
                "description": "Stable binding identifier.",
                "minLength": 1
              },
              "agentId": {
                "type": "string",
                "description": "Bound voice-agent identifier.",
                "minLength": 1
              },
              "revision": {
                "type": "integer",
                "description": "Immutable agent revision pinned by the binding.",
                "minimum": 1
              },
              "transportConnectionId": {
                "type": "string",
                "description": "Twilio connection selected by the binding.",
                "minLength": 1
              }
            }
          },
          "createdAt": {
            "type": "string",
            "description": "Time the provider acquired the number.",
            "format": "date-time"
          }
        }
      }
    },
    "nextPageToken": {
      "type": "string",
      "description": "Opaque token to request the next page of numbers; absent when the result is complete.",
      "minLength": 1
    }
  }
}
voice-agents.list_voice_agents

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:list_voice_agents:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "transport": {
      "$ref": "#/$defs/transport"
    },
    "includeDeleted": {
      "type": "boolean",
      "default": false
    },
    "cursor": {
      "type": "string",
      "minLength": 1
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 20
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:list_voice_agents:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agents"
  ],
  "properties": {
    "agents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/agentSummary"
      }
    },
    "nextCursor": {
      "type": "string",
      "minLength": 1
    }
  }
}
voice-agents.release_number

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice_telephony:release_number:1.0.0:voice-agents",
  "type": "object",
  "description": "Owned telephone number to return to the provider.",
  "additionalProperties": false,
  "required": [
    "phoneNumber"
  ],
  "properties": {
    "phoneNumber": {
      "type": "string",
      "description": "Owned telephone number to release in E.164 form.",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transportConnectionId": {
      "type": "string",
      "description": "Provider connection used by composed voice-agent inventory tools; direct provider tools use the execution connection.",
      "minLength": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice_telephony:release_number:output:1.0.0:voice-agents",
  "type": "object",
  "description": "Provider identifier and time of the completed release.",
  "additionalProperties": false,
  "required": [
    "numberId",
    "phoneNumber",
    "releasedAt"
  ],
  "properties": {
    "numberId": {
      "type": "string",
      "description": "Provider-stable identifier of the released number.",
      "minLength": 1
    },
    "phoneNumber": {
      "type": "string",
      "description": "Released telephone number in E.164 form.",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "releasedAt": {
      "type": "string",
      "description": "Time the number was returned to the provider.",
      "format": "date-time"
    }
  }
}
voice-agents.send_session_message

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:send_session_message:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "message",
    "clientMessageId"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "sessionId": {
      "type": "string",
      "minLength": 1
    },
    "message": {
      "type": "string",
      "minLength": 1
    },
    "clientMessageId": {
      "type": "string",
      "minLength": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:send_session_message:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "session",
    "userMessageId",
    "assistantMessage"
  ],
  "properties": {
    "session": {
      "$ref": "#/$defs/session"
    },
    "userMessageId": {
      "type": "string",
      "minLength": 1
    },
    "assistantMessage": {
      "type": "string"
    }
  }
}
voice-agents.start_agent_call

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:start_agent_call:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "to"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "to": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "from": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transportConnectionId": {
      "type": "string",
      "minLength": 1
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    },
    "script": {
      "type": "array",
      "description": "Optional deterministic caller script passed to the mock Pipecat runtime. It is runtime input and never becomes part of the agent definition.",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "caller"
            ],
            "properties": {
              "caller": {
                "type": "string",
                "minLength": 1
              },
              "delayMs": {
                "type": "integer",
                "minimum": 0
              },
              "durationMs": {
                "type": "integer",
                "minimum": 0
              },
              "dtmf": {
                "type": "string",
                "pattern": "^[0-9A-D*#wW]+$"
              },
              "hangup": {
                "type": "boolean"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "expect_tool_call"
            ],
            "properties": {
              "expect_tool_call": {
                "type": "string",
                "minLength": 3
              },
              "input": {
                "type": "object",
                "additionalProperties": true
              },
              "result": true,
              "error": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "not": {
              "required": [
                "result",
                "error"
              ],
              "properties": {
                "result": true,
                "error": true
              }
            }
          }
        ]
      }
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:start_agent_call:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "session",
    "callId"
  ],
  "properties": {
    "session": {
      "$ref": "#/$defs/session"
    },
    "callId": {
      "type": "string",
      "minLength": 1
    },
    "transcriptArtifactId": {
      "type": "string",
      "minLength": 1
    }
  }
}
voice-agents.stop_agent_session

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:stop_agent_session:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "sessionId"
  ],
  "properties": {
    "sessionId": {
      "type": "string",
      "minLength": 1
    },
    "reason": {
      "type": "string",
      "minLength": 1
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:stop_agent_session:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "session"
  ],
  "properties": {
    "session": {
      "$ref": "#/$defs/session"
    }
  }
}
voice-agents.update_voice_agent

Input schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:update_voice_agent:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agentId",
    "expectedRevision",
    "agent"
  ],
  "properties": {
    "agentId": {
      "type": "string",
      "minLength": 1
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 1
    },
    "agent": {
      "$ref": "#/$defs/agentDraft"
    }
  }
}

Output schema

JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:eyeball:voice-agents:update_voice_agent:output:1.0.0:voice-agents",
  "$defs": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "executionId": {
      "type": "string",
      "pattern": "^exe_[A-Za-z0-9][A-Za-z0-9_-]{0,127}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "e164": {
      "type": "string",
      "pattern": "^\\+[1-9][0-9]{7,14}$"
    },
    "transport": {
      "type": "string",
      "enum": [
        "pstn:twilio",
        "webrtc:livekit",
        "chat"
      ]
    },
    "qualifiedToolName": {
      "type": "string",
      "minLength": 3,
      "maxLength": 63,
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
    },
    "llm": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "model"
      ],
      "properties": {
        "model": {
          "type": "string",
          "minLength": 1
        },
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxOutputTokens": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "tts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider",
        "voiceId"
      ],
      "properties": {
        "provider": {
          "const": "elevenlabs"
        },
        "voiceId": {
          "type": "string",
          "minLength": 1
        },
        "modelId": {
          "type": "string",
          "minLength": 1
        },
        "stability": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "similarityBoost": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "stt": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider"
      ],
      "properties": {
        "provider": {
          "const": "deepgram"
        },
        "model": {
          "type": "string",
          "minLength": 1
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "smartFormat": {
          "type": "boolean"
        },
        "interimResults": {
          "type": "boolean"
        }
      }
    },
    "voice": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "tts",
        "stt"
      ],
      "properties": {
        "tts": {
          "$ref": "#/$defs/tts"
        },
        "stt": {
          "$ref": "#/$defs/stt"
        },
        "bargeIn": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "type": "boolean"
            }
          }
        }
      }
    },
    "allowedHoursWindow": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "days",
        "start",
        "end",
        "timeZone"
      ],
      "properties": {
        "days": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ]
          }
        },
        "start": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "end": {
          "type": "string",
          "pattern": "^(?:[01][0-9]|2[0-3]):[0-5][0-9]$"
        },
        "timeZone": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "handoff": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled"
          ],
          "properties": {
            "enabled": {
              "const": false
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "enabled",
            "destination",
            "on"
          ],
          "properties": {
            "enabled": {
              "const": true
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "on": {
              "type": "string",
              "enum": [
                "agent_request",
                "caller_request",
                "guardrail",
                "any"
              ]
            },
            "announcement": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      ]
    },
    "guardrails": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "maxDurationSeconds",
        "handoffToHuman"
      ],
      "properties": {
        "maxDurationSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 3600
        },
        "allowedHours": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/allowedHoursWindow"
          }
        },
        "handoffToHuman": {
          "$ref": "#/$defs/handoff"
        }
      }
    },
    "webhooks": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "endpointIds",
        "transcript",
        "events"
      ],
      "properties": {
        "endpointIds": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "transcript": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "enum": [
              "session.lifecycle",
              "turn.transcript",
              "tool_call",
              "tool_result",
              "handoff",
              "dtmf"
            ]
          }
        }
      }
    },
    "recordingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "consent",
        "retentionDays",
        "redactDtmf"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "disabled",
            "audio",
            "audio_and_transcript"
          ]
        },
        "consent": {
          "type": "string",
          "enum": [
            "external",
            "agent_announcement"
          ]
        },
        "retentionDays": {
          "type": "integer",
          "minimum": 0
        },
        "redactDtmf": {
          "type": "boolean"
        }
      }
    },
    "agentDraft": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        }
      }
    },
    "agentDefinition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "revision",
        "name",
        "systemPrompt",
        "llm",
        "voice",
        "transport",
        "tools",
        "guardrails",
        "webhooks",
        "recordingPolicy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "systemPrompt": {
          "type": "string",
          "minLength": 1
        },
        "llm": {
          "$ref": "#/$defs/llm"
        },
        "voice": {
          "$ref": "#/$defs/voice"
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "tools": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/qualifiedToolName"
          }
        },
        "guardrails": {
          "$ref": "#/$defs/guardrails"
        },
        "webhooks": {
          "$ref": "#/$defs/webhooks"
        },
        "recordingPolicy": {
          "$ref": "#/$defs/recordingPolicy"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "agentSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "activeRevision",
        "name",
        "transport",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "activeRevision": {
          "type": "integer",
          "minimum": 1
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "created",
        "connecting",
        "in-progress",
        "wrap-up",
        "completed",
        "failed",
        "abandoned"
      ]
    },
    "normalizedError": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "invalid_input",
            "auth_missing",
            "auth_expired",
            "auth_insufficient_scope",
            "not_found",
            "rate_limited",
            "provider_unavailable",
            "provider_error",
            "timeout",
            "not_supported",
            "execution_interrupted",
            "execution_cancelled"
          ]
        },
        "message": {
          "type": "string",
          "minLength": 1
        },
        "retryable": {
          "type": "boolean"
        },
        "retryAfter": {
          "type": "number",
          "minimum": 0
        },
        "provider": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "toolkit"
          ],
          "properties": {
            "toolkit": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "code": {
              "type": "string",
              "minLength": 1
            },
            "requestId": {
              "type": "string",
              "minLength": 1
            },
            "detail": true
          }
        }
      }
    },
    "session": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "projectId",
        "agentId",
        "agentRevision",
        "transport",
        "state",
        "userId",
        "createdAt",
        "lastEventSequence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "projectId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "userId": {
          "type": "string",
          "minLength": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastEventSequence": {
          "type": "integer",
          "minimum": 0
        },
        "error": {
          "$ref": "#/$defs/normalizedError"
        }
      }
    },
    "eventData": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "to"
          ],
          "properties": {
            "type": {
              "const": "session.lifecycle"
            },
            "from": {
              "$ref": "#/$defs/state"
            },
            "to": {
              "$ref": "#/$defs/state"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "speaker",
            "text",
            "final",
            "startMs",
            "endMs"
          ],
          "properties": {
            "type": {
              "const": "turn.transcript"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "speaker": {
              "type": "string",
              "enum": [
                "human",
                "agent"
              ]
            },
            "text": {
              "type": "string"
            },
            "final": {
              "type": "boolean"
            },
            "startMs": {
              "type": "integer",
              "minimum": 0
            },
            "endMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool",
            "input"
          ],
          "properties": {
            "type": {
              "const": "tool_call"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "input": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "minProperties": 5,
          "maxProperties": 5,
          "required": [
            "type",
            "turnId",
            "executionId",
            "tool"
          ],
          "properties": {
            "type": {
              "const": "tool_result"
            },
            "turnId": {
              "type": "string",
              "minLength": 1
            },
            "executionId": {
              "$ref": "#/$defs/executionId"
            },
            "tool": {
              "$ref": "#/$defs/qualifiedToolName"
            },
            "output": true,
            "error": {
              "$ref": "#/$defs/normalizedError"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "destination",
            "reason",
            "status"
          ],
          "properties": {
            "type": {
              "const": "handoff"
            },
            "destination": {
              "type": "string",
              "pattern": "^\\+[1-9][0-9]{7,14}$"
            },
            "reason": {
              "type": "string",
              "minLength": 1
            },
            "status": {
              "type": "string",
              "enum": [
                "requested",
                "completed",
                "failed"
              ]
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "type",
            "direction",
            "digits",
            "redacted"
          ],
          "properties": {
            "type": {
              "const": "dtmf"
            },
            "direction": {
              "type": "string",
              "enum": [
                "received",
                "sent"
              ]
            },
            "digits": {
              "type": "string"
            },
            "redacted": {
              "type": "boolean"
            }
          }
        }
      ]
    },
    "event": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "sequence",
        "createdAt",
        "data"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "sequence": {
          "type": "integer",
          "minimum": 1
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "data": {
          "$ref": "#/$defs/eventData"
        }
      }
    },
    "transcriptTurn": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "speaker",
        "startMs",
        "endMs",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "speaker": {
          "type": "string",
          "enum": [
            "human",
            "agent",
            "tool"
          ]
        },
        "startMs": {
          "type": "integer",
          "minimum": 0
        },
        "endMs": {
          "type": "integer",
          "minimum": 0
        },
        "text": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "executionId": {
          "$ref": "#/$defs/executionId"
        },
        "tool": {
          "$ref": "#/$defs/qualifiedToolName"
        }
      }
    },
    "transcriptArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "sessionId",
        "agentId",
        "agentRevision",
        "transport",
        "final",
        "startedAt",
        "turns"
      ],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "sessionId": {
          "type": "string",
          "minLength": 1
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentRevision": {
          "type": "integer",
          "minimum": 1
        },
        "transport": {
          "$ref": "#/$defs/transport"
        },
        "final": {
          "type": "boolean"
        },
        "language": {
          "type": "string",
          "minLength": 1
        },
        "startedAt": {
          "type": "string",
          "format": "date-time"
        },
        "endedAt": {
          "type": "string",
          "format": "date-time"
        },
        "turns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/transcriptTurn"
          }
        },
        "recording": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "artifactId",
            "contentType",
            "durationMs"
          ],
          "properties": {
            "artifactId": {
              "type": "string",
              "minLength": 1
            },
            "contentType": {
              "type": "string",
              "minLength": 1
            },
            "durationMs": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "required": [
    "agent"
  ],
  "properties": {
    "agent": {
      "$ref": "#/$defs/agentDefinition"
    }
  }
}

Authentication

PropertyValue
Auth classnone
Required scopesNone
Optional scopesNone
Credential fieldsNone

Credentials are resolved inside the executor by CredentialProvider. They never belong in tool input, x_provider, model context, logs, or execution output.

Provider-specific extensions

This manifest declares no provider-specific schema extensions. Use only canonical fields.

Provider differences may appear only under x_provider.voice-agents and only when the schema above declares them.

Sync and async behavior

These tools require async mode: voice-agents.create_web_session, voice-agents.send_session_message, voice-agents.start_agent_call. Other tools accept sync or async mode.

Mutations require a stable Idempotency-Key. The TypeScript SDK accepts it as idempotencyKey; it is never part of the JSON request body.

REST example

Bash
curl "$EYEBALL_EXECUTOR_URL/v1/execute" \
  -H "Authorization: Bearer $EYEBALL_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: docs:voice-agents.attach_agent_to_number:demo-1' \
  --data '{"tool":"voice-agents.attach_agent_to_number","userId":"demo_user","input":{"agentId":"example_agentId","phoneNumber":"+12025550123","transportConnectionId":"example_transportConnectionId"},"mode":"sync"}'

Mock support

Point EYEBALL_EXECUTOR_URL at a mock-configured executor to run through the real catalog, validation, credential seam, adapter, normalized errors, and execution records with no Voice Agents account. Mock selection changes the executor endpoint and trusted provider base-URL configuration, never the execute request.

Limitations

  • This page describes the manifest's explicit P0 subset, not every operation offered by the provider.
  • Provider account policy, consent UI, quota details, and current wire compatibility still require a real-provider certification pass.
  • Fields outside the canonical schemas and declared x_provider extensions are rejected.

Versions

ContractVersion
Runtime catalog1.1
Manifest catalog1.1
Manifest schema1.0
Sourcenative
TierP0
Capabilitiesvoice_telephony

Next

Use Testing with mocks to exercise this toolkit before connecting a live provider account.