Create Model Experiment
metrx_create_model_experimentCreate a draft A/B model experiment for an agent, comparing a baseline control model against a candidate treatment model so you can plan model testing before any traffic is routed.
Instructions
Record a DRAFT A/B experiment comparing an agent's current model (control) with a candidate (treatment) model. Creating it does NOT start routing traffic: the experiment is stored with status 'draft'. If control_model is omitted, the API uses the model the agent ran most often in the last 90 days (and refuses if it cannot determine one, or if it equals the treatment). Needs an API key with the 'admin' scope (an org owner or admin mints one in Settings → Security → API Keys). Do NOT use to read results — use get_experiment_results. Requires an API key with the 'admin' scope.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>",
"name": "<name>",
"treatment_model": "<treatment_model>"
},
"name": "metrx_create_model_experiment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable experiment name | |
| agent_id | Yes | Agent (UUID) the experiment belongs to | |
| description | No | Optional free-text description | |
| traffic_pct | No | Planned percentage of traffic for the treatment model, 1-50 (default: 10) | |
| control_model | No | Baseline model. Omit to use the agent's most-used model of the last 90 days. | |
| treatment_model | Yes | The candidate model to test (e.g., "gpt-4o-mini", "claude-haiku-4-5") |