openapi: 3.1.0 info: title: Amigo Account Agent Definitions API version: 0.1.0 servers: - url: https://api.amigo.ai - url: https://internal-api.amigo.ai - url: https://api-eu-central-1.amigo.ai - url: https://api-ap-southeast-2.amigo.ai - url: https://api-ca-central-1.amigo.ai security: - Bearer-Authorization: [] Bearer-Authorization-Organization: [] Basic: [] tags: - name: Agent Definitions paths: /v1/{workspace_id}/agent-definitions: post: tags: - Agent Definitions summary: Register Agent Definition operationId: register_agent_definition_v1__workspace_id__agent_definitions_post requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RegisterAgentDefinitionRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/RegisterAgentDefinitionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id get: tags: - Agent Definitions summary: List Agent Definitions operationId: list_agent_definitions_v1__workspace_id__agent_definitions_get parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id - name: framework in: query required: false schema: anyOf: - enum: - claude-agent-sdk - openai-agents type: string - type: 'null' title: Framework - name: include_archived in: query required: false schema: type: boolean default: false title: Include Archived - name: limit in: query required: false schema: type: integer maximum: 200 exclusiveMinimum: 0 default: 50 title: Limit - name: continuation_token in: query required: false schema: title: Continuation Token responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentDefinitionListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/{workspace_id}/agent-definitions/validate: post: tags: - Agent Definitions summary: Validate Agent Definition description: 'Dry-run clamp validation — nothing is stored. 422 with the offending paths on failure (the same shape push returns).' operationId: validate_agent_definition_v1__workspace_id__agent_definitions_validate_post requestBody: content: application/json: schema: $ref: '#/components/schemas/RegisterAgentDefinitionRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ValidateAgentDefinitionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id /v1/{workspace_id}/agent-definitions/{definition_id}: get: tags: - Agent Definitions summary: Get Agent Definition operationId: get_agent_definition_v1__workspace_id__agent_definitions__definition_id__get parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id - name: definition_id in: path required: true schema: type: string format: uuid title: Definition Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentDefinitionDetail' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Agent Definitions summary: Archive Agent Definition operationId: archive_agent_definition_v1__workspace_id__agent_definitions__definition_id__delete parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id - name: definition_id in: path required: true schema: type: string format: uuid title: Definition Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/{workspace_id}/agent-definitions/{definition_id}/versions/{version}: get: tags: - Agent Definitions summary: Get Agent Definition Version operationId: get_agent_definition_version_v1__workspace_id__agent_definitions__definition_id__versions__version__get parameters: - name: workspace_id in: path required: true schema: type: string format: uuid title: Workspace Id - name: definition_id in: path required: true schema: type: string format: uuid title: Definition Id - name: version in: path required: true schema: type: integer title: Version responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgentDefinitionVersionDetail' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError RegisterAgentDefinitionRequest: properties: name: $ref: '#/components/schemas/SlugString' description: Stable slug identifying this definition within the workspace. body: additionalProperties: true type: object title: Body description: The framework-native definition document (its 'framework' field selects the shape). Validated by the platform clamp schema — a non-whitelisted field is rejected. type: object required: - name - body title: RegisterAgentDefinitionRequest AgentDefinitionDetail: properties: definition_id: type: string format: uuid title: Definition Id name: type: string title: Name framework: type: string enum: - claude-agent-sdk - openai-agents title: Framework status: type: string enum: - active - archived title: Status versions: items: $ref: '#/components/schemas/AgentDefinitionVersionMeta' type: array title: Versions type: object required: - definition_id - name - framework - status - versions title: AgentDefinitionDetail SlugString: type: string maxLength: 63 minLength: 2 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$ AgentDefinitionListResponse: properties: items: items: $ref: '#/components/schemas/AgentDefinitionSummary' type: array title: Items has_more: type: boolean title: Has More continuation_token: title: Continuation Token type: object required: - items - has_more title: AgentDefinitionListResponse AgentDefinitionSummary: properties: definition_id: type: string format: uuid title: Definition Id name: type: string title: Name framework: type: string enum: - claude-agent-sdk - openai-agents title: Framework status: type: string enum: - active - archived title: Status type: object required: - definition_id - name - framework - status title: AgentDefinitionSummary ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError ValidateAgentDefinitionResponse: properties: valid: type: boolean const: true title: Valid framework: type: string enum: - claude-agent-sdk - openai-agents title: Framework has_write_tools: type: boolean title: Has Write Tools agent_count: type: integer title: Agent Count type: object required: - valid - framework - has_write_tools - agent_count title: ValidateAgentDefinitionResponse AgentDefinitionVersionMeta: properties: version: type: integer title: Version body_sha256: type: string title: Body Sha256 validator_rev: type: string title: Validator Rev has_write_tools: type: boolean title: Has Write Tools agent_count: type: integer title: Agent Count type: object required: - version - body_sha256 - validator_rev - has_write_tools - agent_count title: AgentDefinitionVersionMeta AgentDefinitionVersionDetail: properties: version: type: integer title: Version body_sha256: type: string title: Body Sha256 validator_rev: type: string title: Validator Rev has_write_tools: type: boolean title: Has Write Tools agent_count: type: integer title: Agent Count definition_id: type: string format: uuid title: Definition Id framework: type: string enum: - claude-agent-sdk - openai-agents title: Framework body: additionalProperties: true type: object title: Body type: object required: - version - body_sha256 - validator_rev - has_write_tools - agent_count - definition_id - framework - body title: AgentDefinitionVersionDetail RegisterAgentDefinitionResponse: properties: definition_id: type: string format: uuid title: Definition Id version: type: integer title: Version created: type: boolean title: Created description: False when an identical body was already registered (idempotent push). framework: type: string enum: - claude-agent-sdk - openai-agents title: Framework has_write_tools: type: boolean title: Has Write Tools agent_count: type: integer title: Agent Count body_sha256: type: string title: Body Sha256 type: object required: - definition_id - version - created - framework - has_write_tools - agent_count - body_sha256 title: RegisterAgentDefinitionResponse securitySchemes: Bearer-Authorization: type: http scheme: bearer bearerFormat: JWT description: Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the [`SignInWithAPIKey`](sign-in-with-api-key) endpoint. Bearer-Authorization-Organization: type: apiKey in: header name: X-ORG-ID description: 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. Basic: type: http scheme: basic description: The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.