List input a session has accepted but not read
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/pending-inputs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/pending-inputs"
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}/pending-inputs', 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}/pending-inputs",
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}/pending-inputs"
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}/pending-inputs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/pending-inputs")
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": [
{
"createdAt": "2023-11-07T05:31:56Z",
"event": {
"actor": "<string>",
"content": {
"blocks": [
{
"type": "<string>",
"byteSize": 0,
"content": [
{
"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>",
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"width": 0
}
],
"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": [
{
"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>",
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"width": 0
}
],
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"width": 0
}
],
"metadata": {}
},
"eventId": "<string>",
"eventType": "message",
"inferenceConfig": {},
"role": "user",
"schemaVersion": 1
},
"inputId": "<string>",
"kind": "message"
}
]
}{
"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": "managed_agents_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
List input a session has accepted but not read
Returns the messages waiting for a busy session, in acceptance order. A message sent while the agent is mid-turn is durable immediately but is not part of the transcript until the next turn boundary reads it, so it appears here and not in the events listing. Each entry’s inputId becomes the event id on promotion, which is how a client follows a queued message into history. Interrupt and send a new instruction, or resume the session, to read the queue.
GET
/
managed-agents
/
v2
/
sessions
/
{sessionId}
/
pending-inputs
List input a session has accepted but not read
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/pending-inputs \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/pending-inputs"
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}/pending-inputs', 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}/pending-inputs",
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}/pending-inputs"
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}/pending-inputs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v2/sessions/{sessionId}/pending-inputs")
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": [
{
"createdAt": "2023-11-07T05:31:56Z",
"event": {
"actor": "<string>",
"content": {
"blocks": [
{
"type": "<string>",
"byteSize": 0,
"content": [
{
"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>",
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"width": 0
}
],
"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": [
{
"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>",
"summary": "<array>",
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"width": 0
}
],
"text": "<string>",
"title": "<string>",
"toolUseId": "<string>",
"uri": "<string>",
"width": 0
}
],
"metadata": {}
},
"eventId": "<string>",
"eventType": "message",
"inferenceConfig": {},
"role": "user",
"schemaVersion": 1
},
"inputId": "<string>",
"kind": "message"
}
]
}{
"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": "managed_agents_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
}
}