@labelbox/recursion-sdk 0.0.165 → 0.0.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/sdk.gen.d.ts +3 -3
- package/dist/generated/sdk.gen.js +3 -3
- package/dist/generated/types.gen.d.ts +5 -1
- package/dist/reference/domains.d.ts +5 -1
- package/dist/reference/domains.js +2 -1
- package/dist/reference/recipes-reference.generated.js +408 -0
- package/dist/reference/recipes-schema.js +1 -1
- package/dist/reference/resources-reference.generated.js +1 -1
- package/dist/reference/sdk-reference.generated.js +11 -11
- package/package.json +1 -1
|
@@ -37,7 +37,7 @@ export declare class ManagedAgents extends HeyApiClient {
|
|
|
37
37
|
/**
|
|
38
38
|
* Create an agent and immutable version
|
|
39
39
|
*
|
|
40
|
-
* Creates an agent and its first immutable version, and returns the agent resolved to that version. Exactly one of model or model_ref_id is required alongside name and system. The body is also accepted as application/x-yaml with the same schema. Any vault named in default_vault_ids must already exist.
|
|
40
|
+
* Creates an agent and its first immutable version, and returns the agent resolved to that version. Exactly one of model or model_ref_id is required alongside name and system. The body is also accepted as application/x-yaml with the same schema. Any vault named in default_vault_ids must already exist. Invalid model_config and unsupported reasoning_effort values return 400, including when a reachable gateway model publishes no exact options; an unconfigured or unreachable gateway that prevents verification returns 503.
|
|
41
41
|
*/
|
|
42
42
|
createAgent<ThrowOnError extends boolean = false>(parameters?: {
|
|
43
43
|
body?: ManagedAgentsCreateAgentRequest;
|
|
@@ -61,7 +61,7 @@ export declare class ManagedAgents extends HeyApiClient {
|
|
|
61
61
|
/**
|
|
62
62
|
* Update agent and create a new immutable version
|
|
63
63
|
*
|
|
64
|
-
* Applies a partial update and returns the agent resolved to the new version. Agent versions are immutable, so every accepted update mints a new one rather than editing history; omitted fields keep their current values. Running sessions keep the version they started with.
|
|
64
|
+
* Applies a partial update and returns the agent resolved to the new version. Agent versions are immutable, so every accepted update mints a new one rather than editing history; omitted fields keep their current values. Running sessions keep the version they started with. Invalid model_config and unsupported new or changed reasoning_effort values return 400, including when a reachable gateway model publishes no exact options; an unconfigured or unreachable gateway that prevents verification returns 503.
|
|
65
65
|
*/
|
|
66
66
|
updateAgent<ThrowOnError extends boolean = false>(parameters: {
|
|
67
67
|
agent_id: string;
|
|
@@ -488,7 +488,7 @@ export declare class ManagedAgents extends HeyApiClient {
|
|
|
488
488
|
/**
|
|
489
489
|
* Start a managed session
|
|
490
490
|
*
|
|
491
|
-
* Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected.
|
|
491
|
+
* Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected. A reasoning_effort incompatible with the selected model or its frozen output capacity returns 400 before provisioning; a temporarily unavailable model reference or catalog dependency returns 503.
|
|
492
492
|
*/
|
|
493
493
|
startSession<ThrowOnError extends boolean = false>(parameters?: {
|
|
494
494
|
'Idempotency-Key'?: string;
|
|
@@ -40,7 +40,7 @@ export class ManagedAgents extends HeyApiClient {
|
|
|
40
40
|
/**
|
|
41
41
|
* Create an agent and immutable version
|
|
42
42
|
*
|
|
43
|
-
* Creates an agent and its first immutable version, and returns the agent resolved to that version. Exactly one of model or model_ref_id is required alongside name and system. The body is also accepted as application/x-yaml with the same schema. Any vault named in default_vault_ids must already exist.
|
|
43
|
+
* Creates an agent and its first immutable version, and returns the agent resolved to that version. Exactly one of model or model_ref_id is required alongside name and system. The body is also accepted as application/x-yaml with the same schema. Any vault named in default_vault_ids must already exist. Invalid model_config and unsupported reasoning_effort values return 400, including when a reachable gateway model publishes no exact options; an unconfigured or unreachable gateway that prevents verification returns 503.
|
|
44
44
|
*/
|
|
45
45
|
createAgent(parameters, options) {
|
|
46
46
|
const params = buildClientParams([parameters], [{ args: [{ key: 'body', map: 'body' }] }]);
|
|
@@ -90,7 +90,7 @@ export class ManagedAgents extends HeyApiClient {
|
|
|
90
90
|
/**
|
|
91
91
|
* Update agent and create a new immutable version
|
|
92
92
|
*
|
|
93
|
-
* Applies a partial update and returns the agent resolved to the new version. Agent versions are immutable, so every accepted update mints a new one rather than editing history; omitted fields keep their current values. Running sessions keep the version they started with.
|
|
93
|
+
* Applies a partial update and returns the agent resolved to the new version. Agent versions are immutable, so every accepted update mints a new one rather than editing history; omitted fields keep their current values. Running sessions keep the version they started with. Invalid model_config and unsupported new or changed reasoning_effort values return 400, including when a reachable gateway model publishes no exact options; an unconfigured or unreachable gateway that prevents verification returns 503.
|
|
94
94
|
*/
|
|
95
95
|
updateAgent(parameters, options) {
|
|
96
96
|
const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'agent_id' }, { key: 'body', map: 'body' }] }]);
|
|
@@ -929,7 +929,7 @@ export class ManagedAgents extends HeyApiClient {
|
|
|
929
929
|
/**
|
|
930
930
|
* Start a managed session
|
|
931
931
|
*
|
|
932
|
-
* Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected.
|
|
932
|
+
* Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected. A reasoning_effort incompatible with the selected model or its frozen output capacity returns 400 before provisioning; a temporarily unavailable model reference or catalog dependency returns 503.
|
|
933
933
|
*/
|
|
934
934
|
startSession(parameters, options) {
|
|
935
935
|
const params = buildClientParams([parameters], [{ args: [{ in: 'headers', key: 'Idempotency-Key' }, { key: 'body', map: 'body' }] }]);
|
|
@@ -8982,6 +8982,10 @@ export type ManagedAgentsGatewayModel = {
|
|
|
8982
8982
|
* Whether the gateway can stream responses for this model. False means turns are only available as a single complete response.
|
|
8983
8983
|
*/
|
|
8984
8984
|
streaming?: boolean;
|
|
8985
|
+
/**
|
|
8986
|
+
* Exact reasoning_effort strings LiteLLM reports for this model group. Omitted means unknown; [] means no explicit effort is supported; a non-empty list is exhaustive. Omit reasoning_effort to use the provider's current default.
|
|
8987
|
+
*/
|
|
8988
|
+
supported_reasoning_efforts?: unknown;
|
|
8985
8989
|
/**
|
|
8986
8990
|
* Whether the gateway reports that this exact model accepts user image content on its configured wire.
|
|
8987
8991
|
*/
|
|
@@ -9015,7 +9019,7 @@ export type ManagedAgentsInferenceConfig = {
|
|
|
9015
9019
|
[key: string]: unknown;
|
|
9016
9020
|
};
|
|
9017
9021
|
/**
|
|
9018
|
-
*
|
|
9022
|
+
* Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.
|
|
9019
9023
|
*/
|
|
9020
9024
|
reasoning_effort?: string;
|
|
9021
9025
|
/**
|
|
@@ -58,8 +58,12 @@ export declare const DOMAINS: readonly [{
|
|
|
58
58
|
readonly id: "integrations";
|
|
59
59
|
readonly title: "Integrations";
|
|
60
60
|
readonly order: 13;
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: "managed-agents";
|
|
63
|
+
readonly title: "Managed Agents";
|
|
64
|
+
readonly order: 14;
|
|
61
65
|
}];
|
|
62
|
-
/** Union of the
|
|
66
|
+
/** Union of the fourteen canonical domain ids. */
|
|
63
67
|
export type DomainId = (typeof DOMAINS)[number]['id'];
|
|
64
68
|
/** Runtime guard: is `value` one of the canonical domain ids? */
|
|
65
69
|
export declare function isDomainId(value: unknown): value is DomainId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Canonical **product-domain taxonomy** — the single source of truth for the
|
|
2
2
|
// docs information architecture. The How-to (recipes) and Explanation (concepts)
|
|
3
|
-
// quadrants group their entries under these
|
|
3
|
+
// quadrants group their entries under these fourteen flat domains; Reference keeps
|
|
4
4
|
// its own deep, spec-derived tree (it is not domain-grouped).
|
|
5
5
|
//
|
|
6
6
|
// Consumed by the frontend docs nav, the `rl` CLI, and the dx generators. The
|
|
@@ -24,6 +24,7 @@ export const DOMAINS = [
|
|
|
24
24
|
{ id: 'cost', title: 'Cost', order: 11 },
|
|
25
25
|
{ id: 'administration', title: 'Administration', order: 12 },
|
|
26
26
|
{ id: 'integrations', title: 'Integrations', order: 13 },
|
|
27
|
+
{ id: 'managed-agents', title: 'Managed Agents', order: 14 },
|
|
27
28
|
];
|
|
28
29
|
const DOMAIN_IDS = new Set(DOMAINS.map((d) => d.id));
|
|
29
30
|
/** Runtime guard: is `value` one of the canonical domain ids? */
|
|
@@ -4661,6 +4661,140 @@ export const RECIPE_REFERENCE = {
|
|
|
4661
4661
|
],
|
|
4662
4662
|
},
|
|
4663
4663
|
},
|
|
4664
|
+
'define-a-session-outcome': {
|
|
4665
|
+
id: 'define-a-session-outcome',
|
|
4666
|
+
title: 'Define a session outcome',
|
|
4667
|
+
goal: 'Give a session a rubric so the agent is graded against a checkable bar, then read the verdict it earned.',
|
|
4668
|
+
category: 'managed-agents',
|
|
4669
|
+
video: 'define-a-session-outcome.mp4',
|
|
4670
|
+
walkthrough: [
|
|
4671
|
+
{
|
|
4672
|
+
caption: 'Start a session with an outcome',
|
|
4673
|
+
image: '01-start-a-session-with-an-outcome.png',
|
|
4674
|
+
description: 'The rubric travels with the start request: the session is graded against it from the first turn.',
|
|
4675
|
+
},
|
|
4676
|
+
{
|
|
4677
|
+
caption: 'Wait for the graded session, then read the verdict',
|
|
4678
|
+
image: '02-wait-for-the-graded-session-then-read-the-verdict.png',
|
|
4679
|
+
description: 'A graded session ends once the grader has run its revision passes, and the outcome then carries its evaluations: a per-criterion verdict with rationale.',
|
|
4680
|
+
},
|
|
4681
|
+
],
|
|
4682
|
+
steps: [
|
|
4683
|
+
{
|
|
4684
|
+
kind: 'sdk',
|
|
4685
|
+
operationId: 'managedAgentsCreateEnvironment',
|
|
4686
|
+
caption: 'Create the environment the agent works in',
|
|
4687
|
+
phase: 'setup',
|
|
4688
|
+
inputs: {
|
|
4689
|
+
name: {
|
|
4690
|
+
value: 'Graded sandbox',
|
|
4691
|
+
},
|
|
4692
|
+
provider: {
|
|
4693
|
+
value: 'runs',
|
|
4694
|
+
},
|
|
4695
|
+
},
|
|
4696
|
+
captures: {
|
|
4697
|
+
environmentId: 'environment_id',
|
|
4698
|
+
},
|
|
4699
|
+
},
|
|
4700
|
+
{
|
|
4701
|
+
kind: 'sdk',
|
|
4702
|
+
operationId: 'managedAgentsCreateAgent',
|
|
4703
|
+
caption: 'Create the agent',
|
|
4704
|
+
phase: 'setup',
|
|
4705
|
+
inputs: {
|
|
4706
|
+
name: {
|
|
4707
|
+
value: 'Report writer',
|
|
4708
|
+
},
|
|
4709
|
+
system: {
|
|
4710
|
+
value: 'Write the requested report. Follow every instruction exactly.',
|
|
4711
|
+
},
|
|
4712
|
+
model: {
|
|
4713
|
+
value: '<gatewayModel>',
|
|
4714
|
+
},
|
|
4715
|
+
},
|
|
4716
|
+
captures: {
|
|
4717
|
+
agentId: 'agent_id',
|
|
4718
|
+
},
|
|
4719
|
+
},
|
|
4720
|
+
{
|
|
4721
|
+
kind: 'sdk',
|
|
4722
|
+
operationId: 'managedAgentsStartSession',
|
|
4723
|
+
caption: 'Start a session with an outcome',
|
|
4724
|
+
phase: 'main',
|
|
4725
|
+
inputs: {
|
|
4726
|
+
agent_id: {
|
|
4727
|
+
$ref: 'agentId',
|
|
4728
|
+
},
|
|
4729
|
+
environment_id: {
|
|
4730
|
+
$ref: 'environmentId',
|
|
4731
|
+
},
|
|
4732
|
+
message: {
|
|
4733
|
+
value: 'Write a two-sentence summary of what a managed agent session is.',
|
|
4734
|
+
},
|
|
4735
|
+
outcome: {
|
|
4736
|
+
value: {
|
|
4737
|
+
description: 'A two-sentence summary of what a managed agent session is.',
|
|
4738
|
+
rubric: '- The summary is exactly two sentences.\n- The summary names the sandbox the session runs in.',
|
|
4739
|
+
max_iterations: 3,
|
|
4740
|
+
},
|
|
4741
|
+
},
|
|
4742
|
+
},
|
|
4743
|
+
captures: {
|
|
4744
|
+
sessionId: 'session_id',
|
|
4745
|
+
},
|
|
4746
|
+
},
|
|
4747
|
+
{
|
|
4748
|
+
kind: 'sdk',
|
|
4749
|
+
operationId: 'managedAgentsGetSession',
|
|
4750
|
+
caption: 'Wait for the graded session to finish',
|
|
4751
|
+
phase: 'main',
|
|
4752
|
+
inputs: {
|
|
4753
|
+
session_id: {
|
|
4754
|
+
$ref: 'sessionId',
|
|
4755
|
+
},
|
|
4756
|
+
},
|
|
4757
|
+
captures: {
|
|
4758
|
+
sessionStatus: 'status',
|
|
4759
|
+
},
|
|
4760
|
+
},
|
|
4761
|
+
{
|
|
4762
|
+
kind: 'sdk',
|
|
4763
|
+
operationId: 'managedAgentsListSessionOutcomes',
|
|
4764
|
+
caption: 'Read the verdict',
|
|
4765
|
+
phase: 'main',
|
|
4766
|
+
inputs: {
|
|
4767
|
+
session_id: {
|
|
4768
|
+
$ref: 'sessionId',
|
|
4769
|
+
},
|
|
4770
|
+
},
|
|
4771
|
+
captures: {
|
|
4772
|
+
outcomes: 'outcomes',
|
|
4773
|
+
},
|
|
4774
|
+
},
|
|
4775
|
+
],
|
|
4776
|
+
sdk: {
|
|
4777
|
+
setup: "// Create the environment the agent works in\nconst managedAgent = await rl.managedAgents.createEnvironment({\n body: {\n name: 'Graded sandbox',\n provider: 'runs',\n },\n});\nconst environmentId = managedAgent.environment_id;\n\n// Create the agent\nconst managedAgent2 = await rl.managedAgents.createAgent({\n body: {\n model: '<gatewayModel>',\n name: 'Report writer',\n system: 'Write the requested report. Follow every instruction exactly.',\n },\n});\nconst agentId = managedAgent2.agent_id;",
|
|
4778
|
+
main: "// Start a session with an outcome\nconst managedAgent3 = await rl.managedAgents.startSession({\n body: {\n agent_id: agentId,\n environment_id: environmentId,\n message: 'Write a two-sentence summary of what a managed agent session is.',\n outcome: { description: 'A two-sentence summary of what a managed agent session is.', rubric: '- The summary is exactly two sentences.\\n- The summary names the sandbox the session runs in.', max_iterations: 3 },\n },\n});\nconst sessionId = managedAgent3.session_id;\n\n// Wait for the graded session to finish\nlet managedAgent4;\nconst managedAgent4Deadline = Date.now() + 900000;\nfor (;;) {\n managedAgent4 = await rl.managedAgents.getSession({\n session_id: sessionId,\n });\n if (['failed', 'cancelled'].includes(managedAgent4.status)) throw new Error('reached a terminal failure state: ' + managedAgent4.status);\n if (['completed'].includes(managedAgent4.status)) break;\n if (Date.now() > managedAgent4Deadline) throw new Error('timed out after 900000ms waiting for a terminal state');\n await new Promise((resolve) => setTimeout(resolve, 10000));\n}\nconst sessionStatus = managedAgent4.status;\n\n// Read the verdict\nconst managedAgent5 = await rl.managedAgents.listSessionOutcomes({\n session_id: sessionId,\n});\nconst outcomes = managedAgent5.outcomes;",
|
|
4779
|
+
},
|
|
4780
|
+
cli: {
|
|
4781
|
+
setup: '# Create the environment the agent works in\nENVIRONMENT_ID=$(rl managed-agents create-environment \\\n --data "{ \\"name\\": \\"Graded sandbox\\", \\"provider\\": \\"runs\\" }" \\\n | jq -r \'.environment_id\')\n\n# Create the agent\nAGENT_ID=$(rl managed-agents create-agent \\\n --data "{ \\"model\\": \\"<gatewayModel>\\", \\"name\\": \\"Report writer\\", \\"system\\": \\"Write the requested report. Follow every instruction exactly.\\" }" \\\n | jq -r \'.agent_id\')',
|
|
4782
|
+
main: '# Start a session with an outcome\nSESSION_ID=$(rl managed-agents start-session \\\n --data "{ \\"agent_id\\": \\"$AGENT_ID\\", \\"environment_id\\": \\"$ENVIRONMENT_ID\\", \\"message\\": \\"Write a two-sentence summary of what a managed agent session is.\\", \\"outcome\\": { \\"description\\": \\"A two-sentence summary of what a managed agent session is.\\", \\"rubric\\": \\"- The summary is exactly two sentences.\\\\n- The summary names the sandbox the session runs in.\\", \\"max_iterations\\": 3 } }" \\\n | jq -r \'.session_id\')\n\n# Wait for the graded session to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(rl managed-agents get-session \\\n --session_id "$SESSION_ID")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 10\ndone\nSESSION_STATUS=$(printf \'%s\' "$response" | jq -r \'.status\')\n\n# Read the verdict\nOUTCOMES=$(rl managed-agents list-session-outcomes \\\n --session_id "$SESSION_ID" \\\n | jq -r \'.outcomes\')',
|
|
4783
|
+
},
|
|
4784
|
+
curl: {
|
|
4785
|
+
setup: '# Create the environment the agent works in\nENVIRONMENT_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/environments" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"name\\": \\"Graded sandbox\\", \\"provider\\": \\"runs\\" }" \\\n | jq -r \'.environment_id\')\n\n# Create the agent\nAGENT_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/agents" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"model\\": \\"<gatewayModel>\\", \\"name\\": \\"Report writer\\", \\"system\\": \\"Write the requested report. Follow every instruction exactly.\\" }" \\\n | jq -r \'.agent_id\')',
|
|
4786
|
+
main: '# Start a session with an outcome\nSESSION_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/sessions" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"agent_id\\": \\"$AGENT_ID\\", \\"environment_id\\": \\"$ENVIRONMENT_ID\\", \\"message\\": \\"Write a two-sentence summary of what a managed agent session is.\\", \\"outcome\\": { \\"description\\": \\"A two-sentence summary of what a managed agent session is.\\", \\"rubric\\": \\"- The summary is exactly two sentences.\\\\n- The summary names the sandbox the session runs in.\\", \\"max_iterations\\": 3 } }" \\\n | jq -r \'.session_id\')\n\n# Wait for the graded session to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(curl -s -X GET "https://api.recursion.labelbox.com/managed-agents/v1/sessions/$SESSION_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 10\ndone\nSESSION_STATUS=$(printf \'%s\' "$response" | jq -r \'.status\')\n\n# Read the verdict\nOUTCOMES=$(curl -s -X GET "https://api.recursion.labelbox.com/managed-agents/v1/sessions/$SESSION_ID/outcomes" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.outcomes\')',
|
|
4787
|
+
},
|
|
4788
|
+
related: {
|
|
4789
|
+
variationOf: 'run-an-agent-session',
|
|
4790
|
+
learnMore: [
|
|
4791
|
+
{
|
|
4792
|
+
type: 'concept',
|
|
4793
|
+
id: 'how-grading-works',
|
|
4794
|
+
},
|
|
4795
|
+
],
|
|
4796
|
+
},
|
|
4797
|
+
},
|
|
4664
4798
|
'delete-a-draft-version': {
|
|
4665
4799
|
id: 'delete-a-draft-version',
|
|
4666
4800
|
title: 'Delete a draft version',
|
|
@@ -6288,6 +6422,136 @@ export const RECIPE_REFERENCE = {
|
|
|
6288
6422
|
],
|
|
6289
6423
|
},
|
|
6290
6424
|
},
|
|
6425
|
+
'give-an-agent-a-skill': {
|
|
6426
|
+
id: 'give-an-agent-a-skill',
|
|
6427
|
+
title: 'Give an agent a skill',
|
|
6428
|
+
goal: 'Write a procedure as an Agent Skill and attach it to an agent, so every session it starts loads that procedure.',
|
|
6429
|
+
category: 'managed-agents',
|
|
6430
|
+
video: 'give-an-agent-a-skill.mp4',
|
|
6431
|
+
walkthrough: [
|
|
6432
|
+
{
|
|
6433
|
+
caption: 'Write the skill document',
|
|
6434
|
+
image: '01-write-the-skill-document.png',
|
|
6435
|
+
description: 'A skill is a SKILL.md: YAML frontmatter naming and describing it, then the procedure itself.',
|
|
6436
|
+
},
|
|
6437
|
+
{
|
|
6438
|
+
caption: 'Attach the skill to the agent',
|
|
6439
|
+
image: '02-attach-the-skill-to-the-agent.png',
|
|
6440
|
+
description: 'Attaching by skill id follows the skill: the agent picks up each new version as it is published.',
|
|
6441
|
+
},
|
|
6442
|
+
{
|
|
6443
|
+
caption: 'Confirm the agent carries the skill',
|
|
6444
|
+
image: '03-confirm-the-agent-carries-the-skill.png',
|
|
6445
|
+
description: 'Reading the agent back shows the attachment as the service stored it, on a new agent version.',
|
|
6446
|
+
},
|
|
6447
|
+
],
|
|
6448
|
+
steps: [
|
|
6449
|
+
{
|
|
6450
|
+
kind: 'sdk',
|
|
6451
|
+
operationId: 'managedAgentsCreateAgent',
|
|
6452
|
+
caption: 'Create the agent the skill is for',
|
|
6453
|
+
phase: 'setup',
|
|
6454
|
+
inputs: {
|
|
6455
|
+
name: {
|
|
6456
|
+
value: 'Release notes writer',
|
|
6457
|
+
},
|
|
6458
|
+
system: {
|
|
6459
|
+
value: 'Follow the attached procedures exactly.',
|
|
6460
|
+
},
|
|
6461
|
+
model: {
|
|
6462
|
+
value: '<gatewayModel>',
|
|
6463
|
+
},
|
|
6464
|
+
},
|
|
6465
|
+
captures: {
|
|
6466
|
+
agentId: 'agent_id',
|
|
6467
|
+
},
|
|
6468
|
+
},
|
|
6469
|
+
{
|
|
6470
|
+
kind: 'sdk',
|
|
6471
|
+
operationId: 'managedAgentsCreateSkill',
|
|
6472
|
+
caption: 'Write the skill document',
|
|
6473
|
+
phase: 'main',
|
|
6474
|
+
inputs: {
|
|
6475
|
+
document: {
|
|
6476
|
+
value: '---\nname: write-release-notes\ndescription: Turn a list of merged changes into release notes grouped by audience impact.\n---\n\n# Write release notes\n\n1. Group the merged changes by who notices them: users, operators, nobody.\n2. Drop the "nobody" group.\n3. Write one line per change, in the reader\'s language, not the commit\'s.',
|
|
6477
|
+
},
|
|
6478
|
+
display_title: {
|
|
6479
|
+
value: 'Write release notes',
|
|
6480
|
+
},
|
|
6481
|
+
},
|
|
6482
|
+
captures: {
|
|
6483
|
+
skillId: 'skill_id',
|
|
6484
|
+
},
|
|
6485
|
+
},
|
|
6486
|
+
{
|
|
6487
|
+
kind: 'sdk',
|
|
6488
|
+
operationId: 'managedAgentsUpdateAgent',
|
|
6489
|
+
caption: 'Attach the skill to the agent',
|
|
6490
|
+
phase: 'main',
|
|
6491
|
+
inputs: {
|
|
6492
|
+
agent_id: {
|
|
6493
|
+
$ref: 'agentId',
|
|
6494
|
+
},
|
|
6495
|
+
skills: {
|
|
6496
|
+
value: [
|
|
6497
|
+
{
|
|
6498
|
+
skill_id: {
|
|
6499
|
+
$ref: 'skillId',
|
|
6500
|
+
},
|
|
6501
|
+
},
|
|
6502
|
+
],
|
|
6503
|
+
},
|
|
6504
|
+
},
|
|
6505
|
+
captures: {
|
|
6506
|
+
agentVersionId: 'latest_agent_version_id',
|
|
6507
|
+
},
|
|
6508
|
+
},
|
|
6509
|
+
{
|
|
6510
|
+
kind: 'sdk',
|
|
6511
|
+
operationId: 'managedAgentsGetAgent',
|
|
6512
|
+
caption: 'Confirm the agent carries the skill',
|
|
6513
|
+
phase: 'main',
|
|
6514
|
+
inputs: {
|
|
6515
|
+
agent_id: {
|
|
6516
|
+
$ref: 'agentId',
|
|
6517
|
+
},
|
|
6518
|
+
},
|
|
6519
|
+
captures: {
|
|
6520
|
+
attachedSkills: 'skills',
|
|
6521
|
+
},
|
|
6522
|
+
},
|
|
6523
|
+
],
|
|
6524
|
+
sdk: {
|
|
6525
|
+
setup: "// Create the agent the skill is for\nconst managedAgent = await rl.managedAgents.createAgent({\n body: {\n model: '<gatewayModel>',\n name: 'Release notes writer',\n system: 'Follow the attached procedures exactly.',\n },\n});\nconst agentId = managedAgent.agent_id;",
|
|
6526
|
+
main: "// Write the skill document\nconst managedAgent2 = await rl.managedAgents.createSkill({\n body: {\n display_title: 'Write release notes',\n document: '---\\nname: write-release-notes\\ndescription: Turn a list of merged changes into release notes grouped by audience impact.\\n---\\n\\n# Write release notes\\n\\n1. Group the merged changes by who notices them: users, operators, nobody.\\n2. Drop the \"nobody\" group.\\n3. Write one line per change, in the reader\\'s language, not the commit\\'s.',\n },\n});\nconst skillId = managedAgent2.skill_id;\n\n// Attach the skill to the agent\nconst managedAgent3 = await rl.managedAgents.updateAgent({\n agent_id: agentId,\n body: {\n agent_id: agentId,\n skills: [{ skill_id: skillId }],\n },\n});\nconst agentVersionId = managedAgent3.latest_agent_version_id;\n\n// Confirm the agent carries the skill\nconst managedAgent4 = await rl.managedAgents.getAgent({\n agent_id: agentId,\n});\nconst attachedSkills = managedAgent4.skills;",
|
|
6527
|
+
},
|
|
6528
|
+
cli: {
|
|
6529
|
+
setup: '# Create the agent the skill is for\nAGENT_ID=$(rl managed-agents create-agent \\\n --data "{ \\"model\\": \\"<gatewayModel>\\", \\"name\\": \\"Release notes writer\\", \\"system\\": \\"Follow the attached procedures exactly.\\" }" \\\n | jq -r \'.agent_id\')',
|
|
6530
|
+
main: '# Write the skill document\nSKILL_ID=$(rl managed-agents create-skill \\\n --data "{ \\"display_title\\": \\"Write release notes\\", \\"document\\": \\"---\\\\nname: write-release-notes\\\\ndescription: Turn a list of merged changes into release notes grouped by audience impact.\\\\n---\\\\n\\\\n# Write release notes\\\\n\\\\n1. Group the merged changes by who notices them: users, operators, nobody.\\\\n2. Drop the \\\\\\"nobody\\\\\\" group.\\\\n3. Write one line per change, in the reader\'s language, not the commit\'s.\\" }" \\\n | jq -r \'.skill_id\')\n\n# Attach the skill to the agent\nAGENT_VERSION_ID=$(rl managed-agents update-agent \\\n --agent_id "$AGENT_ID" \\\n --data "{ \\"agent_id\\": \\"$AGENT_ID\\", \\"skills\\": [{ \\"skill_id\\": \\"$SKILL_ID\\" }] }" \\\n | jq -r \'.latest_agent_version_id\')\n\n# Confirm the agent carries the skill\nATTACHED_SKILLS=$(rl managed-agents get-agent \\\n --agent_id "$AGENT_ID" \\\n | jq -r \'.skills\')',
|
|
6531
|
+
},
|
|
6532
|
+
curl: {
|
|
6533
|
+
setup: '# Create the agent the skill is for\nAGENT_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/agents" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"model\\": \\"<gatewayModel>\\", \\"name\\": \\"Release notes writer\\", \\"system\\": \\"Follow the attached procedures exactly.\\" }" \\\n | jq -r \'.agent_id\')',
|
|
6534
|
+
main: '# Write the skill document\nSKILL_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/skills" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"display_title\\": \\"Write release notes\\", \\"document\\": \\"---\\\\nname: write-release-notes\\\\ndescription: Turn a list of merged changes into release notes grouped by audience impact.\\\\n---\\\\n\\\\n# Write release notes\\\\n\\\\n1. Group the merged changes by who notices them: users, operators, nobody.\\\\n2. Drop the \\\\\\"nobody\\\\\\" group.\\\\n3. Write one line per change, in the reader\'s language, not the commit\'s.\\" }" \\\n | jq -r \'.skill_id\')\n\n# Attach the skill to the agent\nAGENT_VERSION_ID=$(curl -s -X PATCH "https://api.recursion.labelbox.com/managed-agents/v1/agents/$AGENT_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"agent_id\\": \\"$AGENT_ID\\", \\"skills\\": [{ \\"skill_id\\": \\"$SKILL_ID\\" }] }" \\\n | jq -r \'.latest_agent_version_id\')\n\n# Confirm the agent carries the skill\nATTACHED_SKILLS=$(curl -s -X GET "https://api.recursion.labelbox.com/managed-agents/v1/agents/$AGENT_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.skills\')',
|
|
6535
|
+
},
|
|
6536
|
+
related: {
|
|
6537
|
+
requires: [
|
|
6538
|
+
{
|
|
6539
|
+
type: 'state',
|
|
6540
|
+
explanation: 'an agent exists to attach the skill to',
|
|
6541
|
+
via: {
|
|
6542
|
+
type: 'recipe',
|
|
6543
|
+
id: 'run-an-agent-session',
|
|
6544
|
+
},
|
|
6545
|
+
},
|
|
6546
|
+
],
|
|
6547
|
+
learnMore: [
|
|
6548
|
+
{
|
|
6549
|
+
type: 'resource',
|
|
6550
|
+
id: 'managed-agents',
|
|
6551
|
+
},
|
|
6552
|
+
],
|
|
6553
|
+
},
|
|
6554
|
+
},
|
|
6291
6555
|
'grade-with-a-composite-grader': {
|
|
6292
6556
|
id: 'grade-with-a-composite-grader',
|
|
6293
6557
|
title: 'Grade with a composite grader',
|
|
@@ -9823,6 +10087,150 @@ export const RECIPE_REFERENCE = {
|
|
|
9823
10087
|
],
|
|
9824
10088
|
},
|
|
9825
10089
|
},
|
|
10090
|
+
'run-an-agent-session': {
|
|
10091
|
+
id: 'run-an-agent-session',
|
|
10092
|
+
title: 'Run an agent session',
|
|
10093
|
+
goal: 'Give a managed agent a sandboxed environment and a task, then watch the session run to completion and read what it did.',
|
|
10094
|
+
category: 'managed-agents',
|
|
10095
|
+
video: 'run-an-agent-session.mp4',
|
|
10096
|
+
walkthrough: [
|
|
10097
|
+
{
|
|
10098
|
+
caption: 'Create the environment the agent works in',
|
|
10099
|
+
image: '01-create-the-environment-the-agent-works-in.png',
|
|
10100
|
+
description: 'The environment is the sandbox: its runtime, image, and setup commands are what the agent gets a shell in.',
|
|
10101
|
+
},
|
|
10102
|
+
{
|
|
10103
|
+
caption: 'Create the agent',
|
|
10104
|
+
image: '02-create-the-agent.png',
|
|
10105
|
+
description: 'An agent is a name, a system prompt, and a model — the definition a session snapshots.',
|
|
10106
|
+
},
|
|
10107
|
+
{
|
|
10108
|
+
caption: 'Start a session',
|
|
10109
|
+
image: '03-start-a-session.png',
|
|
10110
|
+
description: 'Starting is accepted, not finished: the response carries the session id to observe.',
|
|
10111
|
+
},
|
|
10112
|
+
{
|
|
10113
|
+
caption: 'Wait for the session to finish',
|
|
10114
|
+
image: '04-wait-for-the-session-to-finish.png',
|
|
10115
|
+
description: 'The session provisions its sandbox, runs the agent loop, and lands on a terminal status.',
|
|
10116
|
+
},
|
|
10117
|
+
{
|
|
10118
|
+
caption: 'Read what the agent did',
|
|
10119
|
+
image: '05-read-what-the-agent-did.png',
|
|
10120
|
+
description: 'The event timeline is the durable record of the run — messages, tool calls, and results.',
|
|
10121
|
+
},
|
|
10122
|
+
],
|
|
10123
|
+
steps: [
|
|
10124
|
+
{
|
|
10125
|
+
kind: 'sdk',
|
|
10126
|
+
operationId: 'managedAgentsCreateEnvironment',
|
|
10127
|
+
caption: 'Create the environment the agent works in',
|
|
10128
|
+
phase: 'setup',
|
|
10129
|
+
inputs: {
|
|
10130
|
+
name: {
|
|
10131
|
+
value: 'Research sandbox',
|
|
10132
|
+
},
|
|
10133
|
+
provider: {
|
|
10134
|
+
value: 'runs',
|
|
10135
|
+
},
|
|
10136
|
+
description: {
|
|
10137
|
+
value: 'Sandbox for the quickstart research session.',
|
|
10138
|
+
},
|
|
10139
|
+
},
|
|
10140
|
+
captures: {
|
|
10141
|
+
environmentId: 'environment_id',
|
|
10142
|
+
},
|
|
10143
|
+
},
|
|
10144
|
+
{
|
|
10145
|
+
kind: 'sdk',
|
|
10146
|
+
operationId: 'managedAgentsCreateAgent',
|
|
10147
|
+
caption: 'Create the agent',
|
|
10148
|
+
phase: 'setup',
|
|
10149
|
+
inputs: {
|
|
10150
|
+
name: {
|
|
10151
|
+
value: 'Research assistant',
|
|
10152
|
+
},
|
|
10153
|
+
system: {
|
|
10154
|
+
value: 'Research the task, then write a concise report of what you found.',
|
|
10155
|
+
},
|
|
10156
|
+
model: {
|
|
10157
|
+
value: '<gatewayModel>',
|
|
10158
|
+
},
|
|
10159
|
+
},
|
|
10160
|
+
captures: {
|
|
10161
|
+
agentId: 'agent_id',
|
|
10162
|
+
},
|
|
10163
|
+
},
|
|
10164
|
+
{
|
|
10165
|
+
kind: 'sdk',
|
|
10166
|
+
operationId: 'managedAgentsStartSession',
|
|
10167
|
+
caption: 'Start a session',
|
|
10168
|
+
phase: 'main',
|
|
10169
|
+
inputs: {
|
|
10170
|
+
agent_id: {
|
|
10171
|
+
$ref: 'agentId',
|
|
10172
|
+
},
|
|
10173
|
+
environment_id: {
|
|
10174
|
+
$ref: 'environmentId',
|
|
10175
|
+
},
|
|
10176
|
+
message: {
|
|
10177
|
+
value: 'Write a one-paragraph summary of what a managed agent session is.',
|
|
10178
|
+
},
|
|
10179
|
+
},
|
|
10180
|
+
captures: {
|
|
10181
|
+
sessionId: 'session_id',
|
|
10182
|
+
},
|
|
10183
|
+
},
|
|
10184
|
+
{
|
|
10185
|
+
kind: 'sdk',
|
|
10186
|
+
operationId: 'managedAgentsGetSession',
|
|
10187
|
+
caption: 'Wait for the session to finish',
|
|
10188
|
+
phase: 'main',
|
|
10189
|
+
inputs: {
|
|
10190
|
+
session_id: {
|
|
10191
|
+
$ref: 'sessionId',
|
|
10192
|
+
},
|
|
10193
|
+
},
|
|
10194
|
+
captures: {
|
|
10195
|
+
sessionStatus: 'status',
|
|
10196
|
+
},
|
|
10197
|
+
},
|
|
10198
|
+
{
|
|
10199
|
+
kind: 'sdk',
|
|
10200
|
+
operationId: 'managedAgentsListSessionEvents',
|
|
10201
|
+
caption: 'Read what the agent did',
|
|
10202
|
+
phase: 'main',
|
|
10203
|
+
inputs: {
|
|
10204
|
+
session_id: {
|
|
10205
|
+
$ref: 'sessionId',
|
|
10206
|
+
},
|
|
10207
|
+
},
|
|
10208
|
+
captures: {
|
|
10209
|
+
events: 'events',
|
|
10210
|
+
},
|
|
10211
|
+
},
|
|
10212
|
+
],
|
|
10213
|
+
sdk: {
|
|
10214
|
+
setup: "// Create the environment the agent works in\nconst managedAgent = await rl.managedAgents.createEnvironment({\n body: {\n description: 'Sandbox for the quickstart research session.',\n name: 'Research sandbox',\n provider: 'runs',\n },\n});\nconst environmentId = managedAgent.environment_id;\n\n// Create the agent\nconst managedAgent2 = await rl.managedAgents.createAgent({\n body: {\n model: '<gatewayModel>',\n name: 'Research assistant',\n system: 'Research the task, then write a concise report of what you found.',\n },\n});\nconst agentId = managedAgent2.agent_id;",
|
|
10215
|
+
main: "// Start a session\nconst managedAgent3 = await rl.managedAgents.startSession({\n body: {\n agent_id: agentId,\n environment_id: environmentId,\n message: 'Write a one-paragraph summary of what a managed agent session is.',\n },\n});\nconst sessionId = managedAgent3.session_id;\n\n// Wait for the session to finish\nlet managedAgent4;\nconst managedAgent4Deadline = Date.now() + 900000;\nfor (;;) {\n managedAgent4 = await rl.managedAgents.getSession({\n session_id: sessionId,\n });\n if (['failed', 'cancelled'].includes(managedAgent4.status)) throw new Error('reached a terminal failure state: ' + managedAgent4.status);\n if (['completed'].includes(managedAgent4.status)) break;\n if (Date.now() > managedAgent4Deadline) throw new Error('timed out after 900000ms waiting for a terminal state');\n await new Promise((resolve) => setTimeout(resolve, 10000));\n}\nconst sessionStatus = managedAgent4.status;\n\n// Read what the agent did\nconst managedAgent5 = await rl.managedAgents.listSessionEvents({\n session_id: sessionId,\n});\nconst events = managedAgent5.events;",
|
|
10216
|
+
},
|
|
10217
|
+
cli: {
|
|
10218
|
+
setup: '# Create the environment the agent works in\nENVIRONMENT_ID=$(rl managed-agents create-environment \\\n --data "{ \\"description\\": \\"Sandbox for the quickstart research session.\\", \\"name\\": \\"Research sandbox\\", \\"provider\\": \\"runs\\" }" \\\n | jq -r \'.environment_id\')\n\n# Create the agent\nAGENT_ID=$(rl managed-agents create-agent \\\n --data "{ \\"model\\": \\"<gatewayModel>\\", \\"name\\": \\"Research assistant\\", \\"system\\": \\"Research the task, then write a concise report of what you found.\\" }" \\\n | jq -r \'.agent_id\')',
|
|
10219
|
+
main: '# Start a session\nSESSION_ID=$(rl managed-agents start-session \\\n --data "{ \\"agent_id\\": \\"$AGENT_ID\\", \\"environment_id\\": \\"$ENVIRONMENT_ID\\", \\"message\\": \\"Write a one-paragraph summary of what a managed agent session is.\\" }" \\\n | jq -r \'.session_id\')\n\n# Wait for the session to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(rl managed-agents get-session \\\n --session_id "$SESSION_ID")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 10\ndone\nSESSION_STATUS=$(printf \'%s\' "$response" | jq -r \'.status\')\n\n# Read what the agent did\nEVENTS=$(rl managed-agents list-session-events \\\n --session_id "$SESSION_ID" \\\n | jq -r \'.events\')',
|
|
10220
|
+
},
|
|
10221
|
+
curl: {
|
|
10222
|
+
setup: '# Create the environment the agent works in\nENVIRONMENT_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/environments" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"description\\": \\"Sandbox for the quickstart research session.\\", \\"name\\": \\"Research sandbox\\", \\"provider\\": \\"runs\\" }" \\\n | jq -r \'.environment_id\')\n\n# Create the agent\nAGENT_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/agents" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"model\\": \\"<gatewayModel>\\", \\"name\\": \\"Research assistant\\", \\"system\\": \\"Research the task, then write a concise report of what you found.\\" }" \\\n | jq -r \'.agent_id\')',
|
|
10223
|
+
main: '# Start a session\nSESSION_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/managed-agents/v1/sessions" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"agent_id\\": \\"$AGENT_ID\\", \\"environment_id\\": \\"$ENVIRONMENT_ID\\", \\"message\\": \\"Write a one-paragraph summary of what a managed agent session is.\\" }" \\\n | jq -r \'.session_id\')\n\n# Wait for the session to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(curl -s -X GET "https://api.recursion.labelbox.com/managed-agents/v1/sessions/$SESSION_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 10\ndone\nSESSION_STATUS=$(printf \'%s\' "$response" | jq -r \'.status\')\n\n# Read what the agent did\nEVENTS=$(curl -s -X GET "https://api.recursion.labelbox.com/managed-agents/v1/sessions/$SESSION_ID/events" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.events\')',
|
|
10224
|
+
},
|
|
10225
|
+
related: {
|
|
10226
|
+
learnMore: [
|
|
10227
|
+
{
|
|
10228
|
+
type: 'resource',
|
|
10229
|
+
id: 'managed-agents',
|
|
10230
|
+
},
|
|
10231
|
+
],
|
|
10232
|
+
},
|
|
10233
|
+
},
|
|
9826
10234
|
'run-an-evaluation': {
|
|
9827
10235
|
id: 'run-an-evaluation',
|
|
9828
10236
|
title: 'Run an evaluation',
|
|
@@ -129,7 +129,7 @@ export const RecipeManifestSchema = z
|
|
|
129
129
|
// One-sentence statement of the user goal this recipe accomplishes.
|
|
130
130
|
goal: z.string().min(1),
|
|
131
131
|
// The canonical product domain this recipe lives under in the docs How-to nav
|
|
132
|
-
// (one of the
|
|
132
|
+
// (one of the canonical `DOMAINS`). Kebab here; membership in `DOMAINS` is enforced
|
|
133
133
|
// fail-fast by `recipes:generate` (it can't import the domains module — schema
|
|
134
134
|
// files are loaded as source at codegen time, so they may only import npm deps).
|
|
135
135
|
category: z.string().regex(KEBAB_CASE, 'category must be kebab-case'),
|
|
@@ -2671,7 +2671,7 @@ export const RESOURCE_REFERENCE = {
|
|
|
2671
2671
|
name: 'reasoning_effort',
|
|
2672
2672
|
required: false,
|
|
2673
2673
|
type: 'string',
|
|
2674
|
-
description:
|
|
2674
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
2675
2675
|
},
|
|
2676
2676
|
{
|
|
2677
2677
|
name: 'response_format',
|
|
@@ -44872,7 +44872,7 @@ export const SDK_REFERENCE = {
|
|
|
44872
44872
|
cliExample: "rl managed-agents create-agent \\\n --name 'example-name' \\\n --system 'example' \\\n --from-json body.json",
|
|
44873
44873
|
curlExample: 'curl -X POST \'https://api.recursion.labelbox.com/managed-agents/v1/agents\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "custom_tools": [\n {\n "config": {\n "key": "example"\n },\n "name": "example-name",\n "type": "example"\n }\n ],\n "default_credential_refs": [\n {\n "credential_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "vault_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n "default_rubric": "example",\n "default_vault_ids": [\n "example"\n ],\n "description": "example",\n "mcp_servers": [\n {\n "key": "example"\n }\n ],\n "metadata": {\n "key": "example"\n },\n "model": "example",\n "model_config": {\n "max_tokens": 1,\n "provider_params": {\n "key": "example"\n },\n "reasoning_effort": "example",\n "response_format": "example",\n "temperature": 1.5,\n "tool_choice": "example",\n "top_p": 1.5\n },\n "model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "multiagent": {\n "key": "example"\n },\n "name": "example-name",\n "runtime_adapters": [\n {\n "key": "example"\n }\n ],\n "skills": [\n {\n "key": "example"\n }\n ],\n "system": "example",\n "tools": [\n {\n "config": {\n "key": "example"\n },\n "name": "example-name",\n "type": "example"\n }\n ],\n "toolsets": [\n {\n "config": {\n "key": "example"\n },\n "name": "example-name",\n "type": "example"\n }\n ],\n "web_search_enabled": true\n }\'',
|
|
44874
44874
|
summary: 'Create an agent and immutable version',
|
|
44875
|
-
description: 'Creates an agent and its first immutable version, and returns the agent resolved to that version. Exactly one of model or model_ref_id is required alongside name and system. The body is also accepted as application/x-yaml with the same schema. Any vault named in default_vault_ids must already exist.',
|
|
44875
|
+
description: 'Creates an agent and its first immutable version, and returns the agent resolved to that version. Exactly one of model or model_ref_id is required alongside name and system. The body is also accepted as application/x-yaml with the same schema. Any vault named in default_vault_ids must already exist. Invalid model_config and unsupported reasoning_effort values return 400, including when a reachable gateway model publishes no exact options; an unconfigured or unreachable gateway that prevents verification returns 503.',
|
|
44876
44876
|
httpMethod: 'post',
|
|
44877
44877
|
path: '/managed-agents/v1/agents',
|
|
44878
44878
|
requiredPermissions: ['managed-agents:create'],
|
|
@@ -44980,7 +44980,7 @@ export const SDK_REFERENCE = {
|
|
|
44980
44980
|
in: 'body',
|
|
44981
44981
|
required: false,
|
|
44982
44982
|
type: 'ManagedAgentsInferenceConfig',
|
|
44983
|
-
description:
|
|
44983
|
+
description: "Default inference config applied to sessions started from this agent. Omit model_config or send {} to use provider defaults; null is invalid. reasoning_effort is normalized and validated for direct providers, and must exactly match the selected gateway model's published options. An unsupported value, including a reachable gateway model that publishes no exact options, returns 400; an unconfigured or unreachable gateway that prevents verification returns 503.",
|
|
44984
44984
|
fields: [
|
|
44985
44985
|
{
|
|
44986
44986
|
name: 'max_tokens',
|
|
@@ -44999,7 +44999,7 @@ export const SDK_REFERENCE = {
|
|
|
44999
44999
|
name: 'reasoning_effort',
|
|
45000
45000
|
required: false,
|
|
45001
45001
|
type: 'string',
|
|
45002
|
-
description:
|
|
45002
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
45003
45003
|
},
|
|
45004
45004
|
{
|
|
45005
45005
|
name: 'response_format',
|
|
@@ -45234,7 +45234,7 @@ export const SDK_REFERENCE = {
|
|
|
45234
45234
|
name: 'reasoning_effort',
|
|
45235
45235
|
required: false,
|
|
45236
45236
|
type: 'string',
|
|
45237
|
-
description:
|
|
45237
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
45238
45238
|
},
|
|
45239
45239
|
{
|
|
45240
45240
|
name: 'response_format',
|
|
@@ -48639,7 +48639,7 @@ export const SDK_REFERENCE = {
|
|
|
48639
48639
|
name: 'reasoning_effort',
|
|
48640
48640
|
required: false,
|
|
48641
48641
|
type: 'string',
|
|
48642
|
-
description:
|
|
48642
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
48643
48643
|
},
|
|
48644
48644
|
{
|
|
48645
48645
|
name: 'response_format',
|
|
@@ -49025,7 +49025,7 @@ export const SDK_REFERENCE = {
|
|
|
49025
49025
|
name: 'reasoning_effort',
|
|
49026
49026
|
required: false,
|
|
49027
49027
|
type: 'string',
|
|
49028
|
-
description:
|
|
49028
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
49029
49029
|
},
|
|
49030
49030
|
{
|
|
49031
49031
|
name: 'response_format',
|
|
@@ -55184,7 +55184,7 @@ export const SDK_REFERENCE = {
|
|
|
55184
55184
|
cliExample: "rl managed-agents start-session \\\n --agent_id '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d' \\\n --environment_id '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d' \\\n --from-json body.json",
|
|
55185
55185
|
curlExample: 'curl -X POST \'https://api.recursion.labelbox.com/managed-agents/v1/sessions\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "agent_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "credential_refs": [\n {\n "credential_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "vault_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n "environment_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "external_source_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "external_source_type": "example",\n "idempotency_key": "example",\n "message": "example",\n "metadata": {\n "key": "example"\n },\n "outcome": {\n "description": "example",\n "grader_model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "max_iterations": 1,\n "rubric": "example"\n },\n "project_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "skip_default_outcome": true,\n "vault_ids": [\n "example"\n ]\n }\'',
|
|
55186
55186
|
summary: 'Start a managed session',
|
|
55187
|
-
description: 'Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected.',
|
|
55187
|
+
description: 'Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected. A reasoning_effort incompatible with the selected model or its frozen output capacity returns 400 before provisioning; a temporarily unavailable model reference or catalog dependency returns 503.',
|
|
55188
55188
|
httpMethod: 'post',
|
|
55189
55189
|
path: '/managed-agents/v1/sessions',
|
|
55190
55190
|
requiredPermissions: ['managed-agents:create'],
|
|
@@ -55351,7 +55351,7 @@ export const SDK_REFERENCE = {
|
|
|
55351
55351
|
cliExample: 'rl managed-agents update-agent \\\n --agent_id <agent_id> \\\n --from-json body.json',
|
|
55352
55352
|
curlExample: 'curl -X PATCH \'https://api.recursion.labelbox.com/managed-agents/v1/agents/<agent_id>\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "agent_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "created_at": "2026-02-18T09:30:00Z",\n "custom_tools": [\n {\n "config": {\n "key": "example"\n },\n "name": "example-name",\n "type": "example"\n }\n ],\n "default_credential_refs": [\n {\n "credential_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "vault_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n "default_rubric": "example",\n "default_vault_ids": [\n "example"\n ],\n "description": "example",\n "latest_agent_version_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "mcp_servers": [\n {\n "key": "example"\n }\n ],\n "metadata": {\n "key": "example"\n },\n "model": "example",\n "model_config": {\n "max_tokens": 1,\n "provider_params": {\n "key": "example"\n },\n "reasoning_effort": "example",\n "response_format": "example",\n "temperature": 1.5,\n "tool_choice": "example",\n "top_p": 1.5\n },\n "model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "multiagent": {\n "key": "example"\n },\n "name": "example-name",\n "organization_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "runtime_adapters": [\n {\n "key": "example"\n }\n ],\n "skills": [\n {\n "key": "example"\n }\n ],\n "system": "example",\n "toolsets": [\n {\n "config": {\n "key": "example"\n },\n "name": "example-name",\n "type": "example"\n }\n ],\n "updated_at": "2026-02-18T09:30:00Z",\n "web_search_enabled": true\n }\'',
|
|
55353
55353
|
summary: 'Update agent and create a new immutable version',
|
|
55354
|
-
description: 'Applies a partial update and returns the agent resolved to the new version. Agent versions are immutable, so every accepted update mints a new one rather than editing history; omitted fields keep their current values. Running sessions keep the version they started with.',
|
|
55354
|
+
description: 'Applies a partial update and returns the agent resolved to the new version. Agent versions are immutable, so every accepted update mints a new one rather than editing history; omitted fields keep their current values. Running sessions keep the version they started with. Invalid model_config and unsupported new or changed reasoning_effort values return 400, including when a reachable gateway model publishes no exact options; an unconfigured or unreachable gateway that prevents verification returns 503.',
|
|
55355
55355
|
httpMethod: 'patch',
|
|
55356
55356
|
path: '/managed-agents/v1/agents/{agent_id}',
|
|
55357
55357
|
requiredPermissions: ['managed-agents:update'],
|
|
@@ -55447,7 +55447,7 @@ export const SDK_REFERENCE = {
|
|
|
55447
55447
|
in: 'body',
|
|
55448
55448
|
required: false,
|
|
55449
55449
|
type: 'ManagedAgentsInferenceConfig',
|
|
55450
|
-
description:
|
|
55450
|
+
description: "Default inference config for the new version. Omit model_config to preserve the current config; send {} to clear the entire config and use provider defaults; null is invalid. reasoning_effort is normalized and validated for direct providers, and must exactly match the selected gateway model's published options. An unsupported new or changed value, including a reachable gateway model that publishes no exact options, returns 400; an unconfigured or unreachable gateway that prevents verification returns 503.",
|
|
55451
55451
|
fields: [
|
|
55452
55452
|
{
|
|
55453
55453
|
name: 'max_tokens',
|
|
@@ -55466,7 +55466,7 @@ export const SDK_REFERENCE = {
|
|
|
55466
55466
|
name: 'reasoning_effort',
|
|
55467
55467
|
required: false,
|
|
55468
55468
|
type: 'string',
|
|
55469
|
-
description:
|
|
55469
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
55470
55470
|
},
|
|
55471
55471
|
{
|
|
55472
55472
|
name: 'response_format',
|
|
@@ -55661,7 +55661,7 @@ export const SDK_REFERENCE = {
|
|
|
55661
55661
|
name: 'reasoning_effort',
|
|
55662
55662
|
required: false,
|
|
55663
55663
|
type: 'string',
|
|
55664
|
-
description:
|
|
55664
|
+
description: "Provider-native reasoning depth value. For gateway models, use one of supported_reasoning_efforts from the models catalog; omit it to follow the provider's current default.",
|
|
55665
55665
|
},
|
|
55666
55666
|
{
|
|
55667
55667
|
name: 'response_format',
|