API

SwarmEvent

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/agent/swarms/{swarm_id}/events list The swarm's decision log, oldest first

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

swarm_events, err := client.SwarmEvent(nil).List(map[string]any{"swarm_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(swarm_events)

Lua

Construct client as shown in the Lua setup, then call the operations:

local swarm_events, err = client:SwarmEvent():list({ swarm_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$swarm_events = $client->SwarmEvent()->list(["swarm_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

swarm_events = client.SwarmEvent().list({"swarm_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

swarm_events = client.SwarmEvent.list({ "swarm_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const swarm_events = await client.SwarmEvent().list({ swarm_id: "example" })

Fields

Field Type Required Description
agent_swarm_id string Yes Agent Swarm Id
attempt_id one,string,null Yes Attempt Id
created_at string Yes Created At
created_at_label one,string,null Yes Created At Label
id integer Yes Id
kind string Yes Kind
payload object Yes Payload
reason one,string,null Yes Reason
scheduler_generation one,integer,null Yes Scheduler Generation
task_id one,string,null Yes Task Id

list

GET /api/v1/agent/swarms/{swarm_id}/events

Operation ID: api_v1_swarm_events.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
swarm_id path string Yes
after query integer No
kind query string No
limit query integer No

Responses

200: The swarm's decision log, oldest first

application/json

Property Type Required Description
events array of object Yes
events[].agent_swarm_id string Yes
events[].attempt_id string Yes
events[].created_at string (date-time) Yes
events[].created_at_label string Yes
events[].id integer Yes
events[].kind string Yes
events[].payload object Yes
events[].reason string Yes
events[].scheduler_generation integer Yes
events[].task_id string Yes
401: Unauthorized
403: Forbidden
404: Invalid agent swarm request

application/json

Property Type Required Description
details array of string No
error string Yes
422: Unprocessable entity
502: Bad gateway