Skip to main content
GET
/
api
/
v1
/
agents
/
{agent_id}
/
runs
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK();

async function run() {
  const result = await sdk.agentRuns.listAgentRuns({
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
  }, {
    agentId: "<id>",
  });

  console.log(result);
}

run();
{
  "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
}

Authorizations

Authorization
string
header
required

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

Headers

X-On-Behalf-Of
string

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

Path Parameters

agent_id
string
required

Query Parameters

limit
integer
default:20
Required range: 1 <= x <= 100
order
enum<string>
default:desc
Available options:
asc,
desc

Response

A list of agent runs.

object
enum<string>
required
Available options:
list
data
object[]
required
first_id
string | null
required
last_id
string | null
required
has_more
boolean
required