LogoLogo
Go to website
  • Welcome
  • Getting Started
    • Amigo Overview
      • System Components
      • Overcoming LLM Limitations
      • [Advanced] Future-Ready Architecture
      • [Advanced] The Accelerating AI Landscape
    • The Journey with Amigo
      • Partnership Model
  • Concepts
    • Agent Core
      • Core Persona
      • Global Directives
    • Context Graphs
      • State-Based Architecture
      • [Advanced] Field Implementation Guidance
    • Functional Memory
      • Layered Architecture
      • User Model
      • [Advanced] Recall Mechanisms
      • [Advanced] Analytical Capabilities
    • Dynamic Behaviors
      • Side-Effect Architecture
      • Knowledge
      • [Advanced] Behavior Chaining
    • Evaluations
      • Testing Framework Examples
    • [Advanced] Reinforcement Learning
    • Safety
  • Glossary
  • Advanced Topics
    • Transition to Neuralese Systems
    • Agent V2 Architecture
  • Agent Building Best Practices
    • Dynamic Behaviors Guide
  • Developer Guide
    • Enterprise Integration Guide
      • Authentication
      • User Creation + Management
      • Service Discovery + Management
      • Conversation Creation + Management
      • Data Retrieval + User Model Management
      • Webhook Management
    • API Reference
      • V1/organization
      • V1/service
      • V1/conversation
      • V1/user
      • V1/role
      • V1/admin
      • V1/webhook_destination
      • V1/metric
      • V1/dynamic_behavior_set
      • V1/simulation
      • Models
Powered by GitBook
LogoLogo

Resources

  • Pricing
  • About Us

Company

  • Careers

Policies

  • Terms of Service

Amigo Inc. ©2025 All Rights Reserved.


On this page

Was this helpful?

Export as PDF
  1. Developer Guide
  2. API Reference

V1/simulation

PreviousV1/dynamic_behavior_setNextModels

Was this helpful?

Get simulation persona versions

get

Retrieve versions of a simulation persona.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:GetSimulationPersona for the simulation persona.

Authorizations
Path parameters
organizationstringRequired
simulation_persona_idstringRequired

The ID of the simulation persona to get versions for.

Pattern: ^[a-f0-9]{24}$
Query parameters
versionany ofOptional

The versions of the simulation persona to retrieve. One can specify an exact version to retrieve, which is either the version number or latest, which retrieves the latest version. Alternatively, one can specify a range of inclusive lower and upper bound for the version number separated by -, and every version within the range would be retrieved.

Example: 1
stringOptional
or
nullOptional
limitinteger · min: 1 · max: 10Optional

The maximum number of simulation persona versions to return.

Default: 10
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation persona version.

Default: 0
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are version. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation persona does not exist.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/persona/{simulation_persona_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_persona_versions": [
    {
      "_id": "text",
      "org_id": "text",
      "simulation_persona_id": "text",
      "version": 1,
      "background": "text"
    }
  ],
  "has_more": true,
  "continuation_token": null
}

Delete a simulation persona

delete

Delete a simulation persona. This endpoint only soft-deletes the simulation persona so any existing references to it would still be valid. However, they cannot be used in any new simulations.

This endpoint will error if the simulation persona is used in any simulation unit tests.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Simulation:DeleteSimulationPersona on the simulation persona to delete.

Authorizations
Path parameters
organizationstringRequired
simulation_persona_idstringRequired

The ID of the simulation persona to delete.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
204
Succeeded.
400
The specified simulation persona is used in a simulation unit test.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation persona does not exist.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/simulation/persona/{simulation_persona_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Get simulation scenario versions

get

Retrieve the versions of a simulation scenario.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:GetSimulationScenario for the simulation scenario.

Authorizations
Path parameters
organizationstringRequired
simulation_scenario_idstringRequired

The ID of the simulation scenario to get versions for.

Pattern: ^[a-f0-9]{24}$
Query parameters
versionany ofOptional

The versions of the simulation scenario to retrieve. One can specify an exact version to retrieve, which is either the version number or latest, which retrieves the latest version. Alternatively, one can specify a range of inclusive lower and upper bound for the version number separated by -, and every version within the range would be retrieved.

Example: 1
stringOptional
or
nullOptional
limitinteger · min: 1 · max: 10Optional

The maximum number of simulation scenario versions to return.

Default: 10
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation scenario version.

Default: 0
sort_bystring[]Optional

The fields to sort the versions by. Supported fields are version. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation scenario does not exist.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/scenario/{simulation_scenario_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_scenario_versions": [
    {
      "_id": "text",
      "org_id": "text",
      "simulation_scenario_id": "text",
      "version": 1,
      "objective": "text",
      "instructions": "text"
    }
  ],
  "has_more": true,
  "continuation_token": null
}

Get simulation scenarios

get

Retrieve simulation scenarios that match the given filters.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation scenarios that the authenticated user has Simulation:GetSimulationScenario permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
idany ofOptional

The ID of the simulation scenario to retrieve.

string[]Optional
or
nullOptional
limitinteger · max: 50Optional

The maximum number of simulation scenarios to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation scenarios.

Default: 0
is_deletedany ofOptional

Whether the simulation scenario is deleted.

booleanOptional
or
nullOptional
creatorstring[]Optional

The creators of the simulation scenarios. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation scenarios. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are updated_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/scenario/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_scenarios": [
    {
      "id": "text",
      "name": "text",
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "is_deleted": true,
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": null,
  "filter_values": {
    "creators": [
      {
        "org_id": "text",
        "user_id": "text"
      }
    ],
    "tags": [
      "text"
    ]
  }
}

Delete a simulation scenario

delete

Delete a simulation scenario. This endpoint only soft-deletes the simulation scenario so any existing references to it would still be valid. However, they cannot be used in any new simulations.

This endpoint will error if the simulation scenario is used in any simulation unit tests.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Simulation:DeleteSimulationScenario on the simulation scenario to delete.

Authorizations
Path parameters
organizationstringRequired
simulation_scenario_idstringRequired

The ID of the simulation scenario to delete.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
204
Succeeded
400
The specified simulation scenario is used in a simulation unit test.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation scenario does not exist.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/simulation/scenario/{simulation_scenario_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Search simulation personas

get

Search for simulation personas that match the given filters and contain the given query in its name and the background of its latest version. Only the top 50 results will be returned. The results will be sorted by the relevance of the search query.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation personas that the authenticated user has Simulation:GetSimulationPersona permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
querystring · min: 1Required

The query to search for. Any simulation personas containing the terms in its name and the background of its latest version would be returned.

rolestring[]Optional

The roles of the simulation personas.

Default: []
creatorstring[]Optional

The creators of the simulation personas. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation personas. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/persona/search HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_personas": [
    {
      "id": "text",
      "name": "text",
      "role": "text",
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "is_deleted": true,
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ]
}

Search simulation scenarios

get

Search for simulation scenarios that match the given filters and contain the given query in its name. Only the top 50 results will be returned. The results will be sorted by the relevance of the search query.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation scenarios that the authenticated user has Simulation:GetSimulationScenario permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
querystring · min: 1Required

The query to search for. Any simulation scenarios containing the terms in its name would be returned.

creatorstring[]Optional

The creators of the simulation scenarios. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation scenarios. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/scenario/search HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_scenarios": [
    {
      "id": "text",
      "name": "text",
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "is_deleted": true,
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ]
}

Get simulation unit tests

get

Retrieve the simulation unit tests that match the given filters.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation unit tests that the authenticated user has Simulation:GetSimulationUnitTest permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The ID of the simulation unit test to retrieve.

Default: []
limitinteger · max: 100Optional

The maximum number of simulation unit tests to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation unit tests.

Default: 0
is_deletedany ofOptional

Whether the simulation unit test is deleted.

booleanOptional
or
nullOptional
service_idstring[]Optional

The IDs of the services that the simulation unit tests run on.

Default: []
persona_idstring[]Optional

The IDs of the personas that the simulation unit tests use.

Default: []
scenario_idstring[]Optional

The IDs of the scenarios that the simulation unit tests use.

Default: []
metric_idstring[]Optional

The IDs of the metrics that the simulation unit tests use.

Default: []
creatorstring[]Optional

The creators of the simulation unit tests. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation unit tests. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are updated_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/unit_test/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_unit_tests": [
    {
      "_id": "text",
      "org_id": "text",
      "name": "text",
      "description": "text",
      "service_id": "text",
      "service_version_set_name": "text",
      "persona_id": "text",
      "scenario_id": "text",
      "max_interactions": 1,
      "success_criterions": [
        {
          "name": "text",
          "metric_id": "text",
          "criterion": {
            "type": "text",
            "expected_value": true
          }
        }
      ],
      "is_deleted": true,
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1,
  "filter_values": {
    "creators": [
      {
        "org_id": "text",
        "user_id": "text"
      }
    ],
    "tags": [
      "text"
    ],
    "service_ids": [
      "text"
    ],
    "persona_ids": [
      "text"
    ],
    "scenario_ids": [
      "text"
    ],
    "metric_ids": [
      "text"
    ]
  }
}

Delete a simulation unit test

delete

Delete a simulation unit test. The unit test is soft-deleted and all references to it are still valid. Any scheduled unit test runs would still continue as expected, but no new run can be created.

This endpoint will error if the simulation unit test is used in any simulation unit test set.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:DeleteSimulationUnitTest for the simulation unit test to delete.

Authorizations
Path parameters
organizationstringRequired
simulation_unit_test_idstringRequired

The ID of the simulation unit test to delete.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
204
Succeeded.
400
The specified simulation unit test is used in a simulation unit test set.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation unit test was not found or is inactive.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/simulation/unit_test/{simulation_unit_test_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Search simulation unit tests

get

Search for simulation unit tests that match the given filters and whose name or description contains the specified query.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation unit tests that the authenticated user has Simulation:GetSimulationUnitTest permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
querystring · min: 1Required

The query to search for. Any simulation unit tests containing the terms in its name would be returned.

creatorstring[]Optional

The creators of the simulation unit tests. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation unit tests. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
service_idstring[]Optional

The IDs of the services that the simulation unit tests run on.

Default: []
persona_idstring[]Optional

The IDs of the personas that the simulation unit tests use.

Default: []
scenario_idstring[]Optional

The IDs of the scenarios that the simulation unit tests use.

Default: []
metric_idstring[]Optional

The IDs of the metrics that the simulation unit tests use.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/unit_test/search/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_unit_tests": [
    {
      "_id": "text",
      "org_id": "text",
      "name": "text",
      "description": "text",
      "service_id": "text",
      "service_version_set_name": "text",
      "persona_id": "text",
      "scenario_id": "text",
      "max_interactions": 1,
      "success_criterions": [
        {
          "name": "text",
          "metric_id": "text",
          "criterion": {
            "type": "text",
            "expected_value": true
          }
        }
      ],
      "is_deleted": true,
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ]
}

Get simulation unit test sets

get

Retrieve the simulation unit test sets that match the given filters.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation unit test sets that the authenticated user has Simulation:GetSimulationUnitTestSet permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The ID of the simulation unit test set to retrieve.

Default: []
limitinteger · max: 20Optional

The maximum number of simulation unit test sets to return.

Default: 20
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation unit test sets.

Default: 0
is_deletedany ofOptional

Whether the simulation unit test set is deleted.

booleanOptional
or
nullOptional
unit_test_idstring[]Optional

The IDs of the unit tests that are part of the simulation unit test sets.

Default: []
creatorstring[]Optional

The creators of the simulation unit test sets. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation unit test sets. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are updated_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/unit_test_set/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_unit_test_sets": [
    {
      "_id": "text",
      "org_id": "text",
      "name": "text",
      "description": "text",
      "unit_test_runs": [
        {
          "unit_test_id": "text",
          "run_count": 1
        }
      ],
      "last_triggered_run_id": "text",
      "is_deleted": true,
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1,
  "filter_values": {
    "creators": [
      {
        "org_id": "text",
        "user_id": "text"
      }
    ],
    "unit_test_ids": [
      "text"
    ],
    "tags": [
      "text"
    ]
  }
}

Search simulation unit test sets

get

Search for simulation unit test sets that match the given filters and whose name or description contains the specified query.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation unit test sets that the authenticated user has Simulation:GetSimulationUnitTestSet permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
querystring · min: 1Required

The query to search for. Any simulation unit test sets containing the terms in its name or description would be returned.

creatorstring[]Optional

The creators of the simulation unit test sets. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation unit test sets. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
unit_test_idstring[]Optional

The IDs of the unit tests that are part of the simulation unit test sets.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/unit_test_set/search/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_unit_test_sets": [
    {
      "_id": "text",
      "org_id": "text",
      "name": "text",
      "description": "text",
      "unit_test_runs": [
        {
          "unit_test_id": "text",
          "run_count": 1
        }
      ],
      "last_triggered_run_id": "text",
      "is_deleted": true,
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ]
}

Delete a simulation unit test set

delete

Delete a simulation unit test set.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:DeleteSimulationUnitTestSet for the simulation unit test set.

Authorizations
Path parameters
organizationstringRequired
simulation_unit_test_set_idstringRequired

The ID of the simulation unit test set to delete.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
204
Succeeded.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation unit test set was not found
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/simulation/unit_test_set/{simulation_unit_test_set_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Get simulation unit test set runs

get

Retrieves simulation unit test set runs.

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only the runs that the authenticated user has the Simulation:GetSimulationUnitTestSetRun permission for will be returned.

  • The unit_test_run_specs and unit_test_run_results fields are only populated if the authenticated user has the Simulation:GetSimulationUnitTestSet permission.

  • The fields scenario_version_info, persona_version_info, metrics_to_evaluate in unit_test_run_specs and the field metric_evaluation_results in unit_test_run_results are only populated if the authenticated user has the Simulation:GetSimulationUnitTest permission.

  • The fields metric_name and metric_value in metrics_to_evaluate are only populated if the authenticated user has the Metric:GetMetric permission.

Authorizations
Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The ID of the simulation unit test set run to retrieve.

Default: []
limitinteger · max: 50Optional

The maximum number of simulation unit test set runs to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation unit test set runs.

Default: 0
creatorstring[]Optional

The creators of the simulation unit test sets. Each value must be of the format org_id,user_id.

Default: []
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are created_at.

Default: []
simulation_unit_test_set_idstring[]Optional

The IDs of the simulation unit test sets that the simulation unit test set runs belong to.

Default: []
is_completedany ofOptional

Whether the simulation unit test set run is completed.

booleanOptional
or
nullOptional
failed_metricsany ofOptional

Whether the simulation unit test set run has failed due to failing metrics. Note that this field could be True even if the run is still ongoing -- it simply means some unit test runs have failed.

booleanOptional
or
nullOptional
erroredany ofOptional

Whether the simulation unit test set run has encountered an error.

booleanOptional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/unit_test_set_run/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_unit_test_set_runs": [
    {
      "org_id": "text",
      "id": "text",
      "is_completed": true,
      "simulation_unit_test_set_id": "text",
      "failed_metrics": true,
      "errored": true,
      "artifacts_generated": true,
      "unit_test_run_specs": [
        {
          "unit_test_id": "text",
          "run_count": 1,
          "service_hierarchical_state_machine_version_info": [],
          "agent_version_info": [],
          "scenario_version_info": [],
          "persona_version_info": [],
          "llm_model_preferences": {
            "ANY_ADDITIONAL_PROPERTY": {
              "llm_name": "text",
              "top_p": 1,
              "temperature": 1,
              "top_k": 1
            }
          },
          "max_interactions": 1,
          "metrics_to_evaluate": [
            {
              "metric_id": "text",
              "metric_name": "text",
              "metric_value": {
                "type": "text"
              },
              "success_criterion_name": "text",
              "success_criterion": {
                "type": "text",
                "expected_value": true
              }
            }
          ]
        }
      ],
      "unit_test_run_results": [
        {
          "unit_test_id": "text",
          "metric_evaluation_results": [
            {
              "metric_id": "text",
              "result": [
                []
              ]
            }
          ]
        }
      ],
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1,
  "filter_values": {
    "creators": [
      {
        "org_id": "text",
        "user_id": "text"
      }
    ],
    "simulation_unit_test_set_ids": [
      "text"
    ],
    "tags": [
      "text"
    ]
  }
}

Get simulation unit test set run artifacts

get

Get the artifacts of a simulation unit test set run. A link to the raw artifacts in S3 is returned.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:GetSimulationUnitTestSetRun for the simulation unit test set run.

  • Organization:GetServiceHierarchicalStateMachineDetails for the state machine that the simulation uses.

Authorizations
Path parameters
organizationstringRequired
simulation_unit_test_set_run_idstringRequired

The ID of the simulation unit test set run to retrieve the artifacts of.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
400
The artifacts for the unit test set run are not yet available for retrieval
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or unit test set run is not found.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/unit_test_set_run/{simulation_unit_test_set_run_id}/artifacts/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "presigned_url": "text",
  "url_expires_at": "2025-05-10T04:48:39.958Z"
}

Cancel a simulation unit test set run

delete

Cancel a simulation unit test set run. The run must still be in progress. This cancellation is a best-effort operation, and there's no guarantee that it'll take effect immediately.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:CancelSimulationUnitTestSetRun for the authenticated user.

Authorizations
Path parameters
organizationstringRequired
simulation_unit_test_set_run_idstringRequired

The ID of the simulation unit test set run to cancel.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
204
Succeeded.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation unit test set run was not found.
409
The simulation unit test set run is not in progress.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/simulation/unit_test_set_run/{simulation_unit_test_set_run_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

  • GETGet simulation personas
  • POSTCreate a simulation persona
  • GETGet simulation persona versions
  • POSTCreate a new simulation persona version
  • POSTUpdate a simulation persona
  • DELETEDelete a simulation persona
  • GETGet simulation scenario versions
  • POSTCreate a new simulation scenario version
  • GETGet simulation scenarios
  • POSTCreate a simulation scenario
  • POSTUpdate a simulation scenario
  • DELETEDelete a simulation scenario
  • GETSearch simulation personas
  • GETSearch simulation scenarios
  • GETGet simulation unit tests
  • POSTCreate a simulation unit test
  • POSTUpdate a simulation unit test
  • DELETEDelete a simulation unit test
  • GETSearch simulation unit tests
  • GETGet simulation unit test sets
  • POSTCreate a simulation unit test set
  • GETSearch simulation unit test sets
  • POSTUpdate a simulation unit test set
  • DELETEDelete a simulation unit test set
  • GETGet simulation unit test set runs
  • POSTCreate a simulation unit test set run
  • GETGet simulation unit test set run artifacts
  • DELETECancel a simulation unit test set run

Get simulation personas

get

Retrieve simulation personas that match the given filters.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • Only simulation personas that the authenticated user has Simulation:GetSimulationPersona permission for will be retrieved.

Authorizations
Path parameters
organizationstringRequired
Query parameters
idany ofOptional

The ID of the simulation persona to retrieve.

string[]Optional
or
nullOptional
limitinteger · max: 50Optional

The maximum number of simulation personas to return.

Default: 50
continuation_tokenintegerOptional

The continuation token from the previous request used to retrieve the next page of simulation personas.

Default: 0
is_deletedany ofOptional

Whether the simulation persona is deleted.

booleanOptional
or
nullOptional
rolestring[]Optional

The roles of the simulation personas.

Default: []
creatorstring[]Optional

The creators of the simulation personas. Each value must be of the format org_id,user_id.

Default: []
tagstring[]Optional

The tags of the simulation personas. Must be specified using the syntax key:value, which means to match all sets with the given key and value pair among its tags. If value is *, it means the value does not matter. If value is empty, it matches against when the value is None.

Default: []
sort_bystring[]Optional

The fields to sort the sets by. Supported fields are updated_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

Default: []
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization is not found.
422
Invalid request path parameter or request query parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/simulation/persona/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "simulation_personas": [
    {
      "id": "text",
      "name": "text",
      "role": "text",
      "tags": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "is_deleted": true,
      "created_at": "2025-05-10T04:48:39.958Z",
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_at": "2025-05-10T04:48:39.958Z",
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": null,
  "filter_values": {
    "creators": [
      {
        "org_id": "text",
        "user_id": "text"
      }
    ],
    "tags": [
      "text"
    ],
    "roles": [
      "text"
    ]
  }
}

Create a simulation persona

post

Create a simulation persona.

Permissions

  • User:GetUserInfo for the authenticated user.

  • Simulation:CreateSimulationPersona for the persona to create.

  • Simulation:ModifySimulationPersona for the persona to create.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
namestring · min: 1Required

The name of the simulation persona.

rolestring · min: 1Required

The role of the simulation persona.

Responses
201
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization was not found.
409
A simulation persona with this name already exists.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/persona/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 111

{
  "name": "text",
  "role": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "initial_version": {
    "background": "text"
  }
}
{
  "simulation_persona_id": "text"
}

Create a new simulation persona version

post

Create a new version of the simulation persona.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:ModifySimulationPersona for the simulation persona.

Authorizations
Path parameters
organizationstringRequired
simulation_persona_idstringRequired

The ID of the simulation persona to create a version for.

Pattern: ^[a-f0-9]{24}$
Query parameters
versionany ofOptional

The version number of the new version. If specified, this endpoint throws an error if the next version in the database doesn't equal to the value of this parameter.

integerOptional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
backgroundstring · min: 1Required

The background of the simulation persona.

Responses
201
Succeeded.
application/json
400
The specified version number is not the expected next version to be created.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation persona does not exist.
422
Invalid request path parameter, request query parameter, or request body failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/persona/{simulation_persona_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "background": "text"
}
{
  "version": 1
}

Update a simulation persona

post

Update a simulation persona.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:ModifySimulationPersona for the persona to update.

Authorizations
Path parameters
organizationstringRequired
simulation_persona_idstringRequired

The ID of the simulation persona to update

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
tagsany ofOptional

The tags of the simulation persona. Both the key and the value can only contain alphanumeric characters, underscores, or spaces.

or
nullOptional
Responses
204
Succeeded.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation persona does not exist.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/persona/{simulation_persona_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

No content

Create a new simulation scenario version

post

Create a new version of the simulation scenario.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:ModifySimulationScenario for the simulation scenario.

Authorizations
Path parameters
organizationstringRequired
simulation_scenario_idstringRequired

The ID of the simulation scenario to create a version for.

Pattern: ^[a-f0-9]{24}$
Query parameters
versionany ofOptional

The version number of the new version. If specified, this endpoint throws an error if the next version in the database doesn't equal to the value of this parameter.

integerOptional
or
nullOptional
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
objectivestring · min: 1Required

The objective of the simulation scenario.

instructionsstring · min: 1Required

The instructions of the simulation scenario.

Responses
201
Succeeded.
application/json
400
The specified version number is not the expected next version to be created.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation scenario does not exist.
422
Invalid request path parameter, request query parameter, or request body failed validation.
429
The user has exceeded the rate limit of 100 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/scenario/{simulation_scenario_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "objective": "text",
  "instructions": "text"
}
{
  "version": 1
}

Create a simulation scenario

post

Create a simulation scenario.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:CreateSimulationScenario for the simulation scenario.

  • Simulation:ModifySimulationScenario for the simulation scenario.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
namestring · min: 1Required

The name of the simulation scenario.

Responses
201
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization was not found.
409
A simulation scenario with this name already exists.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/scenario/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 118

{
  "name": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "initial_version": {
    "objective": "text",
    "instructions": "text"
  }
}
{
  "simulation_scenario_id": "text"
}

Update a simulation scenario

post

Update a simulation scenario.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Simulation:ModifySimulationScenario on the simulation scenario.

Authorizations
Path parameters
organizationstringRequired
simulation_scenario_idstringRequired

The ID of the simulation scenario to update.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
tagsany ofOptional

The tags of the simulation persona. Both the key and the value can only contain alphanumeric characters, underscores, or spaces.

or
nullOptional
Responses
204
Succeeded.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation scenario does not exist.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/scenario/{simulation_scenario_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

No content

Create a simulation unit test

post

Create a new simulation unit test.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:CreateSimulationUnitTest for the unit test to create.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
namestring · min: 1Required

The name of the unit test.

descriptionstring · min: 1Required

A description of the unit test.

service_idstringRequired

The service that the unit test runs on.

Pattern: ^[a-f0-9]{24}$
service_version_set_namestringRequired

The version set of the service that the unit test runs on.

persona_idstringRequired

The persona that unit test uses.

Pattern: ^[a-f0-9]{24}$
scenario_idstringRequired

The scenario that the unit test uses.

Pattern: ^[a-f0-9]{24}$
max_interactionsinteger · max: 50Required

The max number of interactions after which the unit test fails.

Responses
201
Succeeded.
application/json
400
The metric type of the success criterion does not match the metric type of the metric.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization, service, persona, scenario, metric, or service version set was not found.
409
A unit test with this name already exists.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/unit_test/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 306

{
  "name": "text",
  "description": "text",
  "service_id": "text",
  "service_version_set_name": "text",
  "persona_id": "text",
  "scenario_id": "text",
  "max_interactions": 1,
  "success_criterions": [
    {
      "name": "text",
      "metric_id": "text",
      "criterion": {
        "type": "text",
        "verb": "==",
        "threshold": 1
      }
    }
  ],
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "simulation_unit_test_id": "text"
}

Update a simulation unit test

post

Modify the specified simulation unit test.

Permissions

  • User:GetUserInfo for the authenticated user.

  • Simulation:ModifySimulationUnitTest for the unit test to update.

Authorizations
Path parameters
organizationstringRequired
simulation_unit_test_idstringRequired

The ID of the simulation unit test to update.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
descriptionany ofOptional

A description of the unit test.

string · min: 1Optional
or
nullOptional
service_idany ofOptional

The service that the unit test runs on.

stringOptionalPattern: ^[a-f0-9]{24}$
or
nullOptional
service_version_set_nameany ofOptional

The version set of the service that the unit test runs on.

stringOptional
or
nullOptional
persona_idany ofOptional

The persona that unit test uses.

stringOptionalPattern: ^[a-f0-9]{24}$
or
nullOptional
scenario_idany ofOptional

The scenario that the unit test uses.

stringOptionalPattern: ^[a-f0-9]{24}$
or
nullOptional
max_interactionsany ofOptional

The max number of interactions after which the unit test fails.

integer · max: 50Optional
or
nullOptional
success_criterionsany ofOptional

The success criterions for the unit test.

or
nullOptional
run_countany ofOptional

Each time this unit test is run, the number of sessions to simulate.

integerOptional
or
nullOptional
tagsany ofOptional

The tags of the simulation persona.

or
nullOptional
Responses
204
Succeeded.
400
The metric type of the success criterion does not match the metric type of the metric.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization, simulation unit test, service, persona, scenario, metric, or service version set was not found.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/unit_test/{simulation_unit_test_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 306

{
  "description": "text",
  "service_id": "text",
  "service_version_set_name": "text",
  "persona_id": "text",
  "scenario_id": "text",
  "max_interactions": 1,
  "success_criterions": [
    {
      "name": "text",
      "metric_id": "text",
      "criterion": {
        "type": "text",
        "verb": "==",
        "threshold": 1
      }
    }
  ],
  "run_count": 1,
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

No content

Create a simulation unit test set

post

Create a new simulation unit test set.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:CreateSimulationUnitTestSet for the simulation unit test set.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
namestring · min: 1Required

The name of the simulation unit test set.

descriptionany ofRequired

The description of the simulation unit test set.

string · min: 1Optional
or
nullOptional
Responses
201
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or unit test was not found.
409
A simulation unit test set with the same name already exists.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/unit_test_set/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "name": "text",
  "description": "text",
  "unit_test_runs": [
    {
      "unit_test_id": "text",
      "run_count": 1
    }
  ],
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "simulation_unit_test_set_id": "text"
}

Update a simulation unit test set

post

Update a simulation unit test set.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:ModifySimulationUnitTestSet for the simulation unit test set.

Authorizations
Path parameters
organizationstringRequired
simulation_unit_test_set_idstringRequired

The ID of the simulation unit test set to update.

Pattern: ^[a-f0-9]{24}$
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
nameany ofOptional

The name of the simulation unit test set.

string · min: 1Optional
or
nullOptional
descriptionany ofOptional

The description of the simulation unit test set. If not specified or an empty object is provided, the description will not be updated.

Default: {}
string · min: 1Optional
or
object · _NotSetOptional

A specific type to indicate that a field is not set in the request.

or
nullOptional
unit_test_runsany ofOptional

The unit test runs that are part of this set.

or
nullOptional
tagsany ofOptional

The tags of the simulation unit test set.

or
nullOptional
Responses
204
Succeeded.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation unit test set was not found
409
A simulation unit test set with this name already exists.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/unit_test_set/{simulation_unit_test_set_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "name": "text",
  "description": "text",
  "unit_test_runs": [
    {
      "unit_test_id": "text",
      "run_count": 1
    }
  ],
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

No content

Create a simulation unit test set run

post

Create a run for a simulation unit test set. The user must not already have an unfinished run for this simulation unit test set.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

  • Simulation:CreateSimulationUnitTestSetRun for the test set run.

Authorizations
Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-nameany ofOptional

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

stringOptional
or
nullOptional
Body
simulation_unit_test_set_idstringRequired

The ID of the simulation unit test set to run.

Pattern: ^[a-f0-9]{24}$
Responses
201
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or simulation unit test set was not found.
409
The user already has an unfinished run for this simulation unit test set.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 20 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/simulation/unit_test_set_run/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "simulation_unit_test_set_id": "text"
}
{
  "simulation_unit_test_set_run_id": "text"
}