curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/events/{eventId}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/events/{eventId}/content"
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/v1/sessions/{sessionId}/events/{eventId}/content', 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/v1/sessions/{sessionId}/events/{eventId}/content",
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/v1/sessions/{sessionId}/events/{eventId}/content"
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/v1/sessions/{sessionId}/events/{eventId}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/events/{eventId}/content")
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{
"blocks": [
{
"type": "<string>",
"byte_size": 0,
"content": "<array>",
"context": "<string>",
"data": "<string>",
"encrypted_content": "<string>",
"height": 0,
"id": "<string>",
"input": {},
"is_error": true,
"media_type": "<string>",
"name": "<string>",
"omitted_bytes": 0,
"payload": true,
"provider": "<string>",
"provider_payload": true,
"redacted": true,
"semantic_hint": "<string>",
"sha256": "<string>",
"signature": "<string>",
"source": {
"file_id": "<string>",
"type": "file"
},
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"tool_use_id": "<string>",
"uri": "<string>",
"url": "<string>",
"url_expires_at": "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>"
},
"metadata": {},
"plan": [
{
"content": "<string>",
"id": "<string>",
"status": "<string>"
}
],
"stop_reason": "<string>",
"tools": [
{
"description": "<string>",
"input_schema": {},
"name": "<string>"
}
],
"usage": {
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"cost_usd": 123,
"input_tokens": 0,
"output_tokens": 0
}
}{
"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
}
}Stream one authenticated complete event content document
Returns the complete stored content document for one event as application/json when its payload was externalized instead of inlined in the timeline. The event must belong to the session in the path.
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/events/{eventId}/content \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/events/{eventId}/content"
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/v1/sessions/{sessionId}/events/{eventId}/content', 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/v1/sessions/{sessionId}/events/{eventId}/content",
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/v1/sessions/{sessionId}/events/{eventId}/content"
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/v1/sessions/{sessionId}/events/{eventId}/content")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/events/{eventId}/content")
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{
"blocks": [
{
"type": "<string>",
"byte_size": 0,
"content": "<array>",
"context": "<string>",
"data": "<string>",
"encrypted_content": "<string>",
"height": 0,
"id": "<string>",
"input": {},
"is_error": true,
"media_type": "<string>",
"name": "<string>",
"omitted_bytes": 0,
"payload": true,
"provider": "<string>",
"provider_payload": true,
"redacted": true,
"semantic_hint": "<string>",
"sha256": "<string>",
"signature": "<string>",
"source": {
"file_id": "<string>",
"type": "file"
},
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"tool_use_id": "<string>",
"uri": "<string>",
"url": "<string>",
"url_expires_at": "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>"
},
"metadata": {},
"plan": [
{
"content": "<string>",
"id": "<string>",
"status": "<string>"
}
],
"stop_reason": "<string>",
"tools": [
{
"description": "<string>",
"input_schema": {},
"name": "<string>"
}
],
"usage": {
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"cost_usd": 123,
"input_tokens": 0,
"output_tokens": 0
}
}{
"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
A Recursion API key, created in the console under API keys.
Headers
Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.
1Path Parameters
Session id (UUID) the event belongs to.
Event id, a lowercase canonical UUIDv7 taken from an event returned by managedAgentsListSessionEvents. Event ids sort chronologically.
Response
The body of a session event, shaped like a provider message: content blocks plus the stop reason and token usage the provider returned. Every event in a session transcript carries one.
The body of a session event, shaped like a provider message: content blocks plus the stop reason and token usage the provider returned. Every event in a session transcript carries one.
Ordered content blocks of this message, in the provider's content-block form. Empty for events that carry no message body.
Show child attributes
Show child attributes
One state of a typed request an assistant put in front of the reader: questions, a solution blueprint, or a plan of changes. Present on the approval_request events of an assistant session, one per state the interaction passes through.
Show child attributes
Show child attributes
Extra key/value detail about this event that is not part of the message body, such as the ingest subtype or the sandbox working directory.
Show child attributes
Show child attributes
Plan items reported by the agent, present on a plan_update event.
Show child attributes
Show child attributes
The provider's own stop_reason for the assistant turn, recorded verbatim, e.g. end_turn, tool_use, or max_tokens. Absent on events that are not a model response.
Tool definitions that were in scope for the turn, as sent to the provider. Recorded on the session's system message so a transcript shows what the model could call.
Show child attributes
Show child attributes
Token counts the provider reported for the call that produced this message. Absent when the event is not a model response.
Show child attributes
Show child attributes