Connect an agent to coval by providing the agent’s configuration.
API key for authentication
Human-readable agent name
1 - 200"Customer Support Agent"
Agent type. 5 types are supported:
MODEL_TYPE_VOICE, MODEL_TYPE_OUTBOUND_VOICE, MODEL_TYPE_CHAT, MODEL_TYPE_SMS, MODEL_TYPE_WEBSOCKET "MODEL_TYPE_VOICE"
Phone number in E.164 format (e.g., +12345678901) or SIP address (e.g., sip:user@domain.com).
Required for:
Optional for other agent types.
200"+12345678901"
Webhook endpoint URL that Coval will POST to.
Required for MODEL_TYPE_OUTBOUND_VOICE agents. Must be a valid HTTP/HTTPS URL.
200"https://api.yourcompany.com/triggers/voice-simulation"
Agent instructions/system prompt
50000"You are a helpful customer support agent..."
Simulator-specific configuration (JSONB, max 10MB).
For CHAT agents:
Required:
chat_endpoint - Chat endpoint URL (validated, no private IPs/localhost)Authentication:
authorization_header - Auth header (Bearer, X-API-Key, etc.)Initialization:
initialization_endpoint - Init endpoint called before chat (validated URL)initialization_payload - JSON payload for init request (max 16KB)Custom Data:
custom_data - Organization/agent-level data (max 32KB JSON string)custom_persona_data - Persona-specific data (max 16KB JSON string)Headers & Format:
custom_headers - Additional headers with template variables (max 16KB JSON string)response_format - "chat_completions" (default) or "responses"Request/Response Processing:
input_template - Custom JSON template for requests (validated JSON)payload_wrapper - Wrapper field name (e.g., "data", "request")response_message_path - Dot notation path to extract messagestrip_message_timestamps - Remove timestamp fields (boolean, default: false)Tool Calls:
tool_call_extraction_config - Configuration for extracting tool calls from custom responsesDynamic Configuration:
persona_id - Reference persona for parameter substitution (22-char ShortUUID)Template Variables: {{sessionId}}, {{simulation_output_id}}, {{init_response.path}}, {{persona.field}}, {{messages}}, {{latest_message}}, {{custom_data.field}}
For OUTBOUND_VOICE agents:
trigger_call_headers - JSON string with HTTP headerstrigger_call_payload - JSON string with base payloadphone_number_key - Field name for phone number (default: "phone_number")For WEBSOCKET agents:
Required:
endpoint - WebSocket endpoint URL (must be wss://, validated)initialization_json - JSON string payload sent on connectionAuthentication (optional):
authorization_header - Auth header sent during WebSocket handshake. Supports:
"Bearer <token>" → sent as Authorization: Bearer <token>"X-API-Key <key>" → sent as X-API-Key: <key>custom_headers - JSON string of additional HTTP headers for WebSocket handshake{
"chat_endpoint": "https://api.example.com/v1/chat",
"authorization_header": "Bearer sk-xxx"
}
Workflow configuration (JSONB, max 10MB)
{}
Associated metric IDs (22-char IDs)
^[A-Za-z0-9]{22}$["abc123def456ghi789jklm"]
Associated test set IDs (22-char IDs)
^[A-Za-z0-9]{22}$["xyz789uvw456rst123abcd"]
Agent created successfully
Agent configuration resource.
Note: The active field (soft delete status) is managed internally and not exposed in API responses.