Skip to content

States

Create Task State
client.states.create(StateCreateParams { agent_id, state, task_id } body, RequestOptionsoptions?): State { id, agent_id, created_at, 3 more }
POST/states
List States
client.states.list(StateListParams { agent_id, limit, order_by, 3 more } query?, RequestOptionsoptions?): StateListResponse { id, agent_id, created_at, 3 more }
GET/states
Get State by State ID
client.states.retrieve(stringstateID, RequestOptionsoptions?): State { id, agent_id, created_at, 3 more }
GET/states/{state_id}
Update Task State
client.states.update(stringstateID, StateUpdateParams { state } body, RequestOptionsoptions?): State { id, agent_id, created_at, 3 more }
PUT/states/{state_id}
Delete Task State
client.states.delete(stringstateID, RequestOptionsoptions?): State { id, agent_id, created_at, 3 more }
DELETE/states/{state_id}
ModelsExpand Collapse
State { id, agent_id, created_at, 3 more }

Represents a state in the agent system. A state is associated uniquely with a task and an agent.

This entity is used to store states in MongoDB, with each state associated with a specific task and agent. The combination of task_id and agent_id is globally unique.

The state is a dictionary of arbitrary data.

id: string

The task state’s unique id

agent_id: string
created_at: string

The timestamp when the state was created

formatdate-time
state: Record<string, unknown>
task_id: string
updated_at?: string | null

The timestamp when the state was last updated

formatdate-time
StateListResponse = Array<State { id, agent_id, created_at, 3 more } >
id: string

The task state’s unique id

agent_id: string
created_at: string

The timestamp when the state was created

formatdate-time
state: Record<string, unknown>
task_id: string
updated_at?: string | null

The timestamp when the state was last updated

formatdate-time