Get root timeline events
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"actor": "<string>",
"content": {
"blocks": [
{
"type": "<string>",
"byteSize": 0,
"content": "<array>",
"context": "<string>",
"data": "<string>",
"encryptedContent": "<string>",
"height": 0,
"id": "<string>",
"input": {},
"isError": true,
"mediaType": "<string>",
"name": "<string>",
"omittedBytes": 0,
"payload": true,
"provider": "<string>",
"providerPayload": true,
"redacted": true,
"semanticHint": "<string>",
"sha256": "<string>",
"signature": "<string>",
"source": {
"fileId": "<string>",
"type": "file"
},
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"url": "<string>",
"urlExpiresAt": "2023-11-07T05:31:56Z",
"width": 0
}
],
"assistantInteraction": {
"digest": "<string>",
"interactionId": "<string>",
"kind": "question",
"origin": "assistant",
"requestedAt": "2023-11-07T05:31:56Z",
"revision": 4503599627370496,
"status": "pending",
"title": "<string>",
"blueprint": {
"agents": [
{
"role": "<string>",
"model": "<string>",
"responsibilities": "<string>"
}
],
"capabilities": [
{
"capabilityId": "<string>",
"kind": "<string>",
"name": "<string>",
"status": "<string>",
"purpose": "<string>"
}
],
"trigger": {
"kind": "manual",
"detail": "<string>"
},
"checkpoints": [
"<string>"
],
"costClass": "low",
"environment": "<string>",
"evaluation": "<string>",
"gaps": [
"<string>"
],
"outputs": [
"<string>"
]
},
"decision": {
"decidedAt": "2023-11-07T05:31:56Z",
"decision": "answered",
"answers": [
{
"questionId": "<string>",
"optionIds": [
"<string>"
],
"text": "<string>"
}
],
"comments": [
{
"text": "<string>",
"field": "<string>",
"stepId": "<string>"
}
],
"decidedBy": "<string>",
"note": "<string>"
},
"plan": {
"steps": [
{
"action": "<string>",
"costClass": "none",
"enabled": true,
"input": {},
"stepId": "<string>",
"title": "<string>",
"dependsOn": [
"<string>"
],
"fields": [
{
"label": "<string>",
"name": "<string>",
"widget": "text",
"help": "<string>",
"options": [
{
"label": "<string>",
"optionId": "<string>",
"description": "<string>"
}
],
"required": true
}
],
"optional": true,
"warnings": [
"<string>"
]
}
],
"prerequisites": [
{
"kind": "connect_integration",
"label": "<string>",
"prerequisiteId": "<string>",
"satisfied": true,
"capabilityId": "<string>",
"detail": "<string>",
"link": "<string>"
}
]
},
"questions": [
{
"input": "single_select",
"prompt": "<string>",
"questionId": "<string>",
"allowOther": true,
"multiple": true,
"optional": true,
"options": [
{
"label": "<string>",
"optionId": "<string>",
"description": "<string>"
}
],
"picker": "agent"
}
],
"stepResults": [
{
"status": "running",
"stepId": "<string>",
"link": "<string>",
"message": "<string>",
"resourceId": "<string>",
"resourceKind": "<string>"
}
],
"summary": "<string>"
},
"evaluationBudgetReached": {
"affectedTargetSessionIds": [
"<string>"
],
"maxTreeCostUsd": "<string>"
},
"evaluationPlanFrozen": {
"criteria": [
{
"criterionKey": "<string>",
"criterionText": "<string>"
}
],
"maxConcurrentThreads": 0,
"targets": [
{
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"maxTreeCostUsd": "<string>"
},
"evaluationRunFinished": {
"targetsBudgetReached": 0,
"targetsSkipped": 0,
"targetsTotal": 0,
"terminalStatus": "<string>",
"verdictsRecorded": 0,
"failureCode": "<string>",
"failureMessage": "<string>"
},
"evaluationTargetSkipped": {
"reason": "<string>",
"reasonCode": "<string>",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"evaluationTargetStarted": {
"childSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cloneState": "<string>",
"evaluationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sandboxProvider": "<string>"
},
"evaluationVerdictRecorded": {
"childSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"costCompleteness": "<string>",
"costUsd": "<string>",
"evaluationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"failedCriterionKeys": [
"<string>"
],
"result": "<string>",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"metadata": {},
"plan": [
{
"content": "<string>",
"id": "<string>",
"status": "<string>"
}
],
"stopReason": "<string>",
"tools": [
{
"description": "<string>",
"inputSchema": {},
"name": "<string>"
}
],
"usage": {
"cacheReadTokens": 0,
"cacheWriteTokens": 0,
"costUsd": 123,
"inputTokens": 0,
"outputTokens": 0
}
},
"createdAt": "2023-11-07T05:31:56Z",
"eventId": "<string>",
"eventType": "<string>",
"inferenceConfig": {
"imagesInView": 25,
"maxTokens": 0,
"providerParams": {},
"reasoningEffort": "<string>",
"temperature": 123,
"topP": 123
},
"schemaVersion": 0,
"sessionId": "<string>",
"agentId": "<string>",
"cacheReadTokens": 0,
"cacheWriteTokens": 0,
"causalEventId": "<string>",
"contentHydrationStatus": "hydrated",
"contentPayloadBytes": 0,
"contentPayloadRef": "<string>",
"contentPayloadSha256": "<string>",
"contentRef": "<string>",
"costMicros": 0,
"environmentId": "<string>",
"eventStatus": "<string>",
"finishReason": "<string>",
"inputTokens": 0,
"latencyMs": 0,
"model": {
"model": "<string>",
"provider": "<string>",
"baseUrl": "<string>",
"capabilities": {},
"contextWindow": 0,
"maxOutputTokens": 0,
"metadata": {},
"modelRefId": "<string>",
"modelVersion": "<string>",
"providerId": "<string>",
"providerType": "<string>",
"servingBackend": "<string>"
},
"modelRefId": "<string>",
"organizationId": "<string>",
"outputTokens": 0,
"parentEventId": "<string>",
"promptTokens": 0,
"providerModelId": "<string>",
"providerRequestId": "<string>",
"providerType": "<string>",
"role": "<string>",
"sandboxInstanceId": "<string>",
"threadId": "<string>",
"toolName": "<string>",
"toolUseId": "<string>",
"turnId": "<string>"
}
],
"nextCursor": "<string>",
"total": 4503599627370495
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "content_store_unavailable",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Sessions
Get root timeline events
Returns one page of the root timeline’s events in chronological order, plus nextCursor to continue from. A page can come back shorter than limit because an aggregate serialized-byte budget applies as well as the count, so treat an empty page with no token as the end rather than inferring the end from the length. Large event payloads hydrate by default; pass payloads=refs for bounded stubs instead.
GET
/
managed-agents
/
v2
/
sessions
/
{sessionId}
/
events
Get root timeline events
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"actor": "<string>",
"content": {
"blocks": [
{
"type": "<string>",
"byteSize": 0,
"content": "<array>",
"context": "<string>",
"data": "<string>",
"encryptedContent": "<string>",
"height": 0,
"id": "<string>",
"input": {},
"isError": true,
"mediaType": "<string>",
"name": "<string>",
"omittedBytes": 0,
"payload": true,
"provider": "<string>",
"providerPayload": true,
"redacted": true,
"semanticHint": "<string>",
"sha256": "<string>",
"signature": "<string>",
"source": {
"fileId": "<string>",
"type": "file"
},
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"url": "<string>",
"urlExpiresAt": "2023-11-07T05:31:56Z",
"width": 0
}
],
"assistantInteraction": {
"digest": "<string>",
"interactionId": "<string>",
"kind": "question",
"origin": "assistant",
"requestedAt": "2023-11-07T05:31:56Z",
"revision": 4503599627370496,
"status": "pending",
"title": "<string>",
"blueprint": {
"agents": [
{
"role": "<string>",
"model": "<string>",
"responsibilities": "<string>"
}
],
"capabilities": [
{
"capabilityId": "<string>",
"kind": "<string>",
"name": "<string>",
"status": "<string>",
"purpose": "<string>"
}
],
"trigger": {
"kind": "manual",
"detail": "<string>"
},
"checkpoints": [
"<string>"
],
"costClass": "low",
"environment": "<string>",
"evaluation": "<string>",
"gaps": [
"<string>"
],
"outputs": [
"<string>"
]
},
"decision": {
"decidedAt": "2023-11-07T05:31:56Z",
"decision": "answered",
"answers": [
{
"questionId": "<string>",
"optionIds": [
"<string>"
],
"text": "<string>"
}
],
"comments": [
{
"text": "<string>",
"field": "<string>",
"stepId": "<string>"
}
],
"decidedBy": "<string>",
"note": "<string>"
},
"plan": {
"steps": [
{
"action": "<string>",
"costClass": "none",
"enabled": true,
"input": {},
"stepId": "<string>",
"title": "<string>",
"dependsOn": [
"<string>"
],
"fields": [
{
"label": "<string>",
"name": "<string>",
"widget": "text",
"help": "<string>",
"options": [
{
"label": "<string>",
"optionId": "<string>",
"description": "<string>"
}
],
"required": true
}
],
"optional": true,
"warnings": [
"<string>"
]
}
],
"prerequisites": [
{
"kind": "connect_integration",
"label": "<string>",
"prerequisiteId": "<string>",
"satisfied": true,
"capabilityId": "<string>",
"detail": "<string>",
"link": "<string>"
}
]
},
"questions": [
{
"input": "single_select",
"prompt": "<string>",
"questionId": "<string>",
"allowOther": true,
"multiple": true,
"optional": true,
"options": [
{
"label": "<string>",
"optionId": "<string>",
"description": "<string>"
}
],
"picker": "agent"
}
],
"stepResults": [
{
"status": "running",
"stepId": "<string>",
"link": "<string>",
"message": "<string>",
"resourceId": "<string>",
"resourceKind": "<string>"
}
],
"summary": "<string>"
},
"evaluationBudgetReached": {
"affectedTargetSessionIds": [
"<string>"
],
"maxTreeCostUsd": "<string>"
},
"evaluationPlanFrozen": {
"criteria": [
{
"criterionKey": "<string>",
"criterionText": "<string>"
}
],
"maxConcurrentThreads": 0,
"targets": [
{
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"maxTreeCostUsd": "<string>"
},
"evaluationRunFinished": {
"targetsBudgetReached": 0,
"targetsSkipped": 0,
"targetsTotal": 0,
"terminalStatus": "<string>",
"verdictsRecorded": 0,
"failureCode": "<string>",
"failureMessage": "<string>"
},
"evaluationTargetSkipped": {
"reason": "<string>",
"reasonCode": "<string>",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"childSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"evaluationTargetStarted": {
"childSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cloneState": "<string>",
"evaluationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sandboxProvider": "<string>"
},
"evaluationVerdictRecorded": {
"childSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"costCompleteness": "<string>",
"costUsd": "<string>",
"evaluationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"failedCriterionKeys": [
"<string>"
],
"result": "<string>",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targetSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"metadata": {},
"plan": [
{
"content": "<string>",
"id": "<string>",
"status": "<string>"
}
],
"stopReason": "<string>",
"tools": [
{
"description": "<string>",
"inputSchema": {},
"name": "<string>"
}
],
"usage": {
"cacheReadTokens": 0,
"cacheWriteTokens": 0,
"costUsd": 123,
"inputTokens": 0,
"outputTokens": 0
}
},
"createdAt": "2023-11-07T05:31:56Z",
"eventId": "<string>",
"eventType": "<string>",
"inferenceConfig": {
"imagesInView": 25,
"maxTokens": 0,
"providerParams": {},
"reasoningEffort": "<string>",
"temperature": 123,
"topP": 123
},
"schemaVersion": 0,
"sessionId": "<string>",
"agentId": "<string>",
"cacheReadTokens": 0,
"cacheWriteTokens": 0,
"causalEventId": "<string>",
"contentHydrationStatus": "hydrated",
"contentPayloadBytes": 0,
"contentPayloadRef": "<string>",
"contentPayloadSha256": "<string>",
"contentRef": "<string>",
"costMicros": 0,
"environmentId": "<string>",
"eventStatus": "<string>",
"finishReason": "<string>",
"inputTokens": 0,
"latencyMs": 0,
"model": {
"model": "<string>",
"provider": "<string>",
"baseUrl": "<string>",
"capabilities": {},
"contextWindow": 0,
"maxOutputTokens": 0,
"metadata": {},
"modelRefId": "<string>",
"modelVersion": "<string>",
"providerId": "<string>",
"providerType": "<string>",
"servingBackend": "<string>"
},
"modelRefId": "<string>",
"organizationId": "<string>",
"outputTokens": 0,
"parentEventId": "<string>",
"promptTokens": 0,
"providerModelId": "<string>",
"providerRequestId": "<string>",
"providerType": "<string>",
"role": "<string>",
"sandboxInstanceId": "<string>",
"threadId": "<string>",
"toolName": "<string>",
"toolUseId": "<string>",
"turnId": "<string>"
}
],
"nextCursor": "<string>",
"total": 4503599627370495
}{
"code": "invalid_request",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "unauthorized",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "forbidden",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "not_found",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "payload_too_large",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "rate_limit_exceeded",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "internal_error",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "bad_gateway",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "content_store_unavailable",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}{
"code": "gateway_timeout",
"message": "<string>",
"details": {
"field": "<string>",
"issues": [
"<string>"
],
"requestId": "<string>",
"retryable": true
}
}Authorizations
Headers
Query Parameters
Response
OK