{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-src-app-endpoints-dynamic-behavior-set-get-dynamic-behavior-set-versions-response-schema.json",
  "title": "Response",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-dynamic-behavior-set-api-openapi.yml#/components/schemas/src__app__endpoints__dynamic_behavior_set__get_dynamic_behavior_set_versions__Response",
  "properties": {
    "dynamic_behavior_set_versions": {
      "items": {
        "$ref": "#/$defs/DynamicBehaviorSetVersion"
      },
      "type": "array",
      "title": "Dynamic Behavior Set Versions",
      "description": "The retrieved dynamic behavior set versions."
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "Whether there are more dynamic behavior set versions to retrieve."
    },
    "continuation_token": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Continuation Token",
      "description": "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`."
    }
  },
  "type": "object",
  "required": [
    "dynamic_behavior_set_versions",
    "has_more",
    "continuation_token"
  ],
  "$defs": {
    "ChangeToolCandidatesAction-Output": {
      "properties": {
        "type": {
          "type": "string",
          "const": "change-tool-candidates",
          "title": "Type"
        },
        "tool_call_specs": {
          "items": {
            "$ref": "#/$defs/amigo_lib__mongo__collections__dynamic_behavior_set_version__DynamicBehaviorSetVersion__ChangeToolCandidatesAction__ToolCallSpec"
          },
          "type": "array",
          "title": "Tool Call Specs",
          "description": "Additional tool call specs that will be made available to LLMs."
        },
        "overrides_existing_tool_call_specs": {
          "type": "boolean",
          "title": "Overrides Existing Tool Call Specs",
          "description": "During injection, whether the existing tool call specs are overriden with these new specs."
        }
      },
      "type": "object",
      "required": [
        "type",
        "tool_call_specs",
        "overrides_existing_tool_call_specs"
      ],
      "title": "ChangeToolCandidatesAction"
    },
    "DynamicBehaviorSetVersion": {
      "properties": {
        "_id": {
          "type": "string",
          "title": "Id",
          "description": "The ID of the document."
        },
        "org_id": {
          "type": "string",
          "title": "Org Id",
          "description": "The ID of the organization."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        },
        "dynamic_behavior_set_id": {
          "type": "string",
          "title": "Dynamic Behavior Set Id"
        },
        "version": {
          "type": "integer",
          "title": "Version"
        },
        "conversation_triggers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Conversation Triggers"
        },
        "actions": {
          "items": {
            "$ref": "#/$defs/amigo_lib__mongo__collections__dynamic_behavior_set_version__Action"
          },
          "type": "array",
          "title": "Actions"
        },
        "creator": {
          "$ref": "#/$defs/amigo_lib__mongo__collections__dynamic_behavior_set_version__DynamicBehaviorSetVersion__UserInfo",
          "description": "The user who created this version of the dynamic behavior set."
        }
      },
      "type": "object",
      "required": [
        "_id",
        "org_id",
        "dynamic_behavior_set_id",
        "version",
        "conversation_triggers",
        "actions",
        "creator"
      ],
      "title": "DynamicBehaviorSetVersion"
    },
    "InjectInstructionAction-Output": {
      "properties": {
        "type": {
          "type": "string",
          "const": "inject-instruction",
          "title": "Type"
        },
        "instruction": {
          "type": "string",
          "title": "Instruction"
        },
        "overrides_instructions": {
          "type": "boolean",
          "title": "Overrides Instructions",
          "description": "During injection, whether the original instruction of the state is overriden with this instruction."
        }
      },
      "type": "object",
      "required": [
        "type",
        "instruction",
        "overrides_instructions"
      ],
      "title": "InjectInstructionAction"
    },
    "ResultPersistence": {
      "type": "string",
      "enum": [
        "ephemeral",
        "persisted-preferred",
        "persisted"
      ]
    },
    "amigo_lib__mongo__collections__dynamic_behavior_set_version__Action": {
      "oneOf": [
        {
          "$ref": "#/$defs/InjectInstructionAction-Output"
        },
        {
          "$ref": "#/$defs/ChangeToolCandidatesAction-Output"
        }
      ]
    },
    "amigo_lib__mongo__collections__dynamic_behavior_set_version__DynamicBehaviorSetVersion__ChangeToolCandidatesAction__ToolCallSpec": {
      "properties": {
        "tool_id": {
          "type": "string",
          "title": "Tool Id",
          "description": "The ID of the tool."
        },
        "version_constraint": {
          "type": "string",
          "title": "Version Constraint",
          "description": "A [Python packaging version constraint](https://packaging.python.org/en/latest/specifications/version-specifiers/#id5) of the tool."
        },
        "additional_instruction": {
          "type": "string",
          "title": "Additional Instruction",
          "description": "Additional instruction to be supplied to the LLM in addition to the tool's description."
        },
        "audio_fillers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Audio Fillers",
          "description": "A list of audio fillers to play in audio mode if the tool is taking a long time."
        },
        "audio_filler_triggered_after": {
          "type": "number",
          "title": "Audio Filler Triggered After",
          "description": "The number of seconds to wait before playing an audio filler."
        },
        "result_persistence": {
          "$ref": "#/$defs/ResultPersistence",
          "description": "The type of result persistence for this tool call.\n\n- If `ephemeral`, the result of the tool call is only provided to the current LLM interaction. Any future LLM interactions will not see this tool result.\n- If `persisted-preferred`, the result of the tool call is reflected in all future LLM interactions if it's less than 5000 characters long. Otherwise, it's only visible in the current LLM interaction.\n- If `persisted`, the result of the tool call is reflected in all future LLM interactions, unless it's more than 5000 characters long, in which case an error is thrown."
        },
        "tool_name": {
          "type": "string",
          "title": "Tool Name",
          "description": "An identifier of the tool that will be displayed in the description of this dynamic behavior set. This could be simply the name of the tool, or one augmented with\nthe context of the dynamic behavior."
        }
      },
      "type": "object",
      "required": [
        "tool_id",
        "version_constraint",
        "additional_instruction",
        "audio_fillers",
        "audio_filler_triggered_after",
        "result_persistence",
        "tool_name"
      ],
      "title": "ToolCallSpec"
    },
    "amigo_lib__mongo__collections__dynamic_behavior_set_version__DynamicBehaviorSetVersion__UserInfo": {
      "properties": {
        "org_id": {
          "type": "string",
          "title": "Org Id"
        },
        "user_id": {
          "type": "string",
          "title": "User Id"
        }
      },
      "type": "object",
      "required": [
        "org_id",
        "user_id"
      ],
      "title": "UserInfo"
    }
  }
}