Scenarios
Define conversation test scripts with objectives, instructions, and initial message types.
Create a Scenario
curl --request POST \
--url 'https://api.amigo.ai/v1/<YOUR-ORG-ID>/simulation/scenario/' \
--header 'Authorization: Bearer <AUTH-TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Account Setup Assistance",
"tags": {"category": "onboarding", "priority": "high"},
"initial_version": {
"objective": "The user needs help setting up their account and configuring preferences.",
"instructions": "Act confused about the setup process. Ask questions about each step. Express satisfaction when the agent explains things clearly.",
"initial_message_type": "user-message",
"conversation_starts_at": null
}
}'Initial Message Types
Create a simulation scenario.
Permissions
This endpoint requires the following permissions:
Simulation:CreateSimulationScenariofor the simulation scenario.Simulation:ModifySimulationScenariofor the simulation scenario.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
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.
[]The name of the simulation scenario.
Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization was not found.
A simulation scenario with this name already exists.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
The service is going through temporary maintenance.
List Scenarios
Retrieve simulation scenarios that match the given filters.
Permissions
This endpoint may be impacted by the following permissions:
- Only simulation scenarios that the authenticated user has
Simulation:GetSimulationScenariopermission for will be retrieved.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The IDs of the simulation scenarios to retrieve.
[]The maximum number of simulation scenarios to return.
50The continuation token from the previous request used to retrieve the next page of simulation scenarios.
0Whether the simulation scenario is deleted.
The creators of the simulation scenarios. Each value must be of the format org_id,user_id.
[]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 to match any value. If value is empty, it matches against when the value is None.
[]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.
[]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.
[]Succeeded.
Whether there are more simulation scenarios to fetch.
The continuation token to use to retrieve the next page of simulation scenarios.
For each filter that this endpoint supports that can take on dynamic values, this field includes what these values are. This is only provided for the first page in the pagination results.
Note that the values are counted assuming the authenticated user has access to all the simulation scenarios, so they might differ from how many scenarios are actually retrieved.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 200 requests per minute for this endpoint.
The service is going through temporary maintenance.
Search Scenarios
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 may be impacted by the following permissions:
- Only simulation scenarios that the authenticated user has
Simulation:GetSimulationScenariopermission for will be retrieved.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The query to search for. Any simulation scenarios containing the terms in its name would be returned.
The creators of the simulation scenarios. Each value must be of the format org_id,user_id.
[]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.
[]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.
[]Succeeded.
Invalid authorization credentials.
Missing required permissions.
Specified organization is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 50 requests per minute for this endpoint.
The service is going through temporary maintenance.
Update a Scenario
Update a simulation scenario.
Permissions
This endpoint requires the following permissions:
Simulation:ModifySimulationScenarioon the simulation scenario.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation scenario to update.
^[a-f0-9]{24}$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.
[]The tags of the simulation persona. Both the key and the value can only contain alphanumeric characters, underscores, or spaces.
Succeeded.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation scenario does not exist.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
The service is going through temporary maintenance.
No content
Delete a Scenario
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:
Simulation:DeleteSimulationScenarioon the simulation scenario to delete.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation scenario to delete.
^[a-f0-9]{24}$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.
[]Succeeded
The specified simulation scenario is used in a simulation unit test.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation scenario does not exist.
Invalid request path parameter failed validation.
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
The service is going through temporary maintenance.
No content
Create a Scenario Version
Create a new simulation scenario version
Create a new version of the simulation scenario.
Permissions
This endpoint requires the following permissions:
Simulation:ModifySimulationScenariofor the simulation scenario.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation scenario to create a version for.
^[a-f0-9]{24}$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.
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.
[]The objective of the simulation scenario.
The instructions of the simulation scenario.
The initial message type for the simulation scenario version.
The time at which the conversation starts. This must be a timestamp in UTC. If not specified, the current server time is used.
Succeeded.
The specified version number is not the expected next version to be created.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation scenario does not exist.
Invalid request path parameter, request query parameter, or request body failed validation.
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
The service is going through temporary maintenance.
Get Scenario Versions
Get simulation scenario versions
Retrieve the versions of a simulation scenario.
Permissions
This endpoint requires the following permissions:
Simulation:GetSimulationScenariofor the simulation scenario.
The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.
Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.
An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
The ID of the simulation scenario to get versions for.
^[a-f0-9]{24}$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.
1The maximum number of simulation scenario versions to return.
10The continuation token from the previous request used to retrieve the next page of simulation scenario version.
0The 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.
[]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.
[]Succeeded.
Whether there are more simulation scenario versions to fetch.
A token to supply to the next request to retreive the next page of simulation scenario versions.
Invalid authorization credentials.
Missing required permissions.
The specified organization or simulation scenario does not exist.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 500 requests per minute for this endpoint.
The service is going through temporary maintenance.
Related
Last updated
Was this helpful?

