Dynamic Behaviors
Create trigger-based behavior sets that inject instructions or modify tool availability during conversations.
Manage organization-scoped, versioned sets of trigger-based behaviors that activate during conversations. This page documents the core API endpoints for creating, updating, and managing Dynamic Behavior Sets and their versions.
Overview
Dynamic Behavior Sets are versioned collections of trigger-action rules that activate during conversations when specific patterns are detected. Each set contains:
Conversation Triggers: natural-language descriptions of conversation patterns that activate the behavior, matched via semantic similarity.
Actions: operations performed when a trigger fires. Two action types are supported:
inject-instruction: injects additional instructions into the agent's context.change-tool-candidates: modifies the set of tools available to the agent.
Key Properties
Organization-scoped: each behavior set belongs to a single organization.
Versioned: each set maintains a version history. New versions are created with incremented version numbers.
Service-bound: behavior sets are applied to one or more services and activated via version sets.
Activatable: sets have an
is_activeflag that controls whether they are eligible for invocation.
How They Relate to Services
Dynamic Behavior Sets are applied to services through version sets. When a conversation is created with a specific version set, the platform evaluates the associated behavior sets' triggers against each user message. When a trigger matches, the corresponding actions run within that interaction.
For more on configuring version sets, see Version Sets & Promotion. For data access and table schemas, see Dynamic Behaviors Data Access.
Trigger Evaluation Flow
Typical Lifecycle
Create a behavior set with an initial version (name, triggers, actions).
Apply it to one or more services.
Test in a staging version set.
Activate the set (
is_active: true) and promote to release.Create new versions as triggers or actions evolve.
Query invocation history to verify trigger accuracy.
Rate Limits
Create a set
200 requests per minute
List sets
500 requests per minute
Search sets
50 requests per minute
Update a set
500 requests per minute
Delete a set
500 requests per minute
Get invocations
50 requests per minute
Create a version
200 requests per minute
Get versions
1000 requests per minute
Action Types
Inject Instruction
Adds or overrides the agent's instructions when a trigger fires.
type
string
Must be "inject-instruction"
instruction
string
The instruction text to inject
overrides_instructions
boolean
If true, replaces the state's original instruction. If false, appends to it.
Change Tool Candidates
Modifies the tools available to the agent when a trigger fires.
type
string
Must be "change-tool-candidates"
tool_call_specs
array
List of tool call specifications to add or replace
overrides_existing_tool_call_specs
boolean
If true, replaces existing tool specs. If false, adds to them.
Each entry in tool_call_specs requires all of the following fields:
tool_id
string
The ID of the tool
tool_name
string
An identifier of the tool displayed in the behavior set's description
version_constraint
string
A Python packaging version constraint for the tool
additional_instruction
string
Instruction supplied to the LLM in addition to the tool's description
audio_fillers
array
Audio fillers to play in audio mode if the tool is taking a long time
audio_filler_triggered_after
number
Seconds to wait before playing an audio filler
result_persistence
string
ephemeral, persisted-preferred, or persisted
Create a Dynamic Behavior Set
Create a new dynamic behavior set along with its initial version. The initial version defines the triggers and actions that will be active when the set is activated.
Response (201):
Create a new dynamic behavior set as well as its initial version.
Permissions
This endpoint requires the following permissions:
DynamicBehaviorInstruction:CreateDynamicBehaviorInstructionon the set to create.DynamicBehaviorInstruction:UpdateDynamicBehaviorInstructionon the set to create.
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 dynamic behavior set.
The services that the dynamic behavior set should be applied to.
Succeeded.
The ID of the newly created dynamic behavior set.
Invalid authorization credentials.
Missing required permissions.
The specified organization, service, or tool does not exist.
If the initial version is defined and is_active is set to True, an active dynamic behavior set with the same name already exists.
Invalid request path parameter or request body failed validation.
The user has exceeded the rate limit of 200 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/dynamic_behavior_set/ 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
{
"name": "text",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"applied_to_services": [
"text"
],
"initial_version": {
"is_active": true,
"conversation_triggers": [
"text"
],
"actions": [
{
"type": "text",
"instruction": "text",
"overrides_instructions": true
}
]
}
}{
"dynamic_behavior_set_id": "text"
}List Dynamic Behavior Sets
Retrieve dynamic behavior sets matching the given filters. Only sets the authenticated user has DynamicBehaviorInstruction:GetDynamicBehaviorInstruction permission for are returned.
Common filters:
id=<id>(repeatable): filter by specific IDsis_active=true|false: filter by active statusapplied_to_service=<service_id>(repeatable): filter by associated servicecreator=<org_id,user_id>(repeatable): filter by creatortag=key:value(repeatable;valuemay be*for any value, or empty for null)sort_by=+updated_at|-updated_at(repeatable)limit(0-50, default 50),continuation_token(int, default 0)
Retrieve dynamic behavior sets that match the given filters.
Permissions
This endpoint may be impacted by the following permissions:
- Only dynamic behavior sets that the authenticated user has
DynamicBehaviorInstruction:GetDynamicBehaviorInstructionpermission 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 dynamic behavior sets to retrieve.
[]The maximum number of dynamic behavior sets to return.
50The continuation token to use to retrieve the next set of dynamic behavior sets.
0Whether the dynamic behavior set is active.
The IDs of the services that the dynamic behavior set is applied to.
[]The creators of the dynamic behavior sets.
[]The tags of the dynamic behavior 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.
[]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 dynamic behavior sets to retrieve.
The continuation token to use to retrieve the next set of dynamic behavior sets.
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 500 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/dynamic_behavior_set/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"dynamic_behavior_sets": [
{
"id": "text",
"name": "text",
"is_active": true,
"applied_to_services": [
"text"
],
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"created_at": "2026-01-01T00:00:00.000Z",
"creator": {
"org_id": "text",
"user_id": "text"
},
"updated_at": "2026-01-01T00:00:00.000Z",
"updated_by": {
"org_id": "text",
"user_id": "text"
}
}
],
"has_more": true,
"continuation_token": 1,
"filter_values": {
"applied_to_services_ids": [
"text"
],
"creators": [
{
"org_id": "text",
"user_id": "text"
}
],
"tags": [
"text"
]
}
}Search Dynamic Behavior Sets
Search for dynamic behavior sets by text query. The query matches against set names and the triggers of the latest version. Returns the top 50 results sorted by relevance.
Search for dynamic behavior sets that match the given filters and contain the given query in its name and the triggers 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 may be impacted by the following permissions:
- Only dynamic behavior sets that the authenticated user has
DynamicBehaviorInstruction:GetDynamicBehaviorInstructionpermission 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 sets containing the terms in its name and the triggers of its latest version would be returned.
Whether the dynamic behavior set is active.
The IDs of the services that the dynamic behavior set is applied to.
[]The creators of the dynamic behavior sets. Each value must be of the format org_id,user_id.
[]The tags of the dynamic behavior 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.
[]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.
GET /v1/{organization}/dynamic_behavior_set/search?query=text HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"dynamic_behavior_sets": [
{
"id": "text",
"name": "text",
"is_active": true,
"applied_to_services": [
"text"
],
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"created_at": "2026-01-01T00:00:00.000Z",
"creator": {
"org_id": "text",
"user_id": "text"
},
"updated_at": "2026-01-01T00:00:00.000Z",
"updated_by": {
"org_id": "text",
"user_id": "text"
}
}
]
}Update a Dynamic Behavior Set
Update a dynamic behavior set's metadata, service associations, or active status. All fields are optional; only provided fields are updated.
Update a dynamic behavior set.
Permissions
This endpoint requires the following permissions:
DynamicBehaviorInstruction:UpdateDynamicBehaviorInstructionon the dynamic behavior set to update.
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 dynamic behavior set 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.
[]The name of the dynamic behavior set.
The services that the dynamic behavior set should be applied to.
Whether the dynamic behavior set is active.
Succeeded.
No content
Invalid authorization credentials.
Missing required permissions.
The specified organization, dynamic behavior set, or service does not exist.
Another active set with the same 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.
POST /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_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: 105
{
"name": "text",
"tags": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"applied_to_services": [
"text"
],
"is_active": true
}No content
Delete a Dynamic Behavior Set
Permanently delete a dynamic behavior set.
Delete a dynamic behavior instruction
Delete a dynamic behavior set.
Permissions
This endpoint requires the following permissions:
DynamicBehaviorInstruction:DeleteDynamicBehaviorInstructionon the dynamic behavior set 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 dynamic behavior set 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.
Invalid authorization credentials.
Missing required permissions.
The specified organization or dynamic behavior set 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.
DELETE /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
No content
Get Invocations
Retrieve the invocation history for a dynamic behavior set: a record of when and where the behavior's triggers fired during conversations. This is useful for verifying trigger accuracy and auditing activation frequency.
Common filters:
limit(1-30, default 30)continuation_token(int, default 0)sort_by=+invoked_at|-invoked_at(repeatable)
Get dynamic behavior invocations
Retrieve the dynamic behavior invocations for a dynamic behavior set.
Permissions
This endpoint requires the following permissions:
DynamicBehaviorInstruction:GetDynamicBehaviorInstructionfor the dynamic behavior set.
This endpoint is impacted by the following permissions:
- Only invocations from messages that the authenticated user has the
Conversation:GetMessagepermission for are returned.
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 dynamic behavior set.
^[a-f0-9]{24}$The maximum number of dynamic behavior invocations to return.
30The continuation token from the previous request used to retrieve the next page of dynamic behavior invocations.
0The fields to sort the versions by. Supported fields are invoked_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 dynamic behavior invocations to retrieve.
A token to supply to the next request to retrieve the next page of dynamic behavior invocations. Only populated if has_more is True.
Invalid authorization credentials.
Missing required permissions.
Specified organization or dynamic behavior set 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.
GET /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/invocation/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"dynamic_behavior_invocations": [
{
"_id": "text",
"org_id": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"conversation_id": "text",
"service_id": "text",
"user_id": "text",
"initial_message_id": "text",
"agent_message_id": "text",
"agent_inner_thoughts_ids": [
"text"
],
"dynamic_behavior_set_version_info": [],
"invoked_at": "2026-01-01T00:00:00.000Z",
"external_event_message_ids": [
"text"
]
}
],
"has_more": true,
"continuation_token": 1
}Create a Version
Create a new version of an existing dynamic behavior set. Each version defines a complete set of triggers and actions. Version numbers are automatically incremented.
Response (201):
Create a new version of a dynamic behavior set.
Create a new version of the given dynamic behavior set.
Permissions
This endpoint requires the following permissions:
DynamicBehaviorInstruction:UpdateDynamicBehaviorInstructionon the dynamic behavior set to create a new version for.
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 dynamic behavior set to delete.
^[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 conversation triggers for the dynamic behavior set version.
Succeeded.
The version number of the new version.
The specified version number is not the expected next version to be created.
Invalid authorization credentials.
Missing required permissions.
The specified organization, dynamic behavior set, or tool does not exist.
Invalid request path parameter, request query parameter, or request body failed validation.
The user has exceeded the rate limit of 200 requests per minute for this endpoint.
The service is going through temporary maintenance.
POST /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/version/ 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: 113
{
"conversation_triggers": [
"text"
],
"actions": [
{
"type": "text",
"instruction": "text",
"overrides_instructions": true
}
]
}{
"new_version_number": 1
}Get Versions
Retrieve the version history for a dynamic behavior set.
Common filters:
version=<constraint>: exact version number,"latest"for the most recent, or an inclusive range of version numbers separated by-(for example2-5)limit(1-10, default 10)continuation_token(int, default 0)sort_by=+version|-version(repeatable)
Get dynamic behavior set versions
Get the versions of a dynamic behavior set.
Permissions
This endpoint requires the following permissions:
DynamicBehaviorInstruction:GetDynamicBehaviorInstructionfor the dynamic behavior set to retrieve.
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 dynamic behavior set.
^[a-f0-9]{24}$The versions of the dynamic behavior set 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 dynamic behavior set versions to return.
10The continuation token from the previous request used to retrieve the next page of dynamic behavior set versions.
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 dynamic behavior set versions to retrieve.
A token to supply to the next request to retrieve the next page of dynamic behavior set versions. Only populated if has_more is True.
Invalid authorization credentials.
Missing required permissions.
Specified organization or dynamic behavior set is not found.
Invalid request path parameter or request query parameter failed validation.
The user has exceeded the rate limit of 1000 requests per minute for this endpoint.
The service is going through temporary maintenance.
GET /v1/{organization}/dynamic_behavior_set/{dynamic_behavior_set_id}/version/ HTTP/1.1
Host: api.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
X-ORG-ID: YOUR_API_KEY
Accept: */*
{
"dynamic_behavior_set_versions": [
{
"_id": "text",
"org_id": "text",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"dynamic_behavior_set_id": "text",
"version": 1,
"conversation_triggers": [
"text"
],
"actions": [
{
"type": "text",
"instruction": "text",
"overrides_instructions": true
}
],
"creator": {
"org_id": "text",
"user_id": "text"
}
}
],
"has_more": true,
"continuation_token": 1
}Related
Classic API -> Services (version sets and behavior application)
Best Practices → Version Sets & Promotion
Data Access → Dynamic Behaviors Tables
Getting Started → Authentication
Last updated
Was this helpful?

