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/conversation

PreviousV1/serviceNextV1/user

Was this helpful?

Get conversation feedbacks

get

Retrieve feedbacks for a conversation. Both conversation-level feedbacks and interaction-level feedbacks are supported.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • If type is conversation, only feedbacks for which the authenticated user has the Conversation:GetConversationFeedback permission will be returned.

  • If type is interaction, only feedbacks for which the authenticated user has the Conversation:GetInteractionFeedback permission will be returned.

Authorizations
Path parameters
organizationstringRequired
Query parameters
typestring · enumRequired

The type of feedback to retrieve.

Possible values:
conversation_idany ofOptional

The IDs of conversations to retrieve feedbacks for.

string[]Optional
or
nullOptional
interaction_idany ofOptional

If type is interaction, the IDs of interactions to retrieve feedbacks for.

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

The maximum number of feedbacks to retrieve.

Default: 10
continuation_tokenintegerOptional

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

Default: 0
sort_bystring[]Optional

The fields to sort the feedbacks by. Supported fields are created_at, user_id, user_org_id, conversation_id, and feedback_content.interaction_id if type is interaction.

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 conversation 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}/conversation/feedback/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "feedbacks": [
    {
      "id": "text",
      "user_id": "text",
      "user_org_id": "text",
      "conversation_id": "text",
      "created_at": "2025-05-10T03:32:47.110Z",
      "feedback_content": {
        "type": "text",
        "comment": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1
}

Get conversation metrics

get

Return the metrics generated for a conversation. If a conversation's metrics is not generated yet, this endpoint will return an empty array, so check thecompleted_post_processings field on the conversation first.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Conversation:GetConversationMetrics on the conversation.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The identifier of the conversation.

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
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or conversation is not found.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 50 requests per second for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/conversation/{conversation_id}/metrics/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "metric_values": [
    {
      "metric_id": "text",
      "name": "text",
      "value": "text",
      "references": [
        "text"
      ],
      "justification": "text"
    }
  ]
}

Get conversation by ID

get

Retrieve a conversation by its ID.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo for the authenticated user.

  • Conversation.GetConversation for the conversation.

This endpoint is impacted by the following permissions:

  • The user_id field in the response is only non-empty if the authenticated user has the User.GetUserInfo permission on the user who started the conversation.

  • The agent_name and agent_pfp fields in the response are only non-empty if the authenticated user has the Organization.GetAgent permission on the agent that this conversation uses.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The identifier of the conversation.

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
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or conversation is not found.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 60 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/conversation/{conversation_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "user_id": "text",
  "agent_name": "text",
  "agent_pfp": "text",
  "created_at": "2025-05-10T03:32:47.110Z",
  "is_finished": true,
  "is_analyzed": true,
  "completed_post_processings": [
    "generate-user-models"
  ]
}

Get conversation messages

get

Retrieve messages in a conversation, sorted in the specified order, up to the specified limit.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo for the authenticated user.

This endpoint is impacted by the following permissions:

  • Only messages that the authenticated user has Conversation.GetMessage permission on will be returned.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The identifier of the conversation.

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

The IDs of the messages to retrieve.

string[]Optional
or
nullOptional
interaction_idany ofOptional

The IDs of the interactions to retrieve messages for.

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

The maximum number of messages to return. At most 100 messages can be returned in one request.

Default: 500
continuation_tokenintegerOptional

The continuation token to use to retrieve the next set of messages.

Default: 0
sort_bystring[]Optional

The field to sort the messages by. Supported fields are interaction_id and timestamp. 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 or conversation is not found.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 60 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/conversation/{conversation_id}/messages/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "messages": [
    {
      "id": "text",
      "interaction_id": "text",
      "timestamp": "2025-05-10T03:32:47.110Z",
      "sender": "text",
      "message": "text",
      "format": "text",
      "message_type": "user-message",
      "message_metadata": [
        "text"
      ]
    }
  ],
  "has_more": true,
  "continuation_token": 1
}

Finish a conversation

post

Conclude a conversation and asynchronously initiate post-conversation analysis.

This endpoint should only be called on a started, non-finished conversation. It can only be called when the previous Start a conversation andInteract with a conversation calls have finished.

It's possible for some conversations to automatically finish during an Interact with a conversation call (for instance, if the user explicitly sends a message indicating that they're done with the conversation). In that case, this endpoint shouldn't be called, as the Interact with a conversation endpoint automatically wraps up the conversation.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • User:UpdateUserInfo on the user who started the conversation.

  • Conversation:InteractWithConversation on the conversation.

  • Organization:GetAgent on the agent that the conversation uses.

  • Organization:GetServiceHierarchicalStateMachine on the state machine that this conversation uses.

Authorizations
Path parameters
conversation_idstringRequired

The identifier of the conversation to finish.

Pattern: ^[a-f0-9]{24}$
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
Responses
204
Succeeded.
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or conversation is not found.
409
The specified conversation is already finished.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 5 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/{conversation_id}/finish/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Recommend responses for interaction

get

Generate a recommended response for the user to send based on the existing chat history. This should be called when the most recent interaction had concluded for a while but the user still hasn't responded.

Permissions:

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Conversation:GetRecommendedResponses on this conversation.

  • Organization:GetServiceHierarchicalStateMachine on the service HSM version that the session is currently on as well as all its dependencies.

Authorizations
Path parameters
conversation_idstringRequired

The identifier of the conversation.

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

The identifier of the most recent interaction.

Pattern: ^[a-f0-9]{24}$
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
Responses
200
Succeeded.
application/json
400
The conversation is finished, or the supplied interaction ID doesn't correspond to the latest, completed interaction.
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or conversation is not found.
422
Invalid request path parameter 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.
get
GET /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/recommend_responses HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "recommended_responses": [
    "text"
  ]
}

Get interaction insights

get

Retrieve insights about the agent's message for a given interaction.

Permissions:

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Conversation:GetInteractionInsights on the conversation.

  • Organization:GetServiceHierarchicalStateMachineDetails on the state machine that the current interaction is in.

This endpoint may be impacted by the following permissions:

  • Only reflection messages for which the authenticated user has the Conversation:GetMessage permission are included in the response.

Authorizations
Path parameters
conversation_idstringRequired

The identifier of the conversation.

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

The identifier of the interaction.

Pattern: ^[a-f0-9]{24}$
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
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization, conversation, or interaction is not found.
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.
get
GET /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/insights HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "current_state_name": "text",
  "current_state_action": "text",
  "current_state_objective": "text",
  "state_transition_logs": [
    {
      "previous_state": "text",
      "previous_service_hierarchical_state_machine_version_info": [],
      "next_state": "text",
      "next_service_hierarchical_state_machine_version_info": [],
      "type": "text",
      "previous_state_exit_condition_description": "text"
    }
  ],
  "working_memory": [
    {
      "content": "text",
      "context": "text"
    }
  ],
  "reflections": [
    "text"
  ],
  "triggered_dynamic_behavior_set_version_info": []
}

Interact with a conversation

post

Send a new user message to the conversation. The endpoint will perform analysis and generate an agent message in response.

If request_format is text, the request body must follow multipart/form-data with precise one form field called recorded_message that corresponds to UTF-8 encoded bytes of the text message. If request_format is voice, the entire request body must be the bytes of the voice recording in audio/wav or audio/mpeg (MP3) format. The body can be sent as a stream, and the endpoint will start processing chunks as they're received, which will reduce latency.

A UserMessageAvailableEvent will be the first event in the response, which includes the user message if it's sent as text, or the transcribed message if it's sent as voice. A series of CurrentAgentActionEvents will follow, which indicates steps in the agent's thinking process. Then the agent message is generated sequentially in pieces, with each piece being sent as a NewMessageEvent in the response. After all the pieces are sent, an InteractionCompleteEvent is sent. The response might end here, or, if the conversation automatically ends (for instance, because the user message indicates the user wants to end the session), an EndSessionEvent would be emitted, while the conversation is marked as finished and the post-conversation analysis asynchronously initiated. The connection will then terminate.

Any further action on the conversation is only allowed after the connection is terminated.

A 200 status code doesn't indicate the successful completion of this endpoint, because the status code is transmitted before the stream starts. At any point during the stream, an ErrorEvent might be sent, which indicates that an error has occurred. The connection will be immediately closed after.

This endpoint can only be called on a conversation that has started but not finished.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • User:UpdateUserInfo on the user who started the conversation.

  • Conversation:InteractWithConversation on the conversation.

  • Organization:GetAgent on the agent that the conversation uses.

  • Organization:GetServiceHierarchicalStateMachine on the service hierarchical state machine that the conversation uses.

Authorizations
Path parameters
conversation_idstringRequired

The identifier of the conversation to send a message to.

Pattern: ^[a-f0-9]{24}$
organizationstringRequired
Query parameters
request_formatstring · enumRequired

The format in which the user message is delivered to the server.

Possible values:
response_formatstring · enumRequired

The format of the response that will be sent to the user.

Possible values:
emit_current_agent_action_eventbooleanOptional

Whether to emit CurrentAgentActionEvents`

Default: false
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. The response will be a stream of events in JSON format separated by newlines. The server will transmit an event as soon as one is available, so the client should respond to the events as soon as one arrives, and keep listening until the server closes the connection.
application/x-ndjson
Responseany of
or
or
or
or
or
400
The user message is empty.
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or conversation is not found.
409
The specified conversation is already finished or has not started.
415
The format of the supplied audio file is not supported.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 15 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/{conversation_id}/interact HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "type": "text",
  "message_id": "text",
  "interaction_id": "text",
  "full_message": "text"
}

Retrieve message source

get

Retrieve the raw source of the given message. It's only applicable to messages that did not originate as texts.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Conversation:GetMessage on the the message.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The identifier of the conversation.

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

The identifier of the message.

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
Responseany
400
The message is a text message.
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or message is not found.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 10 request per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/conversation/{conversation_id}/messages/{message_id}/source HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Delete an interaction feedback

delete

Delete an interaction feedback.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.UpsertInteractionFeedback on the feedback to be deleted.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The ID of the conversation.

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

The ID of the interaction.

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

The ID of the feedback.

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, conversation, interaction, or feedback do not exist.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 40 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/feedback/{feedback_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

Delete a conversation feedback

delete

Delete a conversation feedback.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.UpsertConversationFeedback on the feedback to be deleted.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The ID of the conversation.

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

The ID of the feedback.

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, conversation, interaction, or feedback do not exist.
422
Invalid request path parameter failed validation.
429
The user has exceeded the rate limit of 40 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
delete
DELETE /v1/{organization}/conversation/{conversation_id}/feedback/{feedback_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*

No content

  • GETGet conversations
  • POSTCreate a conversation
  • GETGet conversation feedbacks
  • GETGet conversation metrics
  • GETGet conversation by ID
  • GETGet conversation messages
  • POSTFinish a conversation
  • GETRecommend responses for interaction
  • GETGet interaction insights
  • POSTInteract with a conversation
  • GETRetrieve message source
  • POSTUpdate an interaction feedback
  • DELETEDelete an interaction feedback
  • POSTUpdate the feedback for a conversation
  • DELETEDelete a conversation feedback
  • POSTCreate an interaction feedback
  • POSTCreate a conversation feedback
  • POSTSimulate an interaction

Get conversations

get

Retrieve conversations in an organization based on supplied filters.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo for the authenticated user.

This endpoint may be impacted by the following permissions:

  • The final_message field in the response is only non-empty if the authenticated user has the Conversation.GetMessage permission on the final message.

  • The version_set_info field in the response is only non-empty if the authenticated user has the Service.GetVersionSet permission on the version set.

  • Only conversations for which the user has the Conversation.GetConversation permission are returned.

Authorizations
Path parameters
organizationstringRequired
Query parameters
user_idany ofOptional

The identifier of the user whose conversations to retrieve.

string[]Optional
or
nullOptional
service_idany ofOptional

The identifier of the service whose conversation to retrieve.

string[]Optional
or
nullOptional
is_finishedany ofOptional

Whether the conversation is finished.

booleanOptional
or
nullOptional
idany ofOptional

The ID of the conversation to retrieve.

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

The maximum number of conversations to retrieve.

Default: 150
continuation_tokenintegerOptional

The continuation token returned from the previous response to retrieve the next set of conversations.

Default: 0
sort_bystring[]Optional

The field to sort the conversations by. Supported fields are created_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.
422
Invalid request path parameter or query parameter failed validation.
429
The user has exceeded the rate limit of 15 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
get
GET /v1/{organization}/conversation/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Accept: */*
{
  "conversations": [
    {
      "id": "text",
      "user_id": "text",
      "created_at": "2025-05-10T03:32:47.110Z",
      "is_finished": true,
      "is_analyzed": true,
      "completed_post_processings": [
        "generate-user-models"
      ],
      "final_message": "text",
      "service_id": "text",
      "version_set_info": {
        "name": "text",
        "agent_version_info": [],
        "service_hierarchical_state_machine_version_info": [],
        "llm_model_preferences": {
          "ANY_ADDITIONAL_PROPERTY": {
            "llm_name": "text",
            "top_p": 1,
            "temperature": 1,
            "top_k": 1
          }
        }
      },
      "num_messages": 1
    }
  ],
  "has_more": true,
  "continuation_token": 1
}

Create a conversation

post

Create a new conversation and start it. The user must not have any unfinished conversations that belong to the same service.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.CreateConversation for the new conversation.

  • Service.GetService on the specified service.

  • Service.GetVersionSet on the specified service version set.

  • Organization.GetAgent on the agent used by the specified service.

  • Organization.GetServiceHierarchicalStateMachine on the service hierarchical state machine used by the specified service as well as all its dependencies.

Authorizations
Path parameters
organizationstringRequired
Query parameters
response_formatstring · enumRequired

The format of the response that will be sent to the user.

Possible values:
emit_current_agent_action_eventbooleanOptional

Whether to emit CurrentAgentActionEvents.

Default: false
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
service_idstringRequired

The identifier of the service to create a conversation in.

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

The version set of the service to use. If not provided, the release version set is used.

Default: release
Responses
201
Succeeded. The response will be a stream of events in JSON format separated by newlines. The server will transmit an event as soon as one is available, so the client should respond to the events as soon as one arrives, and keep listening until the server closes the connection.
application/x-ndjson
Responseone of
or
or
or
or
400
Attempting to start a conversation when other unfinished conversations exist.
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization or service is not found.
422
Invalid request path parameteror request body failed validation.
429
The user has exceeded the rate limit of 5 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "service_id": "text",
  "service_version_set_name": "text"
}
{
  "type": "text",
  "conversation_id": "text"
}

Update an interaction feedback

post

Update an existing feedback in the interaction.

For feedbacks of type interaction_comment, if it is resolved, the comment cannot be changed.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.UpsertConversationFeedback on the feedback to be updated.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The ID of the conversation.

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

The ID of the interaction.

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

The ID of the feedback.

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
feedbackone ofRequired
or
Responses
204
Succeeded.
400
Cannot change the comment of a feedback that is resolved.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization, conversation, interaction, or feedback do not exist.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 40 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/feedback/{feedback_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 61

{
  "feedback": {
    "type": "text",
    "comment": "text",
    "resolved": true
  }
}

No content

Update the feedback for a conversation

post

Update the feedback for a conversation.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.UpsertConversationFeedback on the feedback to be upserted.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The ID of the conversation to update feedback for.

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

The ID of the feedback.

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
feedbackstring · min: 1Required

The feedback message.

Responses
204
Succeeded.
400
The feedback field must be set when creating a new feedback.
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization or conversation do not exist.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 10 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/{conversation_id}/feedback/{feedback_id} HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "feedback": "text"
}

No content

Create an interaction feedback

post

Create a new feedback for an interaction.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.UpsertInteractionFeedback on the feedback to be created.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The ID of the conversation.

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

The ID of the interaction.

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
feedbackone ofRequired
or
Responses
200
Succeeded.
application/json
401
Invalid authorization credentials.
403
Missing required permissions.
404
The specified organization, conversation, or interaction do not exist.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 40 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/feedback HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "feedback": {
    "type": "text",
    "comment": "text"
  }
}
{
  "interaction_feedback_id": "text"
}

Create a conversation feedback

post

Create a new feedback for the conversation.

Permissions

This endpoint requires the following permissions:

  • User.GetUserInfo on the authenticated user.

  • Conversation.UpsertConversationFeedback on the feedback to be created.

Authorizations
Path parameters
organizationstringRequired
conversation_idstringRequired

The ID of the conversation.

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
commentstring · min: 1Required

The comment for the conversation.

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

{
  "comment": "text"
}
{
  "conversation_feedback_id": "text"
}

Simulate an interaction

post

Re-run the specified interaction with the agent and state machine optionally overriden.

This endpoint does not completely recreate the context under which the interaction was initially run. For instance, the dynamic behaviors that are currently available are retrieved, not the ones that were available when the interaction was initially run.

Side effect states are skipped.

This endpoint does not persist any data. The original interaction isn't overwritten.

Permissions

This endpoint requires the following permissions:

  • User:GetUserInfo on the authenticated user.

  • Organization:GetAgent on the agent.

  • Organization:GetServiceHierarchicalStateMachine on the state machines used by the conversation as well as its dependencies.

  • Conversation:InteractWithConversation on the conversation.

Authorizations
Path parameters
conversation_idstringRequired

The ID of the conversation to simulate.

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

The ID of the interaction to simulate.

Pattern: ^[a-f0-9]{24}$
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
agent_version_overrideany ofOptional

If specified, the specified agent will be used to simulate the interaction.

or
nullOptional
state_machine_version_overrideany ofOptional
or
nullOptional
Responses
200
Succeeded.
application/json
400
A state machine override is specified, but it refers to another state machine that no longer exists.
401
Invalid authorization credentials.
403
Missing required permissions.
404
Specified organization, conversation, or interaction is not found.
422
Invalid request path parameter or request body failed validation.
429
The user has exceeded the rate limit of 15 requests per minute for this endpoint.
503
The service is going through temporary maintenance.
post
POST /v1/{organization}/conversation/{conversation_id}/interaction/{interaction_id}/simulate HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 911

{
  "agent_version_override": {
    "identity": {
      "name": "text",
      "role": "text",
      "developed_by": "text",
      "default_spoken_language": "text",
      "relationship_to_developer": {
        "ownership": "text",
        "type": "text",
        "conversation_visibility": "text",
        "thought_visibility": "text"
      }
    },
    "background": "text",
    "behaviors": [
      "text"
    ],
    "communication_patterns": [
      "text"
    ]
  },
  "state_machine_version_override": {
    "states": {
      "ANY_ADDITIONAL_PROPERTY": {
        "type": "text",
        "objective": "text",
        "actions": [
          "text"
        ],
        "intra_state_navigation_guidelines": [
          "text"
        ],
        "action_guidelines": [
          "text"
        ],
        "boundary_constraints": [
          "text"
        ],
        "exit_conditions": [
          {
            "description": "text",
            "next_state": "text"
          }
        ],
        "message_metadata": [
          "text"
        ]
      }
    },
    "new_user_initial_state": "text",
    "returning_user_initial_state": "text",
    "terminal_state": "text",
    "references": {
      "ANY_ADDITIONAL_PROPERTY": []
    },
    "global_intra_state_navigation_guidelines": [
      "text"
    ],
    "global_action_guidelines": [
      "text"
    ],
    "global_boundary_constraints": [
      "text"
    ]
  }
}
{
  "agent_message": "text",
  "conversation_ended": true
}