Saltar al contenido principal
POST
/
api
/
v1
/
agents
/
{agent_id}
/
runs
Python (SDK)
from openapi import SDK, models


with SDK() as sdk:

    res = sdk.agent_runs.create_agent_run(security=models.CreateAgentRunSecurity(
        bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
    ), agent_id="<id>", input=[
        models.CreateAgentRunRequestInput(
            type="<value>",
        ),
    ])

    # Handle response
    print(res)
{
  "object": "agent.run",
  "id": "<string>",
  "agent_id": "<string>",
  "status": "queued",
  "input": "<string>",
  "conversation": "<string>",
  "previous_response_id": "<string>",
  "metadata": {},
  "gateway_response_id": "<string>",
  "gateway_response": "<string>",
  "error": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z"
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Encabezados

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Parámetros de ruta

agent_id
string
requerido

Cuerpo

application/json
input
requerido
Minimum string length: 1
conversation
previous_response_id
string
metadata
object

Respuesta

Resultado de ejecución persistido.

object
enum<string>
requerido
Opciones disponibles:
agent.run
id
string
requerido
agent_id
string
requerido
status
enum<string>
requerido
Opciones disponibles:
queued,
completed,
failed
input
requerido
conversation
requerido
previous_response_id
string | null
requerido
metadata
object
requerido
gateway_response_id
string | null
requerido
gateway_response
requerido
error
requerido
created_at
string<date-time>
requerido
completed_at
string<date-time> | null
requerido