API

SwarmNote

Operations

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

Method Route SDK operation Returns
POST /api/v1/agent/swarms/{swarm_id}/notes create Success

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:

created, err := client.SwarmNote(nil).Create(map[string]any{"swarm_id": "example", "text": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local created, err = client:SwarmNote():create({ swarm_id = "example", text = "example" })

PHP

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

$created = $client->SwarmNote()->create(["swarm_id" => "example", "text" => "example"]);

Python

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

created = client.SwarmNote().create({ "swarm_id": "example", "text": "example" })

Ruby

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

created = client.SwarmNote.create({ "swarm_id" => "example", "text" => "example" })

TypeScript

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

const created = await client.SwarmNote().create({ swarm_id: "example", text: "example" })

Fields

Field Type Required Description
task_id one,string,null No A task public id; omitted
text string Yes Text

create

POST /api/v1/agent/swarms/{swarm_id}/notes

Operation ID: api_v1_swarm_notes.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
swarm_id path string Yes

Request body

application/json

Property Type Required Description
task_id string No A task public id; omitted
text string Yes

Responses

200: Success

application/json

The response is object.

201: The note as a live feed event

application/json

Property Type Required Description
event object Yes
event.at_ms integer Yes
event.attempt_id string Yes
event.id integer Yes
event.kind string Yes
event.landing_entry object or null Yes
event.payload object Yes
event.reason string Yes
event.task_id string Yes
event.ts string (date-time) Yes
401: Unauthorized
403: Forbidden
404: Invalid agent swarm request

application/json

Property Type Required Description
details array of string No
error string Yes
409: Invalid agent swarm request

application/json

Property Type Required Description
details array of string No
error string Yes
422: Invalid agent swarm request

application/json

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