API

AgentThread

An agent's conversations: list or start one, or archive, compact or snooze it (actions).

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/threads/{id}/archive create Success
POST /api/v1/agent/threads create Success
GET /api/v1/agent/threads/{id} load Success
GET /api/v1/agent/threads load 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:

agent_thread, err := client.AgentThread(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_thread)
created, err := client.AgentThread(nil).Create(map[string]any{}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local agent_thread, err = client:AgentThread():load({ id = "example_id" })
local created, err = client:AgentThread():create({  })

PHP

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

$agent_thread = $client->AgentThread()->load(["id" => "example_id"]);
$created = $client->AgentThread()->create([]);

Python

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

agent_thread = client.AgentThread().load({"id": "example_id"})
created = client.AgentThread().create({  })

Ruby

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

agent_thread = client.AgentThread.load({ "id" => "example_id" })
created = client.AgentThread.create({  })

TypeScript

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

const agent_thread = await client.AgentThread().load({ id: "example_id" })
const created = await client.AgentThread().create({  })

Fields

Field Type Required Description
id string No Id

create

POST /api/v1/agent/threads/{id}/archive

Operation ID: archive_api_v1_thread.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/agent/threads

Operation ID: post_api_v1_agent_threads.

Authentication: bearer token (bearerAuth).

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/agent/threads/{id}

Operation ID: api_v1_thread.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/agent/threads

Operation ID: api_v1_threads.

Authentication: bearer token (bearerAuth).

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway