curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/outcomes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/outcomes"
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}/outcomes', 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}/outcomes",
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}/outcomes"
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}/outcomes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/outcomes")
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{
"outcomes": [
{
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"max_iterations": 0,
"organization_id": "<string>",
"outcome_id": "<string>",
"rubric": "<string>",
"session_id": "<string>",
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"evaluations": [
{
"iteration": 0,
"outcome_id": "<string>",
"result": "satisfied",
"agent_version_id": "<string>",
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"cost_micros": 0,
"criteria": [
{
"criterion_id": "<string>",
"criterion_text": "<string>",
"verdict": "<string>",
"weight": 123,
"evidence_event_ids": [
"<string>"
],
"rationale": "<string>",
"section": "<string>"
}
],
"end_event_id": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"evaluationSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"explanation": "<string>",
"input_tokens": 0,
"output_tokens": 0,
"start_event_id": "<string>",
"started_at": "2023-11-07T05:31:56Z"
}
],
"historicalRoots": [
{
"createdAt": "2023-11-07T05:31:56Z",
"evaluationSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"historyLimited": true,
"rootStatus": "active",
"executionState": "provisioning",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stopReason": "<string>"
}
],
"passes": [
{
"evaluationSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"iteration": 0,
"outcomeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startedAt": "2023-11-07T05:31:56Z",
"status": "preparing",
"endedAt": "2023-11-07T05:31:56Z",
"failureReason": "<string>"
}
],
"rubric_ref": "<string>",
"rubric_sha256": "<string>",
"terminal_result": "satisfied"
}
]
}{
"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
}
}List a session's outcomes and grading history
Returns the session’s outcomes and their grading history, so a caller can see what “done” was defined as and how each attempt was scored.
curl --request GET \
--url https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/outcomes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/outcomes"
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}/outcomes', 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}/outcomes",
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}/outcomes"
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}/outcomes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recursion.labelbox.com/managed-agents/v1/sessions/{sessionId}/outcomes")
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{
"outcomes": [
{
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"max_iterations": 0,
"organization_id": "<string>",
"outcome_id": "<string>",
"rubric": "<string>",
"session_id": "<string>",
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z",
"agent_id": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"evaluations": [
{
"iteration": 0,
"outcome_id": "<string>",
"result": "satisfied",
"agent_version_id": "<string>",
"cache_read_tokens": 0,
"cache_write_tokens": 0,
"cost_micros": 0,
"criteria": [
{
"criterion_id": "<string>",
"criterion_text": "<string>",
"verdict": "<string>",
"weight": 123,
"evidence_event_ids": [
"<string>"
],
"rationale": "<string>",
"section": "<string>"
}
],
"end_event_id": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"evaluationSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"explanation": "<string>",
"input_tokens": 0,
"output_tokens": 0,
"start_event_id": "<string>",
"started_at": "2023-11-07T05:31:56Z"
}
],
"historicalRoots": [
{
"createdAt": "2023-11-07T05:31:56Z",
"evaluationSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"historyLimited": true,
"rootStatus": "active",
"executionState": "provisioning",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stopReason": "<string>"
}
],
"passes": [
{
"evaluationSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"iteration": 0,
"outcomeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshotEventId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startedAt": "2023-11-07T05:31:56Z",
"status": "preparing",
"endedAt": "2023-11-07T05:31:56Z",
"failureReason": "<string>"
}
],
"rubric_ref": "<string>",
"rubric_sha256": "<string>",
"terminal_result": "satisfied"
}
]
}{
"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
}
}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) as returned by managedAgentsStartSession or managedAgentsListSessions.
Response
Response body of GET /managed-agents/v1/sessions/{sessionId}/outcomes. An outcome is the structured verdict a grader or the agent itself writes for a session; a session may accumulate more than one, so this is a list rather than a single object.
Response body of GET /managed-agents/v1/sessions/{sessionId}/outcomes. An outcome is the structured verdict a grader or the agent itself writes for a session; a session may accumulate more than one, so this is a list rather than a single object.
Outcomes recorded against the session named in the path. Empty when none has been recorded.
Show child attributes
Show child attributes