For the complete documentation index, see llms.txt. This page is also available as Markdown.

Services

Discover, create, and manage services with version sets, dynamic behaviors, and deployment routing.

Discover, create, and manage the services that users converse with. A service pairs an agent with a context graph under a single service ID, and version sets control which versions of each are deployed to each environment.

Understanding Amigo Services

Your integration may include multiple service types, each designed for specific interaction scenarios:

  • Meet & Greet: optimized for new user onboarding

  • Adaptive Support: designed for returning user support

Each service has a unique service ID that you reference when creating conversations. Services are configured with Context Graphs (the API may call these "state machines") that define how agents navigate problem spaces. Learn more about Context Graphs in the Conceptual Documentation.

For enterprise voice and EHR workflows, see Platform API: Services.

Services can be connected in a workflow (for example, Meet & Greet leading to Adaptive Support), but you still start each conversation with the correct service ID so the user lands in the right experience.

Service Routing Flow

Retrieving Available Services

To discover all available services for your organization:

Note: Async version also available with async with AsyncAmigoClient()

The response contains the matching services alongside pagination fields (has_more, continuation_token) and, on the first page, filter_values listing the dynamic filter values available.

Get services

get
/v1/{organization}/service/

Retrieve a list of services in this organization.

Permissions

This endpoint is impacted by the following permissions:

  • Only services that the authenticated user has the Service:GetService permission for are returned.
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
Query parameters
idstring[]Optional

The IDs of the services to retrieve.

Default: []
is_activeboolean · nullableOptional

Whether the service is active.

sort_bystring[]Optional

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

Default: []
tagsstring[]Optional

The tags to filter the services by. Must be specified using the syntax key:value, which means to match all services 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: []
limitinteger · max: 20Optional

The maximum number of services to return.

Default: 10
continuation_tokenintegerOptional

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

Default: 0
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
200

Succeeded.

application/json
has_morebooleanRequired

Whether there are more services to retrieve.

continuation_tokeninteger · nullableRequired

A token to supply to the next request to retrieve the next page of services. Only populated if has_more is True.

get/v1/{organization}/service/
GET /v1/{organization}/service/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
  "services": [
    {
      "id": "text",
      "name": "text",
      "version_sets": {
        "ANY_ADDITIONAL_PROPERTY": {
          "agent_version_number": 1,
          "service_hierarchical_state_machine_version_number": 1,
          "llm_model_preferences": {
            "ANY_ADDITIONAL_PROPERTY": {
              "llm_name": "text",
              "params": {
                "ANY_ADDITIONAL_PROPERTY": "anything"
              }
            }
          }
        }
      },
      "description": "text",
      "is_active": true,
      "service_hierarchical_state_machine_id": "text",
      "agent_id": "text",
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "keyterms": [
        "text"
      ],
      "creator": {
        "org_id": "text",
        "user_id": "text"
      },
      "updated_by": {
        "org_id": "text",
        "user_id": "text"
      }
    }
  ],
  "has_more": true,
  "continuation_token": 1,
  "filter_values": {
    "tags": [
      "text"
    ]
  }
}

Create a Service

Create a new service that pairs an agent with a context graph. The new service automatically gets an edge version set that tracks the latest agent and context graph versions with no LLM model preference, plus a release version set that equals the request's release_version_set if specified, or edge otherwise. Creating an active service fails if an active service with the same name already exists.

Note: Async version also available with async with AsyncAmigoClient()

The response will contain the ID of the created service:

Create a service

post
/v1/{organization}/service/

Create a new service. Depending on whether an active service with the same name already exists, the endpoint behaves differently:

  • If is_active is False, creates an inactive new service.
  • If is_active is True and no active service with the given name exists, creates a new active service.
  • If is_active is True and an active service with the given name exists, this endpoint throws an error.

The new service will automatically contain an edge version set that uses the latest Agent and ServiceHierarchicalStateMachine versions with no LLM model preference. It will also create a release version set, that will equal to what's specified in the request if the release_version_set is specified, or equal to edge if not.

Permissions

This endpoint requires the following permissions:

  • Service:CreateService for the service to create.
  • Service:CreateVersionSet for the edge and release version sets.
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
service_hierarchical_state_machine_idstringRequired

The ID of the state machine that this service uses.

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

The ID of the agent that this service uses.

Pattern: ^[a-f0-9]{24}$
namestring · min: 1Required

The name of this service.

descriptionstring · min: 1Required

A description of this service.

is_activebooleanRequired

Whether the newly-created service is active. Only active services are visible to users on the dashboard. You can later adjust the activeness of this service.

keytermsstring[] · max: 20Required

A list of keyterms that are easy to get wrong during audio transcriptions that tend to occur commonly in audio sessions using this service.

Responses
201

Succeeded.

application/json
idstringRequired

The ID of the newly created service.

post/v1/{organization}/service/
POST /v1/{organization}/service/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 424

{
  "service_hierarchical_state_machine_id": "text",
  "agent_id": "text",
  "name": "text",
  "description": "text",
  "is_active": true,
  "release_version_set": {
    "agent_version_number": 1,
    "service_hierarchical_state_machine_version_number": 1,
    "llm_model_preferences": {
      "ANY_ADDITIONAL_PROPERTY": {
        "llm_name": "openai_gpt-4.1-2025-04-14",
        "params": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      }
    }
  },
  "keyterms": [
    "text"
  ],
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "id": "text"
}

Update a Service

Update a service's fields: name, description, is_active, agent_id, service_hierarchical_state_machine_id, tags, and keyterms. Only the fields you provide (non-null) are updated.

Note: Async version also available with async with AsyncAmigoClient()

Deactivating a service (is_active: false) returns an error if the service is used in a simulation unit test. Activating a service fails if another active service already has the same name.

Update a service

post
/v1/{organization}/service/{service_id}/

Update fields about a service.

Permissions

This endpoint requires the following permissions:

  • Service:UpdateService for the service.
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
service_idstringRequired

The identifier of the service to update.

Pattern: ^[a-f0-9]{24}$
organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
namestring · min: 1 · nullableOptional

The name of the service. Only updated if not-null.

descriptionstring · min: 1 · nullableOptional

A description of this Service. Only updates if not-null.

is_activeboolean · nullableOptional

The activeness of the service. Only updated if not-null.

If set to True and the service is currently inactive, no other service with the same name can be active.

If set to False and the service is currently active, it is deactivated. This will error if the service is used in a simulation unit test.

agent_idstring · nullableOptional

The ID of the agent that this service uses. Only updated if not-null.

Pattern: ^[a-f0-9]{24}$
service_hierarchical_state_machine_idstring · nullableOptional

The ID of the service hierarchical state machine that this service uses. Only updated if not-null.

Pattern: ^[a-f0-9]{24}$
keytermsstring[] · max: 20 · nullableOptional

A list of keyterms that are easy to get wrong during audio transcriptions that tend to occur commonly in audio sessions using this service. Only updated if not-null.

Responses
200

Succeeded.

application/json
anyOptional
post/v1/{organization}/service/{service_id}/
POST /v1/{organization}/service/{service_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 180

{
  "name": "text",
  "description": "text",
  "is_active": true,
  "agent_id": "text",
  "service_hierarchical_state_machine_id": "text",
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "keyterms": [
    "text"
  ]
}

No content

Service Mapping Best Practices

Service Versioning with Version Sets

Services use version sets to manage deployments across different environments. Each service can have multiple version sets (for example, "release", "staging", "dev"), so you can test and promote changes without modifying the service ID.

What are Version Sets?

A version set is a named configuration that pins version numbers for the agent and context graph the service already references (agent_id and service_hierarchical_state_machine_id live on the service itself):

  • Agent version (agent_version_number; null selects the latest agent version)

  • Context Graph version (service_hierarchical_state_machine_version_number; null selects the latest version)

  • LLM Model Preferences (llm_model_preferences, model configuration for this deployment)

This enables safe, controlled deployment:

Using Version Sets

When creating conversations, specify the version set:

  • service_version_set_name: the version set to use (typically "release" for production)

  • service_id: the unique identifier for the service

Example:

This approach gives you:

  • Stable production through the "release" version set

  • Safe testing through "staging" or "dev" version sets

  • Zero-downtime deployments by updating version sets without changing service_id

  • Easy rollback by reverting version set configurations

For more on managing version sets and promotion workflows, see Version Sets Best Practices.

Dynamic Behaviors

Services can be extended with Dynamic Behaviors: reusable, versioned, trigger-based rules that inject instructions or modify tool availability when specific conversation patterns are detected. Behavior sets attach at the service level through the behavior set's own applied-services list and active flag, managed through the dynamic behavior set endpoints - they are not part of a service's version sets, so they cannot be staged per version set. See the endpoint reference for creating, versioning, and monitoring behavior sets:

Reading Version Sets

There is no standalone read endpoint for a single version set. Version sets are returned on the service object - list services and read the version_sets map on the service you care about:

Upsert a Version Set

Create or update a version set for a service. This is an idempotent operation: if the version set already exists it is updated; otherwise it is created.

The request body wraps a single version_set object with three required keys: agent_version_number, service_hierarchical_state_machine_version_number (either can be null to select the latest version), and llm_model_preferences.

Note: Async version also available with async with AsyncAmigoClient()

Upsert a service version set

put
/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/

Upsert a version set for the specified service. Replace the existing version set with the same name if any, or create a new one.

Note that the edge version set cannot be updated.

Permissions

This endpoint may require the following permissions:

  • Service:CreateVersionSet if the version set does not exist.
  • Service:UpdateVersionSet if the version set already exists.
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
service_idstringRequired

Identifier of the service.

Pattern: ^[a-f0-9]{24}$
version_set_namestring · min: 1 · max: 40Required

Name of the version set to upsert.

Pattern: ^[A-Za-z0-9_-]+$
organizationstringRequired
Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Body
Responses
204

Succeeded.

No content

put/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/
PUT /v1/{organization}/service/{service_id}/version_sets/{version_set_name}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 237

{
  "version_set": {
    "agent_version_number": 1,
    "service_hierarchical_state_machine_version_number": 1,
    "llm_model_preferences": {
      "ANY_ADDITIONAL_PROPERTY": {
        "llm_name": "openai_gpt-4.1-2025-04-14",
        "params": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      }
    }
  }
}

No content

Delete a Version Set

Remove a version set from a service. This operation cannot be undone. The request returns an error if the version set is used in any simulation unit tests.

Note: Async version also available with async with AsyncAmigoClient()

Delete a service version set

delete
/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/

Delete the given verion set from the given service.

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

Permissions

This endpoint requires the following permissions:

  • Service:DeleteVersionSet for the version set.
Authorizations
AuthorizationstringRequired

The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.

AuthorizationstringRequired

Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the SignInWithAPIKey endpoint.

X-ORG-IDstringRequired

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.

Path parameters
organizationstringRequired
service_idstringRequired

Identifier of the service.

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

Name of the version set.

Header parameters
x-mongo-cluster-namestring · nullableOptional

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.

Sec-WebSocket-Protocolstring[]OptionalDefault: []
Responses
204

Succeeded.

No content

delete/v1/{organization}/service/{service_id}/version_sets/{version_set_name}/
DELETE /v1/{organization}/service/{service_id}/version_sets/{version_set_name}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?