Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

files changedmanaged-agents/files

Nearest release: v2.1.304, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+37added
Lines−25removed
From line 18 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits18to this page, all time

The whole hunk

from line 18, old and new numbered
/
lines
from line 18
1818 
1919<CodeGroup>
2020 ```bash cURL
21 file=$(curl --fail-with-body -sS "${auth[@]}" \
22 "${base_url}/files" \
24 FILE_ID=$(jq -er '.id' <<<"${file}")
21 curl --fail-with-body -sS https://api.anthropic.com/v1/files \
22 -H "x-api-key: $ANTHROPIC_API_KEY" \
23 -H "anthropic-version: 2023-06-01" \
24 -H "anthropic-beta: managed-agents-2026-04-01" \
2526 ```
2627 
2728 ```bash CLI
28 FILE_ID=$(ant files upload --file data.csv --transform id --raw-output)
29 ant files upload --file data.csv
2930 ```
3031 
3132 ```python Python
from line 93
9293 
9394<CodeGroup>
9495 ```bash cURL
95 jq -n \
96 --arg agent_id "${AGENT_ID}" \
97 --arg environment_id "${ENVIRONMENT_ID}" \
98 --arg file_id "${FILE_ID}" \
99 '{
100 agent: $agent_id,
101 environment_id: $environment_id,
102 resources: [
96 curl --fail-with-body -sS https://api.anthropic.com/v1/sessions \
97 -H "x-api-key: $ANTHROPIC_API_KEY" \
98 -H "anthropic-version: 2023-06-01" \
99 -H "anthropic-beta: managed-agents-2026-04-01" \
100 -H "content-type: application/json" \
101 -d '{
102 "agent": "'"$AGENT_ID"'",
103 "environment_id": "'"$ENVIRONMENT_ID"'",
104 "resources": [
103105 {
104 type: "file",
105 file_id: $file_id,
106 mount_path: "/data.csv"
106 "type": "file",
107 "file_id": "'"$FILE_ID"'",
108 "mount_path": "/data.csv"
107109 }
108110 ]
109 }' | curl --fail-with-body -sS "${auth[@]}" "${base_url}/sessions" --json @-
111 }'
110112 ```
111113 
112114 ```bash CLI
from line 360
358360 
359361<CodeGroup>
360362 ```bash cURL
361 jq -n --arg file_id "${FILE_ID}" '{type: "file", file_id: $file_id}' \
362 | curl --fail-with-body -sS "${auth[@]}" \
363 "${base_url}/sessions/${SESSION_ID}/resources" --json @-
363 curl --fail-with-body -sS "https://api.anthropic.com/v1/sessions/$SESSION_ID/resources" \
364 -H "x-api-key: $ANTHROPIC_API_KEY" \
365 -H "anthropic-version: 2023-06-01" \
366 -H "anthropic-beta: managed-agents-2026-04-01" \
367 -H "content-type: application/json" \
368 -d '{
369 "type": "file",
370 "file_id": "'"$FILE_ID"'"
371 }'
364372 ```
365373 
366374 ```bash CLI
from line 458
450458 
451459<CodeGroup>
452460 ```bash cURL
453 curl --fail-with-body -sS "${auth[@]}" \
454 "${base_url}/sessions/${SESSION_ID}/resources"
461 curl --fail-with-body -sS "https://api.anthropic.com/v1/sessions/$SESSION_ID/resources" \
462 -H "x-api-key: $ANTHROPIC_API_KEY" \
463 -H "anthropic-version: 2023-06-01" \
464 -H "anthropic-beta: managed-agents-2026-04-01"
455465 
456 curl --fail-with-body -sS "${auth[@]}" -X DELETE \
457 "${base_url}/sessions/${SESSION_ID}/resources/${RESOURCE_ID}" >/dev/null
466 curl --fail-with-body -sS -X DELETE "https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID" \
467 -H "x-api-key: $ANTHROPIC_API_KEY" \
468 -H "anthropic-version: 2023-06-01" \
469 -H "anthropic-beta: managed-agents-2026-04-01"
458470 ```
459471 
460472 ```bash CLI
Feedback