Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Agentex States API
version: 0.1.0
tags:
- name: States
paths:
/states:
post:
tags:
- States
summary: Create Task State
operationId: create_task_state_states_post
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateStateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/State'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- States
summary: List States
description: List all states, optionally filtered by query parameters.
operationId: filter_states_states_get
parameters:
- name: task_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Task ID
title: Task Id
description: Task ID
- name: agent_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Agent ID
title: Agent Id
description: Agent ID
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
description: Limit
default: 50
title: Limit
description: Limit
- name: page_number
in: query
required: false
schema:
type: integer
minimum: 1
description: Page number
default: 1
title: Page Number
description: Page number
- name: order_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Field to order by
title: Order By
description: Field to order by
- name: order_direction
in: query
required: false
schema:
type: string
description: Order direction (asc or desc)
default: desc
title: Order Direction
description: Order direction (asc or desc)
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/State'
title: Response Filter States States Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/states/{state_id}:
get:
tags:
- States
summary: Get State by State ID
description: Get a state by its unique state ID.
operationId: get_state_states__state_id__get
parameters:
- name: state_id
in: path
required: true
schema:
type: string
title: State Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/State'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
put:
tags:
- States
summary: Update Task State
operationId: update_task_state_states__state_id__put
parameters:
- name: state_id
in: path
required: true
schema:
type: string
title: State Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateStateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/State'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- States
summary: Delete Task State
operationId: delete_task_state_states__state_id__delete
parameters:
- name: state_id
in: path
required: true
schema:
type: string
title: State Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/State'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
State:
properties:
task_id:
type: string
title: The unique id of the task to send the state to
agent_id:
type: string
title: The unique id of the agent to send the state to
state:
additionalProperties: true
type: object
title: The state to send to the task.
id:
type: string
title: Id
description: The task state's unique id
created_at:
type: string
format: date-time
title: Created At
description: The timestamp when the state was created
updated_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Updated At
description: The timestamp when the state was last updated
type: object
required:
- task_id
- agent_id
- state
- id
- created_at
title: State
description: 'Represents a state in the agent system. A state is associated uniquely with a task and an agent.
This entity is used to store states in MongoDB, with each state
associated with a specific task and agent. The combination of task_id and agent_id is globally unique.
The state is a dictionary of arbitrary data.'
CreateStateRequest:
properties:
task_id:
type: string
title: The unique id of the task to send the state to
agent_id:
type: string
title: The unique id of the agent to send the state to
state:
additionalProperties: true
type: object
title: The state to send to the task.
type: object
required:
- task_id
- agent_id
- state
title: CreateStateRequest
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
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
UpdateStateRequest:
properties:
state:
additionalProperties: true
type: object
title: The state to update the state with.
type: object
required:
- state
title: UpdateStateRequest