Amigo Agents API
The Agents API from Amigo — 4 operation(s) for agents.
The Agents API from Amigo — 4 operation(s) for agents.
openapi: 3.1.0
info:
title: Amigo Account Agents 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: Agents
paths:
/v1/{workspace_id}/agents:
post:
tags:
- Agents
summary: Create an agent
description: Create a new agent in a workspace. Requires `Agent.create` permission.
operationId: create-agent
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAgentRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentResponse'
'404':
description: Not found.
'409':
description: Name already taken.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Invalid request body.
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
get:
tags:
- Agents
summary: List agents
description: List agents in a workspace with pagination. Requires `Agent.view` permission.
operationId: list-agents
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: search
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/SearchString'
- type: 'null'
title: Search
- name: sort_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sort By
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
exclusiveMinimum: 0
default: 10
title: Limit
- name: continuation_token
in: query
required: false
schema:
type: integer
default: 0
title: Continuation Token
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse_AgentResponse_'
'404':
description: Not found.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/agents/{agent_id}:
get:
tags:
- Agents
summary: Get an agent
description: Retrieve an agent by ID. Requires `Agent.view` permission.
operationId: get-agent
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: agent_id
in: path
required: true
schema:
type: string
format: uuid
title: Agent Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentResponse'
'404':
description: Not found.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- Agents
summary: Update an agent
description: Update an agent's name or description. Requires `Agent.update` permission.
operationId: update-agent
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: agent_id
in: path
required: true
schema:
type: string
format: uuid
title: Agent Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAgentRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentResponse'
'404':
description: Not found.
'409':
description: Name already taken.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Invalid request body.
delete:
tags:
- Agents
summary: Delete an agent
description: Delete an agent. Agent versions are retained. Requires `Agent.delete` permission.
operationId: delete-agent
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: agent_id
in: path
required: true
schema:
type: string
format: uuid
title: Agent Id
responses:
'204':
description: Successful Response
'404':
description: Not found.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/agents/{agent_id}/versions:
post:
tags:
- Agents
summary: Create an agent version
description: Create a new version of an agent. Version number is auto-incremented. Requires `Agent.create` permission for the first version and `Agent.update` permission afterward.
operationId: create-agent-version
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: agent_id
in: path
required: true
schema:
type: string
format: uuid
title: Agent Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAgentVersionRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentVersionResponse'
'404':
description: Not found.
'409':
description: Name already taken.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Invalid request body.
get:
tags:
- Agents
summary: List agent versions
description: List versions of an agent with pagination. Requires `Agent.view` permission.
operationId: list-agent-versions
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: agent_id
in: path
required: true
schema:
type: string
format: uuid
title: Agent Id
- name: sort_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Sort By
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
exclusiveMinimum: 0
default: 10
title: Limit
- name: continuation_token
in: query
required: false
schema:
type: integer
default: 0
title: Continuation Token
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse_AgentVersionResponse_'
'404':
description: Not found.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/agents/{agent_id}/versions/{version}:
get:
tags:
- Agents
summary: Get an agent version
description: Retrieve a specific agent version by number, or 'latest'. Requires `Agent.view` permission.
operationId: get-agent-version
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: agent_id
in: path
required: true
schema:
type: string
format: uuid
title: Agent Id
- name: version
in: path
required: true
schema:
anyOf:
- type: integer
- type: string
title: Version
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgentVersionResponse'
'404':
description: Not found.
'403':
description: Insufficient permissions.
'401':
description: Missing or invalid API key.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
BackgroundString:
type: string
maxLength: 10000
PaginatedResponse_AgentVersionResponse_:
properties:
items:
items:
$ref: '#/components/schemas/AgentVersionResponse'
type: array
title: Items
has_more:
type: boolean
title: Has More
continuation_token:
anyOf:
- type: integer
- type: 'null'
title: Continuation Token
total:
anyOf:
- type: integer
- type: 'null'
title: Total
type: object
required:
- items
- has_more
title: PaginatedResponse[AgentVersionResponse]
NameString:
type: string
maxLength: 256
minLength: 1
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
VoiceConfig:
properties:
voice_id:
type: string
title: Voice Id
stability:
type: number
title: Stability
default: 0
similarity_boost:
type: number
title: Similarity Boost
default: 0
style:
type: number
title: Style
default: 0
tts_provider:
anyOf:
- type: string
enum:
- cartesia
- elevenlabs
- groq
- type: 'null'
title: Tts Provider
tts_config:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Tts Config
language_providers:
anyOf:
- additionalProperties:
$ref: '#/components/schemas/LanguageProviderEntry'
type: object
maxProperties: 10
- type: 'null'
title: Language Providers
session_provider:
anyOf:
- type: string
enum:
- amigo
- gpt_realtime
- gpt_live
- type: 'null'
title: Session Provider
type: object
required:
- voice_id
title: VoiceConfig
CreateAgentVersionRequest:
properties:
name:
$ref: '#/components/schemas/NameString'
initials:
type: string
maxLength: 10
title: Initials
default: ''
identity:
$ref: '#/components/schemas/Identity'
voice_config:
anyOf:
- $ref: '#/components/schemas/VoiceConfig'
- type: 'null'
background:
$ref: '#/components/schemas/BackgroundString'
default: ''
behaviors:
items:
type: string
maxLength: 2000
type: array
maxItems: 200
title: Behaviors
communication_patterns:
items:
type: string
maxLength: 2000
type: array
maxItems: 200
title: Communication Patterns
type: object
required:
- name
- identity
title: CreateAgentVersionRequest
AgentVersionResponse:
properties:
id:
type: string
format: uuid
title: Id
workspace_id:
type: string
format: uuid
title: Workspace Id
agent_id:
type: string
format: uuid
title: Agent Id
version:
type: integer
title: Version
name:
type: string
title: Name
initials:
type: string
title: Initials
identity:
$ref: '#/components/schemas/Identity'
voice_config:
anyOf:
- $ref: '#/components/schemas/VoiceConfig'
- type: 'null'
background:
type: string
title: Background
behaviors:
items:
type: string
type: array
title: Behaviors
communication_patterns:
items:
type: string
type: array
title: Communication Patterns
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
type: object
required:
- id
- workspace_id
- agent_id
- version
- name
- initials
- identity
- voice_config
- background
- behaviors
- communication_patterns
- created_at
- updated_at
title: AgentVersionResponse
SearchString:
type: string
maxLength: 200
minLength: 1
RelationshipToDeveloper:
properties:
ownership:
type: string
title: Ownership
type:
type: string
title: Type
conversation_visibility:
type: string
title: Conversation Visibility
thought_visibility:
type: string
title: Thought Visibility
type: object
required:
- ownership
- type
- conversation_visibility
- thought_visibility
title: RelationshipToDeveloper
UpdateAgentRequest:
properties:
name:
anyOf:
- $ref: '#/components/schemas/NameString'
- type: 'null'
description:
anyOf:
- $ref: '#/components/schemas/DescriptionString'
- type: 'null'
type: object
title: UpdateAgentRequest
Identity:
properties:
name:
type: string
title: Name
role:
type: string
title: Role
developed_by:
type: string
title: Developed By
default_spoken_language:
type: string
title: Default Spoken Language
relationship_to_developer:
$ref: '#/components/schemas/RelationshipToDeveloper'
type: object
required:
- name
- role
- developed_by
- default_spoken_language
title: Identity
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
LanguageProviderEntry:
properties:
provider:
type: string
enum:
- cartesia
- elevenlabs
- groq
title: Provider
config:
additionalProperties: true
type: object
maxProperties: 20
title: Config
type: object
required:
- provider
title: LanguageProviderEntry
description: Per-language TTS provider configuration.
AgentResponse:
properties:
id:
type: string
format: uuid
title: Id
workspace_id:
type: string
format: uuid
title: Workspace Id
name:
type: string
title: Name
description:
type: string
title: Description
latest_version:
type: integer
title: Latest Version
default: 0
created_at:
type: string
format: date-time
title: Created At
updated_at:
type: string
format: date-time
title: Updated At
type: object
required:
- id
- workspace_id
- name
- description
- created_at
- updated_at
title: AgentResponse
DescriptionString:
type: string
maxLength: 2000
PaginatedResponse_AgentResponse_:
properties:
items:
items:
$ref: '#/components/schemas/AgentResponse'
type: array
title: Items
has_more:
type: boolean
title: Has More
continuation_token:
anyOf:
- type: integer
- type: 'null'
title: Continuation Token
total:
anyOf:
- type: integer
- type: 'null'
title: Total
type: object
required:
- items
- has_more
title: PaginatedResponse[AgentResponse]
CreateAgentRequest:
properties:
name:
$ref: '#/components/schemas/NameString'
description:
$ref: '#/components/schemas/DescriptionString'
default: ''
type: object
required:
- name
title: CreateAgentRequest
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.