Create or Update Target
create_or_update_targetCreate or update an AI Target for evaluation simulations. Supports generation models, custom endpoints, and voice agents with templates, tools, and HTTP settings.
Instructions
Create or update a Target — the AI system you want to evaluate in a simulation.
Calling create_or_update_target with the same name as an existing Target will
**fully replace** its configuration — caller must re-specify all desired fields.
Supported types: 'generation' (foundation model), 'custom_endpoint' (your own
REST API), and 'voice' (voice-based targets reached by phone via Twilio or
over SIP).
**Cloning workflow**: this tool accepts the same key structure that `get_target`
returns, so you can read an existing Target, change `name`, swap in real values
for any field whose value is `"***REDACTED***"`, and pass the result here as
kwargs. Calls that still contain the redaction sentinel are rejected with an
error naming each offending path; the sentinel is never forwarded to the backend.
Args:
name: Unique name for this target.
type: Target type — 'generation', 'custom_endpoint', or 'voice'.
model_id: (generation targets) Foundation model ID, e.g. 'gpt-4o-mini'.
temperature: (generation targets) Response randomness, default 0.
system_prompt_template: (generation targets) System instructions; mustache
syntax supported, e.g. '{scenario_input}'.
user_prompt_template: (generation targets) User prompt template.
dialog_template: (generation targets) Dialog formatting template.
tools: (generation targets) Tool definitions for function calling.
next_message_params: (custom_endpoint) Nested HTTP config for each
conversation turn. Required keys: 'url', 'method'. Optional:
'headers', 'body', 'status_code', 'response_message_path',
'response_session_id_path', 'response_tool_calls_path'.
All response path values MUST use dot-path notation starting with
'response.' — e.g., 'response.message', 'response.choices[0].message.content',
'response.choices[0].tool_calls'. Never use bare property names.
For SSE/streaming endpoints, include a 'streaming' object with:
- 'stop': array of stop conditions (OR semantics — any match ends
the stream). Each has 'value' (required) and optional 'path'
(dot-path into JSON chunk). Without 'path', matches raw SSE data.
- 'select': array of select conditions (AND semantics — all must
match for a chunk's content to be extracted). Each requires
'path' and 'value'.
When streaming, set response_message_path to the chunk field
(e.g., 'response.choices[0].delta.content').
start_session_params: (custom_endpoint, optional) Nested HTTP config to
initialise a session. Required key: 'url'. Optional: 'method',
'headers', 'body', 'status_code', 'response_session_id_path'
(dot-path starting with 'response.', e.g. 'response.id'),
'response_message_path'. Supports 'streaming' object (same
structure as next_message_params.streaming).
end_session_params: (custom_endpoint, optional) Nested HTTP config to
close a session after the last turn.
auth_params: (custom_endpoint, optional) Token-based authorization config.
Required keys when provided: 'url', 'method', 'response_access_token_path'
(dot-path starting with 'response.', e.g. 'response.access_token').
Optional: 'headers', 'body', 'status_code'.
sensitive_fields: (custom_endpoint, optional) List of dot-path strings for
secret fields within auth_params (e.g., 'auth_params.body.client_id').
The MCP auto-generates entries for top-level auth_params keys; use this
for deeper paths. To remove auth from an existing target, call
create_or_update_target again without auth_params.
max_parallel_requests: (custom_endpoint, twilio) Concurrency limit. This is
the same setting the Okareo web UI labels "max concurrency".
edge_type: (voice targets) How Okareo reaches the voice agent —
'twilio' (dial a phone number) or 'sip' (call a SIP URI).
to_phone_number: (voice twilio) Destination phone number (required).
account_sid: (voice twilio, custom only) Twilio account SID. If provided,
auth_token and from_phone_number are also required (all-or-nothing).
Omit for generic Twilio targets using Okareo's managed integration.
auth_token: (voice twilio, custom only) Twilio auth token. Required with
account_sid and from_phone_number.
from_phone_number: (voice twilio, custom only) Caller phone number. Required
with account_sid and auth_token.
sip_uri: (voice sip) Destination SIP URI (required), e.g.
"sip:agent@your-domain.example.com". Use this to test any voice
agent reachable over SIP — for example one fronted by Daily,
Vapi, LiveKit, or a SIP trunk.
sip_username: (voice sip, optional) SIP authentication username.
sip_password: (voice sip, optional) SIP authentication password
(stored as a sensitive field).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | Yes | ||
| tools | No | ||
| sip_uri | No | ||
| model_id | No | ||
| edge_type | No | ||
| auth_token | No | ||
| account_sid | No | ||
| auth_params | No | ||
| temperature | No | ||
| sip_password | No | ||
| sip_username | No | ||
| dialog_template | No | ||
| to_phone_number | No | ||
| sensitive_fields | No | ||
| from_phone_number | No | ||
| end_session_params | No | ||
| next_message_params | No | ||
| start_session_params | No | ||
| user_prompt_template | No | ||
| max_parallel_requests | No | ||
| system_prompt_template | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |