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

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

Corpo

application/json
input
obrigatório
Minimum string length: 1
conversation
previous_response_id
string
metadata
object

Resposta

Resultado da execução persistido.

object
enum<string>
obrigatório
Opções disponíveis:
agent.run
id
string
obrigatório
agent_id
string
obrigatório
status
enum<string>
obrigatório
Opções disponíveis:
queued,
completed,
failed
input
obrigatório
conversation
obrigatório
previous_response_id
string | null
obrigatório
metadata
object
obrigatório
gateway_response_id
string | null
obrigatório
gateway_response
obrigatório
error
obrigatório
created_at
string<date-time>
obrigatório
completed_at
string<date-time> | null
obrigatório