AgentRun
One run of an agent's work, with its status.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
GET |
/api/v1/organizations/{organization_id}/agents/{id}/spark/runs/{run_id} |
load |
Native run state |
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_run, err := client.AgentRun(nil).Load(map[string]any{"agent_id": "example", "id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(agent_run)
Lua
Construct client as shown in the Lua setup, then call the operations:
local agent_run, err = client:AgentRun():load({ agent_id = "example", id = "example_id", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$agent_run = $client->AgentRun()->load(["agent_id" => "example", "id" => "example_id", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
agent_run = client.AgentRun().load({"agent_id": "example", "id": "example_id", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
agent_run = client.AgentRun.load({ "agent_id" => "example", "id" => "example_id", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const agent_run = await client.AgentRun().load({ agent_id: "example", id: "example_id", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
error |
one,string,null |
No | Error |
id |
string |
No | Id |
run_id |
string |
Yes | Run Id |
status |
string |
Yes | Status |
load
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/runs/{run_id}
Operation ID: get_api_v1_organizations_organization_id_agents_id_spark_runs_run_id_.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
run_id |
path |
string |
Yes | |
conversation_id |
query |
string |
No |
Responses
200: Native run state
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string,null |
No | |
run_id |
string |
Yes | |
status |
enum: accepted, running, completed, failed, cancelled, unknown |
Yes |
401: Unauthorized
403: Agent access or experiment gate unavailable
404: Authorized V2 agent or run not found
422: Unprocessable entity
502: Bad gateway
503: Agent connection unavailable; a submission may already have reached native custody. Preserve its input key
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
enum: deploy_draining, gateway_starting, transport_timeout, gateway_failed |
Yes | |
correlation_id |
string |
Yes | |
error |
string |
Yes | |
retry_after |
integer |
Yes |