Skip to main content
POST
/
v1
/
simulation
Run Scenarios
curl --request POST \
  --url https://api.eqho.ai/v1/simulation \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "agent_id": "<string>",
  "scenario_ids": [
    "<string>"
  ],
  "scenario_set_id": "<string>",
  "simulated_lead_llm_args": {
    "ai_model": "<string>",
    "frequency_penalty": 123,
    "max_tokens": 123,
    "presence_penalty": 123,
    "temperature": 123,
    "reasoning": "none",
    "text_verbosity": "low"
  },
  "num_trials": 1,
  "max_steps": 100,
  "max_errors": 5
}
'
{
  "_id": "<string>",
  "account_id": "<string>",
  "agent_id": "<string>",
  "scenario_ids": [
    "<string>"
  ],
  "info": {
    "num_trials": 123,
    "max_steps": 123,
    "max_errors": 123,
    "agent_info": {
      "agent_id": "<string>",
      "ai_settings": {
        "ai_model": "<string>",
        "frequency_penalty": 123,
        "max_tokens": 123,
        "presence_penalty": 123,
        "temperature": 123,
        "reasoning": "none",
        "text_verbosity": "low"
      }
    },
    "simulated_lead_info": {
      "ai_settings": {
        "ai_model": "<string>",
        "frequency_penalty": 123,
        "max_tokens": 123,
        "presence_penalty": 123,
        "temperature": 123,
        "reasoning": "none",
        "text_verbosity": "low"
      }
    }
  },
  "total_runs": 123,
  "scenario_set_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "completed_runs": 0,
  "final_score": 123,
  "pass_hat_ks": {},
  "avg_agent_cost": 123
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
agent_id
string
required

ID of the Agent to run the simulation on

Required string length: 24
scenario_ids
string[] | null

IDs of the simulation scenarios being run in this simulation. Needed if scenario_set_id is not provided.

Required string length: 24
scenario_set_id
string | null

ID of the scenario set to run all scenarios from. Cannot be used together with scenario_ids.

Required string length: 24
simulated_lead_llm_args
AiSettingsModel · object

The model to use for the user

num_trials
integer
default:1

The number of trials to run the simulation on.

Required range: 1 <= x <= 32
max_steps
integer
default:100

The maximum number of steps to run the simulation.

Required range: 1 <= x <= 5000
max_errors
integer
default:5

The maximum number of tool errors allowed in a row.

Required range: x >= 1

Response

Successful Response

The results of a simulation run

_id
string
required
account_id
string
required

Account ID that owns this simulation run

agent_id
string
required

ID of the Agent being simulated

scenario_ids
string[]
required

IDs of the Simulation Scenarios being run

info
SimulationInfo · object
required

Information.

total_runs
integer
required

The total number of simulation runs in this batch

scenario_set_id
string | null

Scenario set that was used for this simulation

created_at
string<date-time>
completed_at
string<date-time> | null

The end time of the simulation.

completed_runs
integer
default:0

The number of completed simulation runs

final_score
number | null

The final score of the simulation. Computed as the average reward over all scenarios.

pass_hat_ks
Pass Hat Ks · object

Average score in trial/pass k

avg_agent_cost
number | null

The average cost of the agent over all scenarios.