The whole hunk
from line 1, old and new numbered
/
lines
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 1
1---
2title: Environments
3url: https://platform.claude.com/docs/en/api/beta/environments
4---
5
16# Environments
27
38## Create Environment
from line 19
1419
1520 - `string`
1621
17 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
1823
1924 - `"message-batches-2024-09-24"`
2025
from line 67
6267
6368 - `"user-profiles-2026-08-18"`
6469
70 - `"user-profiles-2026-09-04"`
71
6572 - `"advisor-tool-2026-03-01"`
6673
6774 - `"managed-agents-2026-04-01"`
from line 110
103110 - `"thinking-binding-controls-2026-08-01"`
104111
105112 - `"mid-conversation-system-clear-at-2026-08-21"`
113
114- `"anthropic-workspace-id": optional string`
106115
107116### Body parameters
108117
from line 179
170179
171180 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
172181
182 - `type: optional "packages"`
183
184 Package configuration type
185
186 default: packages
187
173188 - `apt: optional array of string or null`
174189
175190 Ubuntu/Debian packages to install
from line 209
194209
195210 Python packages to install
196211
197 - `type: optional "packages"`
198
199 Package configuration type
200
201 default: packages
202
203212 - `BetaSelfHostedConfigParams object`
204213
205214 Request params for `self_hosted` environment configuration.
from line 229
220229
221230- `scope: optional "organization" or "account" or null`
222231
223 The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type.
232 The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. API organizations support only 'organization'; 'account' is rejected. If not specified, defaults based on organization type.
224233
225234 - `"organization"`
226235
from line 241
232241
233242 Unified Environment resource for both cloud and self-hosted environments.
234243
244 - `type: "environment"`
245
246 The type of object (always 'environment')
247
248 default: environment
249
235250 - `id: string`
236251
237252 Environment identifier (e.g., 'env_...')
from line 263
248263
249264 `cloud` environment configuration.
250265
266 - `type: "cloud"`
267
268 Environment type
269
251270 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
252271
253272 Network configuration policy.
from line 283
264283
265284 Limited network access.
266285
286 - `type: "limited"`
287
288 Network policy type
289
267290 - `allow_mcp_servers: boolean`
268291
269292 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 299
276299
277300 Specifies domains the container can reach.
278301
279 - `type: "limited"`
280
281 Network policy type
282
283302 - `packages: BetaPackages`
284303
285304 Package manager configuration.
286305
306 - `type: optional "packages"`
307
308 Package configuration type
309
310 default: packages
311
287312 - `apt: array of string`
288313
289314 Ubuntu/Debian packages to install
from line 333
308333
309334 Python packages to install
310335
311 - `type: optional "packages"`
312
313 Package configuration type
314
315 default: packages
316
317 - `type: "cloud"`
336 - `BetaSelfHostedConfig object`
337
338 Configuration for self-hosted environments.
339
340 - `type: "self_hosted"`
318341
319342 Environment type
320343
321 - `BetaSelfHostedConfig object`
322
323 Configuration for self-hosted environments.
324
325 - `type: "self_hosted"`
326
327 Environment type
328
329344 - `created_at: string`
330345
331346 RFC 3339 timestamp when environment was created
from line 356
341356 - `name: string`
342357
343358 Human-readable name for the environment
344
345 - `type: "environment"`
346
347 The type of object (always 'environment')
348
349 default: environment
350359
351360 - `updated_at: string`
352361
from line 480
471480
472481 - `string`
473482
474 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
483 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
475484
476485 - `"message-batches-2024-09-24"`
477486
from line 528
519528
520529 - `"user-profiles-2026-08-18"`
521530
531 - `"user-profiles-2026-09-04"`
532
522533 - `"advisor-tool-2026-03-01"`
523534
524535 - `"managed-agents-2026-04-01"`
from line 572
561572
562573 - `"mid-conversation-system-clear-at-2026-08-21"`
563574
575- `"anthropic-workspace-id": optional string`
576
564577### Returns
565578
566579- `data: array of BetaEnvironment`
567580
568581 List of environments.
569582
583 - `type: "environment"`
584
585 The type of object (always 'environment')
586
587 default: environment
588
570589 - `id: string`
571590
572591 Environment identifier (e.g., 'env_...')
from line 602
583602
584603 `cloud` environment configuration.
585604
605 - `type: "cloud"`
606
607 Environment type
608
586609 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
587610
588611 Network configuration policy.
from line 622
599622
600623 Limited network access.
601624
625 - `type: "limited"`
626
627 Network policy type
628
602629 - `allow_mcp_servers: boolean`
603630
604631 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 638
611638
612639 Specifies domains the container can reach.
613640
614 - `type: "limited"`
615
616 Network policy type
617
618641 - `packages: BetaPackages`
619642
620643 Package manager configuration.
621644
645 - `type: optional "packages"`
646
647 Package configuration type
648
649 default: packages
650
622651 - `apt: array of string`
623652
624653 Ubuntu/Debian packages to install
from line 672
643672
644673 Python packages to install
645674
646 - `type: optional "packages"`
647
648 Package configuration type
649
650 default: packages
651
652 - `type: "cloud"`
675 - `BetaSelfHostedConfig object`
676
677 Configuration for self-hosted environments.
678
679 - `type: "self_hosted"`
653680
654681 Environment type
655682
656 - `BetaSelfHostedConfig object`
657
658 Configuration for self-hosted environments.
659
660 - `type: "self_hosted"`
661
662 Environment type
663
664683 - `created_at: string`
665684
666685 RFC 3339 timestamp when environment was created
from line 695
676695 - `name: string`
677696
678697 Human-readable name for the environment
679
680 - `type: "environment"`
681
682 The type of object (always 'environment')
683
684 default: environment
685698
686699 - `updated_at: string`
687700
from line 793
780793
781794 - `string`
782795
783 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
796 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
784797
785798 - `"message-batches-2024-09-24"`
786799
from line 841
828841
829842 - `"user-profiles-2026-08-18"`
830843
844 - `"user-profiles-2026-09-04"`
845
831846 - `"advisor-tool-2026-03-01"`
832847
833848 - `"managed-agents-2026-04-01"`
from line 885
870885
871886 - `"mid-conversation-system-clear-at-2026-08-21"`
872887
888- `"anthropic-workspace-id": optional string`
889
873890### Returns
874891
875892- `BetaEnvironment object`
876893
877894 Unified Environment resource for both cloud and self-hosted environments.
878895
896 - `type: "environment"`
897
898 The type of object (always 'environment')
899
900 default: environment
901
879902 - `id: string`
880903
881904 Environment identifier (e.g., 'env_...')
from line 915
892915
893916 `cloud` environment configuration.
894917
918 - `type: "cloud"`
919
920 Environment type
921
895922 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
896923
897924 Network configuration policy.
from line 935
908935
909936 Limited network access.
910937
938 - `type: "limited"`
939
940 Network policy type
941
911942 - `allow_mcp_servers: boolean`
912943
913944 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 951
920951
921952 Specifies domains the container can reach.
922953
923 - `type: "limited"`
924
925 Network policy type
926
927954 - `packages: BetaPackages`
928955
929956 Package manager configuration.
930957
958 - `type: optional "packages"`
959
960 Package configuration type
961
962 default: packages
963
931964 - `apt: array of string`
932965
933966 Ubuntu/Debian packages to install
from line 985
952985
953986 Python packages to install
954987
955 - `type: optional "packages"`
956
957 Package configuration type
958
959 default: packages
960
961 - `type: "cloud"`
988 - `BetaSelfHostedConfig object`
989
990 Configuration for self-hosted environments.
991
992 - `type: "self_hosted"`
962993
963994 Environment type
964995
965 - `BetaSelfHostedConfig object`
966
967 Configuration for self-hosted environments.
968
969 - `type: "self_hosted"`
970
971 Environment type
972
973996 - `created_at: string`
974997
975998 RFC 3339 timestamp when environment was created
from line 1008
9851008 - `name: string`
9861009
9871010 Human-readable name for the environment
988
989 - `type: "environment"`
990
991 The type of object (always 'environment')
992
993 default: environment
9941011
9951012 - `updated_at: string`
9961013
from line 1097
10801097
10811098 - `string`
10821099
1083 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1100 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
10841101
10851102 - `"message-batches-2024-09-24"`
10861103
from line 1145
11281145
11291146 - `"user-profiles-2026-08-18"`
11301147
1148 - `"user-profiles-2026-09-04"`
1149
11311150 - `"advisor-tool-2026-03-01"`
11321151
11331152 - `"managed-agents-2026-04-01"`
from line 1188
11691188 - `"thinking-binding-controls-2026-08-01"`
11701189
11711190 - `"mid-conversation-system-clear-at-2026-08-21"`
1191
1192- `"anthropic-workspace-id": optional string`
11721193
11731194### Body parameters
11741195
from line 1251
12301251
12311252 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
12321253
1254 - `type: optional "packages"`
1255
1256 Package configuration type
1257
1258 default: packages
1259
12331260 - `apt: optional array of string or null`
12341261
12351262 Ubuntu/Debian packages to install
from line 1281
12541281
12551282 Python packages to install
12561283
1257 - `type: optional "packages"`
1258
1259 Package configuration type
1260
1261 default: packages
1262
12631284 - `BetaSelfHostedConfigParams object`
12641285
12651286 Request params for `self_hosted` environment configuration.
from line 1319
12981319
12991320 Unified Environment resource for both cloud and self-hosted environments.
13001321
1322 - `type: "environment"`
1323
1324 The type of object (always 'environment')
1325
1326 default: environment
1327
13011328 - `id: string`
13021329
13031330 Environment identifier (e.g., 'env_...')
from line 1341
13141341
13151342 `cloud` environment configuration.
13161343
1344 - `type: "cloud"`
1345
1346 Environment type
1347
13171348 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
13181349
13191350 Network configuration policy.
from line 1361
13301361
13311362 Limited network access.
13321363
1364 - `type: "limited"`
1365
1366 Network policy type
1367
13331368 - `allow_mcp_servers: boolean`
13341369
13351370 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 1377
13421377
13431378 Specifies domains the container can reach.
13441379
1345 - `type: "limited"`
1346
1347 Network policy type
1348
13491380 - `packages: BetaPackages`
13501381
13511382 Package manager configuration.
13521383
1384 - `type: optional "packages"`
1385
1386 Package configuration type
1387
1388 default: packages
1389
13531390 - `apt: array of string`
13541391
13551392 Ubuntu/Debian packages to install
from line 1411
13741411
13751412 Python packages to install
13761413
1377 - `type: optional "packages"`
1378
1379 Package configuration type
1380
1381 default: packages
1382
1383 - `type: "cloud"`
1414 - `BetaSelfHostedConfig object`
1415
1416 Configuration for self-hosted environments.
1417
1418 - `type: "self_hosted"`
13841419
13851420 Environment type
13861421
1387 - `BetaSelfHostedConfig object`
1388
1389 Configuration for self-hosted environments.
1390
1391 - `type: "self_hosted"`
1392
1393 Environment type
1394
13951422 - `created_at: string`
13961423
13971424 RFC 3339 timestamp when environment was created
from line 1434
14071434 - `name: string`
14081435
14091436 Human-readable name for the environment
1410
1411 - `type: "environment"`
1412
1413 The type of object (always 'environment')
1414
1415 default: environment
14161437
14171438 - `updated_at: string`
14181439
from line 1527
15061527
15071528 - `string`
15081529
1509 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1530 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
15101531
15111532 - `"message-batches-2024-09-24"`
15121533
from line 1575
15541575
15551576 - `"user-profiles-2026-08-18"`
15561577
1578 - `"user-profiles-2026-09-04"`
1579
15571580 - `"advisor-tool-2026-03-01"`
15581581
15591582 - `"managed-agents-2026-04-01"`
from line 1619
15961619
15971620 - `"mid-conversation-system-clear-at-2026-08-21"`
15981621
1622- `"anthropic-workspace-id": optional string`
1623
15991624### Returns
16001625
16011626- `BetaEnvironmentDeleteResponse object`
16021627
16031628 Response after deleting an environment.
16041629
1630 - `type: "environment_deleted"`
1631
1632 The type of response
1633
1634 default: environment_deleted
1635
16051636 - `id: string`
16061637
16071638 Environment identifier
1608
1609 - `type: "environment_deleted"`
1610
1611 The type of response
1612
1613 default: environment_deleted
16141639
16151640### Example
16161641
from line 1674
16491674
16501675 - `string`
16511676
1652 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
1677 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
16531678
16541679 - `"message-batches-2024-09-24"`
16551680
from line 1722
16971722
16981723 - `"user-profiles-2026-08-18"`
16991724
1725 - `"user-profiles-2026-09-04"`
1726
17001727 - `"advisor-tool-2026-03-01"`
17011728
17021729 - `"managed-agents-2026-04-01"`
from line 1766
17391766
17401767 - `"mid-conversation-system-clear-at-2026-08-21"`
17411768
1769- `"anthropic-workspace-id": optional string`
1770
17421771### Returns
17431772
17441773- `BetaEnvironment object`
17451774
17461775 Unified Environment resource for both cloud and self-hosted environments.
17471776
1777 - `type: "environment"`
1778
1779 The type of object (always 'environment')
1780
1781 default: environment
1782
17481783 - `id: string`
17491784
17501785 Environment identifier (e.g., 'env_...')
from line 1796
17611796
17621797 `cloud` environment configuration.
17631798
1799 - `type: "cloud"`
1800
1801 Environment type
1802
17641803 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
17651804
17661805 Network configuration policy.
from line 1816
17771816
17781817 Limited network access.
17791818
1819 - `type: "limited"`
1820
1821 Network policy type
1822
17801823 - `allow_mcp_servers: boolean`
17811824
17821825 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 1832
17891832
17901833 Specifies domains the container can reach.
17911834
1792 - `type: "limited"`
1793
1794 Network policy type
1795
17961835 - `packages: BetaPackages`
17971836
17981837 Package manager configuration.
17991838
1839 - `type: optional "packages"`
1840
1841 Package configuration type
1842
1843 default: packages
1844
18001845 - `apt: array of string`
18011846
18021847 Ubuntu/Debian packages to install
from line 1866
18211866
18221867 Python packages to install
18231868
1824 - `type: optional "packages"`
1825
1826 Package configuration type
1827
1828 default: packages
1829
1830 - `type: "cloud"`
1869 - `BetaSelfHostedConfig object`
1870
1871 Configuration for self-hosted environments.
1872
1873 - `type: "self_hosted"`
18311874
18321875 Environment type
18331876
1834 - `BetaSelfHostedConfig object`
1835
1836 Configuration for self-hosted environments.
1837
1838 - `type: "self_hosted"`
1839
1840 Environment type
1841
18421877 - `created_at: string`
18431878
18441879 RFC 3339 timestamp when environment was created
from line 1889
18541889 - `name: string`
18551890
18561891 Human-readable name for the environment
1857
1858 - `type: "environment"`
1859
1860 The type of object (always 'environment')
1861
1862 default: environment
18631892
18641893 - `updated_at: string`
18651894
from line 1969
19401969
19411970 `cloud` environment configuration.
19421971
1972 - `type: "cloud"`
1973
1974 Environment type
1975
19431976 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
19441977
19451978 Network configuration policy.
from line 1989
19561989
19571990 Limited network access.
19581991
1992 - `type: "limited"`
1993
1994 Network policy type
1995
19591996 - `allow_mcp_servers: boolean`
19601997
19611998 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 2005
19682005
19692006 Specifies domains the container can reach.
19702007
1971 - `type: "limited"`
1972
1973 Network policy type
1974
19752008 - `packages: BetaPackages`
19762009
19772010 Package manager configuration.
19782011
2012 - `type: optional "packages"`
2013
2014 Package configuration type
2015
2016 default: packages
2017
19792018 - `apt: array of string`
19802019
19812020 Ubuntu/Debian packages to install
from line 2038
19992038 - `pip: array of string`
20002039
20012040 Python packages to install
2002
2003 - `type: optional "packages"`
2004
2005 Package configuration type
2006
2007 default: packages
2008
2009 - `type: "cloud"`
2010
2011 Environment type
20122041
20132042### Beta Cloud Config Params
20142043
from line 2095
20662095
20672096 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
20682097
2098 - `type: optional "packages"`
2099
2100 Package configuration type
2101
2102 default: packages
2103
20692104 - `apt: optional array of string or null`
20702105
20712106 Ubuntu/Debian packages to install
from line 2125
20902125
20912126 Python packages to install
20922127
2093 - `type: optional "packages"`
2094
2095 Package configuration type
2096
2097 default: packages
2098
20992128### Beta Environment
21002129
21012130- `BetaEnvironment object`
21022131
21032132 Unified Environment resource for both cloud and self-hosted environments.
21042133
2134 - `type: "environment"`
2135
2136 The type of object (always 'environment')
2137
2138 default: environment
2139
21052140 - `id: string`
21062141
21072142 Environment identifier (e.g., 'env_...')
from line 2153
21182153
21192154 `cloud` environment configuration.
21202155
2156 - `type: "cloud"`
2157
2158 Environment type
2159
21212160 - `networking: BetaUnrestrictedNetwork or BetaLimitedNetwork`
21222161
21232162 Network configuration policy.
from line 2173
21342173
21352174 Limited network access.
21362175
2176 - `type: "limited"`
2177
2178 Network policy type
2179
21372180 - `allow_mcp_servers: boolean`
21382181
21392182 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 2189
21462189
21472190 Specifies domains the container can reach.
21482191
2149 - `type: "limited"`
2150
2151 Network policy type
2152
21532192 - `packages: BetaPackages`
21542193
21552194 Package manager configuration.
21562195
2196 - `type: optional "packages"`
2197
2198 Package configuration type
2199
2200 default: packages
2201
21572202 - `apt: array of string`
21582203
21592204 Ubuntu/Debian packages to install
from line 2223
21782223
21792224 Python packages to install
21802225
2181 - `type: optional "packages"`
2182
2183 Package configuration type
2184
2185 default: packages
2186
2187 - `type: "cloud"`
2226 - `BetaSelfHostedConfig object`
2227
2228 Configuration for self-hosted environments.
2229
2230 - `type: "self_hosted"`
21882231
21892232 Environment type
21902233
2191 - `BetaSelfHostedConfig object`
2192
2193 Configuration for self-hosted environments.
2194
2195 - `type: "self_hosted"`
2196
2197 Environment type
2198
21992234 - `created_at: string`
22002235
22012236 RFC 3339 timestamp when environment was created
from line 2247
22122247
22132248 Human-readable name for the environment
22142249
2215 - `type: "environment"`
2216
2217 The type of object (always 'environment')
2218
2219 default: environment
2220
22212250 - `updated_at: string`
22222251
22232252 RFC 3339 timestamp when environment was last updated
from line 2265
22362265
22372266 Response after deleting an environment.
22382267
2268 - `type: "environment_deleted"`
2269
2270 The type of response
2271
2272 default: environment_deleted
2273
22392274 - `id: string`
22402275
22412276 Environment identifier
22422277
2243 - `type: "environment_deleted"`
2244
2245 The type of response
2246
2247 default: environment_deleted
2248
22492278### Beta Limited Network
22502279
22512280- `BetaLimitedNetwork object`
22522281
22532282 Limited network access.
22542283
2284 - `type: "limited"`
2285
2286 Network policy type
2287
22552288 - `allow_mcp_servers: boolean`
22562289
22572290 Permits outbound access to MCP server endpoints configured on the agent, beyond those listed in the `allowed_hosts` array.
from line 2296
22632296 - `allowed_hosts: array of string`
22642297
22652298 Specifies domains the container can reach.
2266
2267 - `type: "limited"`
2268
2269 Network policy type
22702299
22712300### Beta Limited Network Params
22722301
from line 2328
22992328
23002329 Packages (and their versions) available in this environment.
23012330
2331 - `type: optional "packages"`
2332
2333 Package configuration type
2334
2335 default: packages
2336
23022337 - `apt: array of string`
23032338
23042339 Ubuntu/Debian packages to install
from line 2358
23232358
23242359 Python packages to install
23252360
2361### Beta Packages Params
2362
2363- `BetaPackagesParams object`
2364
2365 Specify packages (and optionally their versions) available in this environment.
2366
2367 When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest.
2368
2369 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
2370
23262371 - `type: optional "packages"`
23272372
23282373 Package configuration type
23292374
23302375 default: packages
23312376
2332### Beta Packages Params
2333
2334- `BetaPackagesParams object`
2335
2336 Specify packages (and optionally their versions) available in this environment.
2337
2338 When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest.
2339
2340 Under `limited` networking, requires `networking.allow_package_managers` to be `true`.
2341
23422377 - `apt: optional array of string or null`
23432378
23442379 Ubuntu/Debian packages to install
from line 2398
23632398
23642399 Python packages to install
23652400
2366 - `type: optional "packages"`
2367
2368 Package configuration type
2369
2370 default: packages
2371
23722401### Beta Self Hosted Config
23732402
23742403- `BetaSelfHostedConfig object`
from line 2452
24232452
24242453 - `string`
24252454
2426 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2455 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
24272456
24282457 - `"message-batches-2024-09-24"`
24292458
from line 2500
24712500
24722501 - `"user-profiles-2026-08-18"`
24732502
2503 - `"user-profiles-2026-09-04"`
2504
24742505 - `"advisor-tool-2026-03-01"`
24752506
24762507 - `"managed-agents-2026-04-01"`
from line 2543
25122543 - `"thinking-binding-controls-2026-08-01"`
25132544
25142545 - `"mid-conversation-system-clear-at-2026-08-21"`
2546
2547- `"anthropic-workspace-id": optional string`
25152548
25162549#### Returns
25172550
from line 2556
25232556 receive new messages. The environment worker polls for work to execute in a
25242557 self-hosted sandbox.
25252558
2559 - `type: "work"`
2560
2561 The type of object (always 'work')
2562
2563 default: work
2564
25262565 - `id: string`
25272566
25282567 Work identifier (e.g., 'work_...')
from line 2578
25392578
25402579 The actual work to be performed
25412580
2581 - `type: "session"`
2582
2583 Type of work data
2584
25422585 - `id: string`
25432586
25442587 Session identifier (e.g., 'session_...')
25452588
2546 - `type: "session"`
2547
2548 Type of work data
2549
25502589 - `environment_id: string`
25512590
25522591 Environment identifier this work belongs to (e.g., `env_...`)
from line 2627
25882627 - `stopped_at: string or null`
25892628
25902629 RFC 3339 timestamp when work execution stopped
2591
2592 - `type: "work"`
2593
2594 The type of object (always 'work')
2595
2596 default: work
25972630
25982631#### Example
25992632
from line 2696
26632696
26642697 - `string`
26652698
2666 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2699 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
26672700
26682701 - `"message-batches-2024-09-24"`
26692702
from line 2743
27102743 - `"user-profiles-2026-03-24"`
27112744
27122745 - `"user-profiles-2026-08-18"`
2746
2747 - `"user-profiles-2026-09-04"`
27132748
27142749 - `"advisor-tool-2026-03-01"`
27152750
from line 2802
27672802 receive new messages. The environment worker polls for work to execute in a
27682803 self-hosted sandbox.
27692804
2805 - `type: "work"`
2806
2807 The type of object (always 'work')
2808
2809 default: work
2810
27702811 - `id: string`
27712812
27722813 Work identifier (e.g., 'work_...')
from line 2824
27832824
27842825 The actual work to be performed
27852826
2827 - `type: "session"`
2828
2829 Type of work data
2830
27862831 - `id: string`
27872832
27882833 Session identifier (e.g., 'session_...')
27892834
2790 - `type: "session"`
2791
2792 Type of work data
2793
27942835 - `environment_id: string`
27952836
27962837 Environment identifier this work belongs to (e.g., `env_...`)
from line 2873
28322873 - `stopped_at: string or null`
28332874
28342875 RFC 3339 timestamp when work execution stopped
2835
2836 - `type: "work"`
2837
2838 The type of object (always 'work')
2839
2840 default: work
28412876
28422877#### Example
28432878
from line 2930
28952930
28962931 - `string`
28972932
2898 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
2933 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
28992934
29002935 - `"message-batches-2024-09-24"`
29012936
from line 2977
29422977 - `"user-profiles-2026-03-24"`
29432978
29442979 - `"user-profiles-2026-08-18"`
2980
2981 - `"user-profiles-2026-09-04"`
29452982
29462983 - `"advisor-tool-2026-03-01"`
29472984
from line 3032
29953032 receive new messages. The environment worker polls for work to execute in a
29963033 self-hosted sandbox.
29973034
3035 - `type: "work"`
3036
3037 The type of object (always 'work')
3038
3039 default: work
3040
29983041 - `id: string`
29993042
30003043 Work identifier (e.g., 'work_...')
from line 3054
30113054
30123055 The actual work to be performed
30133056
3057 - `type: "session"`
3058
3059 Type of work data
3060
30143061 - `id: string`
30153062
30163063 Session identifier (e.g., 'session_...')
30173064
3018 - `type: "session"`
3019
3020 Type of work data
3021
30223065 - `environment_id: string`
30233066
30243067 Environment identifier this work belongs to (e.g., `env_...`)
from line 3103
30603103 - `stopped_at: string or null`
30613104
30623105 RFC 3339 timestamp when work execution stopped
3063
3064 - `type: "work"`
3065
3066 The type of object (always 'work')
3067
3068 default: work
30693106
30703107#### Example
30713108
from line 3171
31343171
31353172 - `string`
31363173
3137 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3174 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
31383175
31393176 - `"message-batches-2024-09-24"`
31403177
from line 3219
31823219
31833220 - `"user-profiles-2026-08-18"`
31843221
3222 - `"user-profiles-2026-09-04"`
3223
31853224 - `"advisor-tool-2026-03-01"`
31863225
31873226 - `"managed-agents-2026-04-01"`
from line 3269
32303269
32313270 Response after recording a heartbeat for a work item.
32323271
3272 - `type: "work_heartbeat"`
3273
3274 The type of response
3275
3276 default: work_heartbeat
3277
32333278 - `last_heartbeat: string`
32343279
32353280 RFC 3339 timestamp of the actual heartbeat from DB
from line 3300
32553300 - `ttl_seconds: number`
32563301
32573302 Effective TTL applied to the lease
3258
3259 - `type: "work_heartbeat"`
3260
3261 The type of response
3262
3263 default: work_heartbeat
32643303
32653304#### Example
32663305
from line 3345
33063345
33073346 - `string`
33083347
3309 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3348 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
33103349
33113350 - `"message-batches-2024-09-24"`
33123351
from line 3393
33543393
33553394 - `"user-profiles-2026-08-18"`
33563395
3396 - `"user-profiles-2026-09-04"`
3397
33573398 - `"advisor-tool-2026-03-01"`
33583399
33593400 - `"managed-agents-2026-04-01"`
from line 3436
33953436 - `"thinking-binding-controls-2026-08-01"`
33963437
33973438 - `"mid-conversation-system-clear-at-2026-08-21"`
3439
3440- `"anthropic-workspace-id": optional string`
33983441
33993442#### Body parameters
34003443
from line 3457
34143457 receive new messages. The environment worker polls for work to execute in a
34153458 self-hosted sandbox.
34163459
3460 - `type: "work"`
3461
3462 The type of object (always 'work')
3463
3464 default: work
3465
34173466 - `id: string`
34183467
34193468 Work identifier (e.g., 'work_...')
from line 3479
34303479
34313480 The actual work to be performed
34323481
3482 - `type: "session"`
3483
3484 Type of work data
3485
34333486 - `id: string`
34343487
34353488 Session identifier (e.g., 'session_...')
34363489
3437 - `type: "session"`
3438
3439 Type of work data
3440
34413490 - `environment_id: string`
34423491
34433492 Environment identifier this work belongs to (e.g., `env_...`)
from line 3528
34793528 - `stopped_at: string or null`
34803529
34813530 RFC 3339 timestamp when work execution stopped
3482
3483 - `type: "work"`
3484
3485 The type of object (always 'work')
3486
3487 default: work
34883531
34893532#### Example
34903533
from line 3597
35543597
35553598 - `string`
35563599
3557 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3600 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
35583601
35593602 - `"message-batches-2024-09-24"`
35603603
from line 3645
36023645
36033646 - `"user-profiles-2026-08-18"`
36043647
3648 - `"user-profiles-2026-09-04"`
3649
36053650 - `"advisor-tool-2026-03-01"`
36063651
36073652 - `"managed-agents-2026-04-01"`
from line 3699
36543699
36553700 List of work items
36563701
3702 - `type: "work"`
3703
3704 The type of object (always 'work')
3705
3706 default: work
3707
36573708 - `id: string`
36583709
36593710 Work identifier (e.g., 'work_...')
from line 3721
36703721
36713722 The actual work to be performed
36723723
3724 - `type: "session"`
3725
3726 Type of work data
3727
36733728 - `id: string`
36743729
36753730 Session identifier (e.g., 'session_...')
36763731
3677 - `type: "session"`
3678
3679 Type of work data
3680
36813732 - `environment_id: string`
36823733
36833734 Environment identifier this work belongs to (e.g., `env_...`)
from line 3770
37193770 - `stopped_at: string or null`
37203771
37213772 RFC 3339 timestamp when work execution stopped
3722
3723 - `type: "work"`
3724
3725 The type of object (always 'work')
3726
3727 default: work
37283773
37293774 - `next_page: string or null`
37303775
from line 3836
37913836
37923837 - `string`
37933838
3794 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
3839 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
37953840
37963841 - `"message-batches-2024-09-24"`
37973842
from line 3884
38393884
38403885 - `"user-profiles-2026-08-18"`
38413886
3887 - `"user-profiles-2026-09-04"`
3888
38423889 - `"advisor-tool-2026-03-01"`
38433890
38443891 - `"managed-agents-2026-04-01"`
from line 3927
38803927 - `"thinking-binding-controls-2026-08-01"`
38813928
38823929 - `"mid-conversation-system-clear-at-2026-08-21"`
3930
3931- `"anthropic-workspace-id": optional string`
38833932
38843933#### Body parameters
38853934
from line 3946
38973946 receive new messages. The environment worker polls for work to execute in a
38983947 self-hosted sandbox.
38993948
3949 - `type: "work"`
3950
3951 The type of object (always 'work')
3952
3953 default: work
3954
39003955 - `id: string`
39013956
39023957 Work identifier (e.g., 'work_...')
from line 3968
39133968
39143969 The actual work to be performed
39153970
3971 - `type: "session"`
3972
3973 Type of work data
3974
39163975 - `id: string`
39173976
39183977 Session identifier (e.g., 'session_...')
39193978
3920 - `type: "session"`
3921
3922 Type of work data
3923
39243979 - `environment_id: string`
39253980
39263981 Environment identifier this work belongs to (e.g., `env_...`)
from line 4017
39624017 - `stopped_at: string or null`
39634018
39644019 RFC 3339 timestamp when work execution stopped
3965
3966 - `type: "work"`
3967
3968 The type of object (always 'work')
3969
3970 default: work
39714020
39724021#### Example
39734022
from line 4076
40274076
40284077 - `string`
40294078
4030 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 41 more`
4079 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 42 more`
40314080
40324081 - `"message-batches-2024-09-24"`
40334082
from line 4124
40754124
40764125 - `"user-profiles-2026-08-18"`
40774126
4127 - `"user-profiles-2026-09-04"`
4128
40784129 - `"advisor-tool-2026-03-01"`
40794130
40804131 - `"managed-agents-2026-04-01"`
from line 4168
41174168
41184169 - `"mid-conversation-system-clear-at-2026-08-21"`
41194170
4171- `"anthropic-workspace-id": optional string`
4172
41204173#### Returns
41214174
41224175- `BetaSelfHostedWorkQueueStats object`
from line 4178
41254178
41264179 Uses Redis Stream consumer group metrics for O(1) queries.
41274180
4181 - `type: "work_queue_stats"`
4182
4183 The type of object
4184
4185 default: work_queue_stats
4186
41284187 - `depth: number`
41294188
41304189 Number of work items waiting to be picked up (lag from consumer group)
from line 4197
41384197 Number of work items being processed (polled but not acknowledged)
41394198
41404199 default: 0
4141
4142 - `type: "work_queue_stats"`
4143
4144 The type of object
4145
4146 default: work_queue_stats
41474200
41484201 - `workers_polling: number or null`
41494202
41504203