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


with SDK() as sdk:

    res = sdk.agent_runs.list_agent_runs(security=models.ListAgentRunsSecurity(
        bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
    ), agent_id="<id>", limit=20, order="desc")

    # Handle response
    print(res)
{
  "object": "list",
  "data": [
    {
      "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"
    }
  ],
  "first_id": "<string>",
  "last_id": "<string>",
  "has_more": true
}

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

Parámetros de consulta

limit
integer
predeterminado:20
Rango requerido: 1 <= x <= 100
order
enum<string>
predeterminado:desc
Opciones disponibles:
asc,
desc

Respuesta

Una lista de ejecuciones de agentes.

object
enum<string>
requerido
Opciones disponibles:
list
data
object[]
requerido
first_id
string | null
requerido
last_id
string | null
requerido
has_more
boolean
requerido