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

One read of Claude Developer Platformapi-20260821T200735Z

123 pages moved out of 584 read.

Pages moved 123 significant first
Pages read 584 in this capture
Captured 20:07 UTC
Corpus hash 10824cc06631 index-hash

What this read moved

26-50 of 123, page 2 of 5

This capture is too large to show at once. Changes 26-50 of 123 are below, significant first; the rest are on the following screens.

api/beta/sessions/events Changed · +4805 / -3965 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

Nothing in the body moved in this read. What changed is above.

api/beta/sessions/events/list Changed · +251 / -41 lines

from line 1801
18011801 
18021802 - `configs: array of BetaManagedAgentsAgentToolConfig`
18031803 
1804 - `enabled: boolean`
1804 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
18051805 
1806 - `name: "bash" or "edit" or "read" or 5 more`
1806 Configuration for the bash tool.
18071807 
1808 Built-in agent tool identifier.
1808 - `enabled: boolean`
18091809 
1810 - `"bash"`
1810 - `name: "bash"`
18111811 
1812 - `"edit"`
1812 - `"bash"`
18131813 
1814 - `"read"`
1814 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
18151815 
1816 - `"write"`
1816 Permission policy for tool execution.
18171817 
1818 - `"glob"`
1818 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
18191819 
1820 - `"grep"`
1820 Tool calls are automatically approved without user confirmation.
18211821 
1822 - `"web_fetch"`
1822 - `type: "always_allow"`
18231823 
1824 - `"web_search"`
1824 - `"always_allow"`
18251825 
1826 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1826 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
18271827 
1828 Permission policy for tool execution.
1828 Tool calls require user confirmation before execution.
18291829 
1830 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1830 - `type: "always_ask"`
18311831 
1832 Tool calls are automatically approved without user confirmation.
1832 - `"always_ask"`
18331833 
1834 - `type: "always_allow"`
1834 - `type: "bash"`
18351835 
1836 - `"always_allow"`
1836 - `"bash"`
18371837 
1838 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1838 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
18391839 
1840 Tool calls require user confirmation before execution.
1840 Configuration for the edit tool.
18411841 
1842 - `type: "always_ask"`
1842 - `enabled: boolean`
18431843 
1844 - `"always_ask"`
1844 - `name: "edit"`
1845 
1846 - `"edit"`
1847 
1848 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1849 
1850 Permission policy for tool execution.
1851 
1852 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1853 
1854 Tool calls are automatically approved without user confirmation.
1855 
1856 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1857 
1858 Tool calls require user confirmation before execution.
1859 
1860 - `type: "edit"`
1861 
1862 - `"edit"`
1863 
1864 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
1865 
1866 Configuration for the read tool.
1867 
1868 - `enabled: boolean`
1869 
1870 - `name: "read"`
1871 
1872 - `"read"`
1873 
1874 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1875 
1876 Permission policy for tool execution.
1877 
1878 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1879 
1880 Tool calls are automatically approved without user confirmation.
1881 
1882 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1883 
1884 Tool calls require user confirmation before execution.
1885 
1886 - `type: "read"`
1887 
1888 - `"read"`
1889 
1890 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
1891 
1892 Configuration for the write tool.
1893 
1894 - `enabled: boolean`
1895 
1896 - `name: "write"`
1897 
1898 - `"write"`
1899 
1900 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1901 
1902 Permission policy for tool execution.
1903 
1904 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1905 
1906 Tool calls are automatically approved without user confirmation.
1907 
1908 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1909 
1910 Tool calls require user confirmation before execution.
1911 
1912 - `type: "write"`
1913 
1914 - `"write"`
1915 
1916 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
1917 
1918 Configuration for the glob tool.
1919 
1920 - `enabled: boolean`
1921 
1922 - `name: "glob"`
1923 
1924 - `"glob"`
1925 
1926 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1927 
1928 Permission policy for tool execution.
1929 
1930 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1931 
1932 Tool calls are automatically approved without user confirmation.
1933 
1934 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1935 
1936 Tool calls require user confirmation before execution.
1937 
1938 - `type: "glob"`
1939 
1940 - `"glob"`
1941 
1942 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
1943 
1944 Configuration for the grep tool.
1945 
1946 - `enabled: boolean`
1947 
1948 - `name: "grep"`
1949 
1950 - `"grep"`
1951 
1952 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1953 
1954 Permission policy for tool execution.
1955 
1956 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1957 
1958 Tool calls are automatically approved without user confirmation.
1959 
1960 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1961 
1962 Tool calls require user confirmation before execution.
1963 
1964 - `type: "grep"`
1965 
1966 - `"grep"`
1967 
1968 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
1969 
1970 Configuration for the web_fetch tool.
1971 
1972 - `enabled: boolean`
1973 
1974 - `name: "web_fetch"`
1975 
1976 - `"web_fetch"`
1977 
1978 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1979 
1980 Permission policy for tool execution.
1981 
1982 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1983 
1984 Tool calls are automatically approved without user confirmation.
1985 
1986 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1987 
1988 Tool calls require user confirmation before execution.
1989 
1990 - `type: "web_fetch"`
1991 
1992 - `"web_fetch"`
1993 
1994 - `allowed_domains: optional array of string`
1995 
1996 - `blocked_domains: optional array of string`
1997 
1998 - `max_content_tokens: optional number or null`
1999 
2000 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
2001 
2002 Configuration for the web_search tool.
2003 
2004 - `enabled: boolean`
2005 
2006 - `name: "web_search"`
2007 
2008 - `"web_search"`
2009 
2010 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
2011 
2012 Permission policy for tool execution.
2013 
2014 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
2015 
2016 Tool calls are automatically approved without user confirmation.
2017 
2018 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
2019 
2020 Tool calls require user confirmation before execution.
2021 
2022 - `type: "web_search"`
2023 
2024 - `"web_search"`
2025 
2026 - `allowed_domains: optional array of string`
2027 
2028 - `blocked_domains: optional array of string`
2029 
2030 - `user_location: optional BetaManagedAgentsUserLocation or null`
2031 
2032 Approximate user location for search result localization.
2033 
2034 - `type: "approximate"`
2035 
2036 Location precision. Only "approximate" is supported.
2037 
2038 - `"approximate"`
2039 
2040 - `city: optional string or null`
2041 
2042 City name.
2043 
2044 - `country: optional string or null`
2045 
2046 Two-letter ISO 3166-1 country code, uppercase.
2047 
2048 - `region: optional string or null`
2049 
2050 Region or state name.
2051 
2052 - `timezone: optional string or null`
2053 
2054 IANA timezone identifier, e.g. "America/Los_Angeles".
18452055 
18462056 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
18472057 

api/beta/sessions/events/stream Changed · +251 / -41 lines

from line 1773
17731773 
17741774 - `configs: array of BetaManagedAgentsAgentToolConfig`
17751775 
1776 - `enabled: boolean`
1776 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
17771777 
1778 - `name: "bash" or "edit" or "read" or 5 more`
1778 Configuration for the bash tool.
17791779 
1780 Built-in agent tool identifier.
1780 - `enabled: boolean`
17811781 
1782 - `"bash"`
1782 - `name: "bash"`
17831783 
1784 - `"edit"`
1784 - `"bash"`
17851785 
1786 - `"read"`
1786 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
17871787 
1788 - `"write"`
1788 Permission policy for tool execution.
17891789 
1790 - `"glob"`
1790 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
17911791 
1792 - `"grep"`
1792 Tool calls are automatically approved without user confirmation.
17931793 
1794 - `"web_fetch"`
1794 - `type: "always_allow"`
17951795 
1796 - `"web_search"`
1796 - `"always_allow"`
17971797 
1798 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1798 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
17991799 
1800 Permission policy for tool execution.
1800 Tool calls require user confirmation before execution.
18011801 
1802 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1802 - `type: "always_ask"`
18031803 
1804 Tool calls are automatically approved without user confirmation.
1804 - `"always_ask"`
18051805 
1806 - `type: "always_allow"`
1806 - `type: "bash"`
18071807 
1808 - `"always_allow"`
1808 - `"bash"`
18091809 
1810 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1810 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
18111811 
1812 Tool calls require user confirmation before execution.
1812 Configuration for the edit tool.
18131813 
1814 - `type: "always_ask"`
1814 - `enabled: boolean`
18151815 
1816 - `"always_ask"`
1816 - `name: "edit"`
1817 
1818 - `"edit"`
1819 
1820 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1821 
1822 Permission policy for tool execution.
1823 
1824 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1825 
1826 Tool calls are automatically approved without user confirmation.
1827 
1828 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1829 
1830 Tool calls require user confirmation before execution.
1831 
1832 - `type: "edit"`
1833 
1834 - `"edit"`
1835 
1836 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
1837 
1838 Configuration for the read tool.
1839 
1840 - `enabled: boolean`
1841 
1842 - `name: "read"`
1843 
1844 - `"read"`
1845 
1846 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1847 
1848 Permission policy for tool execution.
1849 
1850 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1851 
1852 Tool calls are automatically approved without user confirmation.
1853 
1854 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1855 
1856 Tool calls require user confirmation before execution.
1857 
1858 - `type: "read"`
1859 
1860 - `"read"`
1861 
1862 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
1863 
1864 Configuration for the write tool.
1865 
1866 - `enabled: boolean`
1867 
1868 - `name: "write"`
1869 
1870 - `"write"`
1871 
1872 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1873 
1874 Permission policy for tool execution.
1875 
1876 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1877 
1878 Tool calls are automatically approved without user confirmation.
1879 
1880 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1881 
1882 Tool calls require user confirmation before execution.
1883 
1884 - `type: "write"`
1885 
1886 - `"write"`
1887 
1888 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
1889 
1890 Configuration for the glob tool.
1891 
1892 - `enabled: boolean`
1893 
1894 - `name: "glob"`
1895 
1896 - `"glob"`
1897 
1898 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1899 
1900 Permission policy for tool execution.
1901 
1902 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1903 
1904 Tool calls are automatically approved without user confirmation.
1905 
1906 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1907 
1908 Tool calls require user confirmation before execution.
1909 
1910 - `type: "glob"`
1911 
1912 - `"glob"`
1913 
1914 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
1915 
1916 Configuration for the grep tool.
1917 
1918 - `enabled: boolean`
1919 
1920 - `name: "grep"`
1921 
1922 - `"grep"`
1923 
1924 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1925 
1926 Permission policy for tool execution.
1927 
1928 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1929 
1930 Tool calls are automatically approved without user confirmation.
1931 
1932 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1933 
1934 Tool calls require user confirmation before execution.
1935 
1936 - `type: "grep"`
1937 
1938 - `"grep"`
1939 
1940 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
1941 
1942 Configuration for the web_fetch tool.
1943 
1944 - `enabled: boolean`
1945 
1946 - `name: "web_fetch"`
1947 
1948 - `"web_fetch"`
1949 
1950 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1951 
1952 Permission policy for tool execution.
1953 
1954 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1955 
1956 Tool calls are automatically approved without user confirmation.
1957 
1958 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1959 
1960 Tool calls require user confirmation before execution.
1961 
1962 - `type: "web_fetch"`
1963 
1964 - `"web_fetch"`
1965 
1966 - `allowed_domains: optional array of string`
1967 
1968 - `blocked_domains: optional array of string`
1969 
1970 - `max_content_tokens: optional number or null`
1971 
1972 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
1973 
1974 Configuration for the web_search tool.
1975 
1976 - `enabled: boolean`
1977 
1978 - `name: "web_search"`
1979 
1980 - `"web_search"`
1981 
1982 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1983 
1984 Permission policy for tool execution.
1985 
1986 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1987 
1988 Tool calls are automatically approved without user confirmation.
1989 
1990 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1991 
1992 Tool calls require user confirmation before execution.
1993 
1994 - `type: "web_search"`
1995 
1996 - `"web_search"`
1997 
1998 - `allowed_domains: optional array of string`
1999 
2000 - `blocked_domains: optional array of string`
2001 
2002 - `user_location: optional BetaManagedAgentsUserLocation or null`
2003 
2004 Approximate user location for search result localization.
2005 
2006 - `type: "approximate"`
2007 
2008 Location precision. Only "approximate" is supported.
2009 
2010 - `"approximate"`
2011 
2012 - `city: optional string or null`
2013 
2014 City name.
2015 
2016 - `country: optional string or null`
2017 
2018 Two-letter ISO 3166-1 country code, uppercase.
2019 
2020 - `region: optional string or null`
2021 
2022 Region or state name.
2023 
2024 - `timezone: optional string or null`
2025 
2026 IANA timezone identifier, e.g. "America/Los_Angeles".
18172027 
18182028 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
18192029 

api/beta/sessions/retrieve Changed · +255 / -43 lines

from line 307
307307 
308308 - `configs: array of BetaManagedAgentsAgentToolConfig`
309309 
310 - `enabled: boolean`
310 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
311311 
312 - `name: "bash" or "edit" or "read" or 5 more`
312 Configuration for the bash tool.
313313 
314 Built-in agent tool identifier.
314 - `enabled: boolean`
315315 
316 - `"bash"`
316 - `name: "bash"`
317317 
318 - `"edit"`
318 - `"bash"`
319319 
320 - `"read"`
320 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
321321 
322 - `"write"`
322 Permission policy for tool execution.
323323 
324 - `"glob"`
324 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
325325 
326 - `"grep"`
326 Tool calls are automatically approved without user confirmation.
327327 
328 - `"web_fetch"`
328 - `type: "always_allow"`
329329 
330 - `"web_search"`
330 - `"always_allow"`
331331 
332 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
332 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
333333 
334 Permission policy for tool execution.
334 Tool calls require user confirmation before execution.
335335 
336 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
336 - `type: "always_ask"`
337337 
338 Tool calls are automatically approved without user confirmation.
338 - `"always_ask"`
339339 
340 - `type: "always_allow"`
340 - `type: "bash"`
341341 
342 - `"always_allow"`
342 - `"bash"`
343343 
344 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
344 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
345345 
346 Tool calls require user confirmation before execution.
346 Configuration for the edit tool.
347347 
348 - `type: "always_ask"`
348 - `enabled: boolean`
349349 
350 - `"always_ask"`
350 - `name: "edit"`
351351 
352 - `"edit"`
353 
354 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
355 
356 Permission policy for tool execution.
357 
358 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
359 
360 Tool calls are automatically approved without user confirmation.
361 
362 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
363 
364 Tool calls require user confirmation before execution.
365 
366 - `type: "edit"`
367 
368 - `"edit"`
369 
370 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
371 
372 Configuration for the read tool.
373 
374 - `enabled: boolean`
375 
376 - `name: "read"`
377 
378 - `"read"`
379 
380 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
381 
382 Permission policy for tool execution.
383 
384 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
385 
386 Tool calls are automatically approved without user confirmation.
387 
388 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
389 
390 Tool calls require user confirmation before execution.
391 
392 - `type: "read"`
393 
394 - `"read"`
395 
396 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
397 
398 Configuration for the write tool.
399 
400 - `enabled: boolean`
401 
402 - `name: "write"`
403 
404 - `"write"`
405 
406 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
407 
408 Permission policy for tool execution.
409 
410 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
411 
412 Tool calls are automatically approved without user confirmation.
413 
414 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
415 
416 Tool calls require user confirmation before execution.
417 
418 - `type: "write"`
419 
420 - `"write"`
421 
422 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
423 
424 Configuration for the glob tool.
425 
426 - `enabled: boolean`
427 
428 - `name: "glob"`
429 
430 - `"glob"`
431 
432 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
433 
434 Permission policy for tool execution.
435 
436 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
437 
438 Tool calls are automatically approved without user confirmation.
439 
440 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
441 
442 Tool calls require user confirmation before execution.
443 
444 - `type: "glob"`
445 
446 - `"glob"`
447 
448 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
449 
450 Configuration for the grep tool.
451 
452 - `enabled: boolean`
453 
454 - `name: "grep"`
455 
456 - `"grep"`
457 
458 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
459 
460 Permission policy for tool execution.
461 
462 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
463 
464 Tool calls are automatically approved without user confirmation.
465 
466 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
467 
468 Tool calls require user confirmation before execution.
469 
470 - `type: "grep"`
471 
472 - `"grep"`
473 
474 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
475 
476 Configuration for the web_fetch tool.
477 
478 - `enabled: boolean`
479 
480 - `name: "web_fetch"`
481 
482 - `"web_fetch"`
483 
484 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
485 
486 Permission policy for tool execution.
487 
488 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
489 
490 Tool calls are automatically approved without user confirmation.
491 
492 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
493 
494 Tool calls require user confirmation before execution.
495 
496 - `type: "web_fetch"`
497 
498 - `"web_fetch"`
499 
500 - `allowed_domains: optional array of string`
501 
502 - `blocked_domains: optional array of string`
503 
504 - `max_content_tokens: optional number or null`
505 
506 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
507 
508 Configuration for the web_search tool.
509 
510 - `enabled: boolean`
511 
512 - `name: "web_search"`
513 
514 - `"web_search"`
515 
516 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
517 
518 Permission policy for tool execution.
519 
520 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
521 
522 Tool calls are automatically approved without user confirmation.
523 
524 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
525 
526 Tool calls require user confirmation before execution.
527 
528 - `type: "web_search"`
529 
530 - `"web_search"`
531 
532 - `allowed_domains: optional array of string`
533 
534 - `blocked_domains: optional array of string`
535 
536 - `user_location: optional BetaManagedAgentsUserLocation or null`
537 
538 Approximate user location for search result localization.
539 
540 - `type: "approximate"`
541 
542 Location precision. Only "approximate" is supported.
543 
544 - `"approximate"`
545 
546 - `city: optional string or null`
547 
548 City name.
549 
550 - `country: optional string or null`
551 
552 Two-letter ISO 3166-1 country code, uppercase.
553 
554 - `region: optional string or null`
555 
556 Region or state name.
557 
558 - `timezone: optional string or null`
559 
560 IANA timezone identifier, e.g. "America/Los_Angeles".
561 
352562 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
353563 
354564 Resolved default configuration for agent tools.
from line 1026
8161026 "name": "bash",
8171027 "permission_policy": {
8181028 "type": "always_allow"
819 }
1029 },
1030 "type": "bash"
8201031 }
8211032 ],
8221033 "default_config": {
from line 1067
8561067 "name": "bash",
8571068 "permission_policy": {
8581069 "type": "always_allow"
859 }
1070 },
1071 "type": "bash"
8601072 }
8611073 ],
8621074 "default_config": {

api/beta/sessions/threads Changed · +5780 / -4307 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

Nothing in the body moved in this read. What changed is above.

api/beta/sessions/threads/archive Changed · +253 / -42 lines

from line 287
287287 
288288 - `configs: array of BetaManagedAgentsAgentToolConfig`
289289 
290 - `enabled: boolean`
290 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
291291 
292 - `name: "bash" or "edit" or "read" or 5 more`
292 Configuration for the bash tool.
293293 
294 Built-in agent tool identifier.
294 - `enabled: boolean`
295295 
296 - `"bash"`
296 - `name: "bash"`
297297 
298 - `"edit"`
298 - `"bash"`
299299 
300 - `"read"`
300 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
301301 
302 - `"write"`
302 Permission policy for tool execution.
303303 
304 - `"glob"`
304 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
305305 
306 - `"grep"`
306 Tool calls are automatically approved without user confirmation.
307307 
308 - `"web_fetch"`
308 - `type: "always_allow"`
309309 
310 - `"web_search"`
310 - `"always_allow"`
311311 
312 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
312 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
313313 
314 Permission policy for tool execution.
314 Tool calls require user confirmation before execution.
315315 
316 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
316 - `type: "always_ask"`
317317 
318 Tool calls are automatically approved without user confirmation.
318 - `"always_ask"`
319319 
320 - `type: "always_allow"`
320 - `type: "bash"`
321321 
322 - `"always_allow"`
322 - `"bash"`
323323 
324 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
324 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
325325 
326 Tool calls require user confirmation before execution.
326 Configuration for the edit tool.
327327 
328 - `type: "always_ask"`
328 - `enabled: boolean`
329329 
330 - `"always_ask"`
330 - `name: "edit"`
331331 
332 - `"edit"`
333 
334 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
335 
336 Permission policy for tool execution.
337 
338 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
339 
340 Tool calls are automatically approved without user confirmation.
341 
342 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
343 
344 Tool calls require user confirmation before execution.
345 
346 - `type: "edit"`
347 
348 - `"edit"`
349 
350 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
351 
352 Configuration for the read tool.
353 
354 - `enabled: boolean`
355 
356 - `name: "read"`
357 
358 - `"read"`
359 
360 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
361 
362 Permission policy for tool execution.
363 
364 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
365 
366 Tool calls are automatically approved without user confirmation.
367 
368 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
369 
370 Tool calls require user confirmation before execution.
371 
372 - `type: "read"`
373 
374 - `"read"`
375 
376 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
377 
378 Configuration for the write tool.
379 
380 - `enabled: boolean`
381 
382 - `name: "write"`
383 
384 - `"write"`
385 
386 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
387 
388 Permission policy for tool execution.
389 
390 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
391 
392 Tool calls are automatically approved without user confirmation.
393 
394 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
395 
396 Tool calls require user confirmation before execution.
397 
398 - `type: "write"`
399 
400 - `"write"`
401 
402 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
403 
404 Configuration for the glob tool.
405 
406 - `enabled: boolean`
407 
408 - `name: "glob"`
409 
410 - `"glob"`
411 
412 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
413 
414 Permission policy for tool execution.
415 
416 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
417 
418 Tool calls are automatically approved without user confirmation.
419 
420 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
421 
422 Tool calls require user confirmation before execution.
423 
424 - `type: "glob"`
425 
426 - `"glob"`
427 
428 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
429 
430 Configuration for the grep tool.
431 
432 - `enabled: boolean`
433 
434 - `name: "grep"`
435 
436 - `"grep"`
437 
438 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
439 
440 Permission policy for tool execution.
441 
442 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
443 
444 Tool calls are automatically approved without user confirmation.
445 
446 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
447 
448 Tool calls require user confirmation before execution.
449 
450 - `type: "grep"`
451 
452 - `"grep"`
453 
454 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
455 
456 Configuration for the web_fetch tool.
457 
458 - `enabled: boolean`
459 
460 - `name: "web_fetch"`
461 
462 - `"web_fetch"`
463 
464 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
465 
466 Permission policy for tool execution.
467 
468 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
469 
470 Tool calls are automatically approved without user confirmation.
471 
472 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
473 
474 Tool calls require user confirmation before execution.
475 
476 - `type: "web_fetch"`
477 
478 - `"web_fetch"`
479 
480 - `allowed_domains: optional array of string`
481 
482 - `blocked_domains: optional array of string`
483 
484 - `max_content_tokens: optional number or null`
485 
486 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
487 
488 Configuration for the web_search tool.
489 
490 - `enabled: boolean`
491 
492 - `name: "web_search"`
493 
494 - `"web_search"`
495 
496 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
497 
498 Permission policy for tool execution.
499 
500 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
501 
502 Tool calls are automatically approved without user confirmation.
503 
504 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
505 
506 Tool calls require user confirmation before execution.
507 
508 - `type: "web_search"`
509 
510 - `"web_search"`
511 
512 - `allowed_domains: optional array of string`
513 
514 - `blocked_domains: optional array of string`
515 
516 - `user_location: optional BetaManagedAgentsUserLocation or null`
517 
518 Approximate user location for search result localization.
519 
520 - `type: "approximate"`
521 
522 Location precision. Only "approximate" is supported.
523 
524 - `"approximate"`
525 
526 - `city: optional string or null`
527 
528 City name.
529 
530 - `country: optional string or null`
531 
532 Two-letter ISO 3166-1 country code, uppercase.
533 
534 - `region: optional string or null`
535 
536 Region or state name.
537 
538 - `timezone: optional string or null`
539 
540 IANA timezone identifier, e.g. "America/Los_Angeles".
541 
332542 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
333543 
334544 Resolved default configuration for agent tools.
from line 807
597807 "name": "bash",
598808 "permission_policy": {
599809 "type": "always_allow"
600 }
810 },
811 "type": "bash"
601812 }
602813 ],
603814 "default_config": {

api/beta/sessions/threads/events Changed · +502 / -82 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 1777
17771777 
17781778 - `configs: array of BetaManagedAgentsAgentToolConfig`
17791779 
1780 - `enabled: boolean`
1781 
1782 - `name: "bash" or "edit" or "read" or 5 more`
1783 
1784 Built-in agent tool identifier.
1785 
1786 - `"bash"`
1787 
1788 - `"edit"`
1789 
1790 - `"read"`
1791 
1792 - `"write"`
1793 
1794 - `"glob"`
1795 
1796 - `"grep"`
1797 
1798 - `"web_fetch"`
1799 
1800 - `"web_search"`
1801 
1802 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1803 
1804 Permission policy for tool execution.
1805 
1806 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1807 
1808 Tool calls are automatically approved without user confirmation.
1809 
1810 - `type: "always_allow"`
1811 
1812 - `"always_allow"`
1813 
1814 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1815 
1816 Tool calls require user confirmation before execution.
1817 
1818 - `type: "always_ask"`
1819 
1820 - `"always_ask"`
1780 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
1781 
1782 Configuration for the bash tool.
1783 
1784 - `enabled: boolean`
1785 
1786 - `name: "bash"`
1787 
1788 - `"bash"`
1789 
1790 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1791 
1792 Permission policy for tool execution.
1793 
1794 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1795 
1796 Tool calls are automatically approved without user confirmation.
1797 
1798 - `type: "always_allow"`
1799 
1800 - `"always_allow"`
1801 
1802 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1803 
1804 Tool calls require user confirmation before execution.
1805 
1806 - `type: "always_ask"`
1807 
1808 - `"always_ask"`
1809 
1810 - `type: "bash"`
1811 
1812 - `"bash"`
1813 
1814 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
1815 
1816 Configuration for the edit tool.
1817 
1818 - `enabled: boolean`
1819 
1820 - `name: "edit"`
1821 
1822 - `"edit"`
1823 
1824 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1825 
1826 Permission policy for tool execution.
1827 
1828 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1829 
1830 Tool calls are automatically approved without user confirmation.
1831 
1832 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1833 
1834 Tool calls require user confirmation before execution.
1835 
1836 - `type: "edit"`
1837 
1838 - `"edit"`
1839 
1840 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
1841 
1842 Configuration for the read tool.
1843 
1844 - `enabled: boolean`
1845 
1846 - `name: "read"`
1847 
1848 - `"read"`
1849 
1850 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1851 
1852 Permission policy for tool execution.
1853 
1854 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1855 
1856 Tool calls are automatically approved without user confirmation.
1857 
1858 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1859 
1860 Tool calls require user confirmation before execution.
1861 
1862 - `type: "read"`
1863 
1864 - `"read"`
1865 
1866 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
1867 
1868 Configuration for the write tool.
1869 
1870 - `enabled: boolean`
1871 
1872 - `name: "write"`
1873 
1874 - `"write"`
1875 
1876 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1877 
1878 Permission policy for tool execution.
1879 
1880 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1881 
1882 Tool calls are automatically approved without user confirmation.
1883 
1884 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1885 
1886 Tool calls require user confirmation before execution.
1887 
1888 - `type: "write"`
1889 
1890 - `"write"`
1891 
1892 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
1893 
1894 Configuration for the glob tool.
1895 
1896 - `enabled: boolean`
1897 
1898 - `name: "glob"`
1899 
1900 - `"glob"`
1901 
1902 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1903 
1904 Permission policy for tool execution.
1905 
1906 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1907 
1908 Tool calls are automatically approved without user confirmation.
1909 
1910 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1911 
1912 Tool calls require user confirmation before execution.
1913 
1914 - `type: "glob"`
1915 
1916 - `"glob"`
1917 
1918 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
1919 
1920 Configuration for the grep tool.
1921 
1922 - `enabled: boolean`
1923 
1924 - `name: "grep"`
1925 
1926 - `"grep"`
1927 
1928 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1929 
1930 Permission policy for tool execution.
1931 
1932 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1933 
1934 Tool calls are automatically approved without user confirmation.
1935 
1936 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1937 
1938 Tool calls require user confirmation before execution.
1939 
1940 - `type: "grep"`
1941 
1942 - `"grep"`
1943 
1944 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
1945 
1946 Configuration for the web_fetch tool.
1947 
1948 - `enabled: boolean`
1949 
1950 - `name: "web_fetch"`
1951 
1952 - `"web_fetch"`
1953 
1954 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1955 
1956 Permission policy for tool execution.
1957 
1958 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1959 
1960 Tool calls are automatically approved without user confirmation.
1961 
1962 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1963 
1964 Tool calls require user confirmation before execution.
1965 
1966 - `type: "web_fetch"`
1967 
1968 - `"web_fetch"`
1969 
1970 - `allowed_domains: optional array of string`
1971 
1972 - `blocked_domains: optional array of string`
1973 
1974 - `max_content_tokens: optional number or null`
1975 
1976 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
1977 
1978 Configuration for the web_search tool.
1979 
1980 - `enabled: boolean`
1981 
1982 - `name: "web_search"`
1983 
1984 - `"web_search"`
1985 
1986 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1987 
1988 Permission policy for tool execution.
1989 
1990 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1991 
1992 Tool calls are automatically approved without user confirmation.
1993 
1994 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1995 
1996 Tool calls require user confirmation before execution.
1997 
1998 - `type: "web_search"`
1999 
2000 - `"web_search"`
2001 
2002 - `allowed_domains: optional array of string`
2003 
2004 - `blocked_domains: optional array of string`
2005 
2006 - `user_location: optional BetaManagedAgentsUserLocation or null`
2007 
2008 Approximate user location for search result localization.
2009 
2010 - `type: "approximate"`
2011 
2012 Location precision. Only "approximate" is supported.
2013 
2014 - `"approximate"`
2015 
2016 - `city: optional string or null`
2017 
2018 City name.
2019 
2020 - `country: optional string or null`
2021 
2022 Two-letter ISO 3166-1 country code, uppercase.
2023 
2024 - `region: optional string or null`
2025 
2026 Region or state name.
2027 
2028 - `timezone: optional string or null`
2029 
2030 IANA timezone identifier, e.g. "America/Los_Angeles".
18212031 
18222032 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
18232033 
from line 4103
38934103 
38944104 - `configs: array of BetaManagedAgentsAgentToolConfig`
38954105 
3896 - `enabled: boolean`
3897 
3898 - `name: "bash" or "edit" or "read" or 5 more`
3899 
3900 Built-in agent tool identifier.
3901 
3902 - `"bash"`
3903 
3904 - `"edit"`
3905 
3906 - `"read"`
3907 
3908 - `"write"`
3909 
3910 - `"glob"`
3911 
3912 - `"grep"`
3913 
3914 - `"web_fetch"`
3915 
3916 - `"web_search"`
3917 
3918 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
3919 
3920 Permission policy for tool execution.
3921 
3922 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
3923 
3924 Tool calls are automatically approved without user confirmation.
3925 
3926 - `type: "always_allow"`
3927 
3928 - `"always_allow"`
3929 
3930 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
3931 
3932 Tool calls require user confirmation before execution.
3933 
3934 - `type: "always_ask"`
3935 
3936 - `"always_ask"`
4106 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
4107 
4108 Configuration for the bash tool.
4109 
4110 - `enabled: boolean`
4111 
4112 - `name: "bash"`
4113 
4114 - `"bash"`
4115 
4116 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4117 
4118 Permission policy for tool execution.
4119 
4120 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4121 
4122 Tool calls are automatically approved without user confirmation.
4123 
4124 - `type: "always_allow"`
4125 
4126 - `"always_allow"`
4127 
4128 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4129 
4130 Tool calls require user confirmation before execution.
4131 
4132 - `type: "always_ask"`
4133 
4134 - `"always_ask"`
4135 
4136 - `type: "bash"`
4137 
4138 - `"bash"`
4139 
4140 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
4141 
4142 Configuration for the edit tool.
4143 
4144 - `enabled: boolean`
4145 
4146 - `name: "edit"`
4147 
4148 - `"edit"`
4149 
4150 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4151 
4152 Permission policy for tool execution.
4153 
4154 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4155 
4156 Tool calls are automatically approved without user confirmation.
4157 
4158 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4159 
4160 Tool calls require user confirmation before execution.
4161 
4162 - `type: "edit"`
4163 
4164 - `"edit"`
4165 
4166 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
4167 
4168 Configuration for the read tool.
4169 
4170 - `enabled: boolean`
4171 
4172 - `name: "read"`
4173 
4174 - `"read"`
4175 
4176 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4177 
4178 Permission policy for tool execution.
4179 
4180 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4181 
4182 Tool calls are automatically approved without user confirmation.
4183 
4184 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4185 
4186 Tool calls require user confirmation before execution.
4187 
4188 - `type: "read"`
4189 
4190 - `"read"`
4191 
4192 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
4193 
4194 Configuration for the write tool.
4195 
4196 - `enabled: boolean`
4197 
4198 - `name: "write"`
4199 
4200 - `"write"`
4201 
4202 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4203 
4204 Permission policy for tool execution.
4205 
4206 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4207 
4208 Tool calls are automatically approved without user confirmation.
4209 
4210 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4211 
4212 Tool calls require user confirmation before execution.
4213 
4214 - `type: "write"`
4215 
4216 - `"write"`
4217 
4218 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
4219 
4220 Configuration for the glob tool.
4221 
4222 - `enabled: boolean`
4223 
4224 - `name: "glob"`
4225 
4226 - `"glob"`
4227 
4228 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4229 
4230 Permission policy for tool execution.
4231 
4232 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4233 
4234 Tool calls are automatically approved without user confirmation.
4235 
4236 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4237 
4238 Tool calls require user confirmation before execution.
4239 
4240 - `type: "glob"`
4241 
4242 - `"glob"`
4243 
4244 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
4245 
4246 Configuration for the grep tool.
4247 
4248 - `enabled: boolean`
4249 
4250 - `name: "grep"`
4251 
4252 - `"grep"`
4253 
4254 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4255 
4256 Permission policy for tool execution.
4257 
4258 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4259 
4260 Tool calls are automatically approved without user confirmation.
4261 
4262 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4263 
4264 Tool calls require user confirmation before execution.
4265 
4266 - `type: "grep"`
4267 
4268 - `"grep"`
4269 
4270 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
4271 
4272 Configuration for the web_fetch tool.
4273 
4274 - `enabled: boolean`
4275 
4276 - `name: "web_fetch"`
4277 
4278 - `"web_fetch"`
4279 
4280 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4281 
4282 Permission policy for tool execution.
4283 
4284 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4285 
4286 Tool calls are automatically approved without user confirmation.
4287 
4288 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4289 
4290 Tool calls require user confirmation before execution.
4291 
4292 - `type: "web_fetch"`
4293 
4294 - `"web_fetch"`
4295 
4296 - `allowed_domains: optional array of string`
4297 
4298 - `blocked_domains: optional array of string`
4299 
4300 - `max_content_tokens: optional number or null`
4301 
4302 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
4303 
4304 Configuration for the web_search tool.
4305 
4306 - `enabled: boolean`
4307 
4308 - `name: "web_search"`
4309 
4310 - `"web_search"`
4311 
4312 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
4313 
4314 Permission policy for tool execution.
4315 
4316 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
4317 
4318 Tool calls are automatically approved without user confirmation.
4319 
4320 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
4321 
4322 Tool calls require user confirmation before execution.
4323 
4324 - `type: "web_search"`
4325 
4326 - `"web_search"`
4327 
4328 - `allowed_domains: optional array of string`
4329 
4330 - `blocked_domains: optional array of string`
4331 
4332 - `user_location: optional BetaManagedAgentsUserLocation or null`
4333 
4334 Approximate user location for search result localization.
4335 
4336 - `type: "approximate"`
4337 
4338 Location precision. Only "approximate" is supported.
4339 
4340 - `"approximate"`
4341 
4342 - `city: optional string or null`
4343 
4344 City name.
4345 
4346 - `country: optional string or null`
4347 
4348 Two-letter ISO 3166-1 country code, uppercase.
4349 
4350 - `region: optional string or null`
4351 
4352 Region or state name.
4353 
4354 - `timezone: optional string or null`
4355 
4356 IANA timezone identifier, e.g. "America/Los_Angeles".
39374357 
39384358 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
39394359 
39404360 

api/beta/sessions/threads/events/list Changed · +251 / -41 lines

from line 1775
17751775 
17761776 - `configs: array of BetaManagedAgentsAgentToolConfig`
17771777 
1778 - `enabled: boolean`
1778 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
17791779 
1780 - `name: "bash" or "edit" or "read" or 5 more`
1780 Configuration for the bash tool.
17811781 
1782 Built-in agent tool identifier.
1782 - `enabled: boolean`
17831783 
1784 - `"bash"`
1784 - `name: "bash"`
17851785 
1786 - `"edit"`
1786 - `"bash"`
17871787 
1788 - `"read"`
1788 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
17891789 
1790 - `"write"`
1790 Permission policy for tool execution.
17911791 
1792 - `"glob"`
1792 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
17931793 
1794 - `"grep"`
1794 Tool calls are automatically approved without user confirmation.
17951795 
1796 - `"web_fetch"`
1796 - `type: "always_allow"`
17971797 
1798 - `"web_search"`
1798 - `"always_allow"`
17991799 
1800 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1800 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
18011801 
1802 Permission policy for tool execution.
1802 Tool calls require user confirmation before execution.
18031803 
1804 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1804 - `type: "always_ask"`
18051805 
1806 Tool calls are automatically approved without user confirmation.
1806 - `"always_ask"`
18071807 
1808 - `type: "always_allow"`
1808 - `type: "bash"`
18091809 
1810 - `"always_allow"`
1810 - `"bash"`
18111811 
1812 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1812 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
18131813 
1814 Tool calls require user confirmation before execution.
1814 Configuration for the edit tool.
18151815 
1816 - `type: "always_ask"`
1816 - `enabled: boolean`
18171817 
1818 - `"always_ask"`
1818 - `name: "edit"`
1819 
1820 - `"edit"`
1821 
1822 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1823 
1824 Permission policy for tool execution.
1825 
1826 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1827 
1828 Tool calls are automatically approved without user confirmation.
1829 
1830 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1831 
1832 Tool calls require user confirmation before execution.
1833 
1834 - `type: "edit"`
1835 
1836 - `"edit"`
1837 
1838 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
1839 
1840 Configuration for the read tool.
1841 
1842 - `enabled: boolean`
1843 
1844 - `name: "read"`
1845 
1846 - `"read"`
1847 
1848 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1849 
1850 Permission policy for tool execution.
1851 
1852 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1853 
1854 Tool calls are automatically approved without user confirmation.
1855 
1856 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1857 
1858 Tool calls require user confirmation before execution.
1859 
1860 - `type: "read"`
1861 
1862 - `"read"`
1863 
1864 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
1865 
1866 Configuration for the write tool.
1867 
1868 - `enabled: boolean`
1869 
1870 - `name: "write"`
1871 
1872 - `"write"`
1873 
1874 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1875 
1876 Permission policy for tool execution.
1877 
1878 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1879 
1880 Tool calls are automatically approved without user confirmation.
1881 
1882 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1883 
1884 Tool calls require user confirmation before execution.
1885 
1886 - `type: "write"`
1887 
1888 - `"write"`
1889 
1890 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
1891 
1892 Configuration for the glob tool.
1893 
1894 - `enabled: boolean`
1895 
1896 - `name: "glob"`
1897 
1898 - `"glob"`
1899 
1900 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1901 
1902 Permission policy for tool execution.
1903 
1904 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1905 
1906 Tool calls are automatically approved without user confirmation.
1907 
1908 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1909 
1910 Tool calls require user confirmation before execution.
1911 
1912 - `type: "glob"`
1913 
1914 - `"glob"`
1915 
1916 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
1917 
1918 Configuration for the grep tool.
1919 
1920 - `enabled: boolean`
1921 
1922 - `name: "grep"`
1923 
1924 - `"grep"`
1925 
1926 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1927 
1928 Permission policy for tool execution.
1929 
1930 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1931 
1932 Tool calls are automatically approved without user confirmation.
1933 
1934 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1935 
1936 Tool calls require user confirmation before execution.
1937 
1938 - `type: "grep"`
1939 
1940 - `"grep"`
1941 
1942 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
1943 
1944 Configuration for the web_fetch tool.
1945 
1946 - `enabled: boolean`
1947 
1948 - `name: "web_fetch"`
1949 
1950 - `"web_fetch"`
1951 
1952 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1953 
1954 Permission policy for tool execution.
1955 
1956 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1957 
1958 Tool calls are automatically approved without user confirmation.
1959 
1960 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1961 
1962 Tool calls require user confirmation before execution.
1963 
1964 - `type: "web_fetch"`
1965 
1966 - `"web_fetch"`
1967 
1968 - `allowed_domains: optional array of string`
1969 
1970 - `blocked_domains: optional array of string`
1971 
1972 - `max_content_tokens: optional number or null`
1973 
1974 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
1975 
1976 Configuration for the web_search tool.
1977 
1978 - `enabled: boolean`
1979 
1980 - `name: "web_search"`
1981 
1982 - `"web_search"`
1983 
1984 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1985 
1986 Permission policy for tool execution.
1987 
1988 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1989 
1990 Tool calls are automatically approved without user confirmation.
1991 
1992 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1993 
1994 Tool calls require user confirmation before execution.
1995 
1996 - `type: "web_search"`
1997 
1998 - `"web_search"`
1999 
2000 - `allowed_domains: optional array of string`
2001 
2002 - `blocked_domains: optional array of string`
2003 
2004 - `user_location: optional BetaManagedAgentsUserLocation or null`
2005 
2006 Approximate user location for search result localization.
2007 
2008 - `type: "approximate"`
2009 
2010 Location precision. Only "approximate" is supported.
2011 
2012 - `"approximate"`
2013 
2014 - `city: optional string or null`
2015 
2016 City name.
2017 
2018 - `country: optional string or null`
2019 
2020 Two-letter ISO 3166-1 country code, uppercase.
2021 
2022 - `region: optional string or null`
2023 
2024 Region or state name.
2025 
2026 - `timezone: optional string or null`
2027 
2028 IANA timezone identifier, e.g. "America/Los_Angeles".
18192029 
18202030 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
18212031 

api/beta/sessions/threads/events/stream Changed · +251 / -41 lines

from line 1775
17751775 
17761776 - `configs: array of BetaManagedAgentsAgentToolConfig`
17771777 
1778 - `enabled: boolean`
1778 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
17791779 
1780 - `name: "bash" or "edit" or "read" or 5 more`
1780 Configuration for the bash tool.
17811781 
1782 Built-in agent tool identifier.
1782 - `enabled: boolean`
17831783 
1784 - `"bash"`
1784 - `name: "bash"`
17851785 
1786 - `"edit"`
1786 - `"bash"`
17871787 
1788 - `"read"`
1788 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
17891789 
1790 - `"write"`
1790 Permission policy for tool execution.
17911791 
1792 - `"glob"`
1792 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
17931793 
1794 - `"grep"`
1794 Tool calls are automatically approved without user confirmation.
17951795 
1796 - `"web_fetch"`
1796 - `type: "always_allow"`
17971797 
1798 - `"web_search"`
1798 - `"always_allow"`
17991799 
1800 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1800 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
18011801 
1802 Permission policy for tool execution.
1802 Tool calls require user confirmation before execution.
18031803 
1804 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1804 - `type: "always_ask"`
18051805 
1806 Tool calls are automatically approved without user confirmation.
1806 - `"always_ask"`
18071807 
1808 - `type: "always_allow"`
1808 - `type: "bash"`
18091809 
1810 - `"always_allow"`
1810 - `"bash"`
18111811 
1812 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1812 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
18131813 
1814 Tool calls require user confirmation before execution.
1814 Configuration for the edit tool.
18151815 
1816 - `type: "always_ask"`
1816 - `enabled: boolean`
18171817 
1818 - `"always_ask"`
1818 - `name: "edit"`
1819 
1820 - `"edit"`
1821 
1822 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1823 
1824 Permission policy for tool execution.
1825 
1826 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1827 
1828 Tool calls are automatically approved without user confirmation.
1829 
1830 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1831 
1832 Tool calls require user confirmation before execution.
1833 
1834 - `type: "edit"`
1835 
1836 - `"edit"`
1837 
1838 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
1839 
1840 Configuration for the read tool.
1841 
1842 - `enabled: boolean`
1843 
1844 - `name: "read"`
1845 
1846 - `"read"`
1847 
1848 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1849 
1850 Permission policy for tool execution.
1851 
1852 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1853 
1854 Tool calls are automatically approved without user confirmation.
1855 
1856 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1857 
1858 Tool calls require user confirmation before execution.
1859 
1860 - `type: "read"`
1861 
1862 - `"read"`
1863 
1864 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
1865 
1866 Configuration for the write tool.
1867 
1868 - `enabled: boolean`
1869 
1870 - `name: "write"`
1871 
1872 - `"write"`
1873 
1874 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1875 
1876 Permission policy for tool execution.
1877 
1878 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1879 
1880 Tool calls are automatically approved without user confirmation.
1881 
1882 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1883 
1884 Tool calls require user confirmation before execution.
1885 
1886 - `type: "write"`
1887 
1888 - `"write"`
1889 
1890 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
1891 
1892 Configuration for the glob tool.
1893 
1894 - `enabled: boolean`
1895 
1896 - `name: "glob"`
1897 
1898 - `"glob"`
1899 
1900 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1901 
1902 Permission policy for tool execution.
1903 
1904 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1905 
1906 Tool calls are automatically approved without user confirmation.
1907 
1908 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1909 
1910 Tool calls require user confirmation before execution.
1911 
1912 - `type: "glob"`
1913 
1914 - `"glob"`
1915 
1916 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
1917 
1918 Configuration for the grep tool.
1919 
1920 - `enabled: boolean`
1921 
1922 - `name: "grep"`
1923 
1924 - `"grep"`
1925 
1926 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1927 
1928 Permission policy for tool execution.
1929 
1930 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1931 
1932 Tool calls are automatically approved without user confirmation.
1933 
1934 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1935 
1936 Tool calls require user confirmation before execution.
1937 
1938 - `type: "grep"`
1939 
1940 - `"grep"`
1941 
1942 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
1943 
1944 Configuration for the web_fetch tool.
1945 
1946 - `enabled: boolean`
1947 
1948 - `name: "web_fetch"`
1949 
1950 - `"web_fetch"`
1951 
1952 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1953 
1954 Permission policy for tool execution.
1955 
1956 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1957 
1958 Tool calls are automatically approved without user confirmation.
1959 
1960 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1961 
1962 Tool calls require user confirmation before execution.
1963 
1964 - `type: "web_fetch"`
1965 
1966 - `"web_fetch"`
1967 
1968 - `allowed_domains: optional array of string`
1969 
1970 - `blocked_domains: optional array of string`
1971 
1972 - `max_content_tokens: optional number or null`
1973 
1974 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
1975 
1976 Configuration for the web_search tool.
1977 
1978 - `enabled: boolean`
1979 
1980 - `name: "web_search"`
1981 
1982 - `"web_search"`
1983 
1984 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
1985 
1986 Permission policy for tool execution.
1987 
1988 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
1989 
1990 Tool calls are automatically approved without user confirmation.
1991 
1992 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
1993 
1994 Tool calls require user confirmation before execution.
1995 
1996 - `type: "web_search"`
1997 
1998 - `"web_search"`
1999 
2000 - `allowed_domains: optional array of string`
2001 
2002 - `blocked_domains: optional array of string`
2003 
2004 - `user_location: optional BetaManagedAgentsUserLocation or null`
2005 
2006 Approximate user location for search result localization.
2007 
2008 - `type: "approximate"`
2009 
2010 Location precision. Only "approximate" is supported.
2011 
2012 - `"approximate"`
2013 
2014 - `city: optional string or null`
2015 
2016 City name.
2017 
2018 - `country: optional string or null`
2019 
2020 Two-letter ISO 3166-1 country code, uppercase.
2021 
2022 - `region: optional string or null`
2023 
2024 Region or state name.
2025 
2026 - `timezone: optional string or null`
2027 
2028 IANA timezone identifier, e.g. "America/Los_Angeles".
18192029 
18202030 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
18212031 

api/beta/sessions/threads/list Changed · +253 / -42 lines

from line 295
295295 
296296 - `configs: array of BetaManagedAgentsAgentToolConfig`
297297 
298 - `enabled: boolean`
298 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
299299 
300 - `name: "bash" or "edit" or "read" or 5 more`
300 Configuration for the bash tool.
301301 
302 Built-in agent tool identifier.
302 - `enabled: boolean`
303303 
304 - `"bash"`
304 - `name: "bash"`
305305 
306 - `"edit"`
306 - `"bash"`
307307 
308 - `"read"`
308 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
309309 
310 - `"write"`
310 Permission policy for tool execution.
311311 
312 - `"glob"`
312 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
313313 
314 - `"grep"`
314 Tool calls are automatically approved without user confirmation.
315315 
316 - `"web_fetch"`
316 - `type: "always_allow"`
317317 
318 - `"web_search"`
318 - `"always_allow"`
319319 
320 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
320 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
321321 
322 Permission policy for tool execution.
322 Tool calls require user confirmation before execution.
323323 
324 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
324 - `type: "always_ask"`
325325 
326 Tool calls are automatically approved without user confirmation.
326 - `"always_ask"`
327327 
328 - `type: "always_allow"`
328 - `type: "bash"`
329329 
330 - `"always_allow"`
330 - `"bash"`
331331 
332 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
332 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
333333 
334 Tool calls require user confirmation before execution.
334 Configuration for the edit tool.
335335 
336 - `type: "always_ask"`
336 - `enabled: boolean`
337337 
338 - `"always_ask"`
338 - `name: "edit"`
339339 
340 - `"edit"`
341 
342 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
343 
344 Permission policy for tool execution.
345 
346 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
347 
348 Tool calls are automatically approved without user confirmation.
349 
350 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
351 
352 Tool calls require user confirmation before execution.
353 
354 - `type: "edit"`
355 
356 - `"edit"`
357 
358 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
359 
360 Configuration for the read tool.
361 
362 - `enabled: boolean`
363 
364 - `name: "read"`
365 
366 - `"read"`
367 
368 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
369 
370 Permission policy for tool execution.
371 
372 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
373 
374 Tool calls are automatically approved without user confirmation.
375 
376 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
377 
378 Tool calls require user confirmation before execution.
379 
380 - `type: "read"`
381 
382 - `"read"`
383 
384 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
385 
386 Configuration for the write tool.
387 
388 - `enabled: boolean`
389 
390 - `name: "write"`
391 
392 - `"write"`
393 
394 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
395 
396 Permission policy for tool execution.
397 
398 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
399 
400 Tool calls are automatically approved without user confirmation.
401 
402 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
403 
404 Tool calls require user confirmation before execution.
405 
406 - `type: "write"`
407 
408 - `"write"`
409 
410 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
411 
412 Configuration for the glob tool.
413 
414 - `enabled: boolean`
415 
416 - `name: "glob"`
417 
418 - `"glob"`
419 
420 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
421 
422 Permission policy for tool execution.
423 
424 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
425 
426 Tool calls are automatically approved without user confirmation.
427 
428 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
429 
430 Tool calls require user confirmation before execution.
431 
432 - `type: "glob"`
433 
434 - `"glob"`
435 
436 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
437 
438 Configuration for the grep tool.
439 
440 - `enabled: boolean`
441 
442 - `name: "grep"`
443 
444 - `"grep"`
445 
446 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
447 
448 Permission policy for tool execution.
449 
450 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
451 
452 Tool calls are automatically approved without user confirmation.
453 
454 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
455 
456 Tool calls require user confirmation before execution.
457 
458 - `type: "grep"`
459 
460 - `"grep"`
461 
462 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
463 
464 Configuration for the web_fetch tool.
465 
466 - `enabled: boolean`
467 
468 - `name: "web_fetch"`
469 
470 - `"web_fetch"`
471 
472 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
473 
474 Permission policy for tool execution.
475 
476 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
477 
478 Tool calls are automatically approved without user confirmation.
479 
480 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
481 
482 Tool calls require user confirmation before execution.
483 
484 - `type: "web_fetch"`
485 
486 - `"web_fetch"`
487 
488 - `allowed_domains: optional array of string`
489 
490 - `blocked_domains: optional array of string`
491 
492 - `max_content_tokens: optional number or null`
493 
494 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
495 
496 Configuration for the web_search tool.
497 
498 - `enabled: boolean`
499 
500 - `name: "web_search"`
501 
502 - `"web_search"`
503 
504 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
505 
506 Permission policy for tool execution.
507 
508 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
509 
510 Tool calls are automatically approved without user confirmation.
511 
512 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
513 
514 Tool calls require user confirmation before execution.
515 
516 - `type: "web_search"`
517 
518 - `"web_search"`
519 
520 - `allowed_domains: optional array of string`
521 
522 - `blocked_domains: optional array of string`
523 
524 - `user_location: optional BetaManagedAgentsUserLocation or null`
525 
526 Approximate user location for search result localization.
527 
528 - `type: "approximate"`
529 
530 Location precision. Only "approximate" is supported.
531 
532 - `"approximate"`
533 
534 - `city: optional string or null`
535 
536 City name.
537 
538 - `country: optional string or null`
539 
540 Two-letter ISO 3166-1 country code, uppercase.
541 
542 - `region: optional string or null`
543 
544 Region or state name.
545 
546 - `timezone: optional string or null`
547 
548 IANA timezone identifier, e.g. "America/Los_Angeles".
549 
340550 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
341551 
342552 Resolved default configuration for agent tools.
from line 820
610820 "name": "bash",
611821 "permission_policy": {
612822 "type": "always_allow"
613 }
823 },
824 "type": "bash"
614825 }
615826 ],
616827 "default_config": {

api/beta/sessions/threads/retrieve Changed · +253 / -42 lines

from line 287
287287 
288288 - `configs: array of BetaManagedAgentsAgentToolConfig`
289289 
290 - `enabled: boolean`
290 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
291291 
292 - `name: "bash" or "edit" or "read" or 5 more`
292 Configuration for the bash tool.
293293 
294 Built-in agent tool identifier.
294 - `enabled: boolean`
295295 
296 - `"bash"`
296 - `name: "bash"`
297297 
298 - `"edit"`
298 - `"bash"`
299299 
300 - `"read"`
300 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
301301 
302 - `"write"`
302 Permission policy for tool execution.
303303 
304 - `"glob"`
304 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
305305 
306 - `"grep"`
306 Tool calls are automatically approved without user confirmation.
307307 
308 - `"web_fetch"`
308 - `type: "always_allow"`
309309 
310 - `"web_search"`
310 - `"always_allow"`
311311 
312 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
312 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
313313 
314 Permission policy for tool execution.
314 Tool calls require user confirmation before execution.
315315 
316 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
316 - `type: "always_ask"`
317317 
318 Tool calls are automatically approved without user confirmation.
318 - `"always_ask"`
319319 
320 - `type: "always_allow"`
320 - `type: "bash"`
321321 
322 - `"always_allow"`
322 - `"bash"`
323323 
324 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
324 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
325325 
326 Tool calls require user confirmation before execution.
326 Configuration for the edit tool.
327327 
328 - `type: "always_ask"`
328 - `enabled: boolean`
329329 
330 - `"always_ask"`
330 - `name: "edit"`
331331 
332 - `"edit"`
333 
334 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
335 
336 Permission policy for tool execution.
337 
338 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
339 
340 Tool calls are automatically approved without user confirmation.
341 
342 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
343 
344 Tool calls require user confirmation before execution.
345 
346 - `type: "edit"`
347 
348 - `"edit"`
349 
350 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
351 
352 Configuration for the read tool.
353 
354 - `enabled: boolean`
355 
356 - `name: "read"`
357 
358 - `"read"`
359 
360 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
361 
362 Permission policy for tool execution.
363 
364 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
365 
366 Tool calls are automatically approved without user confirmation.
367 
368 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
369 
370 Tool calls require user confirmation before execution.
371 
372 - `type: "read"`
373 
374 - `"read"`
375 
376 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
377 
378 Configuration for the write tool.
379 
380 - `enabled: boolean`
381 
382 - `name: "write"`
383 
384 - `"write"`
385 
386 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
387 
388 Permission policy for tool execution.
389 
390 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
391 
392 Tool calls are automatically approved without user confirmation.
393 
394 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
395 
396 Tool calls require user confirmation before execution.
397 
398 - `type: "write"`
399 
400 - `"write"`
401 
402 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
403 
404 Configuration for the glob tool.
405 
406 - `enabled: boolean`
407 
408 - `name: "glob"`
409 
410 - `"glob"`
411 
412 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
413 
414 Permission policy for tool execution.
415 
416 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
417 
418 Tool calls are automatically approved without user confirmation.
419 
420 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
421 
422 Tool calls require user confirmation before execution.
423 
424 - `type: "glob"`
425 
426 - `"glob"`
427 
428 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
429 
430 Configuration for the grep tool.
431 
432 - `enabled: boolean`
433 
434 - `name: "grep"`
435 
436 - `"grep"`
437 
438 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
439 
440 Permission policy for tool execution.
441 
442 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
443 
444 Tool calls are automatically approved without user confirmation.
445 
446 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
447 
448 Tool calls require user confirmation before execution.
449 
450 - `type: "grep"`
451 
452 - `"grep"`
453 
454 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
455 
456 Configuration for the web_fetch tool.
457 
458 - `enabled: boolean`
459 
460 - `name: "web_fetch"`
461 
462 - `"web_fetch"`
463 
464 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
465 
466 Permission policy for tool execution.
467 
468 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
469 
470 Tool calls are automatically approved without user confirmation.
471 
472 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
473 
474 Tool calls require user confirmation before execution.
475 
476 - `type: "web_fetch"`
477 
478 - `"web_fetch"`
479 
480 - `allowed_domains: optional array of string`
481 
482 - `blocked_domains: optional array of string`
483 
484 - `max_content_tokens: optional number or null`
485 
486 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
487 
488 Configuration for the web_search tool.
489 
490 - `enabled: boolean`
491 
492 - `name: "web_search"`
493 
494 - `"web_search"`
495 
496 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
497 
498 Permission policy for tool execution.
499 
500 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
501 
502 Tool calls are automatically approved without user confirmation.
503 
504 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
505 
506 Tool calls require user confirmation before execution.
507 
508 - `type: "web_search"`
509 
510 - `"web_search"`
511 
512 - `allowed_domains: optional array of string`
513 
514 - `blocked_domains: optional array of string`
515 
516 - `user_location: optional BetaManagedAgentsUserLocation or null`
517 
518 Approximate user location for search result localization.
519 
520 - `type: "approximate"`
521 
522 Location precision. Only "approximate" is supported.
523 
524 - `"approximate"`
525 
526 - `city: optional string or null`
527 
528 City name.
529 
530 - `country: optional string or null`
531 
532 Two-letter ISO 3166-1 country code, uppercase.
533 
534 - `region: optional string or null`
535 
536 Region or state name.
537 
538 - `timezone: optional string or null`
539 
540 IANA timezone identifier, e.g. "America/Los_Angeles".
541 
332542 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
333543 
334544 Resolved default configuration for agent tools.
from line 806
596806 "name": "bash",
597807 "permission_policy": {
598808 "type": "always_allow"
599 }
809 },
810 "type": "bash"
600811 }
601812 ],
602813 "default_config": {

api/beta/sessions/update Changed · +577 / -115 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 129
129129 
130130 Per-tool configuration overrides.
131131 
132 - `name: "bash" or "edit" or "read" or 5 more`
133 
134 Built-in agent tool identifier.
135 
136 - `"bash"`
137 
138 - `"edit"`
139 
140 - `"read"`
141 
142 - `"write"`
143 
144 - `"glob"`
145 
146 - `"grep"`
147 
148 - `"web_fetch"`
149 
150 - `"web_search"`
132 - `BetaManagedAgentsBashToolConfigParams object { name, enabled, permission_policy, type }`
133 
134 Configuration override for the bash tool.
135 
136 - `name: "bash"`
137 
138 Must be "bash".
139 
140 - `"bash"`
141 
142 - `enabled: optional boolean or null`
143 
144 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
145 
146 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
147 
148 Permission policy for tool execution.
149 
150 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
151 
152 Tool calls are automatically approved without user confirmation.
153 
154 - `type: "always_allow"`
155 
156 - `"always_allow"`
157 
158 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
159 
160 Tool calls require user confirmation before execution.
161 
162 - `type: "always_ask"`
163 
164 - `"always_ask"`
165 
166 - `type: optional "bash"`
167 
168 - `"bash"`
169 
170 - `BetaManagedAgentsEditToolConfigParams object { name, enabled, permission_policy, type }`
171 
172 Configuration override for the edit tool.
173 
174 - `name: "edit"`
175 
176 Must be "edit".
177 
178 - `"edit"`
179 
180 - `enabled: optional boolean or null`
181 
182 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
183 
184 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
185 
186 Permission policy for tool execution.
187 
188 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
189 
190 Tool calls are automatically approved without user confirmation.
191 
192 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
193 
194 Tool calls require user confirmation before execution.
195 
196 - `type: optional "edit"`
197 
198 - `"edit"`
199 
200 - `BetaManagedAgentsReadToolConfigParams object { name, enabled, permission_policy, type }`
201 
202 Configuration override for the read tool.
203 
204 - `name: "read"`
205 
206 Must be "read".
207 
208 - `"read"`
209 
210 - `enabled: optional boolean or null`
211 
212 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
213 
214 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
215 
216 Permission policy for tool execution.
217 
218 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
219 
220 Tool calls are automatically approved without user confirmation.
221 
222 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
223 
224 Tool calls require user confirmation before execution.
225 
226 - `type: optional "read"`
227 
228 - `"read"`
229 
230 - `BetaManagedAgentsWriteToolConfigParams object { name, enabled, permission_policy, type }`
231 
232 Configuration override for the write tool.
233 
234 - `name: "write"`
235 
236 Must be "write".
237 
238 - `"write"`
239 
240 - `enabled: optional boolean or null`
241 
242 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
243 
244 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
245 
246 Permission policy for tool execution.
247 
248 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
249 
250 Tool calls are automatically approved without user confirmation.
251 
252 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
253 
254 Tool calls require user confirmation before execution.
255 
256 - `type: optional "write"`
257 
258 - `"write"`
259 
260 - `BetaManagedAgentsGlobToolConfigParams object { name, enabled, permission_policy, type }`
261 
262 Configuration override for the glob tool.
263 
264 - `name: "glob"`
265 
266 Must be "glob".
267 
268 - `"glob"`
269 
270 - `enabled: optional boolean or null`
271 
272 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
273 
274 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
275 
276 Permission policy for tool execution.
277 
278 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
279 
280 Tool calls are automatically approved without user confirmation.
281 
282 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
283 
284 Tool calls require user confirmation before execution.
285 
286 - `type: optional "glob"`
287 
288 - `"glob"`
289 
290 - `BetaManagedAgentsGrepToolConfigParams object { name, enabled, permission_policy, type }`
291 
292 Configuration override for the grep tool.
293 
294 - `name: "grep"`
295 
296 Must be "grep".
297 
298 - `"grep"`
299 
300 - `enabled: optional boolean or null`
301 
302 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
303 
304 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
305 
306 Permission policy for tool execution.
307 
308 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
309 
310 Tool calls are automatically approved without user confirmation.
311 
312 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
313 
314 Tool calls require user confirmation before execution.
315 
316 - `type: optional "grep"`
317 
318 - `"grep"`
319 
320 - `BetaManagedAgentsWebFetchToolConfigParams object { name, allowed_domains, blocked_domains, 4 more }`
321 
322 Configuration override for the web_fetch tool.
323 
324 - `name: "web_fetch"`
325 
326 Must be "web_fetch".
327 
328 - `"web_fetch"`
329 
330 - `allowed_domains: optional array of string`
331 
332 Only fetch URLs whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "docs.example.com" (no scheme, port, or path). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with blocked_domains.
333 
334 - `blocked_domains: optional array of string`
335 
336 Never fetch URLs whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "ads.example.com" (no scheme, port, or path). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with allowed_domains.
337 
338 - `enabled: optional boolean or null`
339 
340 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
341 
342 - `max_content_tokens: optional number or null`
343 
344 Maximum number of tokens of fetched text content to include in context per call. Does not apply to binary content such as PDFs.
345 
346 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
347 
348 Permission policy for tool execution.
349 
350 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
351 
352 Tool calls are automatically approved without user confirmation.
353 
354 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
355 
356 Tool calls require user confirmation before execution.
357 
358 - `type: optional "web_fetch"`
359 
360 - `"web_fetch"`
361 
362 - `BetaManagedAgentsWebSearchToolConfigParams object { name, allowed_domains, blocked_domains, 4 more }`
363 
364 Configuration override for the web_search tool.
365 
366 - `name: "web_search"`
367 
368 Must be "web_search".
369 
370 - `"web_search"`
371 
372 - `allowed_domains: optional array of string`
373 
374 Only return search results whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "docs.example.com" (no scheme or port; an optional path suffix is accepted). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with blocked_domains.
375 
376 - `blocked_domains: optional array of string`
377 
378 Never return search results whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "ads.example.com" (no scheme or port; an optional path suffix is accepted). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with allowed_domains.
379 
380 - `enabled: optional boolean or null`
381 
382 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
383 
384 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
385 
386 Permission policy for tool execution.
387 
388 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
389 
390 Tool calls are automatically approved without user confirmation.
391 
392 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
393 
394 Tool calls require user confirmation before execution.
395 
396 - `type: optional "web_search"`
397 
398 - `"web_search"`
399 
400 - `user_location: optional BetaManagedAgentsUserLocation or null`
401 
402 Approximate user location for search result localization.
403 
404 - `type: "approximate"`
405 
406 Location precision. Only "approximate" is supported.
407 
408 - `"approximate"`
409 
410 - `city: optional string or null`
411 
412 City name.
413 
414 - `country: optional string or null`
415 
416 Two-letter ISO 3166-1 country code, uppercase.
417 
418 - `region: optional string or null`
419 
420 Region or state name.
421 
422 - `timezone: optional string or null`
423 
424 IANA timezone identifier, e.g. "America/Los_Angeles".
425 
426 - `default_config: optional BetaManagedAgentsAgentToolsetDefaultConfigParams or null`
427 
428 Default configuration for all tools in a toolset.
151429 
152430 - `enabled: optional boolean or null`
153431 
154 Whether this tool is enabled and available to Claude. Overrides the default_config setting.
432 Whether tools are enabled and available to Claude by default. Defaults to true if not specified.
155433 
156434 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
157435 
from line 439
161439 
162440 Tool calls are automatically approved without user confirmation.
163441 
164 - `type: "always_allow"`
165 
166 - `"always_allow"`
167 
168442 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
169443 
170444 Tool calls require user confirmation before execution.
171445 
172 - `type: "always_ask"`
173 
174 - `"always_ask"`
175 
176 - `default_config: optional BetaManagedAgentsAgentToolsetDefaultConfigParams or null`
177 
178 Default configuration for all tools in a toolset.
446 - `BetaManagedAgentsMCPToolsetParams object { mcp_server_name, type, configs, default_config }`
447 
448 Configuration for tools from an MCP server defined in `mcp_servers`.
449 
450 - `mcp_server_name: string`
451 
452 Name of the MCP server. Must match a server name from the mcp_servers array. 1-255 characters.
453 
454 - `type: "mcp_toolset"`
455 
456 - `"mcp_toolset"`
457 
458 - `configs: optional array of BetaManagedAgentsMCPToolConfigParams`
459 
460 Per-tool configuration overrides.
461 
462 - `name: string`
463 
464 Name of the MCP tool to configure. 1-128 characters.
179465 
180466 - `enabled: optional boolean or null`
181467 
182 Whether tools are enabled and available to Claude by default. Defaults to true if not specified.
468 Whether this tool is enabled. Overrides the `default_config` setting.
183469 
184470 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
185471 
from line 479
193479 
194480 Tool calls require user confirmation before execution.
195481 
196 - `BetaManagedAgentsMCPToolsetParams object { mcp_server_name, type, configs, default_config }`
197 
198 Configuration for tools from an MCP server defined in `mcp_servers`.
199 
200 - `mcp_server_name: string`
201 
202 Name of the MCP server. Must match a server name from the mcp_servers array. 1-255 characters.
203 
204 - `type: "mcp_toolset"`
205 
206 - `"mcp_toolset"`
207 
208 - `configs: optional array of BetaManagedAgentsMCPToolConfigParams`
209 
210 Per-tool configuration overrides.
211 
212 - `name: string`
213 
214 Name of the MCP tool to configure. 1-128 characters.
482 - `default_config: optional BetaManagedAgentsMCPToolsetDefaultConfigParams or null`
483 
484 Default configuration for all tools from an MCP server.
215485 
216486 - `enabled: optional boolean or null`
217487 
218 Whether this tool is enabled. Overrides the `default_config` setting.
488 Whether tools are enabled by default. Defaults to true if not specified.
219489 
220490 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
221491 
from line 499
229499 
230500 Tool calls require user confirmation before execution.
231501 
232 - `default_config: optional BetaManagedAgentsMCPToolsetDefaultConfigParams or null`
233 
234 Default configuration for all tools from an MCP server.
235 
236 - `enabled: optional boolean or null`
237 
238 Whether tools are enabled by default. Defaults to true if not specified.
239 
240 - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy or null`
241 
242 Permission policy for tool execution.
243 
244 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
245 
246 Tool calls are automatically approved without user confirmation.
247 
248 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
249 
250 Tool calls require user confirmation before execution.
251 
252502 - `BetaManagedAgentsCustomToolParams object { description, input_schema, name, type }`
253503 
254504 A custom tool that is executed by the API client rather than the agent. When the agent calls this tool, an `agent.custom_tool_use` event is emitted and the session goes idle, waiting for the client to provide the result via a `user.custom_tool_result` event.
from line 777
527777 
528778 - `configs: array of BetaManagedAgentsAgentToolConfig`
529779 
530 - `enabled: boolean`
531 
532 - `name: "bash" or "edit" or "read" or 5 more`
533 
534 Built-in agent tool identifier.
535 
536 - `"bash"`
537 
538 - `"edit"`
539 
540 - `"read"`
541 
542 - `"write"`
543 
544 - `"glob"`
545 
546 - `"grep"`
547 
548 - `"web_fetch"`
549 
550 - `"web_search"`
551 
552 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
553 
554 Permission policy for tool execution.
555 
556 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
557 
558 Tool calls are automatically approved without user confirmation.
559 
560 - `type: "always_allow"`
561 
562 - `"always_allow"`
563 
564 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
565 
566 Tool calls require user confirmation before execution.
567 
568 - `type: "always_ask"`
569 
570 - `"always_ask"`
780 - `BetaManagedAgentsBashToolConfig object { enabled, name, permission_policy, type }`
781 
782 Configuration for the bash tool.
783 
784 - `enabled: boolean`
785 
786 - `name: "bash"`
787 
788 - `"bash"`
789 
790 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
791 
792 Permission policy for tool execution.
793 
794 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
795 
796 Tool calls are automatically approved without user confirmation.
797 
798 - `type: "always_allow"`
799 
800 - `"always_allow"`
801 
802 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
803 
804 Tool calls require user confirmation before execution.
805 
806 - `type: "always_ask"`
807 
808 - `"always_ask"`
809 
810 - `type: "bash"`
811 
812 - `"bash"`
813 
814 - `BetaManagedAgentsEditToolConfig object { enabled, name, permission_policy, type }`
815 
816 Configuration for the edit tool.
817 
818 - `enabled: boolean`
819 
820 - `name: "edit"`
821 
822 - `"edit"`
823 
824 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
825 
826 Permission policy for tool execution.
827 
828 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
829 
830 Tool calls are automatically approved without user confirmation.
831 
832 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
833 
834 Tool calls require user confirmation before execution.
835 
836 - `type: "edit"`
837 
838 - `"edit"`
839 
840 - `BetaManagedAgentsReadToolConfig object { enabled, name, permission_policy, type }`
841 
842 Configuration for the read tool.
843 
844 - `enabled: boolean`
845 
846 - `name: "read"`
847 
848 - `"read"`
849 
850 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
851 
852 Permission policy for tool execution.
853 
854 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
855 
856 Tool calls are automatically approved without user confirmation.
857 
858 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
859 
860 Tool calls require user confirmation before execution.
861 
862 - `type: "read"`
863 
864 - `"read"`
865 
866 - `BetaManagedAgentsWriteToolConfig object { enabled, name, permission_policy, type }`
867 
868 Configuration for the write tool.
869 
870 - `enabled: boolean`
871 
872 - `name: "write"`
873 
874 - `"write"`
875 
876 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
877 
878 Permission policy for tool execution.
879 
880 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
881 
882 Tool calls are automatically approved without user confirmation.
883 
884 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
885 
886 Tool calls require user confirmation before execution.
887 
888 - `type: "write"`
889 
890 - `"write"`
891 
892 - `BetaManagedAgentsGlobToolConfig object { enabled, name, permission_policy, type }`
893 
894 Configuration for the glob tool.
895 
896 - `enabled: boolean`
897 
898 - `name: "glob"`
899 
900 - `"glob"`
901 
902 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
903 
904 Permission policy for tool execution.
905 
906 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
907 
908 Tool calls are automatically approved without user confirmation.
909 
910 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
911 
912 Tool calls require user confirmation before execution.
913 
914 - `type: "glob"`
915 
916 - `"glob"`
917 
918 - `BetaManagedAgentsGrepToolConfig object { enabled, name, permission_policy, type }`
919 
920 Configuration for the grep tool.
921 
922 - `enabled: boolean`
923 
924 - `name: "grep"`
925 
926 - `"grep"`
927 
928 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
929 
930 Permission policy for tool execution.
931 
932 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
933 
934 Tool calls are automatically approved without user confirmation.
935 
936 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
937 
938 Tool calls require user confirmation before execution.
939 
940 - `type: "grep"`
941 
942 - `"grep"`
943 
944 - `BetaManagedAgentsWebFetchToolConfig object { enabled, name, permission_policy, 4 more }`
945 
946 Configuration for the web_fetch tool.
947 
948 - `enabled: boolean`
949 
950 - `name: "web_fetch"`
951 
952 - `"web_fetch"`
953 
954 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
955 
956 Permission policy for tool execution.
957 
958 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
959 
960 Tool calls are automatically approved without user confirmation.
961 
962 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
963 
964 Tool calls require user confirmation before execution.
965 
966 - `type: "web_fetch"`
967 
968 - `"web_fetch"`
969 
970 - `allowed_domains: optional array of string`
971 
972 - `blocked_domains: optional array of string`
973 
974 - `max_content_tokens: optional number or null`
975 
976 - `BetaManagedAgentsWebSearchToolConfig object { enabled, name, permission_policy, 4 more }`
977 
978 Configuration for the web_search tool.
979 
980 - `enabled: boolean`
981 
982 - `name: "web_search"`
983 
984 - `"web_search"`
985 
986 - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy`
987 
988 Permission policy for tool execution.
989 
990 - `BetaManagedAgentsAlwaysAllowPolicy object { type }`
991 
992 Tool calls are automatically approved without user confirmation.
993 
994 - `BetaManagedAgentsAlwaysAskPolicy object { type }`
995 
996 Tool calls require user confirmation before execution.
997 
998 - `type: "web_search"`
999 
1000 - `"web_search"`
1001 
1002 - `allowed_domains: optional array of string`
1003 
1004 - `blocked_domains: optional array of string`
1005 
1006 - `user_location: optional BetaManagedAgentsUserLocation or null`
1007 
1008 Approximate user location for search result localization.
1009 
1010 - `type: "approximate"`
1011 
1012 Location precision. Only "approximate" is supported.
1013 
1014 - `"approximate"`
1015 
1016 - `city: optional string or null`
1017 
1018 City name.
1019 
1020 - `country: optional string or null`
1021 
1022 Two-letter ISO 3166-1 country code, uppercase.
1023 
1024 - `region: optional string or null`
1025 
1026 Region or state name.
1027 
1028 - `timezone: optional string or null`
1029 
1030 IANA timezone identifier, e.g. "America/Los_Angeles".
5711031 
5721032 - `default_config: BetaManagedAgentsAgentToolsetDefaultConfig`
5731033 
from line 1500
10401500 "name": "bash",
10411501 "permission_policy": {
10421502 "type": "always_allow"
1043 }
1503 },
1504 "type": "bash"
10441505 }
10451506 ],
10461507 "default_config": {
from line 1541
10801541 "name": "bash",
10811542 "permission_policy": {
10821543 "type": "always_allow"
1083 }
1544 },
1545 "type": "bash"
10841546 }
10851547 ],
10861548 "default_config": {
10871549 

api/messages Changed · +40 / -40 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 3073
30733073 
30743074 - `version: string`
30753075 
3076 Skill version or 'latest' for most recent version
3076 The resolved version: a skill version ID for custom skills.
30773077 
30783078 - `content: array of ContentBlock`
30793079 
from line 8244
82448244 
82458245 - `enabled: optional boolean or null`
82468246 
8247 Whether this member is offered to the model. De
8247 Whether this member is offered to the

api/messages/batches Changed · +4 / -4 lines

from line 3749
37493749 
37503750 - `version: string`
37513751 
3752 Skill version or 'latest' for most recent version
3752 The resolved version: a skill version ID for custom skills.
37533753 
37543754 - `content: array of ContentBlock`
37553755 
from line 5064
50645064 
50655065 - `version: string`
50665066 
5067 Skill version or 'latest' for most recent version
5067 The resolved version: a skill version ID for custom skills.
50685068 
50695069 - `content: array of ContentBlock`
50705070 
from line 6179
61796179 
61806180 - `version: string`
61816181 
6182 Skill version or 'latest' for most recent version
6182 The resolved version: a skill version ID for custom skills.
61836183 
61846184 - `content: array of ContentBlock`
61856185 
from line 7256
72567256 
72577257 - `version: string`
72587258 
7259 Skill version or 'latest' for most recent version
7259 The resolved version: a skill version ID for custom skills.
72607260 
72617261 - `content: array of ContentBlock`
72627262 

build-with-claude/cache-diagnostics Changed · +16 / -16 lines

from line 30
3030 ```bash cURL
3131 # Turn 1: establish the cache and opt in to diagnostics
3232 response=$(curl -sS --fail-with-body https://api.anthropic.com/v1/messages \
33 --header "x-api-key: $ANTHROPIC_API_KEY" \
34 --header "anthropic-version: 2023-06-01" \
35 --header "anthropic-beta: cache-diagnosis-2026-04-07" \
36 --header "content-type: application/json" \
37 --data '{
33 -H "x-api-key: $ANTHROPIC_API_KEY" \
34 -H "anthropic-version: 2023-06-01" \
35 -H "anthropic-beta: cache-diagnosis-2026-04-07" \
36 -H "content-type: application/json" \
37 -d '{
3838 "model": "claude-opus-5",
3939 "max_tokens": 1024,
4040 "cache_control": {"type": "ephemeral"},
from line 47
4747 
4848 # Turn 2: reference the previous turn so the API can compare prefixes
4949 curl -sS --fail-with-body https://api.anthropic.com/v1/messages \
50 --header "x-api-key: $ANTHROPIC_API_KEY" \
51 --header "anthropic-version: 2023-06-01" \
52 --header "anthropic-beta: cache-diagnosis-2026-04-07" \
53 --header "content-type: application/json" \
54 --data @- <<EOF | jq '{id, diagnostics}' # diagnostics: null means no divergence was found
50 -H "x-api-key: $ANTHROPIC_API_KEY" \
51 -H "anthropic-version: 2023-06-01" \
52 -H "anthropic-beta: cache-diagnosis-2026-04-07" \
53 -H "content-type: application/json" \
54 -d @- <<EOF | jq '{id, diagnostics}' # diagnostics: null means no divergence was found
5555 {
5656 "model": "claude-opus-5",
5757 "max_tokens": 1024,
from line 427
427427 # Turn 2: stream the response. diagnostics arrives on the message_start event;
428428 # a null value means no divergence was found.
429429 curl -sS --fail-with-body https://api.anthropic.com/v1/messages \
430 --header "x-api-key: $ANTHROPIC_API_KEY" \
431 --header "anthropic-version: 2023-06-01" \
432 --header "anthropic-beta: cache-diagnosis-2026-04-07" \
433 --header "content-type: application/json" \
434 --data @- <<EOF | jq -R 'select(startswith("data: ")) | ltrimstr("data: ") | fromjson | select(.type == "message_start") | .message.diagnostics'
430 -H "x-api-key: $ANTHROPIC_API_KEY" \
431 -H "anthropic-version: 2023-06-01" \
432 -H "anthropic-beta: cache-diagnosis-2026-04-07" \
433 -H "content-type: application/json" \
434 -d @- <<EOF | jq -R 'select(startswith("data: ")) | ltrimstr("data: ") | fromjson | select(.type == "message_start") | .message.diagnostics'
435435 {
436436 "model": "claude-opus-5",
437437 "max_tokens": 1024,
from line 1078
10781078 
10791079## Limitations
10801080 
1081* **Beta:** Field names and semantics may change before general availability.
1081* **Beta:** Field names and semantics may change while this feature is in beta.
10821082* **Claude API only:** Not available on Amazon Bedrock or Google Cloud.
10831083* **Limited retention:** Fingerprints for `previous_message_id` lookup expire after a short period. Run diagnostic comparisons between closely spaced requests.
10841084* **Same workspace:** The previous request must have been made with an API key from the same organization and workspace. To check, compare the `anthropic-workspace-id` [response header](https://platform.claude.com/docs/en/api/overview#response-headers) on the two responses.

build-with-claude/citations Changed · +7 / -13 lines

from line 423
423423 ```
424424 
425425 ```bash CLI
426 ant messages create \
427 --model claude-opus-5 \
428 --max-tokens 1024 <<'YAML'
426 ant messages create --model claude-opus-5 --max-tokens 1024 <<'YAML'
429427 messages:
430428 - role: user
431429 content:
from line 918
920918 ```
921919 
922920 ```php PHP
923 // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta.
924 $citedResponse = $client->beta->messages->create(
921 $citedResponse = $client->messages->create(
925922 maxTokens: 1024,
926923 messages: [
927924 [
from line 926
929926 'content' => [
930927 [
931928 'type' => 'document',
932 'source' => ['type' => 'file', 'file_id' => $fileId],
929 'source' => ['type' => 'file', 'fileID' => $fileId],
933930 'title' => 'Document Title',
934931 'context' => 'Context about the document that will not be cited from',
935932 'citations' => ['enabled' => true],
from line 936
939936 ],
940937 ],
941938 model: 'claude-opus-5',
942 betas: ['files-api-2025-04-14'],
943939 );
944940 
945 print_r($citedResponse);
941 echo $citedResponse;
946942 ```
947943 
948944 ```ruby Ruby
from line 1739
17431739 ```
17441740 
17451741 ```php PHP
1746 // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta.
1747 $citedResponse = $client->beta->messages->create(
1742 $citedResponse = $client->messages->create(
17481743 maxTokens: 1024,
17491744 messages: [
17501745 [
from line 1747
17521747 'content' => [
17531748 [
17541749 'type' => 'document',
1755 'source' => ['type' => 'file', 'file_id' => $fileId],
1750 'source' => ['type' => 'file', 'fileID' => $fileId],
17561751 'title' => 'Document Title',
17571752 'context' => 'Context about the document that will not be cited from',
17581753 'citations' => ['enabled' => true],
from line 1757
17621757 ],
17631758 ],
17641759 model: 'claude-opus-5',
1765 betas: ['files-api-2025-04-14'],
17661760 );
17671761 
1768 print_r($citedResponse);
1762 echo $citedResponse;
17691763 ```
17701764 
17711765 ```ruby Ruby

build-with-claude/claude-on-amazon-bedrock-legacy Changed · +3 / -2 lines

from line 326
326326 # Temporary credentials can be used with aws_session_token.
327327 # Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html.
328328 aws_session_token="<session_token>",
329 # aws_region changes the aws region to which the request is made. By default, the SDK reads AWS_REGION,
330 # and if that's not present, defaults to us-east-1. Note that the SDK does not read ~/.aws/config for the region.
329 # aws_region changes the aws region to which the request is made. If it is not provided, the SDK reads
330 # AWS_REGION / AWS_DEFAULT_REGION, then the region configured for your boto3 session or AWS profile
331 # (including ~/.aws/config), and raises ValueError if no region can be resolved.
331332 aws_region="us-west-2",
332333 )
333334 

build-with-claude/claude-platform-on-aws Changed · +8 / -7 lines

from line 268
268268 
269269### Region resolution
270270 
271The client reads `AWS_REGION` from the environment if `aws_region`/`awsRegion` is not passed to the constructor, falling back to `AWS_DEFAULT_REGION` for compatibility with the standard AWS SDKs. Region is required. There is no fallback default. Unlike `AnthropicBedrock`, which falls back to `us-east-1`, the `AnthropicAWS`/`AnthropicAws` client raises an error if neither the constructor argument nor the environment variable is set.
271The client reads `AWS_REGION` from the environment if `aws_region`/`awsRegion` is not passed to the constructor, falling back to `AWS_DEFAULT_REGION` for compatibility with the standard AWS SDKs. Region is required and there is no default: the `AnthropicAWS`/`AnthropicAws` client raises an error if neither the constructor argument nor an environment variable is set.
272272 
273273## Install an SDK
274274 
from line 341
341341| Model | Model ID |
342342| ----------------- | ----------------- |
343343| Claude Fable 5 | claude-fable-5 |
344| Claude Opus 5 | claude-opus-5 |
344345| Claude Opus 4.8 | claude-opus-4-8 |
345346| Claude Opus 4.7 | claude-opus-4-7 |
346347| Claude Opus 4.6 | claude-opus-4-6 |
from line 840
839840 
840841### Spend limits
841842 
842The Start, Build, and Scale usage tiers each carry a monthly spend cap; see the [per-tier spend caps](https://platform.claude.com/docs/en/api/rate-limits#spend-limits) for current values. When your organization's usage for the calendar month reaches its tier's cap, API requests fail with the [spend-cap error](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap) until 00UTC on the first day of the next month, and retrying sooner doesn't succeed. The spend cap and rate limits belong to the same tier. To raise the cap, or to restore access after reaching it, request a tier increase through your Anthropic account representative or [Anthropic support](https://support.claude.com) (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)).
843The Start, Build, and Scale usage tiers each carry a monthly spend cap; see the [per-tier spend caps](https://platform.claude.com/docs/en/api/rate-limits#spend-limits) for current values. When your organization's usage for the calendar month reaches its tier's cap, API requests fail with the [spend-cap error](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap) until 00:00 UTC on the first day of the next month, and retrying sooner doesn't succeed. The spend cap and rate limits belong to the same tier. To raise the cap, or to restore access after reaching it, request a tier increase through your Anthropic account representative or [Anthropic support](https://support.claude.com) (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)).
843844 
844You can also set your own monthly spend limits below the cap, after adding at least one recipient under **Email notifications** on the Billing page:
845You can also set your own monthly spend limits below the cap, after adding at least one recipient under **Email recipients** on the Billing page:
845846 
846847* **Organization spend limit:** Go to [Settings > Billing](https://platform.claude.com/settings/billing) in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#using-the-claude-console) to set a monthly spend limit.
847848* **Workspace spend limits:** Select a workspace under [Settings > Workspaces](https://platform.claude.com/settings/workspaces) and open its **Spend limits** page. Workspace details are otherwise read-only in the Claude Console on Claude Platform on AWS.
848849 
849When usage reaches a limit you set, requests fail with HTTP 400 (see the [spend limit error](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit)) until 00UTC on the first day of the next month, or until you raise or remove the limit.
850When usage reaches a limit you set, requests fail with HTTP 400 (see the [spend limit error](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit)) until 00:00 UTC on the first day of the next month, or until you raise or remove the limit.
850851 
851Spend is calculated at list prices and can take about 2 hours to reflect recent usage, so usage can exceed the cap or a limit before requests start failing. The overshoot is billed. When the tier cap or an organization spend limit stops your requests, an email notice goes to the recipients listed under **Email notifications** on the Billing page. Role-based recipients, such as all admins, aren't available on Claude Platform on AWS. The tier-cap notice also goes to the email address used at AWS Marketplace sign-up.
852Spend is calculated at list prices and can take about 2 hours to reflect recent usage, so usage can exceed the cap or a limit before requests start failing. The overshoot is billed. When the tier cap or an organization spend limit stops your requests, an email notice goes to the recipients listed under **Email recipients** on the Billing page. Role-based recipients, such as all admins, aren't available on Claude Platform on AWS. The tier-cap notice also goes to the email address used at AWS Marketplace sign-up.
852853 
853854## Monitoring and logging
854855 

build-with-claude/context-editing Changed · +21 / -88 lines

from line 20
2020* **Thinking block clearing** - For managing thinking blocks when using extended thinking, with options to preserve recent thinking for context continuity
2121* **Client-side SDK compaction** - An SDK-based alternative for summary-based context management (server-side compaction is generally preferred)
2222 
23| Approach | Where it runs | Strategies | How it works |
24| --------------- | ------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25| **Server-side** | API | Tool result clearing (`clear_tool_uses_20250919`) Thinking block clearing (`clear_thinking_20251015`) | Applied before the prompt reaches Claude. Clears specific content from conversation history. Each strategy can be configured independently. |
26| **Client-side** | SDK | Compaction | Available in [Python, TypeScript, and Ruby SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) when using [`tool_runner`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner). Generates a summary and replaces full conversation history. See [Client-side compaction](https://platform.claude.com/docs/en/build-with-claude/context-editing#client-side-compaction-sdk). |
23| Approach | Where it runs | Strategies | How it works |
24| --------------- | ------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25| **Server-side** | API | Tool result clearing (`clear_tool_uses_20250919`) Thinking block clearing (`clear_thinking_20251015`) | Applied before the prompt reaches Claude. Clears specific content from conversation history. Each strategy can be configured independently. |
26| **Client-side** | SDK | Compaction | Available in [TypeScript and Ruby SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) when using [`tool_runner`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner). Generates a summary and replaces full conversation history. See [Client-side compaction](https://platform.claude.com/docs/en/build-with-claude/context-editing#client-side-compaction-sdk). |
2727 
2828## Server-side strategies
2929 
from line 2325
23252325<Warning>
23262326 **Anthropic recommends server-side compaction over SDK compaction.** [Server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) handles context management automatically with less integration complexity, better token usage calculation, and no client-side limitations. Use SDK compaction only if you specifically need client-side control over the summarization process.
23272327 
2328 The `compaction_control` parameter is deprecated in the Python, TypeScript, and Ruby SDKs and will be removed in a future version. The SDKs emit a deprecation warning when it is enabled. To use server-side compaction with a tool runner, pass the `compact_20260112` edit in the request's `context_management` parameter.
2328 The `compaction_control` parameter is deprecated in the TypeScript and Ruby SDKs and will be removed in a future version. The SDKs emit a deprecation warning when it is enabled. The Python SDK removed it in v1.0. To use server-side compaction with a tool runner, pass the `compact_20260112` edit in the request's `context_management` parameter.
23292329</Warning>
23302330 
23312331<Note>
2332 Compaction is available in the [Python, TypeScript, and Ruby SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) when using the [`tool_runner` method](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner).
2332 Compaction is available in the [TypeScript and Ruby SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) when using the [`tool_runner` method](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner).
23332333</Note>
23342334 
23352335Compaction is an SDK feature that automatically manages conversation context by generating summaries when token usage grows too large. Unlike server-side context editing strategies that clear content, compaction instructs Claude to summarize the conversation history, then replaces the full history with that summary. This allows Claude to continue working on long-running tasks that would otherwise exceed the [context window](https://platform.claude.com/docs/en/build-with-claude/context-windows).
from line 2361
23612361 </Tab>
23622362 
23632363 <Tab title="Python">
2364 ```python Python
2365 client = anthropic.Anthropic()
2366 
2367 runner = client.beta.messages.tool_runner(
2368 model="claude-opus-5",
2369 max_tokens=1024,
2370 tools=[read_file],
2371 messages=[{"role": "user", "content": "What's in config.json?"}],
2372 compaction_control={"enabled": True, "context_token_threshold": 100000},
2373 )
2374 
2375 for message in runner:
2376 print(f"Tokens used: {message.usage.input_tokens}")
2377 ```
2364 <Note>
2365 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2366 </Note>
23782367 </Tab>
23792368 
23802369 <Tab title="TypeScript">
from line 2493
25042493 </Tab>
25052494 
25062495 <Tab title="Python">
2507 ```python Python
2508 client = anthropic.Anthropic()
2509 
2510 runner = client.beta.messages.tool_runner(
2511 model="claude-opus-5",
2512 max_tokens=1024,
2513 tools=[read_file],
2514 messages=[{"role": "user", "content": "What's in config.json?"}],
2515 # Lower values compact more often; raise to 150000 when the task needs more context
2516 compaction_control={"enabled": True, "context_token_threshold": 50000},
2517 )
2518 
2519 for message in runner:
2520 print(f"Tokens used: {message.usage.input_tokens}")
2521 ```
2496 <Note>
2497 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2498 </Note>
25222499 </Tab>
25232500 
25242501 <Tab title="TypeScript">
from line 2579
26022579 </Tab>
26032580 
26042581 <Tab title="Python">
2605 ```python Python
2606 client = anthropic.Anthropic()
2607 
2608 runner = client.beta.messages.tool_runner(
2609 model="claude-opus-5",
2610 max_tokens=1024,
2611 tools=[read_file],
2612 messages=[{"role": "user", "content": "What's in config.json?"}],
2613 compaction_control={
2614 "enabled": True,
2615 "context_token_threshold": 100000,
2616 "model": "claude-haiku-4-5",
2617 },
2618 )
2619 
2620 for message in runner:
2621 print(f"Tokens used: {message.usage.input_tokens}")
2622 ```
2582 <Note>
2583 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2584 </Note>
26232585 </Tab>
26242586 
26252587 <Tab title="TypeScript">
from line 2671
27092671 </Tab>
27102672 
27112673 <Tab title="Python">
2712 ```python Python
2713 client = anthropic.Anthropic()
2714 
2715 runner = client.beta.messages.tool_runner(
2716 model="claude-opus-5",
2717 max_tokens=1024,
2718 tools=[read_file],
2719 messages=[{"role": "user", "content": "What's in config.json?"}],
2720 compaction_control={
2721 "enabled": True,
2722 "context_token_threshold": 100000,
2723 "summary_prompt": """Summarize the research conducted so far, including:
2724 - Sources consulted and key findings
2725 - Questions answered and remaining unknowns
2726 - Recommended next steps
2727 
2728 Wrap your summary in <summary></summary> tags.""",
2729 },
2730 )
2731 
2732 for message in runner:
2733 print(f"Tokens used: {message.usage.input_tokens}")
2734 ```
2674 <Note>
2675 In v1.0 and later, the Python SDK's tool runner does not support client-side `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead: it works with the tool runner by passing the `compact_20260112` edit in the request's `context_management` parameter.
2676 </Note>
27352677 </Tab>
27362678 
27372679 <Tab title="TypeScript">
from line 2856
29142856 </Tab>
29152857 
29162858 <Tab title="Python">
2917 The Python SDK logs compaction events at the INFO level. Enable the `anthropic.lib.tools` logger:
2918 
2919 ```python Python
2920 import logging
2921 
2922 logging.basicConfig(level=logging.INFO)
2923 logging.getLogger("anthropic.lib.tools").setLevel(logging.INFO)
2924 
2925 # Logs will show:
2926 # INFO: Token usage 105000 has exceeded the threshold of 100000. Performing compaction.
2927 # INFO: Compaction complete. New token usage: 2500
2928 ```
2859 <Note>
2860 In v1.0 and later, the Python SDK's tool runner does not support `compaction_control`. Use [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) instead.
2861 </Note>
29292862 </Tab>
29302863 
29312864 <Tab title="TypeScript">

build-with-claude/files Changed · +16 / -25 lines

from line 123
123123 ```
124124 
125125 ```php PHP
126 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
127 $file = $client->beta->files->upload(
128 FileParam::fromResource(fopen('/path/to/document.pdf', 'rb'), contentType: 'application/pdf'),
126 $file = $client->files->upload(
127 file: FileParam::fromResource(fopen('/path/to/document.pdf', 'rb'), contentType: 'application/pdf'),
129128 );
130129 
131130 $fileId = $file->id;
from line 329
330329 ```
331330 
332331 ```php PHP
333 // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta.
334 $response = $client->beta->messages->create(
332 $response = $client->messages->create(
335333 maxTokens: 1024,
336334 messages: [
337335 [
from line 340
342340 'type' => 'document',
343341 'source' => [
344342 'type' => 'file',
345 'file_id' => $fileId
346 ]
347 ]
348 ]
349 ]
343 'fileID' => $fileId,
344 ],
345 ],
346 ],
347 ],
350348 ],
351349 model: 'claude-opus-5',
352 betas: ['files-api-2025-04-14'],
353350 );
354351 
355 print_r($response);
352 echo $response;
356353 ```
357354 
358355 ```ruby Ruby
from line 691
694691 ```
695692 
696693 ```bash CLI
697 ant files list \
698 --max-items 10
694 ant files list --max-items 10
699695 ```
700696 
701697 ```python Python
from line 735
739735 ```
740736 
741737 ```php PHP
742 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
743 // list() paginates with afterID, beforeID, and limit; page and ids[] are not parameters here.
744738 $client = new Client();
745739 
746 $files = $client->beta->files->list();
740 $files = $client->files->list();
747741 echo $files;
748742 ```
749743 
from line 798
804798 ```
805799 
806800 ```php PHP
807 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
808 $file = $client->beta->files->retrieveMetadata($fileId);
801 $file = $client->files->retrieveMetadata($fileId);
809802 echo $file;
810803 ```
811804 
from line 848
855848 ```
856849 
857850 ```php PHP
858 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
859 $client->beta->files->delete($fileId);
851 $client->files->delete($fileId);
860852 ```
861853 
862854 ```ruby Ruby
from line 924
932924 ```
933925 
934926 ```php PHP
935 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
936 $fileContent = $client->beta->files->download($fileId);
927 $fileContent = $client->files->download($fileId);
937928 
938 file_put_contents("downloaded_file.txt", $fileContent);
929 file_put_contents('downloaded_file.txt', $fileContent);
939930 ```
940931 
941932 ```ruby Ruby

build-with-claude/overview Changed · +6 / -7 lines

from line 18
1818 
1919## Feature availability
2020 
21Features on the Claude Platform are assigned one of the following availability classifications per platform (shown in the Availability column of each following table). Not all features pass through every stage. A feature may enter at any classification and may skip stages.
21The Availability column in each of the following tables lists the platforms that offer a feature. A platform listed without a label offers the feature as stable, fully supported, and recommended for production use, with no beta header and with standard API [versioning](https://platform.claude.com/docs/en/api/versioning) guarantees. A label after a platform name marks one of the following classifications on that platform. Not all features pass through every stage, and a feature may enter at any stage or skip stages.
2222 
23| Classification | Description |
24| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25| **Beta** | Preview features used for gathering feedback and iterating on a less mature use case. Availability may be limited, including through sign-up requirements or waitlists, and may not be publicly announced. Features may change significantly or be discontinued based on feedback. Not guaranteed for ongoing production use. Breaking changes are possible with notice, and some platform-specific limitations may apply. Beta features on the Claude API and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) have a [beta header](https://platform.claude.com/docs/en/api/beta-headers). |
26| **Generally available (GA)** | Feature is stable, fully supported, and recommended for production use. Should not have a beta header or other indicator that the feature is in a preview state. Covered by standard API [versioning](https://platform.claude.com/docs/en/api/versioning) guarantees. |
27| **Deprecated** | Feature is still functional but no longer recommended. A migration path and removal timeline are provided. |
28| **Retired** | Feature is no longer available. |
23| Classification | Description |
24| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25| **Beta** | Preview features used for gathering feedback and iterating on a less mature use case. Availability may be limited, including through sign-up requirements or waitlists, and may not be publicly announced. Features may change significantly or be discontinued based on feedback. Not guaranteed for ongoing production use. Breaking changes are possible with notice, and some platform-specific limitations may apply. Beta features on the Claude API and [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) have a [beta header](https://platform.claude.com/docs/en/api/beta-headers). |
26| **Deprecated** | Feature is still functional but no longer recommended. A migration path and removal timeline are provided. |
27| **Retired** | Feature is no longer available. |
2928 
3029**Platform labels:** Claude API (Anthropic first-party) · [Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) (AWS-operated) · [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) (Anthropic-operated on AWS) · [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai) (Google-operated) · [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) (Anthropic-operated on Azure)
3130 

build-with-claude/pdf-support Changed · +9 / -12 lines

from line 425
425425 
426426 ```python Python
427427 import base64
428 import httpx
428 import httpx2
429429 
430430 # First, load and encode the PDF
431431 pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
432432 pdf_data = base64.standard_b64encode(
433 httpx.get(pdf_url, follow_redirects=True).content
433 httpx2.get(pdf_url, follow_redirects=True).content
434434 ).decode("utf-8")
435435 
436436 # Alternative: Load from a local file
from line 941
941941 ```
942942 
943943 ```php PHP
944 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
945 // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta.
946944 use Anthropic\Core\FileParam;
947945 
948946 $client = new Client();
949947 
950948 // Upload the PDF file
951 $file_upload = $client->beta->files->upload(
949 $file_upload = $client->files->upload(
952950 file: FileParam::fromResource(fopen('/path/to/document.pdf', 'r'), contentType: 'application/pdf'),
953951 );
954952 
955953 // Use the uploaded file in a message
956 $message = $client->beta->messages->create(
954 $message = $client->messages->create(
957955 maxTokens: 1024,
958 betas: ['files-api-2025-04-14'],
959956 messages: [
960957 [
961958 'role' => 'user',
from line 961
964961 'type' => 'document',
965962 'source' => [
966963 'type' => 'file',
967 'file_id' => $file_upload->id,
964 'fileID' => $file_upload->id,
968965 ],
969966 ],
970967 [
from line 1120
11231120 
11241121 ```python Python
11251122 import base64
1126 import httpx
1123 import httpx2
11271124 
11281125 # First, load and encode the PDF
11291126 pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
11301127 pdf_data = base64.standard_b64encode(
1131 httpx.get(pdf_url, follow_redirects=True).content
1128 httpx2.get(pdf_url, follow_redirects=True).content
11321129 ).decode("utf-8")
11331130 
11341131 # Create a message with the cached document
from line 1488
14911488 
14921489 ```python Python
14931490 import base64
1494 import httpx
1491 import httpx2
14951492 
14961493 # First, load and encode the PDF
14971494 pdf_url = "https://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum.pdf"
14981495 pdf_data = base64.standard_b64encode(
1499 httpx.get(pdf_url, follow_redirects=True).content
1496 httpx2.get(pdf_url, follow_redirects=True).content
15001497 ).decode("utf-8")
15011498 
15021499 # Create a batch of requests that use the document

build-with-claude/skills-guide Changed · +79 / -114 lines

from line 250
250250 ```
251251 
252252 ```php PHP
253 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
254253 $client = new Client();
255254 
256 $message = $client->beta->messages->create(
255 $message = $client->messages->create(
257256 maxTokens: 4096,
258257 messages: [
259258 ['role' => 'user', 'content' => 'Create a presentation about renewable energy']
260259 ],
261260 model: 'claude-opus-5',
262 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
263261 container: [
264262 'skills' => [
265263 [
266264 'type' => 'anthropic',
267 'skill_id' => 'pptx',
265 'skillID' => 'pptx',
268266 'version' => 'latest'
269267 ]
270268 ]
from line 387
389387 --raw-output)
390388 
391389 # Step 4: Download the file using Files API
392 ant files download \
393 --file-id "$FILE_ID" \
394 --output "$FILENAME" > /dev/null
390 ant files download --file-id "$FILE_ID" --output "$FILENAME" > /dev/null
395391 
396392 printf 'Downloaded: %s\n' "$FILENAME"
397393 ```
from line 663
667663 ```
668664 
669665 ```php PHP
670 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
671 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
672666 $client = new Client();
673667 
674668 // Step 1: Use a Skill to create a file
675 $response = $client->beta->messages->create(
669 $response = $client->messages->create(
676670 maxTokens: 4096,
677671 messages: [
678672 ['role' => 'user', 'content' => 'Create an Excel file with a simple budget spreadsheet']
679673 ],
680674 model: 'claude-opus-5',
681 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
682675 container: [
683676 'skills' => [
684 ['type' => 'anthropic', 'skill_id' => 'xlsx', 'version' => 'latest']
677 ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest']
685678 ]
686679 ],
687680 tools: [
from line 700
707700 
708701 // Step 3: Download the file using Files API
709702 foreach (extractFileIds($response) as $fileId) {
710 $fileMetadata = $client->beta->files->retrieveMetadata($fileId);
711 $fileContent = $client->beta->files->download($fileId);
703 $fileMetadata = $client->files->retrieveMetadata($fileId);
704 $fileContent = $client->files->download($fileId);
712705 
713706 // Step 4: Save to disk
714707 file_put_contents($fileMetadata->filename, $fileContent);
from line 785
792785 --format yaml
793786 
794787 # List all files
795 ant files list \
796 --transform '{filename,created_at}' \
797 --format yaml
788 ant files list --transform '{filename,created_at}' --format yaml
798789 
799790 # Delete a file
800791 ant files delete --file-id "$FILE_ID" >/dev/null
from line 894
903894 ```
904895 
905896 ```php PHP
906 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
907897 $client = new Client();
908898 $fileId = 'file_011CNha8iCJcU1wXNR6q4V8w';
909899 
910900 // Get file metadata
911 $fileInfo = $client->beta->files->retrieveMetadata($fileId);
901 $fileInfo = $client->files->retrieveMetadata($fileId);
912902 echo "Filename: {$fileInfo->filename}, Size: {$fileInfo->sizeBytes} bytes\n";
913903 
914904 // List files (first page)
915 $files = $client->beta->files->list();
916 foreach ($files->data as $file) {
905 foreach ($client->files->list()->getItems() as $file) {
917906 echo "{$file->filename} - {$file->createdAt->format(DATE_ATOM)}\n";
918907 }
919908 
920909 // Delete a file
921 $client->beta->files->delete($fileId);
910 $client->files->delete($fileId);
922911 ```
923912 
924913 ```ruby Ruby
from line 1249
12601249 ```
12611250 
12621251 ```php PHP
1263 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
12641252 $client = new Client();
12651253 
1266 $response1 = $client->beta->messages->create(
1254 $response1 = $client->messages->create(
12671255 maxTokens: 4096,
12681256 messages: [
12691257 ['role' => 'user', 'content' => 'Create a sample sales dataset and analyze it']
12701258 ],
12711259 model: 'claude-opus-5',
1272 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
12731260 container: [
12741261 'skills' => [
1275 ['type' => 'anthropic', 'skill_id' => 'xlsx', 'version' => 'latest']
1262 ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest']
12761263 ]
12771264 ],
12781265 tools: [
from line 1277
12901277 ['role' => 'user', 'content' => 'What was the total revenue?']
12911278 ];
12921279 
1293 $response2 = $client->beta->messages->create(
1280 $response2 = $client->messages->create(
12941281 maxTokens: 4096,
12951282 messages: $messages,
12961283 model: 'claude-opus-5',
1297 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
12981284 container: [
12991285 'id' => $response1->container->id,
13001286 'skills' => [
1301 ['type' => 'anthropic', 'skill_id' => 'xlsx', 'version' => 'latest']
1287 ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest']
13021288 ]
13031289 ],
13041290 tools: [
from line 1725
17391725 ```
17401726 
17411727 ```php PHP
1742 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
17431728 $client = new Client();
17441729 
17451730 $messages = [
from line 1732
17471732 ];
17481733 $maxRetries = 10;
17491734 
1750 $response = $client->beta->messages->create(
1735 $response = $client->messages->create(
17511736 maxTokens: 4096,
17521737 messages: $messages,
17531738 model: 'claude-opus-5',
1754 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
17551739 container: [
17561740 'skills' => [
17571741 [
17581742 'type' => 'custom',
1759 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
1743 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
17601744 'version' => 'latest'
17611745 ]
17621746 ]
from line 1755
17711755 
17721756 $messages[] = ['role' => 'assistant', 'content' => $response->content];
17731757 
1774 $response = $client->beta->messages->create(
1758 $response = $client->messages->create(
17751759 maxTokens: 4096,
17761760 messages: $messages,
17771761 model: 'claude-opus-5',
1778 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
17791762 container: [
17801763 'id' => $response->container->id,
17811764 'skills' => [
17821765 [
17831766 'type' => 'custom',
1784 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
1767 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
17851768 'version' => 'latest'
17861769 ]
17871770 ]
from line 2077
20942077 ```
20952078 
20962079 ```php PHP
2097 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
20982080 $client = new Client();
20992081 
2100 $message = $client->beta->messages->create(
2082 $message = $client->messages->create(
21012083 maxTokens: 4096,
21022084 messages: [
21032085 ['role' => 'user', 'content' => 'Analyze sales data and create a presentation']
21042086 ],
21052087 model: 'claude-opus-5',
2106 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
21072088 container: [
21082089 'skills' => [
21092090 [
21102091 'type' => 'anthropic',
2111 'skill_id' => 'xlsx',
2092 'skillID' => 'xlsx',
21122093 'version' => 'latest'
21132094 ],
21142095 [
21152096 'type' => 'anthropic',
2116 'skill_id' => 'pptx',
2097 'skillID' => 'pptx',
21172098 'version' => 'latest'
21182099 ],
21192100 [
21202101 'type' => 'custom',
2121 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
2102 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
21222103 'version' => 'latest'
21232104 ]
21242105 ]
from line 2389
24082389 ```
24092390 
24102391 ```php PHP
2411 // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs.
24122392 use Anthropic\Core\FileParam;
24132393 // ...
24142394 
from line 2395
24152395 $client = new Client();
24162396 
24172397 // Option 1: Using a zip file
2418 $skill = $client->beta->skills->create(
2398 $skill = $client->skills->create(
24192399 files: [
2420 FileParam::fromResource(fopen('example_skill.zip', 'r'))
2400 FileParam::fromResource(fopen('example_skill.zip', 'r')),
24212401 ],
24222402 );
24232403 
24242404 // Option 2: Using individual files
2425 $skill = $client->beta->skills->create(
2405 $skill = $client->skills->create(
24262406 files: [
2427 FileParam::fromResource(fopen('financial_skill/SKILL.md', 'r'), 'financial_skill/SKILL.md', 'text/markdown'),
2428 FileParam::fromResource(fopen('financial_skill/analyze.py', 'r'), 'financial_skill/analyze.py', 'text/x-python')
2407 FileParam::fromResource(
2408 fopen('financial_skill/SKILL.md', 'r'),
2409 filename: 'financial_skill/SKILL.md',
2410 contentType: 'text/markdown',
2411 ),
2412 FileParam::fromResource(
2413 fopen('financial_skill/analyze.py', 'r'),
2414 filename: 'financial_skill/analyze.py',
2415 contentType: 'text/x-python',
2416 ),
24292417 ],
24302418 );
24312419 
24322420 echo "Created skill: {$skill->id}\n";
2433 echo "Latest version: {$skill->latestVersion}\n";
2421 echo "Latest version: {$skill->latestVersionID}\n";
24342422 ```
24352423 
24362424 ```ruby Ruby
from line 2583
25952583 ```
25962584 
25972585 ```php PHP
2598 // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs.
25992586 $client = new Client();
26002587 
26012588 // List Skills (first page)
2602 $skills = $client->beta->skills->list();
2603 
2604 foreach ($skills->data as $skill) {
2605 echo "{$skill->id}: {$skill->displayTitle} (source: {$skill->source})\n";
2589 foreach ($client->skills->list()->getItems() as $skill) {
2590 echo "{$skill->id}: {$skill->displayName} (source: {$skill->source->type})\n";
26062591 }
26072592 
26082593 // List only custom Skills
2609 $customSkills = $client->beta->skills->list(
2594 $customSkills = $client->skills->list(
26102595 source: 'custom',
26112596 );
26122597 ```
from line 2625
26402625 ```
26412626 
26422627 ```bash CLI
2643 ant skills retrieve \
2644 --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv
2628 ant skills retrieve --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv
26452629 ```
26462630 
26472631 ```python Python
from line 2689
27052689 ```
27062690 
27072691 ```php PHP
2708 // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs.
27092692 $client = new Client();
27102693 
2711 $skill = $client->beta->skills->retrieve(
2712 skillID: 'skill_01AbCdEfGhIjKlMnOpQrStUv',
2713 );
2694 $skill = $client->skills->retrieve('skill_01AbCdEfGhIjKlMnOpQrStUv');
27142695 
2715 echo "Skill: " . $skill->displayTitle . "\n";
2716 echo "Latest version: " . $skill->latestVersion . "\n";
2717 echo "Created: " . $skill->createdAt . "\n";
2696 echo "Skill: {$skill->displayName}\n";
2697 echo "Latest version: {$skill->latestVersionID}\n";
2698 echo "Created: {$skill->createdAt->format(DATE_ATOM)}\n";
27182699 ```
27192700 
27202701 ```ruby Ruby
from line 2721
27402721 ```
27412722 
27422723 ```bash CLI
2743 ant skills delete \
2744 --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv >/dev/null
2724 ant skills delete --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv >/dev/null
27452725 ```
27462726 
27472727 ```python Python
from line 2763
27832763 ```
27842764 
27852765 ```php PHP
2786 // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs.
27872766 $client = new Client();
27882767 
2789 // In the beta namespace, a Skill's versions must be deleted before the Skill itself.
2790 $skillId = 'skill_01AbCdEfGhIjKlMnOpQrStUv';
2791 foreach ($client->beta->skills->versions->list($skillId)->pagingEachItem() as $version) {
2792 $client->beta->skills->versions->delete($version->version, skillID: $skillId);
2793 }
2794 $client->beta->skills->delete($skillId);
2768 $client->skills->delete('skill_01AbCdEfGhIjKlMnOpQrStUv');
27952769 ```
27962770 
27972771 ```ruby Ruby
from line 3203
32293203 ```
32303204 
32313205 ```php PHP
3232 // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs.
3233 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
32343206 use Anthropic\Core\FileParam;
3235 
32363207 // ...
3208 
32373209 $client = new Client();
32383210 
32393211 // Create a new version
3240 $newVersion = $client->beta->skills->versions->create(
3212 $newVersion = $client->skills->versions->create(
32413213 skillID: 'skill_01AbCdEfGhIjKlMnOpQrStUv',
32423214 files: [
3243 FileParam::fromResource(fopen('financial_skill/SKILL.md', 'r'), 'financial_skill/SKILL.md', 'text/markdown'),
3244 FileParam::fromResource(fopen('financial_skill/analyze.py', 'r'), 'financial_skill/analyze.py', 'text/x-python'),
3215 FileParam::fromResource(
3216 fopen('financial_skill/SKILL.md', 'r'),
3217 filename: 'financial_skill/SKILL.md',
3218 contentType: 'text/markdown',
3219 ),
3220 FileParam::fromResource(
3221 fopen('financial_skill/analyze.py', 'r'),
3222 filename: 'financial_skill/analyze.py',
3223 contentType: 'text/x-python',
3224 ),
32453225 ],
32463226 );
32473227 
32483228 // Use specific version
3249 $response = $client->beta->messages->create(
3229 $response = $client->messages->create(
32503230 maxTokens: 4096,
32513231 messages: [['role' => 'user', 'content' => 'Use updated Skill']],
32523232 model: 'claude-opus-5',
3253 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
32543233 container: [
32553234 'skills' => [[
32563235 'type' => 'custom',
3257 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
3258 'version' => $newVersion->version
3236 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
3237 'version' => $newVersion->id
32593238 ]]
32603239 ],
32613240 tools: [['type' => 'code_execution_20250825', 'name' => 'code_execution']]
from line 3242
32633242 echo $response;
32643243 
32653244 // Use latest version
3266 $latestResponse = $client->beta->messages->create(
3245 $latestResponse = $client->messages->create(
32673246 maxTokens: 4096,
32683247 messages: [['role' => 'user', 'content' => 'Use latest Skill version']],
32693248 model: 'claude-opus-5',
3270 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
32713249 container: [
32723250 'skills' => [[
32733251 'type' => 'custom',
3274 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
3252 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
32753253 'version' => 'latest'
32763254 ]]
32773255 ],
from line 3599
36213599 ```
36223600 
36233601 ```php PHP
3624 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
36253602 $client = new Client();
36263603 
36273604 // Custom DCF analysis Skill (ID obtained from Skills API create response)
3628 $dcfSkillId = "skill_01AbCdEfGhIjKlMnOpQrStUv";
3605 $dcfSkillId = 'skill_01AbCdEfGhIjKlMnOpQrStUv';
36293606 
36303607 // Use with Excel to create financial model
3631 $message = $client->beta->messages->create(
3608 $message = $client->messages->create(
36323609 maxTokens: 4096,
36333610 messages: [
36343611 ['role' => 'user', 'content' => 'Build a DCF valuation model for a SaaS company']
36353612 ],
36363613 model: 'claude-opus-5',
3637 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
36383614 container: [
36393615 'skills' => [
3640 ['type' => 'anthropic', 'skill_id' => 'xlsx', 'version' => 'latest'],
3641 ['type' => 'custom', 'skill_id' => $dcfSkillId, 'version' => 'latest']
3616 ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest'],
3617 ['type' => 'custom', 'skillID' => $dcfSkillId, 'version' => 'latest']
36423618 ]
36433619 ],
36443620 tools: [
from line 3827
38513827 $container = [
38523828 'skills' => [[
38533829 'type' => 'custom',
3854 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
3855 'version' => '1759178010641129'
3830 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
3831 'version' => 'skver_01AbCdEfGhIjKlMnOpQrStUv'
38563832 ]]
38573833 ];
38583834 ```
from line 3968
39923968 $container = [
39933969 'skills' => [[
39943970 'type' => 'custom',
3995 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
3971 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
39963972 'version' => 'latest'
39973973 ]]
39983974 ];
from line 4306
43304306 ```
43314307 
43324308 ```php PHP
4333 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
43344309 $client = new Client();
43354310 
43364311 // Skills render into the system prompt in a fixed, cache-friendly order
4337 $response1 = $client->beta->messages->create(
4312 $response1 = $client->messages->create(
43384313 maxTokens: 4096,
43394314 messages: [
43404315 ['role' => 'user', 'content' => 'Analyze sales data']
43414316 ],
43424317 model: 'claude-opus-5',
4343 betas: [
4344 'code-execution-2025-08-25',
4345 'skills-2025-10-02',
4346 ],
43474318 container: [
43484319 'skills' => [
4349 ['type' => 'anthropic', 'skill_id' => 'xlsx', 'version' => 'latest']
4320 ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest']
43504321 ]
43514322 ],
43524323 tools: [
from line 4327
43564327 echo $response1;
43574328 
43584329 // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit
4359 $response2 = $client->beta->messages->create(
4330 $response2 = $client->messages->create(
43604331 maxTokens: 4096,
43614332 messages: [
43624333 ['role' => 'user', 'content' => 'Create a presentation']
43634334 ],
43644335 model: 'claude-opus-5',
4365 betas: [
4366 'code-execution-2025-08-25',
4367 'skills-2025-10-02',
4368 ],
43694336 container: [
43704337 'skills' => [
4371 ['type' => 'anthropic', 'skill_id' => 'xlsx', 'version' => 'latest'],
4372 ['type' => 'anthropic', 'skill_id' => 'pptx', 'version' => 'latest']
4338 ['type' => 'anthropic', 'skillID' => 'xlsx', 'version' => 'latest'],
4339 ['type' => 'anthropic', 'skillID' => 'pptx', 'version' => 'latest']
43734340 ]
43744341 ],
43754342 tools: [
from line 4588
46214588 ```
46224589 
46234590 ```php PHP
4624 // The PHP SDK supports container skills only through $client->beta->messages with the skills beta.
46254591 use Anthropic\Core\Exceptions\BadRequestException;
46264592 
46274593 $client = new Client();
46284594 
46294595 try {
4630 $message = $client->beta->messages->create(
4596 $message = $client->messages->create(
46314597 maxTokens: 4096,
46324598 messages: [
46334599 ['role' => 'user', 'content' => 'Process data']
46344600 ],
46354601 model: 'claude-opus-5',
4636 betas: ['code-execution-2025-08-25', 'skills-2025-10-02'],
46374602 container: [
46384603 'skills' => [
46394604 [
46404605 'type' => 'custom',
4641 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
4606 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv',
46424607 'version' => 'latest'
46434608 ]
46444609 ]

build-with-claude/token-counting Changed · +4 / -2 lines

from line 516
516516 
517517 ```python Python
518518 import base64
519 import httpx
519 import httpx2
520520 
521521 image_url = "https://platform.claude.com/docs/images/vision-example.jpg"
522522 image_media_type = "image/jpeg"
523 image_data = base64.standard_b64encode(httpx.get(image_url).content).decode("utf-8")
523 image_data = base64.standard_b64encode(httpx2.get(image_url).content).decode("utf-8")
524524 
525525 client = anthropic.Anthropic()
526526 
from line 771
771771```json Output
772772{ "input_tokens": 1028 }
773773```
774 
775An embedded image block that sets [`"oversized_image": "error"`](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#oversized-image-error) is rejected at count time exactly as the Messages API would reject it.
774776 
775777### Count tokens in messages with thinking
776778 

build-with-claude/vision Changed · +8 / -9 lines

from line 792
792792 ```
793793 
794794 ```php PHP
795 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
796 // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta.
795 use Anthropic\Core\FileParam;
796 
797797 $client = new Client();
798798 
799799 // Upload the image file
800 $fileUpload = $client->beta->files->upload(
801 FileParam::fromResource(fopen('vision-example.jpg', 'rb'), contentType: 'image/jpeg'),
800 $fileUpload = $client->files->upload(
801 file: FileParam::fromResource(fopen('vision-example.jpg', 'rb'), contentType: 'image/jpeg'),
802802 );
803803 
804804 // Use the uploaded file in a message
805 $message = $client->beta->messages->create(
805 $message = $client->messages->create(
806806 maxTokens: 1024,
807807 messages: [
808808 [
from line 810
810810 'content' => [
811811 [
812812 'type' => 'image',
813 'source' => ['type' => 'file', 'file_id' => $fileUpload->id],
813 'source' => ['type' => 'file', 'fileID' => $fileUpload->id],
814814 ],
815815 ['type' => 'text', 'text' => 'Describe this image.'],
816816 ],
from line 817
817817 ],
818818 ],
819819 model: 'claude-opus-5',
820 betas: ['files-api-2025-04-14'],
821820 );
822821 
823822 echo json_encode($message, JSON_PRETTY_PRINT), PHP_EOL;
from line 1257
12581257 
12591258Claude views images in patches instead of pixels. Each patch is a 28×28-pixel block of the image, referred to as a visual token. An image, therefore, costs `⌈width / 28⌉ × ⌈height / 28⌉` visual tokens.
12601259 
1261Each model has a maximum native image resolution, expressed as a long-edge limit and a visual-token limit. Images larger than either limit are downscaled before processing; see [How Claude resizes and pads images](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images) for the exact rule. The exception is screenshots and zoom images that you return to the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates) toolsets: the API rejects a `tool_result` image that exceeds the model's limits with a validation error instead of downscaling it, so resize those images in your application before returning them.
1260Each model has a maximum native image resolution, expressed as a long-edge limit and a visual-token limit. Images larger than either limit are downscaled before processing; see [How Claude resizes and pads images](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images) for the exact rule. The exception is screenshots and zoom images that you return to the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates) toolsets: the API rejects a `tool_result` image that exceeds the model's limits with a validation error instead of downscaling it, so resize those images in your application before returning them. To have any other oversized image rejected with an error instead of downscaled, set the image block's [`transformations` field](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#oversized-image-error).
12621261 
12631262| Resolution tier | Models | Max long edge | Max visual tokens |
12641263| --------------- | --------------------------- | ------------- | ----------------- |
from line 1289
12901289 
12911290* **Image clarity:** Ensure images are clear and not too blurry or pixelated.
12921291* **Text:** If the image contains important text, make sure it's legible and not too small. Avoid cropping out key visual context solely to enlarge the text.
1293* **Resizing:** Take into account that your image might be resized if it is too large (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)); this might, for example, make text less legible. Consider pre-resizing your images, cropping them, or both.
1292* **Resizing:** Take into account that your image might be resized if it is too large (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)); this might, for example, make text less legible. Consider pre-resizing your images, cropping them, or both. To have an oversized image rejected with an error instead of resized (important for [coordinate workflows](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates)), mark the image block with [`"oversized_image": "error"`](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#oversized-image-error).
12941293* **Image compression:** Compressing images before sending them, using a lossy format such as JPEG or WebP (lossy mode), can reduce latency by reducing the size of requests. However, this can introduce artifacts that are detrimental to model performance, especially when multiple compression passes are applied. For example, heavy JPEG compression can make text difficult to read. Confirm your compression settings are appropriate for the task by inspecting the actual images sent to the API.
12951294 
12961295***
Feedback