Pular para o conteúdo 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
}

Autorizações

Authorization
string
header
obrigatório

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

Cabeçalhos

X-On-Behalf-Of
string

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

Parâmetros de caminho

agent_id
string
obrigatório

Parâmetros de consulta

limit
integer
padrão:20
Intervalo obrigatório: 1 <= x <= 100
order
enum<string>
padrão:desc
Opções disponíveis:
asc,
desc

Resposta

Uma lista de execuções de agentes.

object
enum<string>
obrigatório
Opções disponíveis:
list
data
object[]
obrigatório
first_id
string | null
obrigatório
last_id
string | null
obrigatório
has_more
boolean
obrigatório