AgentEvent
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/events |
load |
Native conversation event stream |
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_event, err := client.AgentEvent(nil).Load(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(agent_event)
Lua
Construct client as shown in the Lua setup, then call the operations:
local agent_event, err = client:AgentEvent():load({ agent_id = "example", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$agent_event = $client->AgentEvent()->load(["agent_id" => "example", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
agent_event = client.AgentEvent().load({"agent_id": "example", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
agent_event = client.AgentEvent.load({ "agent_id" => "example", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const agent_event = await client.AgentEvent().load({ agent_id: "example", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|
load
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/events
Operation ID: spark_events_api_v1_organization_persistent_agent.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
conversation_id |
query |
string |
No | |
device_activity_providers |
query |
string |
No | Comma-separated device preview providers understood by this client. Omitted retains Codex-only compatibility; current clients send codex,roder,claude. Does not grant execution access. |
Responses
200: Native conversation event stream
application/json
The response is object.
text/event-stream
The response is string.
401: Unauthorized
403: Agent access or experiment gate unavailable
404: Authorized V2 agent not found
422: Unprocessable entity
502: Bad gateway
503: Worker is unavailable before the event stream opens
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 |