diff --git a/content/.metadata.json b/content/.metadata.json index 4875ad62e..a26d011a4 100644 --- a/content/.metadata.json +++ b/content/.metadata.json @@ -1,7 +1,7 @@ { "metadata": { "version": "2.0", - "fetch_date": "2026-07-22T17:04:46.001722Z", + "fetch_date": "2026-07-23T04:01:21.100352Z", "section": "all" }, "items": [ @@ -9,8 +9,8 @@ "url": "https://platform.claude.com/docs/en/intro", "status": "success", "path": "en/intro.md", - "sha256": "6c9866e1b2fa7e8916fe5c5da5bc68afd17c9561cb4e0de8ae0abf3e4de2b264", - "size": 4679 + "sha256": "5218bd25b0e3b2ef5939ac98ae99ae449cc570f7e8f79a83e2b963c8b1bcbda5", + "size": 4658 }, { "url": "https://platform.claude.com/docs/en/get-api-key", @@ -23,15 +23,15 @@ "url": "https://platform.claude.com/docs/en/get-started", "status": "success", "path": "en/get-started.md", - "sha256": "ec98d455b7deee2e9d44a7f24173a5a9d522a8d439d67bd874aa468f55f81940", - "size": 19003 + "sha256": "d8efb533d2b4996ccd9dc564c3664542158dad6fc88bd55fc1b36656d62b4a7b", + "size": 19025 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/overview", "status": "success", "path": "en/build-with-claude/overview.md", - "sha256": "3934be54a7b43cf1264e95ddc876512552f8cde3ace408108663182c0baf0e3d", - "size": 26575 + "sha256": "0a4c43a7eb59e16985695e8af4806ec40c100b476f3c9b98e9cfd1af0526206d", + "size": 26603 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/working-with-messages", @@ -51,8 +51,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback", "status": "success", "path": "en/build-with-claude/refusals-and-fallback.md", - "sha256": "f8778cf845f9449b50c466022f7cfdff3bc87f479bd66f9b206825a7d5fc15d2", - "size": 47812 + "sha256": "c98de106d63db770275767bf3af13698f171ea421611b7979a31d362e590cc8e", + "size": 47794 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/fallback-credit", @@ -61,33 +61,19 @@ "sha256": "e36246315bae352a092b8424447caeed6f02dab479376fed8804832ff33bf253", "size": 31938 }, - { - "url": "https://platform.claude.com/docs/en/build-with-claude/extended-thinking", - "status": "success", - "path": "en/build-with-claude/extended-thinking.md", - "sha256": "62509fbf6f80422aee6ea5068b0218c8172729296cf1ce61f46e276b3af6afa7", - "size": 147438 - }, - { - "url": "https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking", - "status": "success", - "path": "en/build-with-claude/adaptive-thinking.md", - "sha256": "f64865bbd8237013cbf2423003833a8e26f704547ec8299a2dc443a872f541c9", - "size": 42847 - }, { "url": "https://platform.claude.com/docs/en/build-with-claude/effort", "status": "success", "path": "en/build-with-claude/effort.md", - "sha256": "fa6bc389a6db158783306098955b661affabbf1b42060a5c50e3de081b89dccf", - "size": 22101 + "sha256": "03b7e0483cd4168cb9eb950dbf1c76a81145d30b20a273b933896361494cf5b2", + "size": 20055 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/task-budgets", "status": "success", "path": "en/build-with-claude/task-budgets.md", - "sha256": "21175b866336cbec3d5fdb66a948aa3540cb9bd8548c066b8f77e672d7d712bb", - "size": 23596 + "sha256": "37dd12e441d018de909c9fcfa9f90358dc5f76a2f5b6e2b1ffdb23e3494e18cb", + "size": 23614 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/fast-mode", @@ -100,8 +86,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/structured-outputs", "status": "success", "path": "en/build-with-claude/structured-outputs.md", - "sha256": "b783c1fdd396bc2f42577ed988984550519e606f6f8805e154b663a03df62138", - "size": 105116 + "sha256": "89a3c923fe1639ea75d31992e00b4e051c8c6af1beb6059443810c840e84abe7", + "size": 105098 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/citations", @@ -114,8 +100,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/streaming", "status": "success", "path": "en/build-with-claude/streaming.md", - "sha256": "16fedbcddcd16efc0c5a9946fe6bcf905e8faa144fe6bbf3ed7a5f4221c7d825", - "size": 49447 + "sha256": "fa86525379c75ea52ced67568c8396182a15fdf2c0b562eea0e848eefe612c76", + "size": 49393 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/batch-processing", @@ -128,8 +114,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/search-results", "status": "success", "path": "en/build-with-claude/search-results.md", - "sha256": "69680cc2226460357c9cac384e991f9415d327099e562fc5072e8d340c3a06fa", - "size": 84149 + "sha256": "b6bde3f91a15514cb9cf022c6a25d831dc21ec87ae55d70d764e90ab99dacc2e", + "size": 83170 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals", @@ -152,6 +138,41 @@ "sha256": "a56fdf9c95348d69295063c52a154889c226ef72b2712bf312fb26c7928d9824", "size": 22689 }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/thinking", + "status": "success", + "path": "en/build-with-claude/thinking.md", + "sha256": "f996dcfeb6aa139ba50053deb65ba23202ba4980788fb909ad31a969f67781ce", + "size": 51771 + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost", + "status": "success", + "path": "en/build-with-claude/thinking-steering-and-cost.md", + "sha256": "4a0e775740775219c114332483a83772bccf6fce6bf280b32bfe9d6dcf0236f3", + "size": 40477 + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/thinking-tool-workflows", + "status": "success", + "path": "en/build-with-claude/thinking-tool-workflows.md", + "sha256": "9ac358d14eb642b400c6b988f51555631488b25d7177dca33b04e51da8efe133", + "size": 31475 + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting", + "status": "success", + "path": "en/build-with-claude/thinking-troubleshooting.md", + "sha256": "dcb78b24f019e72ab5e1ba3688b384f4effe1bf1ea31a911df0fd722947177f0", + "size": 11099 + }, + { + "url": "https://platform.claude.com/docs/en/build-with-claude/extended-thinking", + "status": "success", + "path": "en/build-with-claude/extended-thinking.md", + "sha256": "c4f60f0ee354796b834feec62144eb3c5751017f30161ca7e2ddcc1d83b004fe", + "size": 21011 + }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview", "status": "success", @@ -177,8 +198,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools", "status": "success", "path": "en/agents-and-tools/tool-use/define-tools.md", - "sha256": "f3ee264b1730d023f0ae93d24fbdee6bc093ac97a12cb323d98bd4a89296f0de", - "size": 33940 + "sha256": "1f1804bfec1841cb494b009c6d9487797a9311b6d22e57b8554cb65b30e418fe", + "size": 33866 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls", @@ -205,8 +226,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use", "status": "success", "path": "en/agents-and-tools/tool-use/strict-tool-use.md", - "sha256": "6bab09d230a09b71705a375bf307723f89aa72d057e5ac12efda8c5e268b0e9d", - "size": 36899 + "sha256": "77e53e4e78edf1e506407d1d4eee633d93ee5efa922a0701aa958955f4dd89c1", + "size": 39501 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools", @@ -275,15 +296,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool", "status": "success", "path": "en/agents-and-tools/tool-use/computer-use-tool.md", - "sha256": "33aaf1e4ff4c9584521aade0caef415a832cc99fdc3bb8d1f086d222627eb529", - "size": 83475 + "sha256": "5826e8e74f2f920a2475ca4e49b7d327be427909a8e4fa17d418990240bb3eb9", + "size": 83439 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/troubleshooting-tool-use", "status": "success", "path": "en/agents-and-tools/tool-use/troubleshooting-tool-use.md", - "sha256": "083eeee6c98ea7c5eacba5ae3a96f02e63a888a1dfc3fed1f2e2c5032c75fe92", - "size": 13066 + "sha256": "8ce2aa4dc63f3cc8b1980d572b422c214537f5c3faff66e8282948b60bba17ac", + "size": 14070 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference", @@ -310,8 +331,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching", "status": "success", "path": "en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md", - "sha256": "c31902e4e85731f6f6514eecd06c2851d2b719fa7ef06f6c9cca79007b857c31", - "size": 6477 + "sha256": "4e82eca55aeb8253709844570733d82da81085e23e95357a123b1c9f2e04ead9", + "size": 7918 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling", @@ -331,8 +352,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/context-windows", "status": "success", "path": "en/build-with-claude/context-windows.md", - "sha256": "28f4528001b8eedb59c069cc11e9f260d4dd888496f658893f7566cdc5fdcbb3", - "size": 15164 + "sha256": "9b40087374742bee801b217a8022fa83d94ca55d18bab5e926a6a9e2585b4df0", + "size": 15021 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/compaction", @@ -345,15 +366,15 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/context-editing", "status": "success", "path": "en/build-with-claude/context-editing.md", - "sha256": "c3c0a210446eb0ff5d1f2c669ae45e9840e650821dacda008ed62eb0e80515da", - "size": 104390 + "sha256": "7c5cb7ec99e022cbb9bf66f27cc9a3e69c1a615cd6a9d9a0fa748e7751cc36c6", + "size": 104381 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-caching", "status": "success", "path": "en/build-with-claude/prompt-caching.md", - "sha256": "0fdef600af660fc46458d6be3bd0f99ecc38e8db805093e30e5f09ab0c3a0698", - "size": 150950 + "sha256": "2ccab2c2239d56065ad9ad94aef1e5f47d8c51687bd788b0ed6f3e158c1ff1fd", + "size": 151879 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages", @@ -380,8 +401,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/token-counting", "status": "success", "path": "en/build-with-claude/token-counting.md", - "sha256": "bd127751455e0728c9af92b82edf33ec640872e5b8b651e495b05d6aaf024117", - "size": 42187 + "sha256": "000e789b15ad3556c92a3ee94403f0aef55ca3ce83651cdce1feb6f2997409db", + "size": 42126 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/files", @@ -401,8 +422,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/vision", "status": "success", "path": "en/build-with-claude/vision.md", - "sha256": "a80339588225e18937275bac10ecb2f12950b0cdf0a8b067e549398fae606a31", - "size": 45946 + "sha256": "1812b38b2ddd71d2db0a75ef7e5192ea42cdc6647f07ec9557802f389a4ff7e6", + "size": 45928 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/vision-coordinates", @@ -457,7 +478,7 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-connector", "status": "success", "path": "en/agents-and-tools/mcp-connector.md", - "sha256": "e2b19c20ea683d4af6987e6c6ff500b90fa0e2ea98aad030688f3f4045d29b2c", + "sha256": "5f80f16e22e143c870b358f609bfd0bd455905c38615b68ce449d29cb57cc3bc", "size": 48191 }, { @@ -527,35 +548,35 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock", "status": "success", "path": "en/build-with-claude/claude-in-amazon-bedrock.md", - "sha256": "522b3399155dc1e540daea8d92c5e33f8d348adc05cf52c4b51e2473574994c3", - "size": 17821 + "sha256": "6816ee4dc1e8a5fee71ddaf651f56b14ddcc16ee44ec266da83141ba339b7e14", + "size": 17803 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy", "status": "success", "path": "en/build-with-claude/claude-on-amazon-bedrock-legacy.md", - "sha256": "5eb7b4e6610e403e5555e754697240e4f14c143f5f753dc948c0515c49e41904", - "size": 34106 + "sha256": "3134ee645e141a0414c72a3e35b15e80950d05acd4a457a0cc90ef78fab84951", + "size": 37573 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws", "status": "success", "path": "en/build-with-claude/claude-platform-on-aws.md", - "sha256": "9dba7a30358c3913f5c8b5541ecb2557f33d88c388e40b276f423e8125926690", + "sha256": "4d13676435ceb88c7c952198d23cc950c88e17bb6d6207a4a2ec7abe2741cd36", "size": 73179 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai", "status": "success", "path": "en/build-with-claude/claude-on-vertex-ai.md", - "sha256": "9de8ee1cf81462cd39b3398d4f5efd6e45252a17cb89d5de3143e01b450f52a3", - "size": 31343 + "sha256": "d8b62329997e5ba0168f94583d58ec768692e0b7e8ad315138406d53fe323a7c", + "size": 31325 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry", "status": "success", "path": "en/build-with-claude/claude-in-microsoft-foundry.md", - "sha256": "c96e401f1608f982145f313cd77b3e81a58c63d63fa611bda16f6abfcfb3bf47", + "sha256": "619aedbe982d2737cb553ab95202a3e9ee6a6ee0b6fb36eadfa0054bbbc79b10", "size": 35201 }, { @@ -569,8 +590,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/quickstart", "status": "success", "path": "en/managed-agents/quickstart.md", - "sha256": "2ffd568601d9311fb332ef06357c1d8968f3cc6d5236c15ba5a658b3a568b051", - "size": 28738 + "sha256": "70eff87ef5f930a564b05e05da19fd6219c01f6b5c29b02d1e0364bf7f92b06e", + "size": 28734 }, { "url": "https://platform.claude.com/docs/en/managed-agents/onboarding", @@ -590,22 +611,22 @@ "url": "https://platform.claude.com/docs/en/managed-agents/agent-setup", "status": "success", "path": "en/managed-agents/agent-setup.md", - "sha256": "5644900ca7f7d09ef4ed64d6b94fdb35b22164f577b222550d4b2db10a5f1287", - "size": 19234 + "sha256": "da30c3ad25571d228e14c50d0d6637f9d9eff466fa8377f0aaff651cc810c311", + "size": 22524 }, { "url": "https://platform.claude.com/docs/en/managed-agents/tools", "status": "success", "path": "en/managed-agents/tools.md", - "sha256": "460468163dbcc771b63232c668dbd647658613e1e1c1b59c2e306e81d2ad4029", - "size": 17167 + "sha256": "9eef7a2f4e047cb1e955572f9e9ef4a42410df2b8039d385516b2735b1296a09", + "size": 17193 }, { "url": "https://platform.claude.com/docs/en/managed-agents/mcp-connector", "status": "success", "path": "en/managed-agents/mcp-connector.md", - "sha256": "efa2d5423a13ca379c75d13cdebfb899051d0527b84115aee9dcc9bf2ed32a50", - "size": 15044 + "sha256": "2a7cde0823ff7fce0bc1898f5e767a5b2de1a5d60193064724dfd9497992ea1c", + "size": 15772 }, { "url": "https://platform.claude.com/docs/en/managed-agents/permission-policies", @@ -618,8 +639,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/skills", "status": "success", "path": "en/managed-agents/skills.md", - "sha256": "0a8f281eb8e96632e28c021c1837f1c190e83cf4379b2da6c5ca8beb5314e781", - "size": 13515 + "sha256": "98bc4ca566368bc0ceca23754204235a2719947cffea37dff3bfeaabfaeb7a36", + "size": 13481 }, { "url": "https://platform.claude.com/docs/en/managed-agents/environments", @@ -632,64 +653,64 @@ "url": "https://platform.claude.com/docs/en/managed-agents/cloud-sandboxes-reference", "status": "success", "path": "en/managed-agents/cloud-sandboxes-reference.md", - "sha256": "6a4f4cba017c2aac59ed3c85f17577a026788b7ed4bafef4498758903504da35", - "size": 3013 + "sha256": "8a79745817bcbe811b2e47358d200a30ef0c5e18e43e5dc81c8b45677dfaf065", + "size": 3944 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes.md", - "sha256": "132bbe416f275cdb146134a71c321f423d2c54cf79f5d40e8e68f5bbd9dcf93a", - "size": 75434 + "sha256": "ecc1a6cfa7c56fa911b838dc87a9a49d410dcf987c1c8c667501682ba088613c", + "size": 76120 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes-security.md", - "sha256": "270685f60abf38adf4513c91b6b673b4aba46e1ba855ffdd70d08260d099c29f", - "size": 2779 + "sha256": "cba1539d0c9dd06236fb78254c54a84dc9df720226a79243e2266d91825aa980", + "size": 2865 }, { "url": "https://platform.claude.com/docs/en/managed-agents/sessions", "status": "success", "path": "en/managed-agents/sessions.md", - "sha256": "7cb03431c422f4a85370ca9f42c13a5ef5b934f036659837b60dd7c5c97f7944", - "size": 20659 + "sha256": "d9baf665e0aad21f4719b8fd814eeb55726941844038f049d1e43de8ced795ea", + "size": 32034 }, { "url": "https://platform.claude.com/docs/en/managed-agents/session-operations", "status": "success", "path": "en/managed-agents/session-operations.md", - "sha256": "a00cc3fbc83ea99a9f4924f36771e9c856ca048dca4b8966f01c3635227efae5", - "size": 22882 + "sha256": "915f18d4d56c6f718ca384e4baec14a9a7fc64a82368949d06ccc58b80a7e7b5", + "size": 23071 }, { "url": "https://platform.claude.com/docs/en/managed-agents/events-and-streaming", "status": "success", "path": "en/managed-agents/events-and-streaming.md", - "sha256": "279c883c71d5b809b68ab163eaa68d6792c2bc9a66be603e28db1542b144d16c", - "size": 92887 + "sha256": "ff79971e95af6567ded323ddfc111a480ca938ada2901dda9abece49c3797f43", + "size": 107881 }, { "url": "https://platform.claude.com/docs/en/managed-agents/webhooks", "status": "success", "path": "en/managed-agents/webhooks.md", - "sha256": "a0e09b0191328a3c95d393801441e7cc36831f840b756adee368e898037872eb", - "size": 20943 + "sha256": "33ea5bef3f76c95c4a50f6032a279ff2891d9d59d2ac0411e68cf358baabfe24", + "size": 27923 }, { "url": "https://platform.claude.com/docs/en/managed-agents/define-outcomes", "status": "success", "path": "en/managed-agents/define-outcomes.md", - "sha256": "67d43d82210c6caf086fd2560affb7c76acc4eec081da7c555147d297686feba", - "size": 31346 + "sha256": "fe92ce3425f92d772b2f351b9c8e45173d38cccd498ca570caae7a91fb10d3d0", + "size": 32168 }, { "url": "https://platform.claude.com/docs/en/managed-agents/vaults", "status": "success", "path": "en/managed-agents/vaults.md", - "sha256": "216170f970aa31e8806829c675d3c4f213d15e4f9ceebf3641956c9793da90c0", - "size": 45452 + "sha256": "d195434fe0a873cab6a0bfba054a66fc2a0e88bddaacb304f1d4435b168dc4b1", + "size": 45887 }, { "url": "https://platform.claude.com/docs/en/managed-agents/github", @@ -702,8 +723,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/files", "status": "success", "path": "en/managed-agents/files.md", - "sha256": "6fe25477b732cd4d54bd10829ca3d18d789af0efc59b3307a733871fe20d63f7", - "size": 19907 + "sha256": "786012c3b453e98f61556dd3e7c94d8a3e6174b2bd586565c4eb2c5197e403b2", + "size": 19854 }, { "url": "https://platform.claude.com/docs/en/managed-agents/memory", @@ -716,29 +737,29 @@ "url": "https://platform.claude.com/docs/en/managed-agents/dreams", "status": "success", "path": "en/managed-agents/dreams.md", - "sha256": "b6e8c9aabb3822d0cd73554646e7831bd5ad0c5a55f5c8796ed44eb1457639fc", - "size": 24202 + "sha256": "b93158d3307980890d59b07c8060620106fdf8dc6a71aa67a8016c8519b0fb64", + "size": 24499 }, { "url": "https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration", "status": "success", "path": "en/managed-agents/multiagent-orchestration.md", - "sha256": "109444e6642524e2f742aa1a22018904f2e4b84b4021378e1821cae725b04995", - "size": 49597 + "sha256": "0b9203164d7f5de0861d23c8e7b1a94824a8aaa48e97c2a45285dfa5b9d01349", + "size": 51392 }, { "url": "https://platform.claude.com/docs/en/managed-agents/scheduled-deployments", "status": "success", "path": "en/managed-agents/scheduled-deployments.md", - "sha256": "d311a3b0dc2df66c2eca9a77191f94663562705395668a6088778e0c54516afb", - "size": 22177 + "sha256": "e928508d7705adbb2926f1f3028654db149e9cbf3ac6fcbe1f260cbaea68e535", + "size": 22423 }, { "url": "https://platform.claude.com/docs/en/managed-agents/reference", "status": "success", "path": "en/managed-agents/reference.md", - "sha256": "a37f6e7cb4e6b5b01af48b0c0b477997f81eb7f5146a03ac8f1688f6305a4e90", - "size": 14262 + "sha256": "131e2ed44a2528f44485d3d16d959291565369a568247bff634cf8af814e9cbb", + "size": 18430 }, { "url": "https://platform.claude.com/docs/en/manage-claude/admin-api", @@ -891,7 +912,7 @@ "url": "https://platform.claude.com/docs/en/manage-claude/api-and-data-retention", "status": "success", "path": "en/manage-claude/api-and-data-retention.md", - "sha256": "674288ee80bc4fae2facebd062bdec82d92ef2e665a83ade313f06a39421f7a7", + "sha256": "17bbb2ec54a8981c99758a888a84ea774ffaf23cd54c1dc32fa2bb9c1e147d4f", "size": 47607 }, { @@ -905,8 +926,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/cmek", "status": "success", "path": "en/manage-claude/cmek.md", - "sha256": "d31a678e6b376b9211175acad551ac9ed2752abb353494aaf35ffef28c20d14d", - "size": 12009 + "sha256": "44337f5f959da2a43d82be97a2338c71b5651ecd99c4d47fb12bffba7964638a", + "size": 11905 }, { "url": "https://platform.claude.com/docs/en/manage-claude/cmek-aws-kms", @@ -933,8 +954,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/compliance-api", "status": "success", "path": "en/manage-claude/compliance-api.md", - "sha256": "7a90578727c86383cb2bd993c07a4334df5a6a9f95b8d440f33cf6bd80b46990", - "size": 6579 + "sha256": "668f5981c84655f39cc1ac851ff34a070f0e54d35d057848a8e776c6cf010fa2", + "size": 6544 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-api-access", @@ -947,36 +968,36 @@ "url": "https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed", "status": "success", "path": "en/manage-claude/compliance-activity-feed.md", - "sha256": "3d8acc4d34c0c61fde9a99c437694e00aa06a6b1411e13cf6c7a3b77d904a2cd", - "size": 13481 + "sha256": "7239a4d3c2f2dae33902d87d7f75b8f840d9b843c1ed2cabc1f20d490f7d8893", + "size": 13372 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-content-data", "status": "success", "path": "en/manage-claude/compliance-content-data.md", - "sha256": "dd0f1cb704c71898de944c929396c0e5e5496bd099e975e1b6d2883f0a4d91c3", - "size": 20254 + "sha256": "ff09df432a57bf5bb42654b9006efb2f8c8097a1509e31e530b699260563a891", + "size": 20014 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-org-data", "status": "success", "path": "en/manage-claude/compliance-org-data.md", - "sha256": "ac098269adda497dd9a4de0bbdb4c1ad6c61dd93a7bcafe50249f92c84bd5291", - "size": 19080 + "sha256": "87d9506f466e00de984c3d60649de55de8727f336fd62c9f46bba4a9202dc68b", + "size": 18897 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-integration-patterns", "status": "success", "path": "en/manage-claude/compliance-integration-patterns.md", - "sha256": "f37d0582bb41ec23dd5bde486f1c0ee801a1f162c0b12da4dc7137839f0201f0", - "size": 11473 + "sha256": "3da5fccceb75da25769f6808336e1a7f5035ac162590ece143c8a2286b0bd83b", + "size": 11391 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-errors", "status": "success", "path": "en/manage-claude/compliance-errors.md", - "sha256": "9278c01f8c8ca0d434ed8491609a41f305445d6393693146e37685fff1a7f272", - "size": 21123 + "sha256": "906e76a7ea64e23c34538b952b76760f9e08a5d0b07f106cbdee53d7f818f3b6", + "size": 21088 }, { "url": "https://platform.claude.com/docs/en/manage-claude/compliance-faq", @@ -996,22 +1017,22 @@ "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/ticket-routing", "status": "success", "path": "en/about-claude/use-case-guides/ticket-routing.md", - "sha256": "61f9e0b4caf7f6ab7e20c89da30aaf06305e2582812bf0eadb155264ccc79884", - "size": 29561 + "sha256": "ce83eb2624ae59aca8261f35c922480b78907d930b697d90565a2ccaf0e35c20", + "size": 29630 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/customer-support-chat", "status": "success", "path": "en/about-claude/use-case-guides/customer-support-chat.md", - "sha256": "7fb23880f46d37c18474d0fd6e263783fd30a098c277b41576197c75bf10da6f", - "size": 34324 + "sha256": "0aee50a054f1b5b4ee6dc40c7a393c9875094f876bb259123f4b2300ec682244", + "size": 53543 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/content-moderation", "status": "success", "path": "en/about-claude/use-case-guides/content-moderation.md", - "sha256": "f15685d0cdd049c6c8ec56de2b88f3746152d22d56b6af5a61ca06ffc13c642f", - "size": 25329 + "sha256": "ca1485415ca24feea5d4b09782dc81b064ac0553c851977220d84b0cfee60cf7", + "size": 114604 }, { "url": "https://platform.claude.com/docs/en/about-claude/use-case-guides/legal-summarization", @@ -1024,22 +1045,22 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview", "status": "success", "path": "en/build-with-claude/prompt-engineering/overview.md", - "sha256": "aa097f81d8de347dc3287f591464d36511e582d3b1a48872419c0cfa88f0ebdd", - "size": 2705 + "sha256": "efab4b9cdce3f22f64e498fef41ca5597322f853573d89c3b687dc1afa9017a4", + "size": 2558 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices", "status": "success", "path": "en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md", - "sha256": "30eec771316c9a604fdedbb1b660ed7a7a7cb84dfa11174a106c7f2d86aa0697", - "size": 56683 + "sha256": "f5813523ecf28fa173dedf2328c2d690d2e57654ec5001d8266168d2d6ef183f", + "size": 56724 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-fable-5.md", - "sha256": "61f3b61423a1c953edbd242e2e9e639a213397a6eb3a3fdc53da7232d4aac9f3", - "size": 18421 + "sha256": "a215e57b39a13c794a9590a9e9a59700c6bbf0e387bf10d71e75c23970accb09", + "size": 18430 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8", @@ -1052,15 +1073,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md", - "sha256": "21910f8721d95d94110b30805573ececeeb36e1f3a0bb15aae1a83cda44d1b58", - "size": 15873 - }, - { - "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-tools", - "status": "success", - "path": "en/build-with-claude/prompt-engineering/prompting-tools.md", - "sha256": "3d2e08806e114a5858a64027749815fb25e9473e96f70169d59423bd77959a91", - "size": 10636 + "sha256": "cdedcdf1ed1034465d1861cba347e1d316773733a3f2effbd1858ca0ab9263ac", + "size": 15882 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/develop-tests", @@ -1069,13 +1083,6 @@ "sha256": "5ff3afee747f992b1ff2475ed6c7340e42d459adddfb8ab371e30b3f2edb9198", "size": 137073 }, - { - "url": "https://platform.claude.com/docs/en/test-and-evaluate/eval-tool", - "status": "success", - "path": "en/test-and-evaluate/eval-tool.md", - "sha256": "7c5ebadc8977cdd759b8075f9cd280b9875e9cace3258876e478b9c5ccdc0be2", - "size": 5470 - }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latency", "status": "success", @@ -1122,8 +1129,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/overview", "status": "success", "path": "en/about-claude/models/overview.md", - "sha256": "82da5d9645a34bd159a9432f6161af7d8fa3efae8893adc8a94fdcae8baa6800", - "size": 27280 + "sha256": "5ad707768802c8add120d4f14983a13b1c17f6d7f371b62c1c37354efd2463e6", + "size": 28128 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions", @@ -1136,36 +1143,36 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/choosing-a-model", "status": "success", "path": "en/about-claude/models/choosing-a-model.md", - "sha256": "3f19cdc89ee4e49a2ad3e93951909ed69a32ad7dc57aeccc35c4692c50aab8f7", - "size": 6711 + "sha256": "8e8ac348f484a934a9286f65073cd5992ee07dad51bd12e0f2e82c3cd8ff39fe", + "size": 6720 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5", "status": "success", "path": "en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5.md", - "sha256": "b42118e8c6d787db55460dde549d739732400c5bc714051412389246a16e1839", - "size": 9301 + "sha256": "f5ad16a736bfd3f58231483d15e9354852416ad44e1120fe3f4edbd21037189c", + "size": 9310 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-8", "status": "success", "path": "en/about-claude/models/whats-new-claude-4-8.md", - "sha256": "74dfc471a1a01877327451e471f2c64e91b16a107b3e053ddee529d19e35ad10", - "size": 14595 + "sha256": "3820ceefeed0b7602d32222e7721ad96d9ca17749c5a7f3fc973b26e1bea31ca", + "size": 14645 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5", "status": "success", "path": "en/about-claude/models/whats-new-sonnet-5.md", - "sha256": "e9838313d3e2564bd487883b4bd18624327dc009fe5b0a59487cbef444700cae", - "size": 9322 + "sha256": "c23f07ceb5a9b5d9765aed28c1c3a21888e75cfd0d41c10826edfde83e43aeb3", + "size": 9367 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/migration-guide", "status": "success", "path": "en/about-claude/models/migration-guide.md", - "sha256": "655ea2cc4c08b42af6f6c65a803f56082e35a71e2312946ea786569de8309945", - "size": 114599 + "sha256": "2c468118e260203962aa0182aaf12e1bbc3a478e3f202a760bf1f557a3ea1f27", + "size": 114698 }, { "url": "https://platform.claude.com/docs/en/about-claude/model-deprecations", @@ -1206,7 +1213,7 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart", "status": "success", "path": "en/cli-sdks-libraries/cli/quickstart.md", - "sha256": "1858a694752b9323a2c22dcfaee18bae6193ded55b22be7bf81443d7f6ffee7c", + "sha256": "c910ed523086d4046fae28556b0b62b6033cb3825acbb3e7ecbd001863f067db", "size": 4786 }, { @@ -1269,7 +1276,7 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/java", "status": "success", "path": "en/cli-sdks-libraries/sdks/java.md", - "sha256": "510ce0e9868bb03b76cf3bcdfd36b65382e53bcc73949d8650786eebb957df89", + "sha256": "81642df5140c90b53d6847933cae0f5ccfe6645d585e8361e69ba0199355d322", "size": 46811 }, { @@ -1290,22 +1297,22 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/apple-foundation-models", "status": "success", "path": "en/cli-sdks-libraries/libraries/apple-foundation-models.md", - "sha256": "d571d2143882693e5e84167def79bae78aed799c4b8e3cd5473c7b3a62b14e2c", - "size": 11879 + "sha256": "03e84d1f3681fd7c3736f689ad8a8c4df865e86ccb268becc66b96042cc4b921", + "size": 11871 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/openai-sdk", "status": "success", "path": "en/cli-sdks-libraries/libraries/openai-sdk.md", - "sha256": "9aa394fd753ae37b66aa048b6562ceb588bbe0df8717bb5262ce80858f9f6188", - "size": 18619 + "sha256": "f1fb0175c5920f39821f0eb04b2fc6bd5b1881fa41067f01a67a280c78dfbf9c", + "size": 18672 }, { "url": "https://platform.claude.com/docs/en/api/overview", "status": "success", "path": "en/api/overview.md", - "sha256": "c3b4ad9c93bf27c3cfb2a7f2cbddc5f10d0dee07131396ef0a855bb8ecf226bc", - "size": 14717 + "sha256": "66343e43c23670b4826e2e836d6f93be3f80ba6b537a12bca1cb9bc65fd1937f", + "size": 14718 }, { "url": "https://platform.claude.com/docs/en/api/beta-headers", @@ -1318,8 +1325,8 @@ "url": "https://platform.claude.com/docs/en/api/errors", "status": "success", "path": "en/api/errors.md", - "sha256": "180b373a012a3df0cf77896efda5fd98907834ac70784e62de7572bd37ba0e15", - "size": 19892 + "sha256": "a96ed2e5e885df9838097aafd8a0364268f579fa543320a7ba8c70f2d30a4f6a", + "size": 22378 }, { "url": "https://platform.claude.com/docs/en/api/claude-code/routines-fire", @@ -1381,36 +1388,36 @@ "url": "https://platform.claude.com/docs/en/release-notes/overview", "status": "success", "path": "en/release-notes/overview.md", - "sha256": "bbd33d60d94b563b90b8d8b0c006f7b3a4c8761499875419ea803c57078785ec", - "size": 69863 + "sha256": "ff60a8345582d6d8edd53ec91f1d44aaf8df8cbbba8efe3b27fd2af1c6d10209", + "size": 71797 }, { "url": "https://platform.claude.com/docs/en/api/completions", "status": "success", "path": "en/api/completions.md", - "sha256": "698f32f03a2b9e8d9dc3a64142efdb412f77589b482c8591ebe30e45191722c7", - "size": 12489 + "sha256": "f450a4a710080f8106f5df9c85e493f4d73e96ba27ac5175230cb8fd31bc2028", + "size": 12520 }, { "url": "https://platform.claude.com/docs/en/api/completions/create", "status": "success", "path": "en/api/completions/create.md", - "sha256": "b7f55f98785b7c61daa269609b7cbd53f178a54da4c6eb7add494ad2353fa506", - "size": 9751 + "sha256": "a8544ecd2cdd0e409f465a5e027319d2b391467a5923a77a4a5c675d0357f030", + "size": 9782 }, { "url": "https://platform.claude.com/docs/en/api/messages", "status": "success", "path": "en/api/messages.md", - "sha256": "775e35b5793dbeb512613f731da1645fb7e93b27130c686e0920163f738fcff8", - "size": 770219 + "sha256": "51fe4af48cddf3b64eae576ec482eca88492d83d6eaca21e11875adff4b6b207", + "size": 779629 }, { "url": "https://platform.claude.com/docs/en/api/messages/create", "status": "success", "path": "en/api/messages/create.md", - "sha256": "3b9f75fa118fd3a5d91b9ff97b146e16855012586942f52a38bab08382d0441c", - "size": 92134 + "sha256": "633ca08f06b7f60c78f496f9d36ffa2377a05ac250b01409b3956fecce9fce6b", + "size": 93183 }, { "url": "https://platform.claude.com/docs/en/api/messages/count_tokens", @@ -1423,8 +1430,8 @@ "url": "https://platform.claude.com/docs/en/api/messages/batches", "status": "success", "path": "en/api/messages/batches.md", - "sha256": "f347f8d0300db1493a058365aa5caa497741e691465dfc084e9e5dcf63f97ae9", - "size": 208817 + "sha256": "d4e073d8d294f5169fe47f5d58717b1d6a287a114c4e788959b7d9ee51663f56", + "size": 212577 }, { "url": "https://platform.claude.com/docs/en/api/messages/batches/create", @@ -1465,1023 +1472,1065 @@ "url": "https://platform.claude.com/docs/en/api/messages/batches/results", "status": "success", "path": "en/api/messages/batches/results.md", - "sha256": "6d4f9ba7712d81a74d544adc3d3c371572b9633c23d371e9e243de4c894a8531", - "size": 30448 + "sha256": "3e732f6e75ab615ef2c2c3ae9d1e60116842820f6be1667a3d8c4cbe92533fe4", + "size": 31397 }, { "url": "https://platform.claude.com/docs/en/api/models", "status": "success", "path": "en/api/models.md", - "sha256": "22ca1e17abe89e3e193c211b0c77b17186fb24cc1a4ed06cfc227bae308fe2bf", - "size": 21316 + "sha256": "8129b86d412816ebbc572910f2f0565d6400781dd320ed602864d6f6694aced8", + "size": 21378 }, { "url": "https://platform.claude.com/docs/en/api/models/list", "status": "success", "path": "en/api/models/list.md", - "sha256": "835319563bb175483e516d190d507a3e414b5752fc1491617d02c5fb6cd1d63d", - "size": 7162 + "sha256": "bf1ce5390e4c1f617f63f3e25b3ed68787749a4ee1c340fb48f4b919fd80bac2", + "size": 7193 }, { "url": "https://platform.claude.com/docs/en/api/models/retrieve", "status": "success", "path": "en/api/models/retrieve.md", - "sha256": "bfb5e6c45f6e09f436a6af91a4537c186dc5927c46d0c86c082fc363d1a2ac2e", - "size": 6139 + "sha256": "eda7016d667ba9d598f16c27e8b76be188717facf9a123be981bd53d0dfc2b16", + "size": 6170 }, { "url": "https://platform.claude.com/docs/en/api/beta", "status": "success", "path": "en/api/beta.md", - "sha256": "545adccc4935fa13879e273d6af6d583e8cdbcfb97e3005b2758fa9a62b9c5be", - "size": 2785999 + "sha256": "2909e969012bab72548d2f09d232e89a10e65224bfe38da70aa580fbf8c21d00", + "size": 2903879 }, { "url": "https://platform.claude.com/docs/en/api/beta/models", "status": "success", "path": "en/api/beta/models.md", - "sha256": "6756d1c2027e7409d5fa69e6d7dbefdf9a527106929eb50a3fd63d84d1572520", - "size": 22558 + "sha256": "3b1bac49ab4cba6ca878ef730ce054cbe5a38b37f1cb6c9a5ac36f9cd97c03c8", + "size": 22620 }, { "url": "https://platform.claude.com/docs/en/api/beta/models/list", "status": "success", "path": "en/api/beta/models/list.md", - "sha256": "0e6d0b404d8cd2e48e914c5c4e63ea6248ac701d6358375cba1e199faee8831b", - "size": 7528 + "sha256": "e0f4828d60d4539ce511054121ebe4c45903c6a3664a21fcfa5ee350102e16fe", + "size": 7559 }, { "url": "https://platform.claude.com/docs/en/api/beta/models/retrieve", "status": "success", "path": "en/api/beta/models/retrieve.md", - "sha256": "314899e3677fe31c9458a68606fdf920d4de2dd675a627d8966e0b607bbd02b1", - "size": 6506 + "sha256": "60c6221baf3307028c444e6315de6cbe8728f21ba8a2a1afd9938b99689c7694", + "size": 6537 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages", "status": "success", "path": "en/api/beta/messages.md", - "sha256": "a86052e52d96801fbc6337e8fa4586762deda08d1a54620b4ebc7d12d77e9319", - "size": 1135598 + "sha256": "4909dd9faeea49ac1e8380b6924045367fb4578fd291af1340f1e48892599967", + "size": 1158604 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/create", "status": "success", "path": "en/api/beta/messages/create.md", - "sha256": "704e271d7836bb4f2d906c32bc8e114d9d7f1d3118b24a93e92b33b293fb5453", - "size": 135657 + "sha256": "e2d09346cd13698b87a0991da0e41fb29a2514ae0c417bb7d9915d0207391282", + "size": 138085 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/count_tokens", "status": "success", "path": "en/api/beta/messages/count_tokens.md", - "sha256": "5cec31eb48e110e5b6b1b62632fc6b5634b626b9263968163cba047d071f6ba2", - "size": 85611 + "sha256": "8e4003cb01b1aea88ca1985680b77090a742f1fef7766655100761ab1db23f4c", + "size": 85725 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches", "status": "success", "path": "en/api/beta/messages/batches.md", - "sha256": "32a519cd9ad6c10f4a09af9b2e93f40590bf4250a237b828a4455e48b0e65e0e", - "size": 317546 + "sha256": "f1cf2b97a58d66504ec70dd1c9d6f46326316437bee5062045af6fbb80f4afa5", + "size": 326168 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/create", "status": "success", "path": "en/api/beta/messages/batches/create.md", - "sha256": "62a2098b548e9485883fac281f4874e7fa9c1468f570dc428b7cea5f983d922a", - "size": 101798 + "sha256": "a9c47de8f517b4429e38b0c828d1cb1aed4831f71ba54e4a89856834eddd83e4", + "size": 102105 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/retrieve", "status": "success", "path": "en/api/beta/messages/batches/retrieve.md", - "sha256": "5fdd0c96034f73e34a53ec6714173b5246ccff4f1c92089260ac08a7e923065c", - "size": 5485 + "sha256": "85bbb97a66b574c2253d40ded6037c49ff73194bc7e798e7043b70dbe3ec09dc", + "size": 5516 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/list", "status": "success", "path": "en/api/beta/messages/batches/list.md", - "sha256": "ea6891b8b0dcf35d86ee5489ec10e366c8ac70af8d21fb74ef770d8e45a2c952", - "size": 6161 + "sha256": "284b9f9ec95669452ecdbe2226172bfdcbd61d1a41c1910b0c76aef55abd0540", + "size": 6192 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/cancel", "status": "success", "path": "en/api/beta/messages/batches/cancel.md", - "sha256": "9db5edd81ee54d12a5076b27ed85dbb820871a5341d2a8109cba88bcf3e575c1", - "size": 5822 + "sha256": "05f4b2d2b14b0b7d4cd636a8d0b76b547eedf97936820ee40f071f1fc8aaa9e4", + "size": 5853 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/delete", "status": "success", "path": "en/api/beta/messages/batches/delete.md", - "sha256": "683c2cdaa6764dbd1cafcf52c7bec7d44a3c8a048b61b7a56a5854ba0516bb89", - "size": 2431 + "sha256": "42be5878d6dbc91334c2179fff6b0c67b4a29c6a150b3dad9f67729ba25461da", + "size": 2462 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/results", "status": "success", "path": "en/api/beta/messages/batches/results.md", - "sha256": "268cc659df624fd217babf3aece5463cafcea113b7bb41cf664893b79092f11b", - "size": 50976 + "sha256": "f49d5ba84682389899625ef6c7126654f323dbd0412c95fc673c6c6e64305655", + "size": 53065 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents", "status": "success", "path": "en/api/beta/agents.md", - "sha256": "62457b7390a770db6c3696b92dfc6bfaeb1de15cd4721caa8eb8990d73d0d340", - "size": 131558 + "sha256": "cab1ebd21669486e7e7206ff092616741ff6bc3eca5e11e753823078c517ccbc", + "size": 147001 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/create", "status": "success", "path": "en/api/beta/agents/create.md", - "sha256": "c16dd5f5ab2306c350233035c9df6bfef7712e1d9e4638f9d0825e157db06cdd", - "size": 21715 + "sha256": "914d1e6b75a5b8a48fec0ea1e31412f38997d5829696c46cc512eb9199b9c907", + "size": 24379 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/list", "status": "success", "path": "en/api/beta/agents/list.md", - "sha256": "0ad642aa4daa67ff7192ad31fcb5315884631d7408295c9fc00c930ff24dd0ca", - "size": 11275 + "sha256": "ab10f8ec128066f1d86a334c71cf8aed0983fc9203eb308a2007ef6611f445a8", + "size": 12409 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/retrieve", "status": "success", "path": "en/api/beta/agents/retrieve.md", - "sha256": "dd1c25e60d8f75a7567da1f399aff71296e95f6782f473940ef05e1f353e248f", - "size": 10620 + "sha256": "c1c89f77fd289ed36176c450ab70b4ad43f2790d35d1509034628af53b767f9f", + "size": 11742 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/update", "status": "success", "path": "en/api/beta/agents/update.md", - "sha256": "8b1b3cccae735db6a95116e54669de29176de4fd7bbcef36fb59f590eea2a164", - "size": 22133 + "sha256": "47b451b4c4fedca6ac97d76325bcf6008da8d9ded2744aa075f152afe41c51ef", + "size": 24934 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/archive", "status": "success", "path": "en/api/beta/agents/archive.md", - "sha256": "38c70fe9b837188bb4ac6b5b3a79ae46f1e808e9dae6bef038cbcc57a9c9ff3b", - "size": 10522 + "sha256": "43e8d2103e187b2e82359e9ce02bdd310bec112747e019c2874aeac05eac5d4a", + "size": 11644 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/versions", "status": "success", "path": "en/api/beta/agents/versions.md", - "sha256": "f75ba8dc039f1232e8bb36e4f02e78902e448fcb195c0eb3dbe951ff3960086c", - "size": 11061 + "sha256": "3150a293a835f1f1acd3fa8593bda2c4ba6317752f6f44ce1ea4c477c156062b", + "size": 12195 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/versions/list", "status": "success", "path": "en/api/beta/agents/versions/list.md", - "sha256": "5eaab541961c795d03662e0c48ed0b13e9440e196346602959fb3c2d14e33ba8", - "size": 11049 + "sha256": "684a9cb40bcca009e671a0f53090c275fd116a6f9f2d55f9021c0c0ccf989d59", + "size": 12183 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments", "status": "success", "path": "en/api/beta/environments.md", - "sha256": "bdf50f94e1c9c2131a1027be7d38f09685954c5547a8c4ca5ff4b9b73bf95efd", - "size": 87213 + "sha256": "06e3c93def033956aa491509211a790426252289bef2ca17f8a79c312ba9d0d1", + "size": 89229 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/create", "status": "success", "path": "en/api/beta/environments/create.md", - "sha256": "62bb0e31edcf9fee97c15bd4b45f154af2ab29f944be8e14acaf1675c25a2e52", - "size": 9531 + "sha256": "2e63451921b39fa7a3dde76397afafa8eec58ecb9fea98c02a6690b12f58ca7f", + "size": 9562 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/list", "status": "success", "path": "en/api/beta/environments/list.md", - "sha256": "703035c0f3d4750876c607f246d8ad1230bd723725a615598c002f3c90e1ee85", - "size": 6319 + "sha256": "b12f4a967a5a3a2ef8c8af049d7ab1d79356d27a0ba66f801fadb0326a969c58", + "size": 6350 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/retrieve", "status": "success", "path": "en/api/beta/environments/retrieve.md", - "sha256": "190e11874a89bb955c3d610acc5bab034557d86469b48bb2796f62fc36aa7c98", - "size": 5726 + "sha256": "c23e571c84ef2e70440aab398a91a8560e2438444738fb67ef5a17f17c4d2f08", + "size": 5757 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/update", "status": "success", "path": "en/api/beta/environments/update.md", - "sha256": "73994c1e625c119f9ffc82a2fe592b59db5beb1839f4d11907344069c0ad2754", - "size": 9126 + "sha256": "c00ceda6aa29228d1c70ccd202811025048605ff43a1fd31be49440872f87a1f", + "size": 9157 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/delete", "status": "success", "path": "en/api/beta/environments/delete.md", - "sha256": "9722e141a958b7e4dc404d7f7c8e99cb35c7fcaf6bd14e1713f5851eced65e3f", - "size": 2120 + "sha256": "427e43aa64fdcdf821173a718cda9919974bd90592cf2bd478f76d077325bc5c", + "size": 2151 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/archive", "status": "success", "path": "en/api/beta/environments/archive.md", - "sha256": "7baf79fd7273f1f86369a4389248c74a5b6554f4f12c91c2f2311284ce99304c", - "size": 5813 + "sha256": "16055f2fb10ad94977b4d1021bab8995f483cfeeb90ce836b4bd75c3a2ec2d0a", + "size": 5844 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work", "status": "success", "path": "en/api/beta/environments/work.md", - "sha256": "c53c553fe78d3f0915bc555b70e1c257a6b5256e3e110d0fd25c49f440718df8", - "size": 37652 + "sha256": "19abf721b7d262660726135fd9bcf425c61f12b41583ad73de3af7bb9050cd6a", + "size": 39482 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/retrieve", "status": "success", "path": "en/api/beta/environments/work/retrieve.md", - "sha256": "1169769e09428c83f1fe5e9434e7de1fd21e72dafe1228f17511f790dea7061c", - "size": 4087 + "sha256": "973ab958e37fb9ce48ebe8d24a11e2a11e93fd57f6673a88588e50608a28ffc4", + "size": 4320 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/poll", "status": "success", "path": "en/api/beta/environments/work/poll.md", - "sha256": "4cd6f8c5534accd1a758f668b718f1655804d563827a79199308f5ca3d4ad852", - "size": 4571 + "sha256": "5cac8cd5c0783b90e505da894c5776417e539456e9aedae1f88f04ca0befc79c", + "size": 4804 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/ack", "status": "success", "path": "en/api/beta/environments/work/ack.md", - "sha256": "216a6e449072f5fedb3df231b34e7e9b424936f906f13c58db0235f890c4413e", - "size": 4168 + "sha256": "f42d7fc14aacc8cd493f2336df8e7d8bd550f4fa3252de7a2e3f159825290491", + "size": 4401 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/heartbeat", "status": "success", "path": "en/api/beta/environments/work/heartbeat.md", - "sha256": "9b2790f86bbfc378201e4a0fa568dddc50abaa8fae31857c1cc2aeff44bd4695", - "size": 3391 + "sha256": "171b008f3445711c4c0d5b0be000a68bc990fe20358be50b881d5a0e332d1906", + "size": 3422 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/stop", "status": "success", "path": "en/api/beta/environments/work/stop.md", - "sha256": "c7ec4940991f98ee54b66fc7eeef29003f81c0a924d8755c94dc35f8129f1cc5", - "size": 4260 + "sha256": "f493b3d3694519ca728a156c11caadae0227c422880fc92277074e7c1eee4ebe", + "size": 4493 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/list", "status": "success", "path": "en/api/beta/environments/work/list.md", - "sha256": "4c3aa8b88927b9e2423dc77eccb72ce43680775a8226d7350e6fadf24b9e8cac", - "size": 4338 + "sha256": "79edb9792ff953c99f4a1f0b7b842ee68b18277cea577b88e5ec957dc09aa7f0", + "size": 4578 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/update", "status": "success", "path": "en/api/beta/environments/work/update.md", - "sha256": "8e1e7ce620622965a02dd3e10d59f9755f8b6e218c1d522b733caee815a249ff", - "size": 4384 + "sha256": "142d8530a4bd5d2f5cc869a1464c37ced2eb863333d4a9930a1b6e975f6d8bc0", + "size": 4617 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/stats", "status": "success", "path": "en/api/beta/environments/work/stats.md", - "sha256": "029f30e5cf834eff29c7f5901e9f9e0580c91ee3748192aa2ddfd3bc6eb3aea3", - "size": 2715 + "sha256": "6cd8c63f5a05611886f4638a285547e1e15429a47ee7e8e92ab8a043048e2ac3", + "size": 2746 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions", "status": "success", "path": "en/api/beta/sessions.md", - "sha256": "a246491f486cf6acf41820b5a47d1fc462f38e7572ca2208696fca072df68002", - "size": 825982 + "sha256": "c6bf699822439973256bf9628731036d613b3096be62ff5eb83cbf49748d1a2e", + "size": 858531 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/create", "status": "success", "path": "en/api/beta/sessions/create.md", - "sha256": "cc4f16f7488b7865a2e55601247b380fc3a4d3604cd6d7e119e2fc9de1ea269f", - "size": 34174 + "sha256": "6151972ed1119ce9906df026fae2bee6d38690a278ce373acf785441412959a7", + "size": 42266 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/list", "status": "success", "path": "en/api/beta/sessions/list.md", - "sha256": "ecbaead2a95425f8d09582e90c4df796de7e6453e7cbaf9ac375e02b11c3c388", - "size": 22792 + "sha256": "60c629c05a3c6edc332904982fc3b8cf1f48cb8955337ac6221c8033ce908adb", + "size": 24055 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/retrieve", "status": "success", "path": "en/api/beta/sessions/retrieve.md", - "sha256": "b8c6365fbdb0e391a717f1c49d04fffed29fbb447f8195d14820a7524d097905", - "size": 20393 + "sha256": "425dc29863226717da4e1beedb0bde83b481982945eeed9bdd8f0fe4554a4e1f", + "size": 21632 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/update", "status": "success", "path": "en/api/beta/sessions/update.md", - "sha256": "d227a53d2a07235b114bbe34553f62bd3ced3741e632b830d6d5563ae62bd707", - "size": 26853 + "sha256": "33340ba705893f893f57cc4a251144d2ba1ca5819f3bc1ac4b571665c2e52cff", + "size": 28092 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/delete", "status": "success", "path": "en/api/beta/sessions/delete.md", - "sha256": "46e715668bbcd0b41a97b9b55b8e3fa2f87d0841b53663cee1da07fd8993d69b", - "size": 1999 + "sha256": "c0f84f9e9a1282775bb8799d461557a05762dee26bfda34e7371374b1c71a5ee", + "size": 2030 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/archive", "status": "success", "path": "en/api/beta/sessions/archive.md", - "sha256": "d7630f4f2f21e0a4672963fefada7bfae96edbc5b8d17722d47f3f4c1a6aca0a", - "size": 20432 + "sha256": "a52b088eafd961a489ed2eca02de2fba5d4092a4ca28f701138b673b129375a0", + "size": 21671 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events", "status": "success", "path": "en/api/beta/sessions/events.md", - "sha256": "dbde64b0aa0f556f4411d290bea06d8b5ac91ff65e03ef106398f76ff7855bce", - "size": 372949 + "sha256": "81aaeab4b6ddb30786ff8c4af3e7a8274bc63c6815595021ae6d65fe31208f74", + "size": 377465 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/list", "status": "success", "path": "en/api/beta/sessions/events/list.md", - "sha256": "4be84a4257d772ddf53a4a9d59eb2144eb66b7089fa5bbdda88dbc46c417cba5", - "size": 57190 + "sha256": "987fc482aa29f6cf059782c272deb50118bbe9156ce584459890ab76ea5d3cef", + "size": 58335 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send", "status": "success", "path": "en/api/beta/sessions/events/send.md", - "sha256": "c18650e62c1d3ecdc8fc8636288364bae4ac6393fef669d4ad13e505ac5b19e3", - "size": 25849 + "sha256": "f42d6f670c3ee5f8396eaf16a79e24a1c938ef73a2a03cf5a1202f3abf8e87bd", + "size": 25880 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream", "status": "success", "path": "en/api/beta/sessions/events/stream.md", - "sha256": "74d40f7daa401812eff78a1b21a80e3d72f0fc1d4d072905996005eff86d0a89", - "size": 59602 + "sha256": "43c2c6dc85b334f9647260b6036ce7e063d5b33aa7d40423706f4515d006f3e2", + "size": 60747 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources", "status": "success", "path": "en/api/beta/sessions/resources.md", - "sha256": "5126024bc5ffb6be23f5ac3b73ecad8035f04933da853e7edd82800f5f163fb2", - "size": 29507 + "sha256": "fb516193f3dbe90b2200c0e52f6b2b275b6bc921d21ef0ac643aa4a2c59e9e4c", + "size": 29662 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/add", "status": "success", "path": "en/api/beta/sessions/resources/add.md", - "sha256": "e75fdf917a6bc29e2a475c06d91d190c406b28adba32c8cfd5e465dcd1339ebd", - "size": 2693 + "sha256": "4d5d2ff9aa317439dce3956c86cd34828e3c445504a8d8d9c7d04b20a2b4066b", + "size": 2724 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/list", "status": "success", "path": "en/api/beta/sessions/resources/list.md", - "sha256": "4ad0d6fa6eeb91e73cf4dd5394baaf1d54b61c361637b1e0373cc7a69ee8fa6d", - "size": 5246 + "sha256": "cff00f9bbd31454e548e4803d626b20e87a248a2bb5192e8ccaa9d6b49cd07ae", + "size": 5277 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/retrieve", "status": "success", "path": "en/api/beta/sessions/resources/retrieve.md", - "sha256": "a65b24bdb67b6734bfbe5a54444372935afe91d9b1d5dccef8a63a8ea7b9613b", - "size": 4375 + "sha256": "01bf1d127dc8949e34fd862a8bc671e63e70e96145a2c507223dcef5adbe721a", + "size": 4406 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/update", "status": "success", "path": "en/api/beta/sessions/resources/update.md", - "sha256": "879cfb730be435069ab373b42e309ae9e7c487977f347cf2fb7f947a9dc0d066", - "size": 4667 + "sha256": "e4562b1bacfe73bee41f939d788aa43fec4d44c904681ddffb3558cd1f37e1ac", + "size": 4698 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/delete", "status": "success", "path": "en/api/beta/sessions/resources/delete.md", - "sha256": "451e539c78e3fc1abcd8bbb8362b33a533511764c1f81fa36547768f95a0a973", - "size": 2100 + "sha256": "515765b7515b64fcabdc0b364508e863740c9d2ef1c152e82fd32798fb80c388", + "size": 2131 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads", "status": "success", "path": "en/api/beta/sessions/threads.md", - "sha256": "ff81bffbd287dc2605f5329bb7811e584f44335c196efba2706fed105688ccdd", - "size": 221220 + "sha256": "218ff52dac3429893d9293ee0680c4422f84d8c8ce59740470cef63b288c517a", + "size": 230071 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/list", "status": "success", "path": "en/api/beta/sessions/threads/list.md", - "sha256": "dc1d3aa8000e732c9117bd50f55dc13cb6a02da73dc6afc56eb40d52b1f7ee89", - "size": 13099 + "sha256": "b91ef3b116b6b59e491114170702c1bdc3ac07461f47e5afdf3316ba350179cf", + "size": 14283 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/retrieve", "status": "success", "path": "en/api/beta/sessions/threads/retrieve.md", - "sha256": "6dbdd9bf2fed43d4136fa8cd97cc6c5dcf2a949199d699f82b1b62ec39ee34d3", - "size": 12576 + "sha256": "3f571558c8793f0b50453d69548a8a5c4fd0f32b02de8c30cf6318a2bb6c586e", + "size": 13748 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/archive", "status": "success", "path": "en/api/beta/sessions/threads/archive.md", - "sha256": "5e3020e207ad1406b8a0402d803d002a694995063a6754f682a5ddab225f3035", - "size": 12615 + "sha256": "4ef7132ef7c353b1fb28bda0492e6d5285ef819574e73a0f4aca7a2896bc25f8", + "size": 13787 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/events", "status": "success", "path": "en/api/beta/sessions/threads/events.md", - "sha256": "381c1a60ca710ff3aaffd6cb3b3ddb4155e87face83283743c2a505c3b3e3d2f", - "size": 115097 + "sha256": "8f538b03c74560672d2bf35680c70c885e02f220ec901830e4f495d9ecaa9a33", + "size": 118214 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/events/list", "status": "success", "path": "en/api/beta/sessions/threads/events/list.md", - "sha256": "eefb92c071bccae4f19ea145780de0fb253322a1230fb800773bdff4838034cc", - "size": 56221 + "sha256": "ba39d4e3a33bd698ee8f122aa61e874b16d1a9dfe18ee12c3f36baabe055e6cb", + "size": 57366 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/events/stream", "status": "success", "path": "en/api/beta/sessions/threads/events/stream.md", - "sha256": "11fce00ba44c9e118d8606f8a524c327bcb53c10c86cd4e3291f0a7623338b83", - "size": 58865 + "sha256": "5e5cbd1a9f8b724f403d4a11fcf518876525e0b2046e139678c5d3568c8870b5", + "size": 60837 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments", "status": "success", "path": "en/api/beta/deployments.md", - "sha256": "f14335e3e300e2fda1608e537ce854adfa2aae953c03c44f9bb8b9213a6dd599", - "size": 210340 + "sha256": "3294ed8a6b779021814425c75f1e5d8215ff1299522e979d8f3a5ab0cbd948dd", + "size": 210588 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/create", "status": "success", "path": "en/api/beta/deployments/create.md", - "sha256": "b7a36eb2d94de8402570ca92098725c630fb68bdf600e874c777cd645b429f4c", - "size": 28093 + "sha256": "d5739afee223337faf53e50a3d8052ab76430831ad818f141bb837e75ec1fdc6", + "size": 28124 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/list", "status": "success", "path": "en/api/beta/deployments/list.md", - "sha256": "f1ddaf88e1f4078c2e4597aba94759589585f502538e44a096f8293e4384f1b0", - "size": 18508 + "sha256": "1070a3fb27ddb6a82938e6b3fec5541e2d7ba733026705031658e726addde1c8", + "size": 18539 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/retrieve", "status": "success", "path": "en/api/beta/deployments/retrieve.md", - "sha256": "c14cf827dd1868b10642c50884016ba6e9519c5d1dafbb859b30fdccf733b63b", - "size": 17614 + "sha256": "9f3091f50ddeeaa72fc72a832d5989f6d5433cc73d6b225614485a81731bf83d", + "size": 17645 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/update", "status": "success", "path": "en/api/beta/deployments/update.md", - "sha256": "b1e4252150b9a231b5bf04f2342d4ea460d67611f29b984ef988e3a9759b245f", - "size": 27991 + "sha256": "3691c41049d4a81ab006718932ed712a15420a1c75adf8972ce37e342af113d3", + "size": 28022 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/archive", "status": "success", "path": "en/api/beta/deployments/archive.md", - "sha256": "ef0c815d6da5a884569c44b7e70eec5852d43adac5b15476a4167d1e4b6f2cdd", - "size": 17653 + "sha256": "32065a81c48bb59cfbb937be6b68d7d6bcb2ff9edef8c9ccf5a1c61af329b9bb", + "size": 17684 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/run", "status": "success", "path": "en/api/beta/deployments/run.md", - "sha256": "38fc7e26e0a75f4c41d5c3094db008fcf731068bbae64ce07bde98fb487eb56f", - "size": 8815 + "sha256": "1d933855810e609cb35c84145762d74675bf30faf76e88b0cc17329e008c3aba", + "size": 8846 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/pause", "status": "success", "path": "en/api/beta/deployments/pause.md", - "sha256": "f8b099adb24ff022dff233f1bc0f28a751713080fd530a522aee462a0208ad5f", - "size": 17645 + "sha256": "4723549f00157440c6c50678737bf9627f3fab91899dd717bbcc304a43999ae8", + "size": 17676 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/unpause", "status": "success", "path": "en/api/beta/deployments/unpause.md", - "sha256": "d5e707a7f1ee403e2b083fe08c0ff685b1a02457e8eabdaefcc1b3223b7ae5e2", - "size": 17653 + "sha256": "c2c1d497e55f6877a0a3fa6e15a70683ebe2d48f0541e067f7e94a56d2444cd3", + "size": 17684 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployment_runs", "status": "success", "path": "en/api/beta/deployment_runs.md", - "sha256": "14503e8bd264d0c78d718b436f01a09778a2a507dd07aafc330cda944b43c9d0", - "size": 32242 + "sha256": "7a0ec001bb0984262ad945060eb93b058b3ba514d9caa70f48dc1c9508017141", + "size": 32304 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployment_runs/list", "status": "success", "path": "en/api/beta/deployment_runs/list.md", - "sha256": "20d4498f3edc41ac3dc9b06ab182f828f61a6a4194cbdc66e0686deebb758413", - "size": 9928 + "sha256": "d21d6ae954e9f7c0542d72a4109f2e8572bc07c45a60f2f983a12ce891913e64", + "size": 9959 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployment_runs/retrieve", "status": "success", "path": "en/api/beta/deployment_runs/retrieve.md", - "sha256": "9087c2c9c82aa447c6275499812a1afdd5fc15bd54686410f1546c2c2623bd02", - "size": 8812 + "sha256": "340a44f592890776ef4162cf4d269180513498564f77c9b34aa2a676cb74c8c7", + "size": 8843 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults", "status": "success", "path": "en/api/beta/vaults.md", - "sha256": "1f80b2a47d1930c2b3a76d2ddfa68c775f16bee987636e78f5a48c4612f138ba", - "size": 98657 + "sha256": "4b3725dc3e5646177c59e5b88f2741e0fe3faad8e3a65f245063cfd305ace498", + "size": 99060 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/create", "status": "success", "path": "en/api/beta/vaults/create.md", - "sha256": "8b15184814e3c680a2879a7e8f02b46f24f337fa79207b6f44d44754d9050a59", - "size": 2909 + "sha256": "209adca5c3ba98f95118c1e2519b873b2853ff7399e77fe4e361c9313e9df46f", + "size": 2940 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/list", "status": "success", "path": "en/api/beta/vaults/list.md", - "sha256": "67bfab9c2e81111d648f4187939e61bbd9c3f1cc01360e4a9c361751e0cdbcba", - "size": 2920 + "sha256": "9322ad13b9ddeca38a2475d19c9d734c2e692c7f05b694af1a6915c0cb9906f3", + "size": 2951 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/retrieve", "status": "success", "path": "en/api/beta/vaults/retrieve.md", - "sha256": "2af763522b71ef7601462078dd6cd9916cfd8b41682987d3d5be7f7aa847044d", - "size": 2524 + "sha256": "e7d723d8b887f18e49cacdc300d51407f349c757d9657cd19139b8f49913a1e9", + "size": 2555 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/update", "status": "success", "path": "en/api/beta/vaults/update.md", - "sha256": "e8d8fe991544a9e4ecb8c573b1404387d7422d191f9365c9dceb971e000307a8", - "size": 2979 + "sha256": "6fa6d95bb20355069bfaf91c05d124842c492477b155b50ff6668d33dd6b0c20", + "size": 3010 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/delete", "status": "success", "path": "en/api/beta/vaults/delete.md", - "sha256": "01a1fe8ac74da3ab1463c2a97011901a4845c9b718f539ce968527d554c34a1e", - "size": 1994 + "sha256": "909934b82eb6e2b82ca98073b36d2d448c9646691059ad78c166538f924d8600", + "size": 2025 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/archive", "status": "success", "path": "en/api/beta/vaults/archive.md", - "sha256": "afa865513c40c1839020bb5f481a030c51075ff5a000a469faf2308ba1d2ef1b", - "size": 2563 + "sha256": "2ade4641afe043a27761e7e4ffda1eff27ea8a821f84f57cbf99bddad890822a", + "size": 2594 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials", "status": "success", "path": "en/api/beta/vaults/credentials.md", - "sha256": "9aeb48c14134f93484a64b685d1f8bc1dd6f70f820c175a200230894816a6105", - "size": 81877 + "sha256": "90c167523b4b29aeeea79fcf965b34a27f330e0909c109648c723f455320afad", + "size": 82094 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/create", "status": "success", "path": "en/api/beta/vaults/credentials/create.md", - "sha256": "7e28bf889658d820fecfec2442e51d3e46249b251b14a716afeb9ccc4ef5050b", - "size": 11859 + "sha256": "5dbbc4820487848ff9827c8d504a5c944b31012ed1fc40a276f9839eefb84ecb", + "size": 11890 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/list", "status": "success", "path": "en/api/beta/vaults/credentials/list.md", - "sha256": "b34bf14bb45749985b27c4a6c3b0a28d18caeed6f5e4273f071966fd4f6d3f61", - "size": 7307 + "sha256": "5ccd1d19490a12c701563aa76c9f7af59f13e9a9d85565659aae3fd25b4eb428", + "size": 7338 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/retrieve", "status": "success", "path": "en/api/beta/vaults/credentials/retrieve.md", - "sha256": "f94321cbe305e5a1c8d44b609621673a3c00e7ab05a00e09f0d562bed38372de", - "size": 6874 + "sha256": "c43c22e0428017364c89f349268f84468f8a7f2aec26cc3c6135bf10b634bd19", + "size": 6905 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/update", "status": "success", "path": "en/api/beta/vaults/credentials/update.md", - "sha256": "ba00e541dac9ef1329126a07ffac132e07498e46d4cbb79704d54e11f5e9017c", - "size": 11122 + "sha256": "432676623e28eb70934980878b3a647b2af4004d3ebaabc8a42a1eb05cd737a5", + "size": 11153 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/delete", "status": "success", "path": "en/api/beta/vaults/credentials/delete.md", - "sha256": "64a76c30ceeaee154ec7d86e7aee4de8c58f5577c710b8c745369601f43a46ff", - "size": 2135 + "sha256": "d37cf099f9e89db2104dc4334f3a1add83abc3a4eb612ce02e9c08056fca68c1", + "size": 2166 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/archive", "status": "success", "path": "en/api/beta/vaults/credentials/archive.md", - "sha256": "4c920d15436316443473788bff72d08105cafe5982c7acf9a43155ebc3aa553a", - "size": 6913 + "sha256": "c5915c68636ae21b82c9f7ab33e72ebdab63fc8a581cf4ca7413a3e2138f016c", + "size": 6944 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/mcp_oauth_validate", "status": "success", "path": "en/api/beta/vaults/credentials/mcp_oauth_validate.md", - "sha256": "b14078153402401f46622bcd6873574d95e2b9de18d4ac29fd88bc8c8df83412", - "size": 4387 + "sha256": "34d15d37a924d100460dd263d40d0864a9d56e763fe00b4ca4f7e8dfc5691e37", + "size": 4418 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores", "status": "success", "path": "en/api/beta/memory_stores.md", - "sha256": "f98c6cc9a8958aaba0eeeb79846a3586ef9cb5433b4eb3ccfd76e9e75381741c", - "size": 86251 + "sha256": "6edf52ebb676ed1b548164ef4a36877e1466787aeef469740f4e639f47a31d75", + "size": 86685 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/create", "status": "success", "path": "en/api/beta/memory_stores/create.md", - "sha256": "3d9c6a949b1d32acaf223566fab9869cbffb63575fa1e586b0d7f8edcf8fb372", - "size": 4123 + "sha256": "788c67ac583cc52bc3ff9af5fd7660254dc99e048737f4e52fd5cb7cd0635d52", + "size": 4154 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/list", "status": "success", "path": "en/api/beta/memory_stores/list.md", - "sha256": "d4c7374ab457030af599bd85f3dffce733eef25ae84e3e7c8f766bc4714de0e0", - "size": 4246 + "sha256": "62345accf6a8664f4a5ab4e7cf82585d55707a44366b9139f6757cde29d8ee21", + "size": 4277 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/retrieve", "status": "success", "path": "en/api/beta/memory_stores/retrieve.md", - "sha256": "24f81960d8b839ec341be092b432c6e82fda4a391bde0066940900d63b1a64c1", - "size": 3382 + "sha256": "e63f038c3567a137b29ee638967e23ecefccae95eb3de935735e4d329546270a", + "size": 3413 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/update", "status": "success", "path": "en/api/beta/memory_stores/update.md", - "sha256": "9778cd30b7b424097d728be49d31c69f8742e3c99933ed307b8ae451035affc3", - "size": 4023 + "sha256": "e9d489dd2264f41e6aeb8f45fa6ec3d37cebc86bd4d7f63a60ba7ac0570f4e70", + "size": 4054 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/delete", "status": "success", "path": "en/api/beta/memory_stores/delete.md", - "sha256": "4465c3609b0de053148e54222dcbb7476ed9e646a1527bcce9da1ac1651262e5", - "size": 2154 + "sha256": "88e2392237c046b1f26aca2f771d6556e3d5a4d2cc03956de4051ef74a3ef256", + "size": 2185 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/archive", "status": "success", "path": "en/api/beta/memory_stores/archive.md", - "sha256": "47f713c16429a4248c1bab04e4adc9609d16b24da7b3b3277f88351010c52d92", - "size": 3411 + "sha256": "987b6bc5196e817749d690fbc802a25ca2294bf8d56d29cc90dbf4b904787d3f", + "size": 3442 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories", "status": "success", "path": "en/api/beta/memory_stores/memories.md", - "sha256": "94e91d09867082fc7df5ddefa438383c65f23a873853aae02f4b0291f02d47c5", - "size": 35986 + "sha256": "dad4c87ec9994432249f2dbc8ed2b564ffedd1d8330ece7040fb0b88171a4c61", + "size": 36141 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/create", "status": "success", "path": "en/api/beta/memory_stores/memories/create.md", - "sha256": "48e8b492cfcac89a7f08de852dd145a53c6be35e5ae49040fd9959ba02f3088b", - "size": 4927 + "sha256": "d75f9139dc1c6ac28f66d8bc06c14be2859ac4a45a2f136ca97953f544cf9011", + "size": 4958 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list", "status": "success", "path": "en/api/beta/memory_stores/memories/list.md", - "sha256": "84c7be31fb5a7c6c57122ad296cd018bdc94ee1fa625dba04c72b34de8d0b485", - "size": 6617 + "sha256": "a3b084ddfb6d34715b7305f95558a1c4db20e134fd0a2808ba339ce86ee24aff", + "size": 6648 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/retrieve", "status": "success", "path": "en/api/beta/memory_stores/memories/retrieve.md", - "sha256": "2b103dd2e9ab7b3711d8f23677686fd2f642b6fcf664f57ca0bd8ff4e409fcbb", - "size": 4364 + "sha256": "41cbe726932f0b5290f7374c56c5a3cd99f2ca0f8d63507de2729e14b2cadfa4", + "size": 4395 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/update", "status": "success", "path": "en/api/beta/memory_stores/memories/update.md", - "sha256": "acc253153fc6699b73e7799d1db0fb1fbe5264c699273c8fbb501a1085b1701d", - "size": 5846 + "sha256": "867b460129dbbfba4a1f83d015aa282fb4ff81bb110e7efe6872c89637ddc636", + "size": 5877 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete", "status": "success", "path": "en/api/beta/memory_stores/memories/delete.md", - "sha256": "25a16124f15800b88ba1a6230e4e63a6dd855e629665c2b4d0a83b49777c3a5d", - "size": 2428 + "sha256": "b61a46990c9c470bb6b24f011b6d32c4168e58d3d2c4203770674c16fb8d783a", + "size": 2459 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions", "status": "success", "path": "en/api/beta/memory_stores/memory_versions.md", - "sha256": "acb76d65343cb5d85dbcca4b6ebe2acfa5a9fdf4e551f62dfbcdb65565905a63", - "size": 27102 + "sha256": "e29df1714f6cc25cf623d5d050311f4506ac6d8ee88b3ef6f55ad94d8d38d90f", + "size": 27195 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list", "status": "success", "path": "en/api/beta/memory_stores/memory_versions/list.md", - "sha256": "8cebfa5dfe469419c78741e973bacc2cbf1cedb0a42386b7fd4c4e2eca8bc11c", - "size": 7069 + "sha256": "8dac9888b79fd9d7a011b6a47b10b1e80f2111c935405347faf4fe1d4cda7ea6", + "size": 7100 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/retrieve", "status": "success", "path": "en/api/beta/memory_stores/memory_versions/retrieve.md", - "sha256": "30b1ab4daf3bf31fc5d1d46b9e8a886d14d5012b363591e37449b22f947ffcce", - "size": 6513 + "sha256": "4dde1af538731b78f28b7cf3f3f13b8a6d5a69c7867a21112a0bb89806796b2b", + "size": 6544 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact", "status": "success", "path": "en/api/beta/memory_stores/memory_versions/redact.md", - "sha256": "707dc900201ebbd022174ee62638b77920de5fe6725e9e2dc39fe6a41328d971", - "size": 6411 + "sha256": "a4b67ef8cf541d590cb9c72b11e2c94c521659e7f32f05e2ea20b2e3b26183ec", + "size": 6442 }, { "url": "https://platform.claude.com/docs/en/api/beta/files", "status": "success", "path": "en/api/beta/files.md", - "sha256": "c7d38829557d6dc1e47ef35ff8d70d4c90ba095af0dbb5186018d72639b3b6fa", - "size": 14803 + "sha256": "f0b687fb3c23c9c8390df26ceeed58e65e89f865c55318dce3a61d57324770b2", + "size": 14958 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/upload", "status": "success", "path": "en/api/beta/files/upload.md", - "sha256": "5509ceffe55d4b29992547fa035687a6bbe12b56ec52a50f8c47b37a1a1abd99", - "size": 2902 + "sha256": "8f96fd4527cc6fd7ecca2d2ddf31babe480353a05989ddc4fd6525110c11b41f", + "size": 2933 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/list", "status": "success", "path": "en/api/beta/files/list.md", - "sha256": "69f64cc45b3dc61a840d882cda786d361894df1463db6dd377b97d336829cc9f", - "size": 3838 + "sha256": "61355dad3b6c2204c6c1cd1dbdc8062e7a91a9555961bd49b6b64b9f01edc425", + "size": 3869 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/download", "status": "success", "path": "en/api/beta/files/download.md", - "sha256": "8f0eeb0af12abc5387835b90c2be96390bcdd75787d5927fc1c33bc13462e0ef", - "size": 1683 + "sha256": "548810c04657481ff7b071aa864ecaf3b8242c647725673d973408b96f0a3d75", + "size": 1714 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/retrieve_metadata", "status": "success", "path": "en/api/beta/files/retrieve_metadata.md", - "sha256": "4d83150120c07ae107c66ed263965cd9249c5994b5f01b336425add5319fe744", - "size": 2917 + "sha256": "d2b6063a2030bc1260b4478f753d8adaeb303adf875c2cd8aa6503f912298778", + "size": 2948 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/delete", "status": "success", "path": "en/api/beta/files/delete.md", - "sha256": "107bde14b36363e89ef0cf2d2ec2fe046876265f58355f206f4d003ea7f19654", - "size": 2021 + "sha256": "988b8f1221974d6e13264640a8f836d1383c643305a7838036fac9735990c283", + "size": 2052 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills", "status": "success", "path": "en/api/beta/skills.md", - "sha256": "bd3e494b04920cfdf632d5af52426abb4332c9e39dee37a05a2ae5165180e051", - "size": 32738 + "sha256": "b2de3fd3ea1b59281df16fb188c1ecee369151cba7aab259303aa32b86b97380", + "size": 33017 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/create", "status": "success", "path": "en/api/beta/skills/create.md", - "sha256": "9b0ad3c429d78753a25dbdeee6e8e5731509bfa9f9476edba9dc042682831b9d", - "size": 2797 + "sha256": "0c0755f354b4a139ed42279a505ba14b24e7033657b0589ce2e08d405811b216", + "size": 2828 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/list", "status": "success", "path": "en/api/beta/skills/list.md", - "sha256": "6ef84403e331b693075ce630ce21dcc9306e4fcf2a72225bc64f6cdb3ed3054b", - "size": 3893 + "sha256": "d3578801cd4d52918f6919d7719551ba16c68de04eb4ff99a7c7e938e0ded341", + "size": 3924 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/retrieve", "status": "success", "path": "en/api/beta/skills/retrieve.md", - "sha256": "1bdd96b923c6eded7e79bd50d11f32be78022b20a08219cf0ca50bda2e064d41", - "size": 2865 + "sha256": "25985768bb9f7f756b1d3ad8f231d06d3f130e037ab2eefd91123430c6a1e609", + "size": 2896 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/delete", "status": "success", "path": "en/api/beta/skills/delete.md", - "sha256": "1c35c9053ee8228dfcde1ba1dd14afd498472869f3ff8f90adcfc522ddafd655", - "size": 2060 + "sha256": "f973223259c392e557979d4e34966ac0d5e97c97cedabe07039f6d41bbb76799", + "size": 2091 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions", "status": "success", "path": "en/api/beta/skills/versions.md", - "sha256": "98aa5e663e52f2049fb091b1da17cb3fd0d5c349b4f5d8634f67271d1f15f0f2", - "size": 17883 + "sha256": "bfcb228cd9b01cbd810a5ab6522225086a1a6a13d4886767fc419205c5acb399", + "size": 18038 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/create", "status": "success", "path": "en/api/beta/skills/versions/create.md", - "sha256": "3a544332dd4e0d0b6e3fd80a3031a00c7488acfdf40ede026d19c0b8638f69c8", - "size": 3116 + "sha256": "1a4fac5da5227049e62365e6b268d5400a8c539a02fb2a09bb785252c8a9980f", + "size": 3147 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/list", "status": "success", "path": "en/api/beta/skills/versions/list.md", - "sha256": "89d1189d4466e51dc89166e821bcd759e1fef0724beb065d4de168aa1cd08ce1", - "size": 3751 + "sha256": "cd0fbc190858a1c75e633371a4de1c9bea3b4056739cb586a1edf313abf10f8e", + "size": 3782 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/download", "status": "success", "path": "en/api/beta/skills/versions/download.md", - "sha256": "b1e66b1a5c482af5b35601ee5c27f24a39c8d8a992649a3ac67c1ff716ebf835", - "size": 1991 + "sha256": "c5412a95d1930831908fa0c7a6605fbb05c516e152abef21cdade05dcdc2b7fc", + "size": 2022 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/retrieve", "status": "success", "path": "en/api/beta/skills/versions/retrieve.md", - "sha256": "88f7270383c7cb3106d1025cd2fa1e1ef222c1470578ed1fe56206f7611f3ec2", - "size": 3191 + "sha256": "c168887e0f194a54e2d22496619b681648253c26414c57f812a3c0beb16bdb68", + "size": 3222 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/delete", "status": "success", "path": "en/api/beta/skills/versions/delete.md", - "sha256": "a4f96ef6fe89259753c33c8de0681e861adf41ac3e3631cd97b8422434711480", - "size": 2286 + "sha256": "86bb350ab0c85a753a3c09c67b49faef203b2d9486fd7bcf964363025c798ae5", + "size": 2317 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles", "status": "success", "path": "en/api/beta/user_profiles.md", - "sha256": "95633e99e712da609ad5040bf55d477419ce1fc5a96de718abd766a0a5304e1f", - "size": 20510 + "sha256": "ba7db3a6e083604d95e3b80927bcd20a78278cbfb6cfab0beaaa52c3d1d0dd27", + "size": 20665 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/create", "status": "success", "path": "en/api/beta/user_profiles/create.md", - "sha256": "22215ad7bf4b340da7105d60af28d8c21bc2cf0f53caec08fb2d179074fd24a6", - "size": 4416 + "sha256": "6643386f32202725c01806c9bfd94083744a4234e58b2915b73ded9ecb3cbcdb", + "size": 4447 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/list", "status": "success", "path": "en/api/beta/user_profiles/list.md", - "sha256": "37771ddbdbca4d11fa2a9c80cb7b9a1a7d50efbb992b1c6c203b4be3cc08d688", - "size": 3835 + "sha256": "e7b6014b983b27b5ede088939cb0208db97a9503221a5c4b2286c99dc94740fb", + "size": 3866 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/retrieve", "status": "success", "path": "en/api/beta/user_profiles/retrieve.md", - "sha256": "43fdec798d6e5e2040b8a94ba1fcb19b78cc66065239b05464f70544a0d83504", - "size": 3461 + "sha256": "767355967ad5827560bbc31d8022f5b34c26f7c43945a9970ec1445309b5d0e4", + "size": 3492 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/update", "status": "success", "path": "en/api/beta/user_profiles/update.md", - "sha256": "975c1ef4aa71412bb979232e1d3cccce220e3d728f198d52f1bd951b5f5a5a2a", - "size": 4493 + "sha256": "3159f9d546f68b99985df0ef5eacb37e576355ce8444a11ab0ab1ed79a55b614", + "size": 4524 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/create_enrollment_url", "status": "success", "path": "en/api/beta/user_profiles/create_enrollment_url.md", - "sha256": "22c9961a8b9ef1208ad5b1c69ac0f65ef7a619a9f0a4ca2169a43cd37c2ac004", - "size": 2269 + "sha256": "6e9e758818e8d614af7e86790a76e71f3ae1fdea599eb97ed832f264b2723e4c", + "size": 2300 + }, + { + "url": "https://platform.claude.com/docs/en/api/beta/dreams", + "status": "success", + "path": "en/api/beta/dreams.md", + "sha256": "4eca87e35cd51ff3c9c783fa30d9bfb1ad50e1640c0893e3b014df53c38d47d1", + "size": 33680 + }, + { + "url": "https://platform.claude.com/docs/en/api/beta/dreams/create", + "status": "success", + "path": "en/api/beta/dreams/create.md", + "sha256": "435595f7203ac80dbaeff19790fb141ceeb16bdb4c1ecc76386042bcd739e853", + "size": 6402 + }, + { + "url": "https://platform.claude.com/docs/en/api/beta/dreams/list", + "status": "success", + "path": "en/api/beta/dreams/list.md", + "sha256": "59cdc6e3456c6a87a9a41f17150785e7651ce897727fe6b8dc8845ae1fb396f3", + "size": 5658 + }, + { + "url": "https://platform.claude.com/docs/en/api/beta/dreams/retrieve", + "status": "success", + "path": "en/api/beta/dreams/retrieve.md", + "sha256": "be83fc836701b45281ed1ed623cb0c27b23d557db9d662cbc975f1a568bcdb88", + "size": 5078 + }, + { + "url": "https://platform.claude.com/docs/en/api/beta/dreams/cancel", + "status": "success", + "path": "en/api/beta/dreams/cancel.md", + "sha256": "79af9eb812903b32ad62939b07bea372c76d0e09a2126c3dc0119cd1f2df3410", + "size": 5113 + }, + { + "url": "https://platform.claude.com/docs/en/api/beta/dreams/archive", + "status": "success", + "path": "en/api/beta/dreams/archive.md", + "sha256": "84b8a56160185e881b96fb40dcd1f05f0be94a323d6914502a8676fcd0d98e56", + "size": 5117 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels", "status": "success", "path": "en/api/beta/tunnels.md", - "sha256": "377fa130476949193c235e969cf9b6883c5dba4e376728c4b44f4aab9ba485bd", - "size": 32715 + "sha256": "1eb3d071aab2ed7c4a1ec65f1cfcfc85fe81f0076ab0ac7d22283c20b6836c4e", + "size": 33025 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/create", "status": "success", "path": "en/api/beta/tunnels/create.md", - "sha256": "7ea67cf53b37358ede76d92e9a3f5701945f0d3f3795f4cf1d7ec269be5f578c", - "size": 3089 + "sha256": "dc6cad4ed4e75ef18c76784f70ae09fe422d3ab473b1d536aa7057ae11cb128b", + "size": 3120 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/retrieve", "status": "success", "path": "en/api/beta/tunnels/retrieve.md", - "sha256": "25642244fc41ac17675c08402cb798fd987eb7a453fa319185b3657930301029", - "size": 2815 + "sha256": "a6b67117d23bbdc5860d8b5f40d91c82c010a021994d95a25697724fa738c2c4", + "size": 2846 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/list", "status": "success", "path": "en/api/beta/tunnels/list.md", - "sha256": "3e5a2cb97bc10fefe77b9e1bf6cb051c5a07396b5e369d7e248435823fe252d3", - "size": 3369 + "sha256": "7524e6fbdb638ca8479d09518bb9900c2b16309b53c4117845132c89c31b1089", + "size": 3400 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/archive", "status": "success", "path": "en/api/beta/tunnels/archive.md", - "sha256": "3a62c3725fc2ecc0269d2bd76022dcaaa4c5403090d1a712227e32684553bd39", - "size": 3119 + "sha256": "bf1517e2fee1550a9b3b3e71e117e5a1f5603c3ae263436226bcf506e91f80bc", + "size": 3150 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/reveal_token", "status": "success", "path": "en/api/beta/tunnels/reveal_token.md", - "sha256": "27cb516fd9311336f142919432649c673ee7c01a827be4953e49fb2003448b7c", - "size": 2668 + "sha256": "b7bd935c60734074384a0a67aff7157a67a5c64f1796bb968327d5ba886f16c8", + "size": 2699 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/rotate_token", "status": "success", "path": "en/api/beta/tunnels/rotate_token.md", - "sha256": "281726ee00f6607f598c3c37195e920f9d95917551738fd0e3e4b858942de836", - "size": 2807 + "sha256": "fa81c6c3dc1322f1910464bbc8b3719a14628fd1b4e35994149aa0c042807a2f", + "size": 2838 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates", "status": "success", "path": "en/api/beta/tunnels/certificates.md", - "sha256": "21934ba244b18f5b266cb189b245a918f375025d8882a44f68ff1332b75bffeb", - "size": 13776 + "sha256": "7a17d346ee1b494c3657507479e6c6e308e98768846f0d7fa97cd05e7b4ff54d", + "size": 13900 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/create", "status": "success", "path": "en/api/beta/tunnels/certificates/create.md", - "sha256": "10987a6dee2039372ca544862ae32555172d45270a069356282a12b89ee88293", - "size": 3375 + "sha256": "a17aa4f8e83bb361886c02bef6420f3ba607871777557ab2321707f3e855f4af", + "size": 3406 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/retrieve", "status": "success", "path": "en/api/beta/tunnels/certificates/retrieve.md", - "sha256": "b4056ebc8b486b210af2225df14380308f956249a4ab2efb4449ce11fb60198c", - "size": 2970 + "sha256": "1583d56f916c3f3c1d4f9b90626d59d7ca95fbd293d92b94006be5a689879d3a", + "size": 3001 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/list", "status": "success", "path": "en/api/beta/tunnels/certificates/list.md", - "sha256": "edb31ad69db50c4e049693a222556ed773c46e1ce8f4271bd99a1b16f8cd510b", - "size": 3510 + "sha256": "4dc0c49ee1a6821a299363b63d5a963c8927acb2744e987236aafd902876a16e", + "size": 3541 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/archive", "status": "success", "path": "en/api/beta/tunnels/certificates/archive.md", - "sha256": "44dfe0eaab93634eb3d0546998d0c39a3a70efc5935078b4bc5ec7942a163faf", - "size": 3217 + "sha256": "70e31e8705b52f29617c79fd30cc0bd4e7fcf73acbdc306c0f6b0da9ab4f9b5f", + "size": 3248 }, { "url": "https://platform.claude.com/docs/en/api/beta/webhooks", "status": "success", "path": "en/api/beta/webhooks.md", - "sha256": "db3d67bc06dc8aed0ac0262e957c267d282e3adbcee127fb6a89b710333b79f0", - "size": 49147 + "sha256": "7429848dac8d4b06168f49ecd16d0b6b0422d3772caa6a5fa5b0f9fb1ab36b37", + "size": 58193 }, { "url": "https://platform.claude.com/docs/en/api/admin", @@ -3789,15 +3838,15 @@ "url": "https://platform.claude.com/docs/en/claude_api_primer", "status": "success", "path": "en/claude_api_primer.md", - "sha256": "2b1ee28f697f849eb1ec14d162cdeec9a35ae772469f8ba8e11278d16f9602c3", - "size": 25669 + "sha256": "e8a67e33fa3744d561425acabc742847acfba9e2cfca80ae5859a5fdd942bbeb", + "size": 25687 }, { "url": "https://code.claude.com/docs/en/accessibility", "status": "success", "path": "en/docs/claude-code/accessibility.md", - "sha256": "c5d715d12d3b7943daa3b6000633587ae20defc6a10418c48b918f12cecefee1", - "size": 10688 + "sha256": "59e2a48b9bd227f5e426e25f20bbf200231d58ed248aec5c21812c9017c8a64f", + "size": 11459 }, { "url": "https://code.claude.com/docs/en/admin-setup", @@ -3915,8 +3964,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/python", "status": "success", "path": "en/docs/claude-code/agent-sdk/python.md", - "sha256": "e8141eaf2bc92d721e817c0739fe3fd172a936c62646a07cc198809991993d6e", - "size": 190872 + "sha256": "a8a9d22569de3037247501c7d44df7c16d73f0549f9105770e4f6f41c33f4a79", + "size": 190877 }, { "url": "https://code.claude.com/docs/en/agent-sdk/quickstart", @@ -3985,8 +4034,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/subagents", "status": "success", "path": "en/docs/claude-code/agent-sdk/subagents.md", - "sha256": "39e20485c190a0133a29820c27f3aa9280539699652d21da6142502b70bb092b", - "size": 38382 + "sha256": "0f2e4ba3c656874bc34ab877a247ddc7adaac53badcdd2dfeb1841e516d86be6", + "size": 38716 }, { "url": "https://code.claude.com/docs/en/agent-sdk/todo-tracking", @@ -4006,8 +4055,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/typescript", "status": "success", "path": "en/docs/claude-code/agent-sdk/typescript.md", - "sha256": "de34611900433ea7e970a902b535d9600c24a9048bbd4605dcb8e4e55a0e6929", - "size": 218616 + "sha256": "d6d9403ca6e6a0c2254b4a2215eba98863f8133cd68f78423b8df33cf302ac57", + "size": 218757 }, { "url": "https://code.claude.com/docs/en/agent-sdk/typescript-v2-preview", @@ -4069,8 +4118,8 @@ "url": "https://code.claude.com/docs/en/authentication", "status": "success", "path": "en/docs/claude-code/authentication.md", - "sha256": "75d1338f741e8e064df1a5587b09421d2f01c42b28d30702c11f66811a1eeb70", - "size": 17513 + "sha256": "43d151845b84e4aeca9f374a64d081aac2f5b1ea190bc10b4d318832ea2878f7", + "size": 17595 }, { "url": "https://code.claude.com/docs/en/auto-mode-config", @@ -4097,8 +4146,8 @@ "url": "https://code.claude.com/docs/en/changelog", "status": "success", "path": "en/docs/claude-code/changelog.md", - "sha256": "e1e37cb7a357b30ab1141c156d30defb8d49cd5af2420429d0290682d905f6e0", - "size": 497467 + "sha256": "113c28b0d979e8708e3d575382213c9e42c42d065fafd268a76f3b2fee051e05", + "size": 502692 }, { "url": "https://code.claude.com/docs/en/channels", @@ -4167,8 +4216,8 @@ "url": "https://code.claude.com/docs/en/claude-code-on-the-web", "status": "success", "path": "en/docs/claude-code/claude-code-on-the-web.md", - "sha256": "79ca3e98fae9f1d80f7017947bebf4dfef417e0cae9588d32903903a606fa4f1", - "size": 65505 + "sha256": "9093a99636769c2e866e2a81611b784406e89f8abd5adcbf05617dabbef7c3fb", + "size": 65968 }, { "url": "https://code.claude.com/docs/en/claude-directory", @@ -4188,8 +4237,8 @@ "url": "https://code.claude.com/docs/en/claude-security", "status": "success", "path": "en/docs/claude-code/claude-security.md", - "sha256": "5861a8cab1ccc7af463546a1cc3b12cf6ef23a62fb4309148b3b5a9d81ebc634", - "size": 13775 + "sha256": "fb8fac29ef360eaac99933c0713bb80b7201d4d045dbb3ecd22a7ab3d49e4d55", + "size": 12799 }, { "url": "https://code.claude.com/docs/en/cli-reference", @@ -4251,8 +4300,8 @@ "url": "https://code.claude.com/docs/en/costs", "status": "success", "path": "en/docs/claude-code/costs.md", - "sha256": "48352494a90fad1847d53030ccb92d0595829c89b445da1bcb22460aae6dbaac", - "size": 27836 + "sha256": "2ef2eac1014fff896f61abe8745a3e28643da8bad909fd800991bc33b8e19706", + "size": 29584 }, { "url": "https://code.claude.com/docs/en/data-usage", @@ -4279,8 +4328,8 @@ "url": "https://code.claude.com/docs/en/desktop", "status": "success", "path": "en/docs/claude-code/desktop.md", - "sha256": "6309b04dc694f7d9530ce1542ed7d4525bba1bfbb6faad434766dacc8cb4cb99", - "size": 90196 + "sha256": "15c72c14e5fa7d5789e184baa9d2487363101adae9adbfbec0fb31e09a5451bb", + "size": 90193 }, { "url": "https://code.claude.com/docs/en/desktop-ios-simulator", @@ -4300,8 +4349,8 @@ "url": "https://code.claude.com/docs/en/desktop-quickstart", "status": "success", "path": "en/docs/claude-code/desktop-quickstart.md", - "sha256": "8d683b6f5b1e8330e9fc72a55e2929277b989300bb2f435a257a0508cfb4c76a", - "size": 11261 + "sha256": "4b152dd1f8a5b6a843e6d56b9776a1572713a01ea7ee7ac3f5b4bbeb5d7ae843", + "size": 11260 }, { "url": "https://code.claude.com/docs/en/desktop-scheduled-tasks", @@ -4335,15 +4384,15 @@ "url": "https://code.claude.com/docs/en/env-vars", "status": "success", "path": "en/docs/claude-code/env-vars.md", - "sha256": "3317158bbf686df0db9699b97b9caeaefc53233a71722563086a03162ba92c09", - "size": 329716 + "sha256": "2fe45a00e288e4bf4fe6b55e00674de012654d7edb66b2f7a9cf080335750cb9", + "size": 331822 }, { "url": "https://code.claude.com/docs/en/errors", "status": "success", "path": "en/docs/claude-code/errors.md", - "sha256": "ab39b9d8f84113473ef20c26255688f8aada3623b268814e9ca0db6bcdef47dc", - "size": 138130 + "sha256": "e29e21477a9e29432869212caa9e684fa2bf52074b4a32161cab6fa49283a742", + "size": 139224 }, { "url": "https://code.claude.com/docs/en/fast-mode", @@ -4433,8 +4482,8 @@ "url": "https://code.claude.com/docs/en/hooks", "status": "success", "path": "en/docs/claude-code/hooks.md", - "sha256": "b212e7f13d2ede7d2b6d8d1c1bb6fdca5e29d023fad199abceac853904caad65", - "size": 237192 + "sha256": "21ee7174a0d2e211871009ba9eff4965804cefe635fd977e26f7c67cf0646d61", + "size": 237576 }, { "url": "https://code.claude.com/docs/en/hooks-guide", @@ -4454,8 +4503,8 @@ "url": "https://code.claude.com/docs/en/interactive-mode", "status": "success", "path": "en/docs/claude-code/interactive-mode.md", - "sha256": "fb90e6a8a1ccd21b45c5f7da5e840737dc5b6e9aa2b0afe0aab10c161b96b80d", - "size": 54091 + "sha256": "282f0498c0dd2600fb538f616eae32f9c3d200e9edb8e7c734d66371586b01c0", + "size": 55790 }, { "url": "https://code.claude.com/docs/en/jetbrains", @@ -4468,8 +4517,8 @@ "url": "https://code.claude.com/docs/en/keybindings", "status": "success", "path": "en/docs/claude-code/keybindings.md", - "sha256": "21e693e3bb174f0e56af8b16f9d707424584cb3a2ca1e186e0e20b513470d134", - "size": 30563 + "sha256": "f601200bb8f7f85713714734668e166b80572887abaa39cc9705aa9fb67f275b", + "size": 32332 }, { "url": "https://code.claude.com/docs/en/large-codebases", @@ -4524,8 +4573,8 @@ "url": "https://code.claude.com/docs/en/mcp", "status": "success", "path": "en/docs/claude-code/mcp.md", - "sha256": "7602c09a1b7cb2454d6558e91cdaea235423be986370512c69a49c6d90be8efc", - "size": 74297 + "sha256": "bb18bce4798ad24ad1b4c57a44e94979943b8911ff1997ff4a08082a7914fe4d", + "size": 74598 }, { "url": "https://code.claude.com/docs/en/mcp-quickstart", @@ -4538,8 +4587,8 @@ "url": "https://code.claude.com/docs/en/memory", "status": "success", "path": "en/docs/claude-code/memory.md", - "sha256": "40fda6f5c9d988b392e9013ced8df1d2f2b063c405ce5c49321f74910d8d4e60", - "size": 34849 + "sha256": "a7dd777240fd3f13fec00d5f9c5d3c4909e834963eceab97f01b7a74635d9ded", + "size": 35388 }, { "url": "https://code.claude.com/docs/en/microsoft-foundry", @@ -4566,8 +4615,8 @@ "url": "https://code.claude.com/docs/en/monitoring-usage", "status": "success", "path": "en/docs/claude-code/monitoring-usage.md", - "sha256": "22d3437deb18232fc8ad4ee1bb5342ee69ccc7e356afcbf9b14dd8dcbfc931b4", - "size": 126198 + "sha256": "df45b53c15b5447ff4881cbf8c488b0cf1d1506f07c3ce04995c513a07198861", + "size": 128658 }, { "url": "https://code.claude.com/docs/en/network-config", @@ -4685,8 +4734,8 @@ "url": "https://code.claude.com/docs/en/routines", "status": "success", "path": "en/docs/claude-code/routines.md", - "sha256": "7dedf65d4eaca373e08f8f3874d718c364b85f3d54ea08fd63ae4ce97d1d817e", - "size": 31920 + "sha256": "dafa0fb2fbac921ea30888fa83235870ff274f191312e6390d2890950b616c77", + "size": 31919 }, { "url": "https://code.claude.com/docs/en/sandbox-environments", @@ -4734,15 +4783,15 @@ "url": "https://code.claude.com/docs/en/sessions", "status": "success", "path": "en/docs/claude-code/sessions.md", - "sha256": "d6c8b886a582e21dd7698e5a3a79e96a7d3dc9c5eb73d9cb4901d0233951fbd0", - "size": 20684 + "sha256": "a04968aa82d190dce4fcd3ef697b2438f97325997ea77d20cc6a7759f58de892", + "size": 21224 }, { "url": "https://code.claude.com/docs/en/settings", "status": "success", "path": "en/docs/claude-code/settings.md", - "sha256": "72b3190a648921155fa0a69edd638c4a20f910145a45918995ada29c6b1b9546", - "size": 266332 + "sha256": "064d6e8e90b95cd395fc5f2cc7ee92243a930bdb5594a5444773aa84afd7650a", + "size": 268693 }, { "url": "https://code.claude.com/docs/en/setup", @@ -4776,8 +4825,8 @@ "url": "https://code.claude.com/docs/en/sub-agents", "status": "success", "path": "en/docs/claude-code/sub-agents.md", - "sha256": "7e6df1218a9cdc36518cb099640d93cac725e779d367e46f379ef2b285f523ab", - "size": 86170 + "sha256": "9d775d5413924f524196a0243467b28e4423e64209997da3cbe19507502ffc1d", + "size": 91131 }, { "url": "https://code.claude.com/docs/en/terminal-config", @@ -4797,8 +4846,8 @@ "url": "https://code.claude.com/docs/en/tools-reference", "status": "success", "path": "en/docs/claude-code/tools-reference.md", - "sha256": "f2ee06121556907cff00fb306b5605340c1f13388ec052de61c293eeefbe8085", - "size": 90998 + "sha256": "23f40794c6328b20e4be4382a1f8d0b51b4152497a089ac695709a33a38884fa", + "size": 87598 }, { "url": "https://code.claude.com/docs/en/troubleshoot-install", @@ -4839,8 +4888,8 @@ "url": "https://code.claude.com/docs/en/vs-code", "status": "success", "path": "en/docs/claude-code/vs-code.md", - "sha256": "6c94727fa1e0739aebe41bce94d412069ba9e9d184e81a1884a46999a5a8962e", - "size": 48427 + "sha256": "28ee73b4085785fb954b71ed3ebbd5f451af5ce463540a1fff05dbd0bee30a27", + "size": 48415 }, { "url": "https://code.claude.com/docs/en/web-quickstart", @@ -4930,8 +4979,8 @@ "url": "https://code.claude.com/docs/en/whats-new/2026-w24", "status": "success", "path": "en/docs/claude-code/whats-new/2026-w24.md", - "sha256": "0baa5b3c36e72a00777e837bb379dc69d05cb73460a155d5ed29eddb5d6363c2", - "size": 5372 + "sha256": "4e1e979931ce7ed0be1affdf30d184513ae884bdf59f5b81dc825829861fa305", + "size": 5389 }, { "url": "https://code.claude.com/docs/en/whats-new/2026-w25", @@ -6589,7 +6638,7 @@ "url": "https://support.claude.com/en/articles/8114491-get-started-with-claude", "status": "success", "path": "support/8114491-get-started-with-claude.md", - "sha256": "32fb1b3997e3b576b97b6c2101e445bd521a67f39843bc35960d86acb3b4ee96", + "sha256": "cb7bb0ef05d7a058f77d08ffc960b0fb0d2e68c10f0026039391a61ad7042d86", "size": 5298 }, { @@ -6673,8 +6722,8 @@ "url": "https://support.claude.com/en/articles/8230524-how-can-i-delete-or-rename-a-conversation", "status": "success", "path": "support/8230524-how-can-i-delete-or-rename-a-conversation.md", - "sha256": "e110b4d55adaa8e28abd6f1b550eae00d919c72b30e3338de757a459b41a3465", - "size": 1297 + "sha256": "e6dbfc13b85ed41e1e82ab82bc70dd1b5bf749337984b9901663ff2e555b13e1", + "size": 1301 }, { "url": "https://support.claude.com/en/articles/8241126-upload-files-to-claude", @@ -6715,7 +6764,7 @@ "url": "https://support.claude.com/en/articles/8287232-verify-your-phone-number", "status": "success", "path": "support/8287232-verify-your-phone-number.md", - "sha256": "6a99237d04e622587c0993bed618ce5c1bcb0b99b1c28e77acfb95a0118e6183", + "sha256": "1b8ca20847af2a87e236b285b04012bb5dc279a9ecd2654ed35da81119fc0158", "size": 3977 }, { @@ -6743,7 +6792,7 @@ "url": "https://support.claude.com/en/articles/8325618-paid-plan-billing-faqs", "status": "success", "path": "support/8325618-paid-plan-billing-faqs.md", - "sha256": "665ec9d6008f8d07f17f62be309cce90d13a979776d6fc73792a93a04ce14413", + "sha256": "37195a395da6e1cad63d497cdd7d9ba7198504061fd5a76cb0041be73933148f", "size": 4551 }, { @@ -6785,8 +6834,8 @@ "url": "https://support.claude.com/en/articles/8606378-how-do-i-use-the-workbench", "status": "success", "path": "support/8606378-how-do-i-use-the-workbench.md", - "sha256": "3666fcd695797cf223a50a1bae5f48b2b5ffb965e8ce7c1625197f55fac2535c", - "size": 9651 + "sha256": "0a8c561b6d59bab5cb5618928b0d4bb0d26e72d931789583b8664132a9e66b0c", + "size": 9647 }, { "url": "https://support.claude.com/en/articles/8606394-how-large-is-the-context-window-on-paid-claude-plans", @@ -6813,8 +6862,8 @@ "url": "https://support.claude.com/en/articles/8887527-customizing-your-appearance-settings", "status": "success", "path": "support/8887527-customizing-your-appearance-settings.md", - "sha256": "2934278e95487de191e31546590b83d8a2e5f2698a6b1d498aac2bae5be34583", - "size": 1866 + "sha256": "ca31ae8c5288ffc29485ea8c707fa73d8411a2711d8d28ef96350288efcf81f2", + "size": 1868 }, { "url": "https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler", @@ -6869,8 +6918,8 @@ "url": "https://support.claude.com/en/articles/9028421-how-can-i-delete-my-claude-account", "status": "success", "path": "support/9028421-how-can-i-delete-my-claude-account.md", - "sha256": "d1b7932699b3006da0ae9ada309c48d9d67e7c91c2832808f5c5aef55fb823ee", - "size": 2019 + "sha256": "89dd2bc1caf33075d0a320f9949167c6da01752f3f2d707ce4a9101e9acabd52", + "size": 2023 }, { "url": "https://support.claude.com/en/articles/9035075-law-enforcement-requests", @@ -7037,15 +7086,15 @@ "url": "https://support.claude.com/en/articles/9519177-how-can-i-create-and-manage-projects", "status": "success", "path": "support/9519177-how-can-i-create-and-manage-projects.md", - "sha256": "b4f8d453c8fcf5faa6f877a86d6e184edc8c16377436821fa1e2c3ca1a2840e5", - "size": 11172 + "sha256": "dfd3445566fdc4f9431a8474c4468dbcd45ad4402303e4bcd1db1d4422fac574", + "size": 11180 }, { "url": "https://support.claude.com/en/articles/9519189-manage-project-visibility-and-sharing", "status": "success", "path": "support/9519189-manage-project-visibility-and-sharing.md", - "sha256": "ee40df9debaa0d1e9fd310fe72b1f5b393cc649ef9f27b1f961790198f3d59fd", - "size": 6823 + "sha256": "18a423fe5eb9e99660e73f93752a16a8be6f097a25b68d4499a4d01100932443", + "size": 6813 }, { "url": "https://support.claude.com/en/articles/9519291-what-is-anthropic-s-policy-for-handling-governmental-requests-for-user-information", @@ -7065,8 +7114,8 @@ "url": "https://support.claude.com/en/articles/9534590-cost-and-usage-reporting-in-the-claude-console", "status": "success", "path": "support/9534590-cost-and-usage-reporting-in-the-claude-console.md", - "sha256": "c74ea1885c4501000234f90a8ef6639e338a56fb0d0cd4e6185defb3ba6e397b", - "size": 5100 + "sha256": "502bf602810a16331781831f4e4ca5734affb7b711a6bb0a967bafd9671bdd5d", + "size": 5102 }, { "url": "https://support.claude.com/en/articles/9547008-publish-and-share-artifacts", @@ -7149,8 +7198,8 @@ "url": "https://support.claude.com/en/articles/9927533-disable-public-projects-for-your-organization", "status": "success", "path": "support/9927533-disable-public-projects-for-your-organization.md", - "sha256": "bf2f07edfde477e062ce6c1712ccf74c9104dc52e348fcbf16567f822a0e9418", - "size": 2582 + "sha256": "0333cfacfd7558e430c3c88e63c6d520cbafce1e97fc48b6e310f49ed04d9026", + "size": 2578 }, { "url": "https://support.claude.com/en/articles/9927624-add-or-update-your-team-plan-s-tax-or-vat-id", @@ -7289,15 +7338,15 @@ "url": "https://support.claude.com/en/articles/10310342-how-do-i-log-out-of-all-active-sessions", "status": "success", "path": "support/10310342-how-do-i-log-out-of-all-active-sessions.md", - "sha256": "c9d2e1aeefdc1d25f6790d414352be7c5880df0a36f63ffafdb754a5617a25da", - "size": 2480 + "sha256": "800b23347315bb3e36c77887af917a6a6e8e1f6868010247e5a6279e1c718679", + "size": 2482 }, { "url": "https://support.claude.com/en/articles/10366376-how-can-i-delete-my-claude-console-account", "status": "success", "path": "support/10366376-how-can-i-delete-my-claude-console-account.md", - "sha256": "e35630011e04c49d2edd405f2d70172606ce18cf0894280b8ccd92665898fbec", - "size": 3159 + "sha256": "655653b7578f172f8acd844215fd84ceed19a9d924e198a4a42bfda007ccaf51", + "size": 3165 }, { "url": "https://support.claude.com/en/articles/10366389-how-can-i-get-higher-rate-limits-on-the-claude-api", @@ -7345,15 +7394,15 @@ "url": "https://support.claude.com/en/articles/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans", "status": "success", "path": "support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md", - "sha256": "6e0fc621eb67ea7954f00fe01ccba372b39e52341cbeaacfcf40a72ac97996a1", - "size": 1040 + "sha256": "da7cf5fe2d4483cd9304e09eeec37cb4a4fae3a406da6ebb78b4ba5a43f65e9f", + "size": 1036 }, { "url": "https://support.claude.com/en/articles/10504853-manage-user-feedback-settings-on-claude-console", "status": "success", "path": "support/10504853-manage-user-feedback-settings-on-claude-console.md", - "sha256": "cae3911ada1cdef8a1d5610573db4c9a2bf47ce42d6b7e2d7034030cc5e4a5d4", - "size": 1001 + "sha256": "4e0f5bf3f82622b9a8cc59ae6aefee7282ecb8b666e114426602739078e28511", + "size": 997 }, { "url": "https://support.claude.com/en/articles/10534883-use-the-claude-widget-on-android", @@ -7366,15 +7415,15 @@ "url": "https://support.claude.com/en/articles/10593882-share-and-unshare-chats", "status": "success", "path": "support/10593882-share-and-unshare-chats.md", - "sha256": "2307796ebd5065f8514788cef4b431d472e361231b6d1a75c150ae573c9a85d2", - "size": 4010 + "sha256": "877c61b5da4aaf5494830b1b8d3858b9e426c4a5bdc9edbcf447d0f14d80fc8b", + "size": 4014 }, { "url": "https://support.claude.com/en/articles/10684626-enable-and-use-web-search", "status": "success", "path": "support/10684626-enable-and-use-web-search.md", - "sha256": "5861f067c3dd4f2015258f299a343c0378dcd70a6356e31efe3c1dbbd157ccec", - "size": 6364 + "sha256": "050307e74c070850c835eab1f6ce9a48fb37d6ce8ef152b51b94f7f260960c27", + "size": 6358 }, { "url": "https://support.claude.com/en/articles/10684638-reporting-blocking-and-removing-content-from-claude", @@ -7387,8 +7436,8 @@ "url": "https://support.claude.com/en/articles/10722177-sharing-prompts-in-the-claude-console", "status": "success", "path": "support/10722177-sharing-prompts-in-the-claude-console.md", - "sha256": "25be5c96fae8745debebe5837e15bcf15bc631d3d42a4f17ff6f4ad7ee353e81", - "size": 4537 + "sha256": "887e8d621d1353c9d246ccc9a4e87c94e4367a7805292b7f6a6686688f08b983", + "size": 4529 }, { "url": "https://support.claude.com/en/articles/10769299-how-to-use-claude-in-your-preferred-language", @@ -7401,7 +7450,7 @@ "url": "https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop", "status": "success", "path": "support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md", - "sha256": "24d32b08fd932e58a6faa5d80104dc771a682a225840766110c45ba2a5682636", + "sha256": "0502ab7000c9f3de28710ffdc9f967351d976c591437a779f3d2c6d891a196e9", "size": 8267 }, { @@ -7443,7 +7492,7 @@ "url": "https://support.claude.com/en/articles/11101966-use-voice-mode", "status": "success", "path": "support/11101966-use-voice-mode.md", - "sha256": "fd97b27540f55e99f3220565aa51343a56cc0f27be15318a571d76da012d6244", + "sha256": "96c4bf424ca0fe069cb334842fecdc840332c5e2ba0f740e21f85b5c5111bdc1", "size": 8414 }, { @@ -7499,8 +7548,8 @@ "url": "https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp", "status": "success", "path": "support/11175166-get-started-with-custom-connectors-using-remote-mcp.md", - "sha256": "3d01c6cdf5d8fb065ec5313a80a2c3061c87779bd61a8ef169fee8d27282d2d9", - "size": 10943 + "sha256": "56d5765721b0c601a93c9f7a24734d724b875b13553e0a4893f4a71e19b6d242", + "size": 10887 }, { "url": "https://support.claude.com/en/articles/11176164-use-connectors-to-extend-claude-s-capabilities", @@ -7548,8 +7597,8 @@ "url": "https://support.claude.com/en/articles/11506255-get-started-with-claude-in-slack", "status": "success", "path": "support/11506255-get-started-with-claude-in-slack.md", - "sha256": "022b596e2027d8ca1a45bb87e24500d3e51a6987fbdf1af4a7bbb7087de45a73", - "size": 10410 + "sha256": "83705b7ade9bc13c78ac08257385b630cac44546945ec5c7ef3e180564dd1aaf", + "size": 10414 }, { "url": "https://support.claude.com/en/articles/11526368-how-am-i-billed-for-my-enterprise-plan", @@ -7590,8 +7639,8 @@ "url": "https://support.claude.com/en/articles/11725453-set-up-the-claude-lti-in-canvas-by-instructure", "status": "success", "path": "support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md", - "sha256": "b4ad7ce5071f7028b7da4cfc6fa3b3ed34561a73dd4dbd2d98947fd4033a4509", - "size": 2748 + "sha256": "7b9df9a59e98fa456f6db6a54eab11123fd6a2891fdcaaa01c2f0337e058276e", + "size": 2750 }, { "url": "https://support.claude.com/en/articles/11732894-who-owns-and-manages-the-data-of-my-claude-for-education-account", @@ -7604,15 +7653,15 @@ "url": "https://support.claude.com/en/articles/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context", "status": "success", "path": "support/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context.md", - "sha256": "a749fd625308b7161774ac35e7466acccc64978c58d84fec3845f89c1a0c12a4", - "size": 21516 + "sha256": "2d63b87d7f69433f479eddda226e46f05f9fecf046c5f2aad10b7f020d0ba6e2", + "size": 21506 }, { "url": "https://support.claude.com/en/articles/11818288-why-am-i-being-asked-to-verify-my-payment-method", "status": "success", "path": "support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md", - "sha256": "8feb60811bebfbfd36bbc78e559c98e904b77e108fc686dca7237af03dcb96a5", - "size": 820 + "sha256": "04cf8c4c3ed8840cc3aefb5c373e5ad9f726f81c084777187cf1dbf4b1a4458b", + "size": 816 }, { "url": "https://support.claude.com/en/articles/11825384-how-to-update-claude-for-ios", @@ -7646,8 +7695,8 @@ "url": "https://support.claude.com/en/articles/11869629-use-claude-with-android-apps", "status": "success", "path": "support/11869629-use-claude-with-android-apps.md", - "sha256": "23f30e03f49afdba9959bfd235e9fb6bd5b8a25b8f32d8396ee9a09005e02e76", - "size": 14139 + "sha256": "22e2e30d59ff19f7977c0517d30883c85fc116b882e56fb96713ace45713954c", + "size": 14141 }, { "url": "https://support.claude.com/en/articles/11932705-automated-security-reviews-in-claude-code", @@ -7681,14 +7730,14 @@ "url": "https://support.claude.com/en/articles/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans", "status": "success", "path": "support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md", - "sha256": "b2a776c4a4ed55d587483c6167cd164033498593a007937e48ae3dbb12576add", - "size": 9632 + "sha256": "7b797796446d5e8316b042402a4015b01ecc2a65df77d1293475f6cb3cc4c23b", + "size": 9642 }, { "url": "https://support.claude.com/en/articles/12012173-get-started-with-claude-in-chrome", "status": "success", "path": "support/12012173-get-started-with-claude-in-chrome.md", - "sha256": "f271715e6fd20aa51e161ac922310a020457f8e330886e47853c06b32e2f1347", + "sha256": "fa135c0c5d125d9d6029e493beb14077f08cc6aa9c1549620b5c9ac0c06a8dfa", "size": 12672 }, { @@ -7716,8 +7765,8 @@ "url": "https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude", "status": "success", "path": "support/12111783-create-and-edit-files-with-claude.md", - "sha256": "f610e1ef8814dc86ebdf069e94c69d604deb73b6255705917a978efd341a8f3d", - "size": 18405 + "sha256": "ea7a4fa785b2e3506bd47ea86eb0b87f52247dedb9834ea825ddf317c876872d", + "size": 18413 }, { "url": "https://support.claude.com/en/articles/12119250-model-safety-bug-bounty-program", @@ -7744,22 +7793,22 @@ "url": "https://support.claude.com/en/articles/12157520-claude-code-usage-analytics", "status": "success", "path": "support/12157520-claude-code-usage-analytics.md", - "sha256": "a34ee7b02641c1969f51c8a756347c5354757a32421e76fa7609d9a3710368ca", - "size": 6427 + "sha256": "4097ceeebded5440228efa6bdeb753563dc4faa120e2d4c88886ecc1ff1df6ba", + "size": 6429 }, { "url": "https://support.claude.com/en/articles/12260368-use-incognito-chats", "status": "success", "path": "support/12260368-use-incognito-chats.md", - "sha256": "6ea1ccfe3a402be94a1527b9bbdd71a2ec28383cc81ef17f3933fdf1e6c0d227", - "size": 3604 + "sha256": "96fdbcf33dfbf6dada4b17b1acffe328af6b130f0874d4fe8d2a855f3f5c2ea2", + "size": 3594 }, { "url": "https://support.claude.com/en/articles/12293051-use-claude-in-xcode", "status": "success", "path": "support/12293051-use-claude-in-xcode.md", - "sha256": "4c82d667216e24ed2d061a366e11d8e3e64cb183424023cbf58d5f46a68851af", - "size": 1909 + "sha256": "569c6b2a7b423c82a0358f255de1d8c2f29b6d28ecce9fa5833b4f6706a63c64", + "size": 1915 }, { "url": "https://support.claude.com/en/articles/12304248-manage-api-key-environment-variables-in-claude-code", @@ -7800,22 +7849,22 @@ "url": "https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans", "status": "success", "path": "support/12429409-manage-usage-credits-for-paid-claude-plans.md", - "sha256": "0c7b9bcdbf9f6cfe94abd4c087cfe2d820b92fd7abe4382634a42d884c24f772", - "size": 6069 + "sha256": "ae632217410c08ea6fb717c7c8ad8ab704f7b37a594265428e517900cd2b1a0d", + "size": 6073 }, { "url": "https://support.claude.com/en/articles/12461605-use-claude-in-slack", "status": "success", "path": "support/12461605-use-claude-in-slack.md", - "sha256": "0f76a6cda979f2473c8a0021e868c8872bc5ef9563a04aaa6f4af0fa28899a5f", - "size": 9971 + "sha256": "6090d618e8a8fc64f252daa2ec5106efe07c07f652240bf4b4ea621b89363d32", + "size": 9969 }, { "url": "https://support.claude.com/en/articles/12466728-troubleshoot-claude-error-messages", "status": "success", "path": "support/12466728-troubleshoot-claude-error-messages.md", - "sha256": "ec3f3a5a680c3ed53276f5e86366c46695967e4860b2cd39ce70e691bfa311e9", - "size": 4234 + "sha256": "63bf2bc850710f1f6f3a7e09bbb8e1c9241b354c621aaa3f50cf944bbdf5470d", + "size": 4236 }, { "url": "https://support.claude.com/en/articles/12489464-use-enterprise-search", @@ -7842,8 +7891,8 @@ "url": "https://support.claude.com/en/articles/12512198-how-to-create-custom-skills", "status": "success", "path": "support/12512198-how-to-create-custom-skills.md", - "sha256": "c6e332340ec6dc4941ec1d5bcc19a7ea2ef7011aae653975fbe3c06327d36f1e", - "size": 8124 + "sha256": "9fedfdf1ab8218e833860aaa1524cbb777d02a78591aaadb7a5045cf60c12907", + "size": 11685 }, { "url": "https://support.claude.com/en/articles/12542951-set-up-the-microsoft-365-connector", @@ -7856,8 +7905,8 @@ "url": "https://support.claude.com/en/articles/12592343-enabling-and-using-the-desktop-extension-allowlist", "status": "success", "path": "support/12592343-enabling-and-using-the-desktop-extension-allowlist.md", - "sha256": "81733a3586a14cd8bd666168332098c96a5a3c88aa473de67d8911dfa014d552", - "size": 5722 + "sha256": "e1d0bb62819eeb8c7e36841a9c596ddba7c97138e0f9be008d5c5f815658e94b", + "size": 5704 }, { "url": "https://support.claude.com/en/articles/12611117-deploy-claude-desktop-for-macos", @@ -7870,8 +7919,8 @@ "url": "https://support.claude.com/en/articles/12618689-claude-code-on-the-web", "status": "success", "path": "support/12618689-claude-code-on-the-web.md", - "sha256": "d63d5e1e15ce0102322dfa4d5bf014cec43e60c0992a7462035f727ffd210d49", - "size": 10966 + "sha256": "af18d9ba29d9d0ce96c383575c12565d0edd0488ff24641e94bd3776364f06d8", + "size": 10962 }, { "url": "https://support.claude.com/en/articles/12622667-enterprise-configuration-for-claude-desktop", @@ -7891,15 +7940,15 @@ "url": "https://support.claude.com/en/articles/12626668-use-quick-entry-with-claude-desktop-on-mac", "status": "success", "path": "support/12626668-use-quick-entry-with-claude-desktop-on-mac.md", - "sha256": "738a54c366d2ec67703f28c8c50b20ef96fb3b0b68cd3e5fed267e89a43214a5", + "sha256": "c7e05996e6958e21c286021dc0f72ddbc2600ea8d44ecefca1166f1520a121a8", "size": 5970 }, { "url": "https://support.claude.com/en/articles/12650343-use-claude-for-excel", "status": "success", "path": "support/12650343-use-claude-for-excel.md", - "sha256": "24c6f6c8aa96acaf5585c9a08409b10cbfd12d1671df9f9ec3b6f1058abbaeec", - "size": 20229 + "sha256": "b0a1a908a82db5b21c7321f914541fe4e9840febb32d0202757386230e8857bf", + "size": 20225 }, { "url": "https://support.claude.com/en/articles/12684923-microsoft-365-connector-security-guide", @@ -7933,14 +7982,14 @@ "url": "https://support.claude.com/en/articles/12883420-view-usage-analytics-for-team-and-enterprise-plans", "status": "success", "path": "support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md", - "sha256": "d7a74764b3fcf297d6cfeaf8db93d89f93fa71602f4d523fd2bd23461b41f53b", + "sha256": "c6e5ff9c227edab6ec5e07670690998df9cca456997a6a817caaea21aa57bf94", "size": 12254 }, { "url": "https://support.claude.com/en/articles/12893767-getting-started-with-claude-for-nonprofits", "status": "success", "path": "support/12893767-getting-started-with-claude-for-nonprofits.md", - "sha256": "2b966800c5bf82ca8967d9ae42521c401993c28046af4b874f76c7517b5f8c6a", + "sha256": "825abd5f11df68b1a4be3fa2acb6c36d11ecb20c2c6a82961708a7b46ad002f1", "size": 523512 }, { @@ -7961,8 +8010,8 @@ "url": "https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide", "status": "success", "path": "support/12902446-claude-in-chrome-permissions-guide.md", - "sha256": "db5927d6ccb67e71847d307dbcb8b524c1b121d5b5a51af89edba47f931d0a8a", - "size": 8088 + "sha256": "151f2a9a8b393f714fd6af171d4f4e70d7de6b135d9a638c2209de5caf8676a3", + "size": 8092 }, { "url": "https://support.claude.com/en/articles/12922490-remote-mcp-server-submission-guide", @@ -7989,35 +8038,35 @@ "url": "https://support.claude.com/en/articles/12923221-using-the-blackbaud-connector-in-claude", "status": "success", "path": "support/12923221-using-the-blackbaud-connector-in-claude.md", - "sha256": "7ea528628d8cea1cbb8d166259a686054a85c1fe57b14ed823e69dc90e080f94", + "sha256": "5287a16fff300ec7ceaa3b13d118afe7f790c3034567a1357a0b6df27b48f6cb", "size": 521696 }, { "url": "https://support.claude.com/en/articles/12923227-using-the-benevity-connector-in-claude", "status": "success", "path": "support/12923227-using-the-benevity-connector-in-claude.md", - "sha256": "2c506e9dfc024645ae8fb24b4993edb9462f15c95f54835bd43de8920fcd02b3", + "sha256": "459f88c30e994196299eabae898f7424433a14d966d37ea8494c0edcc30c4899", "size": 520326 }, { "url": "https://support.claude.com/en/articles/12923235-using-the-candid-connector-in-claude", "status": "success", "path": "support/12923235-using-the-candid-connector-in-claude.md", - "sha256": "9bf0cd28a59a2ac481ec7110b255636879b814985fe2234679094ea10c21e191", + "sha256": "00c6f16705c939dec8bb8b6e2f2ee11c550f617cdf58a8b52e2ea6447837a3a0", "size": 523261 }, { "url": "https://support.claude.com/en/articles/12923668-claude-for-nonprofits-partnership-success-guide-for-admins", "status": "success", "path": "support/12923668-claude-for-nonprofits-partnership-success-guide-for-admins.md", - "sha256": "4393cb98e796e612c5a9474b2e3906d55fe60771488bd3675ca3cb4e29ace282", + "sha256": "d15e99dd55e656b329cd8eb80be647e117c05ccca17f1f2c31a806caca116335", "size": 522329 }, { "url": "https://support.claude.com/en/articles/12923901-claude-for-nonprofits-partnership-guide-for-all-users", "status": "success", "path": "support/12923901-claude-for-nonprofits-partnership-guide-for-all-users.md", - "sha256": "95092ff729300389ca85f129db7d3490f0a87888bb958f85f3bc59f1a9d5e6db", + "sha256": "5027843d7e8ba236122f1857191cb08eb3a02ed405d67d319aaaa1a6d34b3a51", "size": 521653 }, { @@ -8045,8 +8094,8 @@ "url": "https://support.claude.com/en/articles/12997503-team-plan-billing-faqs", "status": "success", "path": "support/12997503-team-plan-billing-faqs.md", - "sha256": "1f007b3e5a4bed75f69ce479d2bdffac8bf7e2707f45e007239e8ace55b0feaf", - "size": 3928 + "sha256": "aeb5e700f835d53180c47333b29669ba811b896fc97018f2534674ee8d051310", + "size": 3922 }, { "url": "https://support.claude.com/en/articles/13015708-access-the-compliance-api", @@ -8094,15 +8143,15 @@ "url": "https://support.claude.com/en/articles/13132885-set-up-single-sign-on-sso", "status": "success", "path": "support/13132885-set-up-single-sign-on-sso.md", - "sha256": "37d1d2a44a38d8c867ae82a780de86830ca5d006d5958b47becd1e6557207df8", - "size": 12315 + "sha256": "2d43c6a80c9ae8f4f2ecb77c8a652d8b6a237c3cfedd875edd387e73cb285765", + "size": 12309 }, { "url": "https://support.claude.com/en/articles/13133195-set-up-jit-or-scim-provisioning", "status": "success", "path": "support/13133195-set-up-jit-or-scim-provisioning.md", - "sha256": "b194eca2ff44d7e94a563a781aa63807ed6909311d6aa18231b51239dd37c98c", - "size": 16610 + "sha256": "a4a0674405d274b295e280318f743d44871bd597c7ead6a9022c067eb3330fff", + "size": 16604 }, { "url": "https://support.claude.com/en/articles/13133750-manage-members-on-team-and-enterprise-plans", @@ -8129,8 +8178,8 @@ "url": "https://support.claude.com/en/articles/13163631-configuring-session-security-settings", "status": "success", "path": "support/13163631-configuring-session-security-settings.md", - "sha256": "d504b7c87ef1d25e7825c04ed0ad5354fde7ed41833fc9659d6c1bb993e4a162", - "size": 3700 + "sha256": "8bf0eff0b3d0bf130c5ad70fadd8e4e81975e6ecb72d24c2115f82e560fd94e7", + "size": 3698 }, { "url": "https://support.claude.com/en/articles/13163666-holiday-2025-usage-promotion", @@ -8150,7 +8199,7 @@ "url": "https://support.claude.com/en/articles/13189465-log-in-to-your-claude-account", "status": "success", "path": "support/13189465-log-in-to-your-claude-account.md", - "sha256": "2eb91f1668d416135151579c8883d930e347826048c022a16acdcaece7d19a21", + "sha256": "bfd244c7bf0421264af39ffbb0834bef07278eb01cf9b772bd357c4f597e836f", "size": 7036 }, { @@ -8178,21 +8227,21 @@ "url": "https://support.claude.com/en/articles/13325567-account-management-faqs", "status": "success", "path": "support/13325567-account-management-faqs.md", - "sha256": "9f66e35369e9a58466138b058778fa74cdf45cab0e0dad9c8c45803ad51a549e", - "size": 2639 + "sha256": "0147b49480451595792dbd923e720980a762e72ef91e3a366935b9a21abc790c", + "size": 2637 }, { "url": "https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork", "status": "success", "path": "support/13345190-get-started-with-claude-cowork.md", - "sha256": "7462aa90607a9f79fd0015df5d7974c643c717ec86e7b752def05be8bb470dad", - "size": 20039 + "sha256": "fa998bb3813210fd59f42c56271db97155b8c123569044950f145647b3e972a0", + "size": 20037 }, { "url": "https://support.claude.com/en/articles/13346458-customizing-your-console-appearance-settings", "status": "success", "path": "support/13346458-customizing-your-console-appearance-settings.md", - "sha256": "f8c148957af87a2dd98a5e556dee5394ad4d54801f997595d220378a9c5d259b", + "sha256": "c510b0fa0c57348c80b1868b3395af9900fbc74e4dadb06fdc1c04a1a3c7d255", "size": 607 }, { @@ -8213,8 +8262,8 @@ "url": "https://support.claude.com/en/articles/13371040-logging-in-to-your-console-account", "status": "success", "path": "support/13371040-logging-in-to-your-console-account.md", - "sha256": "b4e72502c36dad9684ddd62ec95ea52b2d941bf6db53c2c4025631170d93ab5c", - "size": 4596 + "sha256": "7a4664e7f12765b47259e5d4af05a72e27a7b765856e2c143919dff339c64061", + "size": 4598 }, { "url": "https://support.claude.com/en/articles/13393991-purchase-and-manage-seats-on-enterprise-plans", @@ -8276,8 +8325,8 @@ "url": "https://support.claude.com/en/articles/13641943-visual-and-interactive-content", "status": "success", "path": "support/13641943-visual-and-interactive-content.md", - "sha256": "f6e0d3b85fd5540b3d68a3d3428eed1eaf4bb42d4ed6d52275cb1752a47fe4ac", - "size": 6515 + "sha256": "ac1c8d3dcc10eb360c9bdb72a20bef41cb9b57ab8f7f02a9fb1c4d4a3f4eb7f3", + "size": 6511 }, { "url": "https://support.claude.com/en/articles/13663666-use-visual-and-interactive-content-on-team-and-enterprise-plans", @@ -8304,8 +8353,8 @@ "url": "https://support.claude.com/en/articles/13756069-public-sector-faqs", "status": "success", "path": "support/13756069-public-sector-faqs.md", - "sha256": "dc0a0951f071134d8ad504ce6f3bacc3b1cdb65ba6a2d47d941ad418fbbbc4cd", - "size": 8378 + "sha256": "07856fcd73b21ea873147a6f276e0011bef20e034a406ea5424dacfbf3fc72a1", + "size": 8376 }, { "url": "https://support.claude.com/en/articles/13776697-join-an-organization-via-invite-link", @@ -8332,29 +8381,29 @@ "url": "https://support.claude.com/en/articles/13837433-manage-plugins-for-your-organization", "status": "success", "path": "support/13837433-manage-plugins-for-your-organization.md", - "sha256": "e8a19e001ae6b8f4e46c7e0a610e5cde5a7596e5f13e4d1591bf2c62e5803b61", - "size": 19761 + "sha256": "4abcad91377aeb1a84c557f3d056ca5e7f3b34881e2625a87109222b0b97b3d8", + "size": 19763 }, { "url": "https://support.claude.com/en/articles/13837440-use-plugins-in-claude", "status": "success", "path": "support/13837440-use-plugins-in-claude.md", - "sha256": "d300f1a6fe46f8d331603825d15929da245c004956aafb8d3e00ece11d4dfe83", - "size": 6362 + "sha256": "2acfae178eaa36dbc1b3d8886d0653412fb06a78d41efd7ba90e9c2aa3cd3115", + "size": 6360 }, { "url": "https://support.claude.com/en/articles/13854387-schedule-recurring-tasks-in-claude-cowork", "status": "success", "path": "support/13854387-schedule-recurring-tasks-in-claude-cowork.md", - "sha256": "bfab25f951effd306e3df8b5e0a02bdfa5dd77bc0a95944263a74e4349f19701", - "size": 4702 + "sha256": "24339ae1dd2e445ab16779c5501cd81478c491712f5fd71aa9d1346746ecfc82", + "size": 4698 }, { "url": "https://support.claude.com/en/articles/13892150-work-across-microsoft-365-apps", "status": "success", "path": "support/13892150-work-across-microsoft-365-apps.md", - "sha256": "8ccf94b33f437fe489798a4ede1d08c384cd2aac3146b4b76870f32fa2fee38e", - "size": 6338 + "sha256": "09fe6f4c576e934d76bde52678463b9cacbcd5501652031291d8432f6ea6f2a6", + "size": 6342 }, { "url": "https://support.claude.com/en/articles/13917817-google-workspace-sso-scim-email-mismatch", @@ -8437,8 +8486,8 @@ "url": "https://support.claude.com/en/articles/13930458-set-up-role-based-permissions-on-enterprise-plans", "status": "success", "path": "support/13930458-set-up-role-based-permissions-on-enterprise-plans.md", - "sha256": "7a23d07005511309c5ae5782f529db673fd0008c5c45ba4c47956b4b47bc4b01", - "size": 40966 + "sha256": "a9109bc444112fdb6247e4094eb86c8bed7f024ce6ceb31c4ef9552fd36c0209", + "size": 40970 }, { "url": "https://support.claude.com/en/articles/13945233-use-claude-for-microsoft-365-with-third-party-platforms", @@ -8451,8 +8500,8 @@ "url": "https://support.claude.com/en/articles/13947068-assign-tasks-from-anywhere-in-claude-cowork", "status": "success", "path": "support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md", - "sha256": "18560ee9107e03dade74da910d9b38527bed61591c9920bdb8e843951741364c", - "size": 8284 + "sha256": "8b09bbcb761e26934e41fb4d6edb0fba2c70697e45ddac7dac6554ecf96b2799", + "size": 8282 }, { "url": "https://support.claude.com/en/articles/13979539-custom-visuals-in-chat-and-cowork", @@ -8472,15 +8521,15 @@ "url": "https://support.claude.com/en/articles/14116274-organize-your-tasks-with-projects-in-claude-cowork", "status": "success", "path": "support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md", - "sha256": "93369d257ff910c4c5c130f58a298c21c40594a84a5656063201dd6abba74944", - "size": 5698 + "sha256": "756f73dc09b090846a7d7381e6c7196cb1fa5b19ec6d87a354d54ba20f0761a7", + "size": 5702 }, { "url": "https://support.claude.com/en/articles/14128542-let-claude-use-your-computer-in-cowork", "status": "success", "path": "support/14128542-let-claude-use-your-computer-in-cowork.md", - "sha256": "46e1508fc30d7be77721eb044ceee31228bd997b2eb9b3fb84f4e1d66656297f", - "size": 8282 + "sha256": "a47b50dda45066e53cee78663a5162a70afab294dbbf6a07f4dc1a1512179f39", + "size": 8286 }, { "url": "https://support.claude.com/en/articles/14128775-claude-code-on-console-to-enterprise-migration", @@ -8556,7 +8605,7 @@ "url": "https://support.claude.com/en/articles/14499648-how-scim-sync-works-for-enterprise-organizations", "status": "success", "path": "support/14499648-how-scim-sync-works-for-enterprise-organizations.md", - "sha256": "123177ef8b4c3266e6e3b40da4c7103a237c398924f434d93192296df4b30f51", + "sha256": "971dab1f1bd5e7bc0a82c09885529d0978894c34ecab0589502e62abdb9cafd1", "size": 7437 }, { @@ -8577,15 +8626,15 @@ "url": "https://support.claude.com/en/articles/14503613-sso-login", "status": "success", "path": "support/14503613-sso-login.md", - "sha256": "da0a806c908a5e5eb46e7722b2af6d4a5762523e937e93b154e108664550738a", - "size": 6690 + "sha256": "9c942cfbb6d2727d8c4f2b20c5e52066fdedfb44b145b3061fd16c1bcb5107c1", + "size": 6682 }, { "url": "https://support.claude.com/en/articles/14503643-set-up-scim-in-claude-for-government", "status": "success", "path": "support/14503643-set-up-scim-in-claude-for-government.md", - "sha256": "4ee57ab8710078423caa8bc9460639752c508adb92839eff360ec4f89c7015ce", - "size": 6414 + "sha256": "29a6682e37fc092e708fd03c56771e73fdf5dd1ca836ea8616e48fe3a49d57e4", + "size": 6410 }, { "url": "https://support.claude.com/en/articles/14503675-organization-instructions-in-claude-for-government", @@ -8612,8 +8661,8 @@ "url": "https://support.claude.com/en/articles/14503775-mcp-web-search", "status": "success", "path": "support/14503775-mcp-web-search.md", - "sha256": "973f3ec84b011e29209272fddd40d997405d0bb015a87df76ace6f76883d3c44", - "size": 4675 + "sha256": "68850250c06a51a15d6bb9ea3a85aa0bf793e3f84b28d34950a746cf66d184fd", + "size": 4679 }, { "url": "https://support.claude.com/en/articles/14503794-model-availability-in-claude-for-government", @@ -8710,29 +8759,29 @@ "url": "https://support.claude.com/en/articles/14604397-set-up-your-design-system-in-claude-design", "status": "success", "path": "support/14604397-set-up-your-design-system-in-claude-design.md", - "sha256": "b665309c4fd3a99a61304633fbbb9414cba87a7bfb07499ee6f5e26457b2d6cf", - "size": 4395 + "sha256": "35960ce99b82a8c176917ed69ff0fee1dc13dd2f4506ba26f600756c4a96f6e7", + "size": 4397 }, { "url": "https://support.claude.com/en/articles/14604406-claude-design-admin-guide-for-team-and-enterprise-plans", "status": "success", "path": "support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md", - "sha256": "62e19369edcccebe7c3a4a39a137b3ab7b3227aa63f7bb77df80c6dc86494c40", - "size": 12238 + "sha256": "79e305b5b16e16ec60939dc786ce18533d0b97a4e6bdaa1e794907538cce0214", + "size": 12240 }, { "url": "https://support.claude.com/en/articles/14604416-get-started-with-claude-design", "status": "success", "path": "support/14604416-get-started-with-claude-design.md", - "sha256": "2bc516971376fb201ee1638c5e2298511644fc0bc3d833c9b1c436d67520007d", - "size": 11128 + "sha256": "b965fe109bdd696aa15eb61e73a3137d45eaa951944435df63ba10e031042905", + "size": 11134 }, { "url": "https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet", "status": "success", "path": "support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md", - "sha256": "d92fa2eb231fccfccb9ed0847646f3977c4ffe1a49961829ecdc28db7a30834c", - "size": 6713 + "sha256": "e598659f00469ac526add8fc2116b104713e43a7f4c29db3ee0aa727f1e997a2", + "size": 7183 }, { "url": "https://support.claude.com/en/articles/14625619-claim-and-migrate-accounts-on-your-domain", @@ -8857,8 +8906,8 @@ "url": "https://support.claude.com/en/articles/15330088-set-a-default-model-for-your-organization", "status": "success", "path": "support/15330088-set-a-default-model-for-your-organization.md", - "sha256": "32fef6bf0c407846f11bdbf1c767b3e7a98a9f5dfac771d41f5b28209f52f213", - "size": 5727 + "sha256": "3e2e860a9935929cccb5d0f4688edf9e820c223c02884b96ae484bf61963cc67", + "size": 5731 }, { "url": "https://support.claude.com/en/articles/15330651-claude-enterprise-admin-api-reference-guide", @@ -8969,8 +9018,8 @@ "url": "https://support.claude.com/en/articles/15694740-manage-model-access-for-your-organization", "status": "success", "path": "support/15694740-manage-model-access-for-your-organization.md", - "sha256": "6a2c4cb64471e24550982f787c44bdff42b6e733fd39ac8aeb0fa54090fb06c2", - "size": 8502 + "sha256": "8747ae761f625f3f64172c9a56fd4552c8a47446ce8ca478c38e01ba93564e1d", + "size": 8498 }, { "url": "https://support.claude.com/en/articles/15707726-using-claude-for-legal-work-privilege-confidentiality-and-how-to-think-about-configuration", @@ -8997,8 +9046,8 @@ "url": "https://support.claude.com/en/articles/15936181-get-started-with-1password-for-claude", "status": "success", "path": "support/15936181-get-started-with-1password-for-claude.md", - "sha256": "b9094a7f4601807be0ea45732b63ae0dc0347f68838e64ecadbcdb59288a205e", - "size": 5058 + "sha256": "24d6badf4426961d09b35d38c67c70c73d71f54abf76b286e28f4d1710f03cfb", + "size": 5056 }, { "url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/.claude/agents/code-reviewer.md", @@ -9532,12 +9581,19 @@ "sha256": "a5dcf516d752e015dd837249560904063c80395e80f6db45e3b0ea62cdac6eb8", "size": 33669 }, + { + "url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/CMA_watch_subagents_live.ipynb", + "status": "success", + "path": "github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb", + "sha256": "5706e13937031e8893d805c45df2e2f9084aba74d65eb56b71e395c857f75630", + "size": 24882 + }, { "url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/README.md", "status": "success", "path": "github/claude-cookbooks/managed_agents/README.md", - "sha256": "3fd767fab5c26c583ba7a516a869e531aa1824087d7a3cb5a578be116b2ef344", - "size": 5913 + "sha256": "c192207709cba3074c074916583ab1d1a91243ca6d8137f2d26f42849f137623", + "size": 6265 }, { "url": "https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/managed_agents/cma-mcp/CLAUDE.md", @@ -10292,15 +10348,15 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/SKILL.md", "status": "success", "path": "github/skills/skills/claude-api/SKILL.md", - "sha256": "1d08b3be1c02b6bd2d8c966b1645e234fbb36454d2dd4cbd39802d2f321bd0f4", - "size": 73938 + "sha256": "0960727edd991a4674df9a73821955286ffcd1af3d53a89198b4c7288ac831bb", + "size": 68963 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/csharp/claude-api/README.md", "status": "success", "path": "github/skills/skills/claude-api/csharp/claude-api/README.md", - "sha256": "16481a361eda1fb0a58ac4581553e3dafab80b6c90ba9be7dcbe426905a8df0f", - "size": 18060 + "sha256": "96b67483b4efd0dfdff00817abfbbe9410d11de6113417ff625c278999bab06f", + "size": 18064 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/csharp/claude-api/batches.md", @@ -10341,8 +10397,8 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/curl/managed-agents.md", "status": "success", "path": "github/skills/skills/claude-api/curl/managed-agents.md", - "sha256": "ded9c1d2f012a0c0cf29050f9c95180d4b549a0697e4424fecab55a65980dee1", - "size": 7546 + "sha256": "dd4d8782530b6f187aaa6aecc95bcbbc7ab91f144a0c6324450bdc163f3cf8f4", + "size": 7638 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/go/claude-api/README.md", @@ -10369,15 +10425,15 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/go/claude-api/tool-use.md", "status": "success", "path": "github/skills/skills/claude-api/go/claude-api/tool-use.md", - "sha256": "8a447360fc87b439aff89ef57730f206e76e3ca3f483602f4148638da13b70ec", - "size": 8169 + "sha256": "24a0afa6908cd8ed2fe25d19a7f2b4c5c916edebba4d789f42714d4862c6f6e0", + "size": 8435 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/go/managed-agents/README.md", "status": "success", "path": "github/skills/skills/claude-api/go/managed-agents/README.md", - "sha256": "bc9eb191b42bb217b7b821427c602f1f0770f0984cd23834e8751b3471d2ef6e", - "size": 18688 + "sha256": "c3cc9fbee6e033f3084c3870513f7c6b620c294247d987eb2d70326442187306", + "size": 18953 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/java/claude-api/README.md", @@ -10411,8 +10467,8 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/java/managed-agents/README.md", "status": "success", "path": "github/skills/skills/claude-api/java/managed-agents/README.md", - "sha256": "6b56c9fd4585525368062955d125800f948123f4014d45cea4be7f5691590a65", - "size": 16695 + "sha256": "d66239c46d413883627eda168049e4f5e7c645c315af2ecbd8bfcf8736a3e5f4", + "size": 16960 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/php/claude-api/README.md", @@ -10453,8 +10509,8 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/php/managed-agents/README.md", "status": "success", "path": "github/skills/skills/claude-api/php/managed-agents/README.md", - "sha256": "df276cf31a3708df4b08171e70b396f16cc8f67410f14374454effb43a7b4cd6", - "size": 13265 + "sha256": "8a7dd0d342576f947d20102c786db63eac765a0eab6b5e2ffc86a550bee3991a", + "size": 13530 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/python/claude-api/README.md", @@ -10481,22 +10537,22 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/python/claude-api/streaming.md", "status": "success", "path": "github/skills/skills/claude-api/python/claude-api/streaming.md", - "sha256": "a3c980a9256bee23bfd4fbfe044637d58f7ba66464ed6a192f61ee622bd96f5a", - "size": 6196 + "sha256": "b1da0dfb8a17b2b8b2961254f59bdf5bb16ffc1fec792a22bf0db382c5fe5846", + "size": 6450 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/python/claude-api/tool-use.md", "status": "success", "path": "github/skills/skills/claude-api/python/claude-api/tool-use.md", - "sha256": "490dc14dbaa0cf471bff456aea5eba95101b7c69f767cc9d7032d93feb0f6f43", - "size": 16933 + "sha256": "2f4b284e9c1ad16991803bcdc35d4ef3dff85695bf01126880098c60acfad91c", + "size": 19459 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/python/managed-agents/README.md", "status": "success", "path": "github/skills/skills/claude-api/python/managed-agents/README.md", - "sha256": "8f797c6e84c89bc63c0d899f1e2ea9c7457778372d6e35906ac7426e50cc47ac", - "size": 10098 + "sha256": "8e0312c4fa8e696faea19ab70b3ae5baa43798b2ed0fd167cc39cad5f86be53a", + "size": 10363 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/ruby/claude-api/README.md", @@ -10523,8 +10579,8 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/ruby/managed-agents/README.md", "status": "success", "path": "github/skills/skills/claude-api/ruby/managed-agents/README.md", - "sha256": "5f3aec036d8b8866a2297d3330e14f8dfc614bbac7a7cff8e894812df453dd3b", - "size": 10199 + "sha256": "877343e976f2eb942556ad044596d8a6c55763935c92e0528dd6653d1648e30f", + "size": 10464 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/agent-design.md", @@ -10558,85 +10614,85 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/live-sources.md", "status": "success", "path": "github/skills/skills/claude-api/shared/live-sources.md", - "sha256": "46ca91c1bb757b97b10a78d8b29152ad11c52213aa328397267535a86de1c949", - "size": 18827 + "sha256": "b7803b85b7e38f71c67482d94ce9b381663400fa46015ca86a052dfba8fd444d", + "size": 18931 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-api-reference.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-api-reference.md", - "sha256": "489651518999b9401b38cda8561e726ef9e2ffb5aa1bc0f548c9d65ef738dac7", - "size": 30692 + "sha256": "a2dc1581d54f9a8ca918a215cf8744cd99962925959b0b28bd886f6b2e452d76", + "size": 32097 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-client-patterns.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-client-patterns.md", - "sha256": "de288a933ed7702edba6e6ec54afdb3addcc861245a09255da3496fce2d0f3a8", - "size": 9701 + "sha256": "40073b7cf79ab15677b01a8cb69f4f19a1a16ec69c6c0a98fb26f35c056f3331", + "size": 10162 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-core.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-core.md", - "sha256": "5a5b3bd53adb8cfb9be60e4dc41fdd8a5b2b397874ddd4f5c4e186caafcf5a45", - "size": 18581 + "sha256": "2526e1a6c65f077321600f991d95137eb5f5219bbc0e9e9e1889b74644afe15b", + "size": 24048 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-environments.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-environments.md", - "sha256": "c26934889eaccb936b2eb900ec2c5a648881784280c1beba0e249864078b90b0", - "size": 11530 + "sha256": "48c7215247c6f004f96b99138e61f868716a494ec4c59ed5286215b41386016a", + "size": 11812 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-events.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-events.md", - "sha256": "8e8ce1b6eb7bf52333092674be9d89ea1bb88c474e0e37f02cdff66410efa1b6", - "size": 14937 + "sha256": "12a09fbbd9ff247c151cf157e57e80152665ae622a39ff7605340c7bfd1ea3a5", + "size": 18499 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-memory.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-memory.md", - "sha256": "1c2825364115ccf9d0a779447336764ebbaaf875f79c2a064075ca9235d16c16", - "size": 9583 + "sha256": "0c5e28422795bd016fc538b0b8b46e96f5ac793bddc51fd6bc9b3e2fbc56dc56", + "size": 10044 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-multiagent.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-multiagent.md", - "sha256": "bd1034335c0424df96c91d9e61c519a5e0e05a5031e8fc8a33f954665c1eabd2", - "size": 6875 + "sha256": "a9012e5692392d0a1300f84bf3afb8bde92a5fae3a1f090fc09f04c899b4ca34", + "size": 9628 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-onboarding.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-onboarding.md", - "sha256": "fa44c171a0c12104836f75f9abd51d3ea07c1e3b488f650755ebd12899a24732", - "size": 10352 + "sha256": "e11051c1510489221b88714f9199949fc62d4fc6636136b15be1277ec2034c0e", + "size": 10386 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-outcomes.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-outcomes.md", - "sha256": "bf195965dca27a07a996c66df16ccb62c745dd000039f1f364b8a4e75dd73b96", - "size": 6140 + "sha256": "26b317a6fd460b03977df261ec1d06637de96954fa36f82eb308d3a587eb2e07", + "size": 6674 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-overview.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-overview.md", - "sha256": "aa4d4659c5249122ca102d849cd175c1093de38010f878301e89c9a6824feaac", - "size": 11082 + "sha256": "95262c3be299685ed9331d766cb2ba4ac38c1ebbbfcd12bb90605ebacea51e5b", + "size": 11549 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-scheduled-deployments.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-scheduled-deployments.md", - "sha256": "63b7b4ca743cfe9a4b3d453dc104820e7ea2410fc18d8d52e6973c3196003ca2", - "size": 7082 + "sha256": "55c0c39694c2aa6a4d69ad6246736fff0d914129f83edf8cc421f580a2ceb1ef", + "size": 7640 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-self-hosted-sandboxes.md", @@ -10649,15 +10705,15 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-tools.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-tools.md", - "sha256": "faaec13061bbd9657653a8731fb727168dfe5fbcc3b53a7a964c49560ac94908", - "size": 19373 + "sha256": "756f28c7bf4305053acad581db244dcccd2abf51a9e3f553ad4c457ea3b9cb63", + "size": 20729 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/managed-agents-webhooks.md", "status": "success", "path": "github/skills/skills/claude-api/shared/managed-agents-webhooks.md", - "sha256": "b2f80f0155b1fe037abaa0ae22d8fd909dbe30a30131e82b18834667b61d0174", - "size": 6552 + "sha256": "fb56b6dc4a199c21e953d4743f4ca96a98d7490622cb0dfef1de01510a644b8a", + "size": 10431 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/model-migration.md", @@ -10698,8 +10754,8 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/shared/tool-use-concepts.md", "status": "success", "path": "github/skills/skills/claude-api/shared/tool-use-concepts.md", - "sha256": "dc2fe5f4e36a8ccfe6567f0c3349e991e58e65c5bf141263dda6395b648bce92", - "size": 25097 + "sha256": "07ae2aeb034ce2c61a818647ed1995b93aa3b67ea42c1765e7cc7146abfdf62c", + "size": 28675 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/typescript/claude-api/README.md", @@ -10733,15 +10789,15 @@ "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/typescript/claude-api/tool-use.md", "status": "success", "path": "github/skills/skills/claude-api/typescript/claude-api/tool-use.md", - "sha256": "1f7108408432767cf277090ef9e5b7b75b1fa04a8bcf62f8d48e9dc3dac28039", - "size": 16311 + "sha256": "c26f8e481e719c2fd6f98ac6724e1154c91b42a4f142a317ba2d27f42435ea6c", + "size": 19150 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/claude-api/typescript/managed-agents/README.md", "status": "success", "path": "github/skills/skills/claude-api/typescript/managed-agents/README.md", - "sha256": "ab1fe28ad2e1c2fe9938807d6e634ee3a1b0f35ecb32c0c755120a1908c543fc", - "size": 9565 + "sha256": "815ac1e82ebec3c13fbf77f99be65f6f36133c7fc78857f1961295d5b12260a5", + "size": 9830 }, { "url": "https://raw.githubusercontent.com/anthropics/skills/main/skills/doc-coauthoring/SKILL.md", @@ -11020,7 +11076,7 @@ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/.claude-plugin/marketplace.json", "status": "success", "path": "github/claude-plugins-official/.claude-plugin/marketplace.json", - "sha256": "76a13b065f2f495cc9ec82192a25262e1bbe9913253fbdf9ddb46c9d523c01fb", + "sha256": "64b111d8c1716c062a285ed63eade42f56e2e79ac95859a994d586f573a20e5e", "size": 158611 }, { @@ -14624,8 +14680,8 @@ ], "failures": [], "summary": { - "total": 2088, - "downloaded": 2088, + "total": 2096, + "downloaded": 2096, "skipped": 0, "failed": 0, "success_rate": 100.0 diff --git a/content/CHANGELOG.md b/content/CHANGELOG.md index d0eab90e4..7b4d63ae5 100644 --- a/content/CHANGELOG.md +++ b/content/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## 2.1.218 + +- Changed `/code-review` to run as a background subagent, so review work no longer fills your conversation and keeps stacked slash commands as its review target +- Added screen-reader announcements of deleted text for word and line deletions (`Option+Delete`, `Ctrl+W`, `Cmd+Backspace`, `Ctrl+U`, `Ctrl+K`) in `--ax-screen-reader` mode +- Fixed Windows paths with `\u`-prefixed segments (like `C:\Users\unicorn`) being corrupted into CJK characters in tool inputs, which made those files inaccessible +- Fixed the left arrow key discarding the conversation with no undo: presses right after editing now ask to confirm, and Esc in the agent view returns to the conversation it backgrounded +- Added HTTP status and error text to `claude mcp list` and `/mcp` when a server fails to connect, and a warning for MCP config values with hidden leading or trailing whitespace +- Fixed multi-line paste collapsing into one line with `j` in place of newlines in terminals that encode pasted newlines as Ctrl+J +- Fixed `/context` reporting stale pre-compact token usage after compacting from the message picker +- Fixed `/ultrareview` failing on descriptive arguments like "review my auth changes" — they now run a review of your current branch with the text applied as a note to the findings +- Fixed `/code-review ultra` silently running a local review in non-interactive sessions — it now launches the cloud review +- Fixed gateway spend metering to price Bedrock application-inference-profile ARNs and other config-mapped upstream model IDs at the configured model's rates +- Fixed mojibake when a long IDE selection was truncated mid-emoji, and a case where a tool executor error could be silently dropped +- Fixed an engine teardown race that could start and abandon a phantom turn, and made input pushed after close consistently rejected +- Fixed spurious "[Request interrupted by user]" messages after interrupted tool calls, and an unpaired `tool_use` block left in the transcript when a tool aborted mid-response +- Fixed VoiceOver reading "new line" instead of echoing the typed space at the end of the input in `--ax-screen-reader` mode +- Fixed plugin and settings panels not moving the terminal cursor to the focused row, so screen readers and magnifiers can follow arrow-key navigation +- Fixed crashes (maximum call stack exceeded) when a deeply nested watched directory tree was deleted or moved, and when rendering deeply nested UI trees +- Fixed pull request events occasionally being lost when a session exited immediately after creating or linking a PR +- Fixed the Bedrock setup wizard failing profile verification for assume-role profiles in partitioned AWS regions and on proxy-only networks +- Fixed rare negative or incorrect turn duration measurements after a system clock adjustment by timing turns with a monotonic clock +- Fixed the "N MCP servers need authentication" startup notice over-counting claude.ai connectors that aren't connected in claude.ai +- Fixed prompt history entries being dropped or duplicated when history writes raced or failed +- Fixed a retry loop that re-sent identical doomed requests after a context-overflow error with a large thinking budget; `Ctrl+B` backgrounding now applies the same background-shell caps as other paths +- Fixed agent frontmatter hooks running from untrusted folders: hooks now require the agent file's own folder to have accepted workspace trust +- Fixed fork-session lineage being lost after compaction in headless and SDK sessions +- Fixed a resumed session failing every turn, or crashing on resume, when its history held a malformed delta attachment +- Improved `/ultrareview` error feedback so Claude can correct an invalid argument instead of retrying it unchanged +- Improved auto mode: the dangerous-rm, background-`&`, and suspicious-Windows-path checks no longer open permission dialogs; the auto-mode classifier adjudicates them instead +- Improved sandbox command restrictions for IDE interactions +- Improved trust dialogs to name the repository root the grant covers +- Changed `/deep-research` to start only when invoked manually; Claude no longer launches it on its own +- Changed plan mode with auto to no longer prompt for Bash commands the static analyzer can't prove read-only; the auto-mode classifier judges them instead +- Added an announcement when fast mode changes as a result of switching models via `/config model=` or Remote Control +- Changed server-managed settings so benign feature and cost toggles no longer trigger the settings-approval prompt +- Changed agent markdown files to reject agent names containing `:`, which is reserved for plugin namespacing +- Changed skills with `context: fork` to run in the background by default; opt out per skill with `background: false` +- Added `yes`/`no`/`on`/`off`/`1`/`0` (case-insensitive) as accepted values for skill and plugin frontmatter booleans, alongside `true`/`false` +- Fixed remote sessions continuing to send heartbeats after their worker was replaced, which left long-lived desktop and IDE processes retrying a rejected request every few seconds forever + ## 2.1.217 - Added emoji shortcode autocomplete in the prompt input: type `:heart:` to insert ❤️, or `:hea` for suggestions — disable with the `emojiCompletionEnabled` setting diff --git a/content/claude-code-manifest.json b/content/claude-code-manifest.json index b05f59aad..66877100f 100644 --- a/content/claude-code-manifest.json +++ b/content/claude-code-manifest.json @@ -1,12 +1,12 @@ { "name": "@anthropic-ai/claude-code", - "version": "2.1.217", + "version": "2.1.218", "author": { "name": "Anthropic", "email": "support@anthropic.com" }, "license": "SEE LICENSE IN README.md", - "_id": "@anthropic-ai/claude-code@2.1.217", + "_id": "@anthropic-ai/claude-code@2.1.218", "maintainers": [ { "name": "zak-anthropic", @@ -69,20 +69,20 @@ "claude": "bin/claude.exe" }, "dist": { - "shasum": "54b77f547936a6a2d39599521366dc5f0e5ccbec", - "tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.217.tgz", + "shasum": "018479d04265ca1b03b87060ca459d14419fac1f", + "tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.218.tgz", "fileCount": 7, - "integrity": "sha512-EIcc3GmI7x+qPlKCjpcLIjCh7YOaCFbOqKfL4BmwZS6QmtduVNT5E98oyr8n2cxsgeWVbnQ0mSVljTw5C/kFtA==", + "integrity": "sha512-BHV951ruIa6QXaZFDF1wRhwxAOkAiafB2AOWG6wGRUJ4apaJ9mlzp1BFLAhGfG0SknwAyqBenqeT6nit6at4uQ==", "signatures": [ { - "sig": "MEQCIDZyT1ZQyS+UmDvjkU2P2K1zB++6d8XLjSSz26d3H6zcAiAQz+zQTB/zTzuNBYxzuW9QsfnPD04pORZXst0kMy/wFw==", + "sig": "MEQCIBXHx44miNa0xlUeRM5+8GnFXTvtg9FIQdXkjqUPY5HzAiAyVpAtVg4pDl8DogLyIQgAJtMP5l1lFIdU/8eBvswJMg==", "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U" } ], - "unpackedSize": 165315 + "unpackedSize": 165478 }, "type": "module", - "_from": "file:staged-npm/anthropic-ai-claude-code-2.1.217.tgz", + "_from": "file:staged-npm/anthropic-ai-claude-code-2.1.218.tgz", "engines": { "node": ">=22.0.0" }, @@ -94,8 +94,8 @@ "name": "wolffiex", "email": "wolffiex@anthropic.com" }, - "_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.217.tgz", - "_integrity": "sha512-EIcc3GmI7x+qPlKCjpcLIjCh7YOaCFbOqKfL4BmwZS6QmtduVNT5E98oyr8n2cxsgeWVbnQ0mSVljTw5C/kFtA==", + "_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.218.tgz", + "_integrity": "sha512-BHV951ruIa6QXaZFDF1wRhwxAOkAiafB2AOWG6wGRUJ4apaJ9mlzp1BFLAhGfG0SknwAyqBenqeT6nit6at4uQ==", "_npmVersion": "11.16.0", "description": "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.", "directories": {}, @@ -104,17 +104,17 @@ "_hasShrinkwrap": false, "readmeFilename": "README.md", "optionalDependencies": { - "@anthropic-ai/claude-code-linux-x64": "2.1.217", - "@anthropic-ai/claude-code-win32-x64": "2.1.217", - "@anthropic-ai/claude-code-darwin-x64": "2.1.217", - "@anthropic-ai/claude-code-linux-arm64": "2.1.217", - "@anthropic-ai/claude-code-win32-arm64": "2.1.217", - "@anthropic-ai/claude-code-darwin-arm64": "2.1.217", - "@anthropic-ai/claude-code-linux-x64-musl": "2.1.217", - "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.217" + "@anthropic-ai/claude-code-linux-x64": "2.1.218", + "@anthropic-ai/claude-code-win32-x64": "2.1.218", + "@anthropic-ai/claude-code-darwin-x64": "2.1.218", + "@anthropic-ai/claude-code-linux-arm64": "2.1.218", + "@anthropic-ai/claude-code-win32-arm64": "2.1.218", + "@anthropic-ai/claude-code-darwin-arm64": "2.1.218", + "@anthropic-ai/claude-code-linux-x64-musl": "2.1.218", + "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.218" }, "_npmOperationalInternal": { - "tmp": "tmp/claude-code_2.1.217_1784663738795_0.022419413634853447", + "tmp": "tmp/claude-code_2.1.218_1784750131986_0.5945423694454417", "host": "s3://npm-registry-packages-npm-production" } } \ No newline at end of file diff --git a/content/en/about-claude/models/choosing-a-model.md b/content/en/about-claude/models/choosing-a-model.md index 64ae21e5f..ed0c99b92 100644 --- a/content/en/about-claude/models/choosing-a-model.md +++ b/content/en/about-claude/models/choosing-a-model.md @@ -58,7 +58,7 @@ This approach is best for: The [effort parameter](/docs/en/build-with-claude/effort) defaults to `high` on Claude Opus 4.8 across all surfaces, including Claude Code and the Messages API. Use `xhigh` for coding, high-autonomy work, and the most intelligence-demanding tasks. -**Claude Fable 5** (`claude-fable-5`) is Anthropic's most capable widely released model, delivering next-generation intelligence for long-running agents. **Claude Mythos 5** (`claude-mythos-5`) is available through [Project Glasswing](https://anthropic.com/glasswing). Both models support a 1M token context window by default, up to 128k output tokens, and always-on [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). See [Introducing Claude Fable 5 and Claude Mythos 5](/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) for launch details. +**Claude Fable 5** (`claude-fable-5`) is Anthropic's most capable widely released model, delivering next-generation intelligence for long-running agents. **Claude Mythos 5** (`claude-mythos-5`) is available through [Project Glasswing](https://anthropic.com/glasswing). Both models support a 1M token context window by default, up to 128k output tokens, and always-on [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). See [Introducing Claude Fable 5 and Claude Mythos 5](/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) for launch details. Claude Fable 5 and Claude Mythos 5 are priced at $10 per million input tokens and $50 per million output tokens. diff --git a/content/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5.md b/content/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5.md index de8fb94dc..8b0e8c434 100644 --- a/content/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5.md +++ b/content/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5.md @@ -69,7 +69,7 @@ Claude Fable 5 responds to the same prompting techniques as other Claude models, ### Adaptive thinking is always on -[Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is the only thinking mode on Claude Fable 5 and Claude Mythos 5. It applies whenever the `thinking` parameter is unset. `thinking: {"type": "disabled"}` is not supported. Use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. +[Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is the only thinking mode on Claude Fable 5 and Claude Mythos 5. It applies whenever the `thinking` parameter is unset. `thinking: {"type": "disabled"}` is not supported. Use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. ### Raw thinking content is never returned @@ -78,7 +78,7 @@ The raw chain of thought is never returned on Claude Fable 5 and Claude Mythos 5 * `"summarized"` returns thinking blocks with a readable summary of the reasoning. * `"omitted"` (the default) returns thinking blocks with an empty `thinking` field. -Pass thinking blocks back unchanged in multi-turn conversations on the same model. See [thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5) for cross-model handling. +Pass thinking blocks back unchanged in multi-turn conversations on the same model. See [thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5) for cross-model handling. ## Supported features @@ -111,7 +111,7 @@ Step-by-step instructions live in the migration guide: Specs and comparison for all current Claude models. - + The only thinking mode on Claude Fable 5 and Claude Mythos 5. diff --git a/content/en/about-claude/models/migration-guide.md b/content/en/about-claude/models/migration-guide.md index 9946a2501..0d772f2ea 100644 --- a/content/en/about-claude/models/migration-guide.md +++ b/content/en/about-claude/models/migration-guide.md @@ -24,7 +24,7 @@ Guide for migrating to the latest Claude models from previous Claude versions The baseline settings for `claude-mythos-5`: -* **Thinking:** [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is always on. The model determines when and how much to think on each request, and no `thinking` configuration is required. Both `thinking: {type: "disabled"}` and manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) return a 400 error. +* **Thinking:** [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is always on. The model determines when and how much to think on each request, and no `thinking` configuration is required. Both `thinking: {type: "disabled"}` and manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) return a 400 error. * **Prefill:** Prefilling the assistant message returns a 400 error. Use system prompt instructions instead. * **Data retention:** Claude Mythos 5 requires 30-day data retention and is not available under zero data retention (ZDR) arrangements; it is designated a Covered Model. See [Model-specific data retention requirements](/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements). @@ -45,7 +45,7 @@ model = "claude-mythos-5" # After #### Features not available on Claude Mythos 5 -1. **Extended thinking and thinking token budgets:** Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported on `claude-mythos-5` and returns a 400 error. [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is always on: the model determines when and how much to think on each request, and no `thinking` configuration is required. `thinking: {type: "disabled"}` returns an error. `budget_tokens` has no direct replacement: thinking is adaptive, and the [effort parameter](/docs/en/build-with-claude/effort) is a separate output-level control, not a thinking budget. +1. **Extended thinking and thinking token budgets:** Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported on `claude-mythos-5` and returns a 400 error. [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is always on: the model determines when and how much to think on each request, and no `thinking` configuration is required. `thinking: {type: "disabled"}` returns an error. `budget_tokens` has no direct replacement: thinking is adaptive, and the [effort parameter](/docs/en/build-with-claude/effort) is a separate output-level control, not a thinking budget. Before (Claude Mythos Preview): @@ -296,7 +296,7 @@ model = "claude-mythos-5" # After 2. **Assistant prefill:** Prefilling the assistant message is not supported on `claude-mythos-5` and returns a 400 error, the same as on Claude Mythos Preview. Use system prompt instructions instead. -3. **Thinking output:** On `claude-mythos-5`, the raw chain of thought is never returned, but thinking blocks still carry readable summarized text when `thinking.display` is set to `summarized`. Pass thinking blocks back unchanged when continuing a conversation on the same model. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). +3. **Thinking output:** On `claude-mythos-5`, the raw chain of thought is never returned, but thinking blocks still carry readable summarized text when `thinking.display` is set to `summarized`. Pass thinking blocks back unchanged when continuing a conversation on the same model. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). #### Token counting and billing @@ -310,7 +310,7 @@ model = "claude-mythos-5" # After * Remove manual extended thinking configuration (`thinking: {type: "enabled", budget_tokens: N}`). Adaptive thinking is always on, and no `thinking` field is required. * Remove any `thinking: {type: "disabled"}` configuration. Disabling thinking returns an error on `claude-mythos-5`. * Remove `budget_tokens`. It has no direct replacement: thinking is adaptive, and the `effort` parameter is a separate output-level control, not a thinking budget. -* Verify any code that parses the `thinking` field treats it as display text only and passes thinking blocks back unchanged when continuing on the same model. `thinking.display` defaults to `"omitted"` on `claude-mythos-5`, the same as on Claude Mythos Preview; set `display: "summarized"` to receive readable summaries. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). +* Verify any code that parses the `thinking` field treats it as display text only and passes thinking blocks back unchanged when continuing on the same model. `thinking.display` defaults to `"omitted"` on `claude-mythos-5`, the same as on Claude Mythos Preview; set `display: "summarized"` to receive readable summaries. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). * If you replay conversation history on another model, strip `thinking` and `redacted_thinking` blocks from prior assistant turns first. Thinking blocks from `claude-mythos-5` are tied to the model that produced them, and models other than Claude Fable 5 and Claude Mythos 5 silently ignore them. Stripping keeps cross-model requests minimal and uniform. * Re-baseline token counts and costs on your own workloads. Token counts are roughly unchanged when migrating from `claude-mythos-preview`. @@ -320,7 +320,7 @@ model = "claude-mythos-5" # After Migration is mostly drop-in. Claude Fable 5 uses the same [Messages API](/docs/en/build-with-claude/working-with-messages) and the same [tool use](/docs/en/agents-and-tools/tool-use/overview) patterns as Claude Opus 4.8. It supports the same [1M token context window](/docs/en/build-with-claude/context-windows) by default and the same [128k max output tokens](/docs/en/about-claude/models/overview). Token counts are roughly unchanged because both models use the same tokenizer. -The key changes to check are always-on [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), thinking output, safety classifier refusals, and pricing. [Before you migrate](#before-you-migrate) covers pricing and data retention; [What changed](#what-changed) covers the rest. +The key changes to check are always-on [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), thinking output, safety classifier refusals, and pricing. [Before you migrate](#before-you-migrate) covers pricing and data retention; [What changed](#what-changed) covers the rest. ### Before you migrate @@ -345,9 +345,9 @@ model = "claude-fable-5" # After The items in this section describe the API and behavior differences worth checking after you swap the model ID. -1. **Adaptive thinking is always on:** [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is the only thinking mode on `claude-fable-5`. The model determines when and how much to think on each request, and no `thinking` configuration is required. `thinking: {type: "disabled"}` returns an error. Use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. +1. **Adaptive thinking is always on:** [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is the only thinking mode on `claude-fable-5`. The model determines when and how much to think on each request, and no `thinking` configuration is required. `thinking: {type: "disabled"}` returns an error. Use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. - The behavior change to check: on Claude Opus 4.8, requests without a `thinking` field run without thinking; on `claude-fable-5`, those same requests run with adaptive thinking. `max_tokens` remains a hard limit on total output, thinking plus response text, so revisit it for workloads that ran without thinking on Claude Opus 4.8. See [Cost control](/docs/en/build-with-claude/adaptive-thinking#cost-control). + The behavior change to check: on Claude Opus 4.8, requests without a `thinking` field run without thinking; on `claude-fable-5`, those same requests run with adaptive thinking. `max_tokens` remains a hard limit on total output, thinking plus response text, so revisit it for workloads that ran without thinking on Claude Opus 4.8. See [Cost control](/docs/en/build-with-claude/thinking-steering-and-cost#cost-control). Before (Claude Opus 4.8): @@ -635,7 +635,7 @@ The items in this section describe the API and behavior differences worth checki 3. **Assistant prefill (unchanged):** Prefilling the assistant message is not supported on `claude-fable-5` and returns a 400 error, the same as on Claude Opus 4.8. Use system prompt instructions instead. -4. **Thinking output:** On `claude-fable-5`, the raw chain of thought is never returned, but thinking blocks still carry readable summarized text when `thinking.display` is set to `summarized`. Pass thinking blocks back unchanged when continuing a conversation on the same model. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). +4. **Thinking output:** On `claude-fable-5`, the raw chain of thought is never returned, but thinking blocks still carry readable summarized text when `thinking.display` is set to `summarized`. Pass thinking blocks back unchanged when continuing a conversation on the same model. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). 5. **Safety classifiers and the `refusal` stop reason:** `claude-fable-5` runs safety classifiers on requests and during response generation. When a classifier declines a request, the Messages API returns `stop_reason: "refusal"` as a successful HTTP 200 response, not an error. The `stop_details.category` field reports which classifier fired, with categories such as `"cyber"`, `"bio"`, and `"reasoning_extraction"`, or `null` when the refusal maps to no named category. See the [refusal category table](/docs/en/build-with-claude/refusals-and-fallback#refusal-response) for the full set. @@ -653,7 +653,7 @@ The items in this section describe the API and behavior differences worth checki * Update the model name from `claude-opus-4-8` to `claude-fable-5`. * Remove any `thinking: {type: "disabled"}` configuration. Disabling thinking returns an error on `claude-fable-5`, and requests without a `thinking` field run with adaptive thinking. * If you removed manual extended thinking and assistant prefills during earlier migrations, no action is needed: both remain unsupported on `claude-fable-5`. -* Verify any code that parses the `thinking` field treats it as display text only and passes thinking blocks back unchanged when continuing on the same model. `thinking.display` defaults to `"omitted"` on `claude-fable-5`, the same as on Claude Opus 4.8; set `display: "summarized"` to receive readable summaries. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). +* Verify any code that parses the `thinking` field treats it as display text only and passes thinking blocks back unchanged when continuing on the same model. `thinking.display` defaults to `"omitted"` on `claude-fable-5`, the same as on Claude Opus 4.8; set `display: "summarized"` to receive readable summaries. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). * If you replay conversation history on another model, strip `thinking` and `redacted_thinking` blocks from prior assistant turns first. Thinking blocks from `claude-fable-5` are tied to the model that produced them, and models other than Claude Fable 5 and Claude Mythos 5 silently ignore them. Stripping keeps cross-model requests minimal and uniform. The exception is redeeming a [fallback credit](/docs/en/build-with-claude/fallback-credit), which requires the request body echoed under that feature's exact rules. * Handle `stop_reason: "refusal"` and read the `stop_details.category` field. To re-run refused requests on another model automatically, consider the opt-in `fallbacks` parameter (beta). See [Refusals and fallback](/docs/en/build-with-claude/refusals-and-fallback). * Re-evaluate your `effort` setting. Start at `high` for most tasks, including workloads that ran at `xhigh` on Claude Opus 4.8. @@ -664,7 +664,7 @@ The items in this section describe the API and behavior differences worth checki Claude Opus 4.8 is built for complex agentic coding and enterprise work. These are the baseline settings for `claude-opus-4-8`. The following sub-sections cover the specific changes to make from each earlier Opus model. * **Pricing:** see [Claude pricing](/docs/en/about-claude/pricing). -* **Thinking:** [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`) is the supported thinking mode and is off by default: requests with no `thinking` field run without thinking. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) returns a 400 error. +* **Thinking:** [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`thinking: {type: "adaptive"}`) is the supported thinking mode and is off by default: requests with no `thinking` field run without thinking. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) returns a 400 error. * **Effort:** The [effort parameter](/docs/en/build-with-claude/effort) defaults to `high` across all surfaces. For coding and high-autonomy work, set `xhigh` explicitly. * **Sampling parameters:** `temperature`, `top_p`, and `top_k` set to a non-default value return a 400 error. Omit them and use prompting to guide the model's behavior. * **Prefill:** Prefilling the assistant message returns a 400 error. Use [structured outputs](/docs/en/build-with-claude/structured-outputs) or `output_config.format` instead. @@ -676,7 +676,7 @@ Claude Opus 4.8 also supports [prompt caching](/docs/en/build-with-claude/prompt Claude Opus 4.8 builds on Claude Opus 4.7. -Claude Opus 4.8 should have strong out-of-the-box performance on existing Claude Opus 4.7 prompts and evals. There are no breaking API changes for code already running on Claude Opus 4.7. It supports the same set of features as Claude Opus 4.7, including the [1M token context window](/docs/en/build-with-claude/context-windows), [128k max output tokens](/docs/en/about-claude/models/overview), [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), [prompt caching](/docs/en/build-with-claude/prompt-caching), [batch processing](/docs/en/build-with-claude/batch-processing), the [Files API](/docs/en/build-with-claude/files), [PDF support](/docs/en/build-with-claude/pdf-support), [vision](/docs/en/build-with-claude/vision), and the full set of server-side and client-side [tools](/docs/en/agents-and-tools/tool-use/overview). It also adds [mid-conversation system messages](/docs/en/about-claude/models/whats-new-claude-4-8#mid-conversation-system-messages) and publicly documents [refusal stop details](/docs/en/about-claude/models/whats-new-claude-4-8#refusal-stop-details). +Claude Opus 4.8 should have strong out-of-the-box performance on existing Claude Opus 4.7 prompts and evals. There are no breaking API changes for code already running on Claude Opus 4.7. It supports the same set of features as Claude Opus 4.7, including the [1M token context window](/docs/en/build-with-claude/context-windows), [128k max output tokens](/docs/en/about-claude/models/overview), [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), [prompt caching](/docs/en/build-with-claude/prompt-caching), [batch processing](/docs/en/build-with-claude/batch-processing), the [Files API](/docs/en/build-with-claude/files), [PDF support](/docs/en/build-with-claude/pdf-support), [vision](/docs/en/build-with-claude/vision), and the full set of server-side and client-side [tools](/docs/en/agents-and-tools/tool-use/overview). It also adds [mid-conversation system messages](/docs/en/about-claude/models/whats-new-claude-4-8#mid-conversation-system-messages) and publicly documents [refusal stop details](/docs/en/about-claude/models/whats-new-claude-4-8#refusal-stop-details). If your code is on Claude Opus 4.6 or earlier, use [Migrating to Claude Opus 4.8 from Claude Opus 4.6](#migrating-from-claude-opus-46) or [Migrating to Claude Opus 4.8 from Claude Opus 4.5 or earlier](#migrating-from-claude-opus-45) instead. Those sections include breaking changes (sampling parameters rejected, manual extended thinking rejected, new tokenizer) that the upgrade from Claude Opus 4.7 alone does not cover. @@ -692,7 +692,7 @@ model = "claude-opus-4-8" # After #### What changed -These are not breaking changes. Code that runs on Claude Opus 4.7 continues to work unchanged on Claude Opus 4.8. The items below describe behavior differences worth checking after you swap the model ID. +These are not breaking changes. Code that runs on Claude Opus 4.7 continues to work unchanged on Claude Opus 4.8. The following items describe behavior differences worth checking after you swap the model ID. 1. **Sampling parameters (unchanged):** Setting `temperature`, `top_p`, or `top_k` to a non-default value returns a 400 error on Claude Opus 4.8, the same as on Claude Opus 4.7. The SDK request types still define these fields for compatibility with earlier models, so code that sets them type-checks, but the API rejects the request server-side. If you removed these parameters when migrating to Opus 4.7, no further changes are needed. @@ -724,7 +724,7 @@ Claude Opus 4.8 should have strong out-of-the-box performance on existing Claude * [1M token context window](/docs/en/build-with-claude/context-windows) at standard API pricing with no long-context premium * [128k max output tokens](/docs/en/about-claude/models/overview) -* [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) +* [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) * [Prompt caching](/docs/en/build-with-claude/prompt-caching) * [Batch processing](/docs/en/build-with-claude/batch-processing) * [Files API](/docs/en/build-with-claude/files) @@ -742,7 +742,7 @@ model = "claude-opus-4-8" # After #### Breaking changes -1. **Extended thinking removed:** `thinking: {type: "enabled", budget_tokens: N}` is no longer supported on Claude Opus 4.7 or later models and returns a 400 error. Switch to [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`) and use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. Adaptive thinking is **off by default** on Claude Opus 4.7: requests with no `thinking` field run without thinking, matching Opus 4.6 behavior. Set `thinking: {type: "adaptive"}` explicitly to enable it. +1. **Extended thinking removed:** `thinking: {type: "enabled", budget_tokens: N}` is no longer supported on Claude Opus 4.7 or later models and returns a 400 error. Switch to [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`thinking: {type: "adaptive"}`) and use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. Adaptive thinking is **off by default** on Claude Opus 4.7: requests with no `thinking` field run without thinking, matching Opus 4.6 behavior. Set `thinking: {type: "adaptive"}` explicitly to enable it. Before (Claude Opus 4.6): @@ -1076,7 +1076,7 @@ model = "claude-opus-4-8" # After ``` - The default is `"omitted"` on Claude Opus 4.7. If your product streams reasoning to users, the new default appears as a long pause before output begins; set `display: "summarized"` to restore visible progress during thinking. See [Extended thinking](/docs/en/build-with-claude/extended-thinking#controlling-thinking-display) for details. + The default is `"omitted"` on Claude Opus 4.7. If your product streams reasoning to users, the new default appears as a long pause before output begins; set `display: "summarized"` to restore visible progress during thinking. See [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display) for details. 4. **Updated token counting:** Claude Opus 4.7 uses a new tokenizer, contributing to its improved performance on a wide range of tasks. The new tokenizer may use roughly 1x to 1.35x as many tokens when processing text compared to previous models (up to \~35% more, varying by content). @@ -1239,7 +1239,7 @@ These are not required but will improve your experience: * Re-test any client-side token-count estimations. * If your application sends images, re-budget for [high-resolution image support](/docs/en/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7) (up to approximately 3x more image tokens per full-resolution image). Downsample before sending if you do not need the additional fidelity. * If you consume pointing or bounding-box coordinates from the model, remove any scale-factor conversion; coordinates are 1:1 with actual image pixels on Claude Opus 4.7. -* Review prompts for the behavior changes above (response length, literalism, tone, progress updates, subagents, effort calibration, tool triggering, cyber safeguards, high-resolution image handling). +* Review prompts for the behavior changes (response length, literalism, tone, progress updates, subagents, effort calibration, tool triggering, cyber safeguards, high-resolution image handling). * Re-baseline response length with existing length-control prompts removed, then tune explicitly. * If using `xhigh` or `max` effort, raise `max_tokens` to at least 64k as a starting point. * Consider adopting task budgets (beta) for agentic workflows. @@ -1267,7 +1267,7 @@ model = "claude-opus-4-8" # After These changes improve your experience on Claude Opus 4.7 and later models. Items marked **(required on Opus 4.7)** were optional recommendations when Opus 4.6 launched but are now mandatory; the rest remain recommended. -1. **Migrate to adaptive thinking (required on Opus 4.7):** `thinking: {type: "enabled", budget_tokens: N}` returns a 400 error on Claude Opus 4.7. Switch to `thinking: {type: "adaptive"}` and use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. See [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). +1. **Migrate to adaptive thinking (required on Opus 4.7):** `thinking: {type: "enabled", budget_tokens: N}` returns a 400 error on Claude Opus 4.7. Switch to `thinking: {type: "adaptive"}` and use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. See [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). ```bash cURL @@ -1812,7 +1812,7 @@ model = "claude-opus-4-8" # After Claude Sonnet 5 offers the best combination of speed and intelligence in the Claude model family. It builds on Claude Sonnet 4.6. -Claude Sonnet 5 is a drop-in upgrade for Claude Sonnet 4.6. Introductory pricing of $2/$10 USD per million input/output tokens is in effect through August 31, 2026, after which the standard pricing of $3/$15 USD per million input/output tokens will take effect; see [Pricing](/docs/en/about-claude/pricing#claude-sonnet-5-introductory-pricing) for details. There are two breaking API changes for code already running on Claude Sonnet 4.6: manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) and sampling parameters (`temperature`, `top_p`, `top_k`) set to non-default values are no longer accepted and return a 400 error. Use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with the [effort parameter](/docs/en/build-with-claude/effort) instead. Claude Sonnet 5 supports the same set of features as Claude Sonnet 4.6, including the [1M token context window](/docs/en/build-with-claude/context-windows), [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), [prompt caching](/docs/en/build-with-claude/prompt-caching), [batch processing](/docs/en/build-with-claude/batch-processing), the [Files API](/docs/en/build-with-claude/files), [PDF support](/docs/en/build-with-claude/pdf-support), [vision](/docs/en/build-with-claude/vision), and the full set of server-side and client-side [tools](/docs/en/agents-and-tools/tool-use/overview). [Priority Tier](/docs/en/api/service-tiers#supported-models) is not available on Claude Sonnet 5. Claude Sonnet 5 also uses a new tokenizer. +Claude Sonnet 5 is a drop-in upgrade for Claude Sonnet 4.6. Introductory pricing of $2/$10 USD per million input/output tokens is in effect through August 31, 2026, after which the standard pricing of $3/$15 USD per million input/output tokens will take effect; see [Pricing](/docs/en/about-claude/pricing#claude-sonnet-5-introductory-pricing) for details. There are two breaking API changes for code already running on Claude Sonnet 4.6: manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) and sampling parameters (`temperature`, `top_p`, `top_k`) set to non-default values are no longer accepted and return a 400 error. Use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) with the [effort parameter](/docs/en/build-with-claude/effort) instead. Claude Sonnet 5 supports the same set of features as Claude Sonnet 4.6, including the [1M token context window](/docs/en/build-with-claude/context-windows), [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), [prompt caching](/docs/en/build-with-claude/prompt-caching), [batch processing](/docs/en/build-with-claude/batch-processing), the [Files API](/docs/en/build-with-claude/files), [PDF support](/docs/en/build-with-claude/pdf-support), [vision](/docs/en/build-with-claude/vision), and the full set of server-side and client-side [tools](/docs/en/agents-and-tools/tool-use/overview). [Priority Tier](/docs/en/api/service-tiers#supported-models) is not available on Claude Sonnet 5. Claude Sonnet 5 also uses a new tokenizer. ### Migrating to Claude Sonnet 5 from Claude Sonnet 4.6 @@ -1838,12 +1838,12 @@ Items 4 and 5 in the following list are breaking changes. `max_tokens` remains a 3. **Assistant message prefilling (unchanged):** Prefilling the assistant message returns a `400` error on Claude Sonnet 5, the same as on Claude Sonnet 4.6. If you removed prefill when migrating to Claude Sonnet 4.6, no further changes are needed. Use [structured outputs](/docs/en/build-with-claude/structured-outputs), system prompt instructions, or `output_config.format` instead. -4. **Adaptive thinking on by default:** On Claude Sonnet 4.6, requests without a `thinking` field run without thinking; on Claude Sonnet 5, the same requests run with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). To turn thinking off, pass `thinking: {type: "disabled"}`. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported and returns a 400 error. Use the [effort parameter](/docs/en/build-with-claude/effort) (default `high`) to control thinking depth. +4. **Adaptive thinking on by default:** On Claude Sonnet 4.6, requests without a `thinking` field run without thinking; on Claude Sonnet 5, the same requests run with [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). To turn thinking off, pass `thinking: {type: "disabled"}`. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported and returns a 400 error. Use the [effort parameter](/docs/en/build-with-claude/effort) (default `high`) to control thinking depth. - Adaptive thinking is on by default for Claude Sonnet 5. The `thinking` field is shown explicitly here to set `display: "summarized"`; if you omit `thinking`, Claude Sonnet 5 omits thinking content from the response by default. For per-model defaults, see [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). + Adaptive thinking is on by default for Claude Sonnet 5. The `thinking` field is shown explicitly here to set `display: "summarized"`; if you omit `thinking`, Claude Sonnet 5 omits thinking content from the response by default. For per-model defaults, see [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). @@ -2437,7 +2437,7 @@ For a complete overview of capabilities, see the [models overview](/docs/en/abou Extended thinking impacts [prompt caching](/docs/en/build-with-claude/prompt-caching#caching-with-thinking-blocks) efficiency. - Extended thinking is deprecated in Claude 4.6 models and removed in Claude Opus 4.7. If using newer models, use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) instead. + Extended thinking is deprecated in Claude 4.6 models and removed in Claude Opus 4.7. If using newer models, use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) instead. ### Migrating to Claude Haiku 4.5 from Claude Haiku 3.5 or earlier diff --git a/content/en/about-claude/models/overview.md b/content/en/about-claude/models/overview.md index 7d74e6ef7..9783668e7 100644 --- a/content/en/about-claude/models/overview.md +++ b/content/en/about-claude/models/overview.md @@ -20,21 +20,21 @@ Claude Fable 5 is generally available on the Claude API, Amazon Bedrock, Claude ### Latest models comparison -| Feature | Claude Fable 5 | Claude Opus 4.8 | Claude Sonnet 5 | Claude Haiku 4.5 | -| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -| **Description** | Next-generation intelligence for long-running agents | For complex agentic coding and enterprise work | The best combination of speed and intelligence | The fastest model with near-frontier intelligence | -| **Claude API ID** | claude-fable-5 | claude-opus-4-8 | claude-sonnet-5 | claude-haiku-4-5-20251001 | -| **Claude API alias** | claude-fable-5 | claude-opus-4-8 | claude-sonnet-5 | claude-haiku-4-5 | -| **AWS Bedrock ID** | anthropic.claude-fable-53 | anthropic.claude-opus-4-83 | anthropic.claude-sonnet-53 | anthropic.claude-haiku-4-5-20251001-v1:0 | -| **Google Cloud ID** | claude-fable-5 | claude-opus-4-8 | claude-sonnet-5 | claude-haiku-4-5\@20251001 | -| **Pricing**1 | $10 / input MTok $50 / output MTok | $5 / input MTok $25 / output MTok | $3 / input MTok $15 / output MTok4 | $1 / input MTok $5 / output MTok | -| **[Extended thinking](/docs/en/build-with-claude/extended-thinking)** | No | No | No | Yes | -| **[Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking)** | Yes (always on) | Yes | Yes | No | -| **Comparative latency** | Slower | Moderate | Fast | Fastest | -| **Context window** | 1M tokens | 1M tokens | 1M tokens | 200k tokens | -| **Max output** | 128k tokens | 128k tokens | 128k tokens | 64k tokens | -| **Reliable knowledge cutoff** | Jan 20262 | Jan 20262 | Jan 20262 | Feb 2025 | -| **Training data cutoff** | Jan 2026 | Jan 2026 | Jan 2026 | Jul 2025 | +| Feature | Claude Fable 5 | Claude Opus 4.8 | Claude Sonnet 5 | Claude Haiku 4.5 | +| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | +| **Description** | Next-generation intelligence for long-running agents | For complex agentic coding and enterprise work | The best combination of speed and intelligence | The fastest model with near-frontier intelligence | +| **Claude API ID** | claude-fable-5 | claude-opus-4-8 | claude-sonnet-5 | claude-haiku-4-5-20251001 | +| **Claude API alias** | claude-fable-5 | claude-opus-4-8 | claude-sonnet-5 | claude-haiku-4-5 | +| **AWS Bedrock ID** | anthropic.claude-fable-53 | anthropic.claude-opus-4-83 | anthropic.claude-sonnet-53 | anthropic.claude-haiku-4-5-20251001-v1:0 | +| **Google Cloud ID** | claude-fable-5 | claude-opus-4-8 | claude-sonnet-5 | claude-haiku-4-5\@20251001 | +| **Pricing**1 | $10 / input MTok $50 / output MTok | $5 / input MTok $25 / output MTok | $3 / input MTok $15 / output MTok4 | $1 / input MTok $5 / output MTok | +| **[Extended thinking (`thinking.type: "enabled"`)](/docs/en/build-with-claude/extended-thinking)** | No | No | No | Yes | +| **[Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost)** | Yes (always on) | Yes | Yes | No | +| **Comparative latency** | Slower | Moderate | Fast | Fastest | +| **Context window** | 1M tokens | 1M tokens | 1M tokens | 200k tokens | +| **Max output** | 128k tokens | 128k tokens | 128k tokens | 64k tokens | +| **Reliable knowledge cutoff** | Jan 20262 | Jan 20262 | Jan 20262 | Feb 2025 | +| **Training data cutoff** | Jan 2026 | Jan 2026 | Jan 2026 | Jul 2025 | *1 - See [Pricing](/docs/en/about-claude/pricing) for complete pricing information including Batch API discounts and prompt caching rates.* @@ -111,27 +111,27 @@ Claude Fable 5 is generally available on the Claude API, Amazon Bedrock, Claude - The Max output values above apply to the synchronous Messages API. On the [Message Batches API](/docs/en/build-with-claude/batch-processing#extended-output-beta), Claude Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 5, and Sonnet 4.6 support up to 300k output tokens by using the `output-300k-2026-03-24` beta header. + The Max output values in the table apply to the synchronous Messages API. On the [Message Batches API](/docs/en/build-with-claude/batch-processing#extended-output-beta), Claude Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 5, and Sonnet 4.6 support up to 300k output tokens by using the `output-300k-2026-03-24` beta header. The following models are still available. Consider migrating to current models for improved performance: - | Feature | Claude Opus 4.7 | Claude Opus 4.6 | Claude Sonnet 4.6 | Claude Sonnet 4.5 | Claude Opus 4.5 | Claude Opus 4.1 (deprecated) | - | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | - | **Claude API ID** | claude-opus-4-7 | claude-opus-4-6 | claude-sonnet-4-6 | claude-sonnet-4-5-20250929 | claude-opus-4-5-20251101 | claude-opus-4-1-20250805 | - | **Claude API alias** | claude-opus-4-7 | claude-opus-4-6 | claude-sonnet-4-6 | claude-sonnet-4-5 | claude-opus-4-5 | claude-opus-4-1 | - | **AWS Bedrock ID** | anthropic.claude-opus-4-76 | anthropic.claude-opus-4-6-v1 | anthropic.claude-sonnet-4-6 | anthropic.claude-sonnet-4-5-20250929-v1:0 | anthropic.claude-opus-4-5-20251101-v1:0 | anthropic.claude-opus-4-1-20250805-v1:0 | - | **Google Cloud ID** | claude-opus-4-7 | claude-opus-4-6 | claude-sonnet-4-6 | claude-sonnet-4-5\@20250929 | claude-opus-4-5\@20251101 | claude-opus-4-1\@20250805 | - | **Pricing** | $5 / input MTok $25 / output MTok | $5 / input MTok $25 / output MTok | $3 / input MTok $15 / output MTok | $3 / input MTok $15 / output MTok | $5 / input MTok $25 / output MTok | $15 / input MTok $75 / output MTok | - | **[Extended thinking](/docs/en/build-with-claude/extended-thinking)** | No | Yes | Yes | Yes | Yes | Yes | - | **[Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking)** | Yes | Yes | Yes | No | No | No | - | **Comparative latency** | Moderate | Moderate | Fast | Fast | Moderate | Moderate | - | **Context window** | 1M tokens | 1M tokens | 1M tokens | 200k tokens | 200k tokens | 200k tokens | - | **Max output** | 128k tokens | 128k tokens | 128k tokens | 64k tokens | 64k tokens | 32k tokens | - | **Reliable knowledge cutoff** | Jan 20265 | May 20255 | Aug 20255 | Jan 20255 | May 20255 | Jan 20255 | - | **Training data cutoff** | Jan 2026 | Aug 2025 | Jan 2026 | Jul 2025 | Aug 2025 | Mar 2025 | + | Feature | Claude Opus 4.7 | Claude Opus 4.6 | Claude Sonnet 4.6 | Claude Sonnet 4.5 | Claude Opus 4.5 | Claude Opus 4.1 (deprecated) | + | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | + | **Claude API ID** | claude-opus-4-7 | claude-opus-4-6 | claude-sonnet-4-6 | claude-sonnet-4-5-20250929 | claude-opus-4-5-20251101 | claude-opus-4-1-20250805 | + | **Claude API alias** | claude-opus-4-7 | claude-opus-4-6 | claude-sonnet-4-6 | claude-sonnet-4-5 | claude-opus-4-5 | claude-opus-4-1 | + | **AWS Bedrock ID** | anthropic.claude-opus-4-76 | anthropic.claude-opus-4-6-v1 | anthropic.claude-sonnet-4-6 | anthropic.claude-sonnet-4-5-20250929-v1:0 | anthropic.claude-opus-4-5-20251101-v1:0 | anthropic.claude-opus-4-1-20250805-v1:0 | + | **Google Cloud ID** | claude-opus-4-7 | claude-opus-4-6 | claude-sonnet-4-6 | claude-sonnet-4-5\@20250929 | claude-opus-4-5\@20251101 | claude-opus-4-1\@20250805 | + | **Pricing** | $5 / input MTok $25 / output MTok | $5 / input MTok $25 / output MTok | $3 / input MTok $15 / output MTok | $3 / input MTok $15 / output MTok | $5 / input MTok $25 / output MTok | $15 / input MTok $75 / output MTok | + | **[Extended thinking (`thinking.type: "enabled"`)](/docs/en/build-with-claude/extended-thinking)** | No | Yes (deprecated) | Yes (deprecated) | Yes | Yes | Yes | + | **[Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost)** | Yes | Yes | Yes | No | No | No | + | **Comparative latency** | Moderate | Moderate | Fast | Fast | Moderate | Moderate | + | **Context window** | 1M tokens | 1M tokens | 1M tokens | 200k tokens | 200k tokens | 200k tokens | + | **Max output** | 128k tokens | 128k tokens | 128k tokens | 64k tokens | 64k tokens | 32k tokens | + | **Reliable knowledge cutoff** | Jan 20265 | May 20255 | Aug 20255 | Jan 20255 | May 20255 | Jan 20255 | + | **Training data cutoff** | Jan 2026 | Aug 2025 | Jan 2026 | Jul 2025 | Aug 2025 | Mar 2025 | Claude Opus 4.1 (`claude-opus-4-1-20250805`) is deprecated and will be retired on August 5, 2026. Migrate to [Claude Opus 4.8](/docs/en/about-claude/models/migration-guide#migrating-from-claude-opus-47) before the retirement date. diff --git a/content/en/about-claude/models/whats-new-claude-4-8.md b/content/en/about-claude/models/whats-new-claude-4-8.md index 486b4f227..7905a7777 100644 --- a/content/en/about-claude/models/whats-new-claude-4-8.md +++ b/content/en/about-claude/models/whats-new-claude-4-8.md @@ -12,7 +12,7 @@ Claude Opus 4.8 is built for complex agentic coding and enterprise work. It buil | --------------- | --------------- | ---------------------------------------------- | | Claude Opus 4.8 | claude-opus-4-8 | For complex agentic coding and enterprise work | -Claude Opus 4.8 supports the [1M token context window](/docs/en/build-with-claude/context-windows) by default on the Claude API, Amazon Bedrock, Google Cloud, and Microsoft Foundry, 128k max output tokens, [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), and the same set of tools and platform features as Claude Opus 4.7. +Claude Opus 4.8 supports the [1M token context window](/docs/en/build-with-claude/context-windows) by default on the Claude API, Amazon Bedrock, Google Cloud, and Microsoft Foundry, 128k max output tokens, [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), and the same set of tools and platform features as Claude Opus 4.7. For complete pricing and specs, see the [models overview](/docs/en/about-claude/models/overview). @@ -52,7 +52,7 @@ Setting `temperature`, `top_p`, or `top_k` to a non-default value returns a 400 Like Claude Opus 4.7, Claude Opus 4.8 does not support extended thinking budgets. Setting `thinking: {type: "enabled", budget_tokens: N}` returns a 400 error. -The following diff updates a request written for Claude Opus 4.6 or earlier to run on Claude Opus 4.8. The removed lines (`-`) set the old model ID and the manual thinking budget that Claude Opus 4.8 rejects. The added lines (`+`) set the new model ID, switch to [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), and control thinking depth with the [effort parameter](/docs/en/build-with-claude/effort), passed in the top-level `output_config` field. The model determines when and how much to think on each turn. If you remove the `thinking` field entirely, requests run without thinking: +The following diff updates a request written for Claude Opus 4.6 or earlier to run on Claude Opus 4.8. The removed lines (`-`) set the old model ID and the manual thinking budget that Claude Opus 4.8 rejects. The added lines (`+`) set the new model ID, switch to [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), and control thinking depth with the [effort parameter](/docs/en/build-with-claude/effort), passed in the top-level `output_config` field. The model determines when and how much to think on each turn. If you remove the `thinking` field entirely, requests run without thinking: ```diff cURL @@ -276,7 +276,7 @@ Compared with Claude Opus 4.7, Claude Opus 4.8 targets behavioral improvements i ### Adaptive thinking -With [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) enabled, Claude Opus 4.8 triggers reasoning only when it determines the turn needs it. On simple lookups and short agentic steps it responds directly. On complex multistep problems it reasons before answering. This reduces wasted thinking tokens on bimodal workloads compared to Claude Opus 4.7 at the same effort level. As on Claude Opus 4.7, thinking is off unless you explicitly set `thinking: {type: "adaptive"}` in your request. +With [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) enabled, Claude Opus 4.8 triggers reasoning only when it determines the turn needs it. On simple lookups and short agentic steps it responds directly. On complex multistep problems it reasons before answering. This reduces wasted thinking tokens on bimodal workloads compared to Claude Opus 4.7 at the same effort level. As on Claude Opus 4.7, thinking is off unless you explicitly set `thinking: {type: "adaptive"}` in your request. ## Behavior changes @@ -302,8 +302,8 @@ For step-by-step migration instructions and the full migration checklist, see [M Control how many tokens Claude uses when responding with the effort parameter, trading off between response thoroughness and token efficiency. - - Let Claude dynamically determine when and how much to use extended thinking with adaptive thinking mode. + + Understand adaptive thinking, where Claude decides when and how much to think, and steer it with effort and prompting. diff --git a/content/en/about-claude/models/whats-new-sonnet-5.md b/content/en/about-claude/models/whats-new-sonnet-5.md index 61a52ede8..1d9aac798 100644 --- a/content/en/about-claude/models/whats-new-sonnet-5.md +++ b/content/en/about-claude/models/whats-new-sonnet-5.md @@ -4,7 +4,7 @@ Overview of new features and behavior changes in Claude Sonnet 5. --- -Claude Sonnet 5 is the next generation of Anthropic's Sonnet model family. It is a drop-in upgrade for Claude Sonnet 4.6 with three behavior changes: [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is on by default, manual extended thinking now returns a 400 error (it was deprecated on Claude Sonnet 4.6), and setting sampling parameters (`temperature`, `top_p`, `top_k`) to non-default values returns a 400 error. This page summarizes everything new at launch, including a new tokenizer. +Claude Sonnet 5 is the next generation of Anthropic's Sonnet model family. It is a drop-in upgrade for Claude Sonnet 4.6 with three behavior changes: [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is on by default, manual extended thinking now returns a 400 error (it was deprecated on Claude Sonnet 4.6), and setting sampling parameters (`temperature`, `top_p`, `top_k`) to non-default values returns a 400 error. This page summarizes everything new at launch, including a new tokenizer. ## New model @@ -12,7 +12,7 @@ Claude Sonnet 5 is the next generation of Anthropic's Sonnet model family. It is | --------------- | ----------------- | ---------------------------------------------- | | Claude Sonnet 5 | `claude-sonnet-5` | The best combination of speed and intelligence | -Claude Sonnet 5 supports the [1M token context window](/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. +Claude Sonnet 5 supports the [1M token context window](/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. For complete pricing and specs, see the [models overview](/docs/en/about-claude/models/overview). @@ -20,7 +20,7 @@ For complete pricing and specs, see the [models overview](/docs/en/about-claude/ ### Adaptive thinking on by default -On Claude Sonnet 4.6, requests without a `thinking` field run without thinking. On Claude Sonnet 5, the same requests run with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). To turn thinking off, pass `thinking: {type: "disabled"}`. Because `max_tokens` is a hard limit on total output (thinking plus response text), revisit it for workloads that ran without thinking on Claude Sonnet 4.6. +On Claude Sonnet 4.6, requests without a `thinking` field run without thinking. On Claude Sonnet 5, the same requests run with [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). To turn thinking off, pass `thinking: {type: "disabled"}`. Because `max_tokens` is a hard limit on total output (thinking plus response text), revisit it for workloads that ran without thinking on Claude Sonnet 4.6. ### Sampling parameters not accepted @@ -100,7 +100,7 @@ model = "claude-sonnet-5" # After Then review the following: 1. **Token budgets and counts:** the [new tokenizer](#new-tokenizer) produces approximately 30% more tokens for the same text. The exact increase depends on the content and workload shape. Recount prompts with [token counting](/docs/en/build-with-claude/token-counting), and revisit `max_tokens` limits sized close to your expected output length. -2. **Extended thinking:** if you still set `budget_tokens`, migrate to [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). Manual extended thinking (`thinking: {type: "enabled"}`) is not supported and returns a 400 error. +2. **Extended thinking:** if you still set `budget_tokens`, migrate to [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). Manual extended thinking (`thinking: {type: "enabled"}`) is not supported and returns a 400 error. 3. **Sampling parameters:** requests that set sampling parameters (`temperature`, `top_p`, `top_k`) to a non-default value return a 400 error; remove them when migrating. Tool definitions and response shapes are unchanged, and assistant message prefilling was already unsupported on Claude Sonnet 4.6. See the [Claude Sonnet 5 section of the migration guide](/docs/en/about-claude/models/migration-guide#migrating-from-claude-sonnet-4-6-to-claude-sonnet-5) for details. @@ -116,7 +116,7 @@ See the [Claude Sonnet 5 section of the migration guide](/docs/en/about-claude/m Measure your prompts under the new tokenizer before you migrate. - + The recommended thinking-on mode on Claude Sonnet 5. diff --git a/content/en/about-claude/use-case-guides/content-moderation.md b/content/en/about-claude/use-case-guides/content-moderation.md index 2e001ccc9..459143cec 100644 --- a/content/en/about-claude/use-case-guides/content-moderation.md +++ b/content/en/about-claude/use-case-guides/content-moderation.md @@ -62,24 +62,239 @@ Here are some key indicators that you should use an LLM like Claude instead of a Before developing a content moderation solution, first create examples of content that should be flagged and content that should not be flagged. Ensure that you include edge cases and challenging scenarios that may be difficult for a content moderation system to handle effectively. Afterward, review your examples to create a well-defined list of moderation categories. For instance, the examples generated by a social media platform might include the following: -```python -allowed_user_comments = [ + + ```python Python + client = anthropic.Anthropic() + + allowed_user_comments = [ + "This movie was great, I really enjoyed it. The main actor really killed it!", + "I hate Mondays.", + "It is a great time to invest in gold!", + ] + + disallowed_user_comments = [ + "Delete this post now or you better hide. I am coming after you and your family.", + "Stay away from the 5G cellphones!! They are using 5G to control you.", + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!", + ] + + # Sample user comments to test the content moderation + user_comments = allowed_user_comments + disallowed_user_comments + + # Categories considered unsafe for content moderation + unsafe_categories = [ + "Child Exploitation", + "Conspiracy Theories", + "Hate", + "Indiscriminate Weapons", + "Intellectual Property", + "Non-Violent Crimes", + "Privacy", + "Self-Harm", + "Sex Crimes", + "Sexual Content", + "Specialized Advice", + "Violent Crimes", + ] + ``` + + ```typescript TypeScript + const client = new Anthropic(); + + const allowedUserComments = [ + "This movie was great, I really enjoyed it. The main actor really killed it!", + "I hate Mondays.", + "It is a great time to invest in gold!" + ]; + + const disallowedUserComments = [ + "Delete this post now or you better hide. I am coming after you and your family.", + "Stay away from the 5G cellphones!! They are using 5G to control you.", + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!" + ]; + + // Sample user comments to test the content moderation + const userComments = [...allowedUserComments, ...disallowedUserComments]; + + // Categories considered unsafe for content moderation + const unsafeCategories = [ + "Child Exploitation", + "Conspiracy Theories", + "Hate", + "Indiscriminate Weapons", + "Intellectual Property", + "Non-Violent Crimes", + "Privacy", + "Self-Harm", + "Sex Crimes", + "Sexual Content", + "Specialized Advice", + "Violent Crimes" + ]; + ``` + + ```csharp C# + var client = new AnthropicClient(); + + string[] allowedUserComments = + [ + "This movie was great, I really enjoyed it. The main actor really killed it!", + "I hate Mondays.", + "It is a great time to invest in gold!", + ]; + + string[] disallowedUserComments = + [ + "Delete this post now or you better hide. I am coming after you and your family.", + "Stay away from the 5G cellphones!! They are using 5G to control you.", + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!", + ]; + + // Sample user comments to test the content moderation + string[] userComments = [.. allowedUserComments, .. disallowedUserComments]; + + // Categories considered unsafe for content moderation + string[] unsafeCategories = + [ + "Child Exploitation", + "Conspiracy Theories", + "Hate", + "Indiscriminate Weapons", + "Intellectual Property", + "Non-Violent Crimes", + "Privacy", + "Self-Harm", + "Sex Crimes", + "Sexual Content", + "Specialized Advice", + "Violent Crimes", + ]; + ``` + + ```go Go + var client = anthropic.NewClient() + + var allowedUserComments = []string{ + "This movie was great, I really enjoyed it. The main actor really killed it!", + "I hate Mondays.", + "It is a great time to invest in gold!", + } + + var disallowedUserComments = []string{ + "Delete this post now or you better hide. I am coming after you and your family.", + "Stay away from the 5G cellphones!! They are using 5G to control you.", + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!", + } + + // Sample user comments to test the content moderation + var userComments = slices.Concat(allowedUserComments, disallowedUserComments) + + // Categories considered unsafe for content moderation + var unsafeCategories = []string{ + "Child Exploitation", + "Conspiracy Theories", + "Hate", + "Indiscriminate Weapons", + "Intellectual Property", + "Non-Violent Crimes", + "Privacy", + "Self-Harm", + "Sex Crimes", + "Sexual Content", + "Specialized Advice", + "Violent Crimes", + } + + ``` + + ```java Java + final AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + final List allowedUserComments = List.of( + "This movie was great, I really enjoyed it. The main actor really killed it!", + "I hate Mondays.", + "It is a great time to invest in gold!"); + + final List disallowedUserComments = List.of( + "Delete this post now or you better hide. I am coming after you and your family.", + "Stay away from the 5G cellphones!! They are using 5G to control you.", + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!"); + + // Sample user comments to test the content moderation + final List userComments = + Stream.concat(allowedUserComments.stream(), disallowedUserComments.stream()).toList(); + + // Categories considered unsafe for content moderation + final List unsafeCategories = List.of( + "Child Exploitation", + "Conspiracy Theories", + "Hate", + "Indiscriminate Weapons", + "Intellectual Property", + "Non-Violent Crimes", + "Privacy", + "Self-Harm", + "Sex Crimes", + "Sexual Content", + "Specialized Advice", + "Violent Crimes"); + ``` + + ```php PHP + $client = new Client(); + + $allowedUserComments = [ + 'This movie was great, I really enjoyed it. The main actor really killed it!', + 'I hate Mondays.', + 'It is a great time to invest in gold!', + ]; + + $disallowedUserComments = [ + 'Delete this post now or you better hide. I am coming after you and your family.', + 'Stay away from the 5G cellphones!! They are using 5G to control you.', + 'Congratulations! You have won a $1,000 gift card. Click here to claim your prize!', + ]; + + // Sample user comments to test the content moderation + $userComments = [...$allowedUserComments, ...$disallowedUserComments]; + + // Categories considered unsafe for content moderation + $unsafeCategories = [ + 'Child Exploitation', + 'Conspiracy Theories', + 'Hate', + 'Indiscriminate Weapons', + 'Intellectual Property', + 'Non-Violent Crimes', + 'Privacy', + 'Self-Harm', + 'Sex Crimes', + 'Sexual Content', + 'Specialized Advice', + 'Violent Crimes', + ]; + ``` + + ```ruby Ruby + CLIENT = Anthropic::Client.new + + ALLOWED_USER_COMMENTS = [ "This movie was great, I really enjoyed it. The main actor really killed it!", "I hate Mondays.", - "It is a great time to invest in gold!", -] + "It is a great time to invest in gold!" + ] -disallowed_user_comments = [ + DISALLOWED_USER_COMMENTS = [ "Delete this post now or you better hide. I am coming after you and your family.", "Stay away from the 5G cellphones!! They are using 5G to control you.", - "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!", -] + "Congratulations! You have won a $1,000 gift card. Click here to claim your prize!" + ] -# Sample user comments to test the content moderation -user_comments = allowed_user_comments + disallowed_user_comments + # Sample user comments to test the content moderation + USER_COMMENTS = ALLOWED_USER_COMMENTS + DISALLOWED_USER_COMMENTS -# List of categories considered unsafe for content moderation -unsafe_categories = [ + # Categories considered unsafe for content moderation + UNSAFE_CATEGORIES = [ "Child Exploitation", "Conspiracy Theories", "Hate", @@ -91,13 +306,14 @@ unsafe_categories = [ "Sex Crimes", "Sexual Content", "Specialized Advice", - "Violent Crimes", -] -``` + "Violent Crimes" + ] + ``` + Effectively moderating these examples requires a nuanced understanding of language. In the comment, `This movie was great, I really enjoyed it. The main actor really killed it!`, the content moderation system needs to recognize that "killed it" is a metaphor, not an indication of actual violence. Conversely, despite the lack of explicit mentions of violence, the comment `Delete this post now or you better hide. I am coming after you and your family.` should be flagged by the content moderation system. -The `unsafe_categories` list can be customized to fit your specific needs. For example, if you want to prevent minors from creating content on your website, you could append "Underage Posting" to the list. +The unsafe categories can be customized to fit your specific needs. For example, if you want to prevent minors from creating content on your website, you could add "Underage Posting" to the categories. *** @@ -148,73 +364,510 @@ When selecting a model, it’s important to consider the size of your data. If c To use Claude for content moderation, Claude must understand the moderation requirements of your application. Start by writing a prompt that allows you to define your moderation needs: -```python Python -import json - -# Initialize the Anthropic client -client = anthropic.Anthropic() - - -def moderate_message(message, unsafe_categories): - # Convert the list of unsafe categories into a string, with each category on a new line - unsafe_category_str = "\n".join(unsafe_categories) + + ```python Python + def moderate_message(message, unsafe_categories): + # Convert the unsafe categories into a string, with each category on a new line + unsafe_category_str = "\n".join(unsafe_categories) + + # Construct the prompt for Claude, including the message and unsafe categories + assessment_prompt = f""" + Determine whether the following message warrants moderation, + based on the unsafe categories outlined below. + + Message: + {message} + + Unsafe Categories: + + {unsafe_category_str} + + + Respond with ONLY a JSON object, using the format below: + {{ + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + }} + Do not include markdown formatting or code fences in your response.""" + + # Send the request to Claude for content moderation + response = client.messages.create( + model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens=200, + messages=[{"role": "user", "content": assessment_prompt}], + ) + + # Parse the JSON response from Claude + text_block = next(block for block in response.content if block.type == "text") + assessment = json.loads(text_block.text) + + # Extract the violation status from the assessment + contains_violation = assessment["violation"] + + # If there's a violation, get the categories and explanation; otherwise, use empty defaults + violated_categories = assessment.get("categories", []) if contains_violation else [] + explanation = assessment.get("explanation") if contains_violation else None + + return contains_violation, violated_categories, explanation + + + # Process each comment and print the results + for comment in user_comments: + print(f"\nComment: {comment}") + violation, violated_categories, explanation = moderate_message( + comment, unsafe_categories + ) + + if violation: + print(f"Violated Categories: {', '.join(violated_categories)}") + print(f"Explanation: {explanation}") + else: + print("No issues detected.") + ``` + + ```typescript TypeScript + // Shape of the JSON assessment Claude returns + interface ModerationAssessment { + violation: boolean; + categories?: string[]; + explanation?: string; + } + + async function moderateMessage( + message: string, + unsafeCategories: string[] + ): Promise<{ violation: boolean; violatedCategories: string[]; explanation?: string }> { + // Convert the unsafe categories into a string, with each category on a new line + const unsafeCategoryStr = unsafeCategories.join("\n"); + + // Construct the prompt for Claude, including the message and unsafe categories + const assessmentPrompt = ` + Determine whether the following message warrants moderation, + based on the unsafe categories outlined below. + + Message: + ${message} + + Unsafe Categories: + + ${unsafeCategoryStr} + + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response.`; + + // Send the request to Claude for content moderation + const response = await client.messages.create({ + model: "claude-haiku-4-5-20251001", // Using the Haiku model for lower costs + max_tokens: 200, + messages: [{ role: "user", content: assessmentPrompt }] + }); + + // Parse the JSON response from Claude + const textBlock = response.content.find((block) => block.type === "text"); + if (!textBlock) { + throw new Error("Expected a text block in the response"); + } + const assessment: ModerationAssessment = JSON.parse(textBlock.text); + + // Extract the violation status from the assessment + const containsViolation = assessment.violation; + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + const violatedCategories = containsViolation ? assessment.categories ?? [] : []; + const explanation = containsViolation ? assessment.explanation : undefined; + + return { violation: containsViolation, violatedCategories, explanation }; + } + + // Process each comment and print the results + for (const comment of userComments) { + console.log(`\nComment: ${comment}`); + const { violation, violatedCategories, explanation } = await moderateMessage( + comment, + unsafeCategories + ); + + if (violation) { + console.log(`Violated Categories: ${violatedCategories.join(", ")}`); + console.log(`Explanation: ${explanation}`); + } else { + console.log("No issues detected."); + } + } + ``` + + ```csharp C# + async Task<(bool ContainsViolation, List ViolatedCategories, string? Explanation)> ModerateMessage( + string message, + IReadOnlyList categories + ) + { + // Convert the unsafe categories into a string, with each category on a new line + var unsafeCategoryText = string.Join("\n", categories); + + // Construct the prompt for Claude, including the message and unsafe categories + var assessmentPrompt = $$""" + + Determine whether the following message warrants moderation, + based on the unsafe categories outlined below. + + Message: + {{message}} + + Unsafe Categories: + + {{unsafeCategoryText}} + + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response. + """; + + // Send the request to Claude for content moderation + var response = await client.Messages.Create( + new() + { + Model = Model.ClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens = 200, + Messages = [new() { Role = Role.User, Content = assessmentPrompt }], + } + ); + + // Narrow the first content block to a text block, then parse Claude's JSON response + if (!response.Content[0].TryPickText(out var textBlock)) + { + throw new InvalidOperationException("Expected a text response from Claude."); + } + var assessment = JsonNode.Parse(textBlock.Text)!; + + // Extract the violation status from the assessment + var containsViolation = assessment["violation"]!.GetValue(); + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + List violatedCategories = containsViolation + ? assessment["categories"]?.AsArray().Select(category => category!.GetValue()).ToList() ?? [] + : []; + var explanation = containsViolation ? assessment["explanation"]?.GetValue() : null; + + return (containsViolation, violatedCategories, explanation); + } + + // Process each comment and print the results + foreach (var comment in userComments) + { + Console.WriteLine($"\nComment: {comment}"); + var (violation, violatedCategories, explanation) = await ModerateMessage(comment, unsafeCategories); + + if (violation) + { + Console.WriteLine($"Violated Categories: {string.Join(", ", violatedCategories)}"); + Console.WriteLine($"Explanation: {explanation}"); + } + else + { + Console.WriteLine("No issues detected."); + } + } + ``` + + ```go Go + func moderateMessage(message string, unsafeCategories []string) (bool, []string, string) { + // Convert the unsafe categories into a string, with each category on a new line + unsafeCategoryStr := strings.Join(unsafeCategories, "\n") + + // Construct the prompt for Claude, including the message and unsafe categories + assessmentPrompt := fmt.Sprintf(` + Determine whether the following message warrants moderation, + based on the unsafe categories outlined below. + + Message: + %s + + Unsafe Categories: + + %s + + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response.`, message, unsafeCategoryStr) + + // Send the request to Claude for content moderation + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens: 200, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock(assessmentPrompt)), + }, + }) + if err != nil { + log.Fatal(err) + } + + // Narrow the first content block to a text block before reading its text + textBlock, ok := response.Content[0].AsAny().(anthropic.TextBlock) + if !ok { + log.Fatalf("expected a text block, got %q", response.Content[0].Type) + } + + // Parse the JSON response from Claude + var assessment struct { + Violation bool `json:"violation"` + Categories []string `json:"categories"` + Explanation string `json:"explanation"` + } + if err := json.Unmarshal([]byte(textBlock.Text), &assessment); err != nil { + log.Fatal(err) + } + + // If there's a violation, return the categories and explanation; otherwise, use empty defaults + if !assessment.Violation { + return false, nil, "" + } + return true, assessment.Categories, assessment.Explanation + } + + // moderateAllComments processes each comment and prints the results. + func moderateAllComments() { + for _, comment := range userComments { + fmt.Printf("\nComment: %s\n", comment) + violation, violatedCategories, explanation := moderateMessage(comment, unsafeCategories) + + if violation { + fmt.Printf("Violated Categories: %s\n", strings.Join(violatedCategories, ", ")) + fmt.Printf("Explanation: %s\n", explanation) + } else { + fmt.Println("No issues detected.") + } + } + } + + ``` + + ```java Java + record ModerationResult(boolean violation, List violatedCategories, String explanation) {} + + ModerationResult moderateMessage(String message, List unsafeCategories) + throws JsonProcessingException { + // Convert the unsafe categories into a string, with each category on a new line + String unsafeCategoryStr = String.join("\n", unsafeCategories); + + // Construct the prompt for Claude, including the message and unsafe categories + String assessmentPrompt = """ + + Determine whether the following message warrants moderation, + based on the unsafe categories outlined below. + + Message: + %s + + Unsafe Categories: + + %s + + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response.""" + .formatted(message, unsafeCategoryStr); + + // Send the request to Claude for content moderation + Message response = client.messages().create(MessageCreateParams.builder() + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(200) + .addUserMessage(assessmentPrompt) + .build()); + + // Parse the JSON response from Claude + String assessmentJson = response.content().stream() + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); + ObjectMapper mapper = new ObjectMapper(); + JsonNode assessment = mapper.readTree(assessmentJson); + + // Extract the violation status from the assessment + boolean containsViolation = assessment.required("violation").asBoolean(); + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + List violatedCategories = containsViolation && assessment.has("categories") + ? mapper.convertValue(assessment.get("categories"), new TypeReference>() {}) + : List.of(); + String explanation = containsViolation && assessment.hasNonNull("explanation") + ? assessment.get("explanation").asText() + : null; + + return new ModerationResult(containsViolation, violatedCategories, explanation); + } + + // Process each comment and print the results + void printModerationResults() throws JsonProcessingException { + for (String comment : userComments) { + IO.println("\nComment: " + comment); + ModerationResult result = moderateMessage(comment, unsafeCategories); + + if (result.violation()) { + IO.println("Violated Categories: " + String.join(", ", result.violatedCategories())); + IO.println("Explanation: " + result.explanation()); + } else { + IO.println("No issues detected."); + } + } + } + ``` + + ```php PHP + $moderateMessage = function (string $message, array $unsafeCategories) use ($client): array { + // Convert the unsafe categories into a string, with each category on a new line + $unsafeCategoryStr = implode("\n", $unsafeCategories); + + // Construct the prompt for Claude, including the message and unsafe categories + $assessmentPrompt = <<{$message} + + Unsafe Categories: + + {$unsafeCategoryStr} + + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response. + PROMPT; + + // Send the request to Claude for content moderation + $response = $client->messages->create( + model: 'claude-haiku-4-5-20251001', // Using the Haiku model for lower costs + maxTokens: 200, + messages: [['role' => 'user', 'content' => $assessmentPrompt]], + ); + + // Parse the JSON response from Claude. The SDK decodes each content block + // into its concrete class, so find the TextBlock before reading the text. + $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock) + ?? throw new RuntimeException('Expected a text block in the response.'); + $assessment = json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR); + + // Extract the violation status from the assessment + $containsViolation = $assessment['violation']; + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + $violatedCategories = $containsViolation ? ($assessment['categories'] ?? []) : []; + $explanation = $containsViolation ? ($assessment['explanation'] ?? null) : null; + + return [$containsViolation, $violatedCategories, $explanation]; + }; + + // Process each comment and print the results + foreach ($userComments as $comment) { + echo "\nComment: {$comment}\n"; + [$violation, $violatedCategories, $explanation] = $moderateMessage($comment, $unsafeCategories); + + if ($violation) { + echo 'Violated Categories: ' . implode(', ', $violatedCategories) . "\n"; + echo "Explanation: {$explanation}\n"; + } else { + echo "No issues detected.\n"; + } + } + ``` + + ```ruby Ruby + def moderate_message(message, unsafe_categories) + # Convert the unsafe categories into a string, with each category on a new line + unsafe_category_str = unsafe_categories.join("\n") # Construct the prompt for Claude, including the message and unsafe categories - assessment_prompt = f""" - Determine whether the following message warrants moderation, - based on the unsafe categories outlined below. + assessment_prompt = <<~PROMPT.chomp - Message: - {message} + Determine whether the following message warrants moderation, + based on the unsafe categories outlined below. - Unsafe Categories: - - {unsafe_category_str} - + Message: + #{message} - Respond with ONLY a JSON object, using the format below: - {{ - "violation": , - "categories": [Comma-separated list of violated categories], - "explanation": [Optional. Only include if there is a violation.] - }}""" + Unsafe Categories: + + #{unsafe_category_str} + + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response. + PROMPT # Send the request to Claude for content moderation - response = client.messages.create( - model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs - max_tokens=200, - temperature=0, # Use 0 temperature for increased consistency - messages=[{"role": "user", "content": assessment_prompt}], + response = CLIENT.messages.create( + model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens: 200, + messages: [{role: :user, content: assessment_prompt}] ) # Parse the JSON response from Claude - assessment = json.loads(response.content[0].text) + text_block = response.content.find { it.type == :text } + assessment = JSON.parse(text_block.text) # Extract the violation status from the assessment contains_violation = assessment["violation"] # If there's a violation, get the categories and explanation; otherwise, use empty defaults - violated_categories = assessment.get("categories", []) if contains_violation else [] - explanation = assessment.get("explanation") if contains_violation else None + violated_categories = contains_violation ? assessment.fetch("categories", []) : [] + explanation = contains_violation ? assessment["explanation"] : nil - return contains_violation, violated_categories, explanation + [contains_violation, violated_categories, explanation] + end -# Process each comment and print the results -for comment in user_comments: - print(f"\nComment: {comment}") - violation, violated_categories, explanation = moderate_message( - comment, unsafe_categories - ) + # Process each comment and print the results + USER_COMMENTS.each do |comment| + puts "\nComment: #{comment}" + violation, violated_categories, explanation = moderate_message(comment, UNSAFE_CATEGORIES) - if violation: - print(f"Violated Categories: {', '.join(violated_categories)}") - print(f"Explanation: {explanation}") - else: - print("No issues detected.") -``` + if violation + puts "Violated Categories: #{violated_categories.join(", ")}" + puts "Explanation: #{explanation}" + else + puts "No issues detected." + end + end + ``` + -In this example, the `moderate_message` function contains an assessment prompt that includes the unsafe content categories and the message to evaluate. The prompt asks Claude to assess whether the message should be moderated, based on the unsafe categories defined above. +In this example, the `moderate_message` function contains an assessment prompt that includes the unsafe content categories and the message to evaluate. The prompt asks Claude to assess whether the message should be moderated, based on the unsafe categories you defined earlier. The model's assessment is then parsed to determine if there is a violation. If there is a violation, Claude also returns a list of violated categories and an explanation as to why the message is unsafe. @@ -224,79 +877,552 @@ Content moderation is a classification problem. Thus, you can use the same techn One additional consideration is that instead of treating content moderation as a binary classification problem, you may instead create multiple categories to represent various risk levels. Creating multiple risk levels allows you to adjust the aggressiveness of your moderation. For example, you might want to automatically block user queries that are deemed high risk, while users with many medium risk queries are flagged for human review. -```python Python -import json + + ```python Python + def assess_risk_level(message, unsafe_categories): + # Convert the unsafe categories into a string, with each category on a new line + unsafe_category_str = "\n".join(unsafe_categories) + + # Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions + assessment_prompt = f""" + Assess the risk level of the following message, + based on the unsafe categories listed below. + + Message: + {message} + + Unsafe Categories: + + {unsafe_category_str} + -# Initialize the Anthropic client -client = anthropic.Anthropic() + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk -def assess_risk_level(message, unsafe_categories): - # Convert the list of unsafe categories into a string, with each category on a new line - unsafe_category_str = "\n".join(unsafe_categories) + Respond with ONLY a JSON object, using the format below: + {{ + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + }} + Do not include markdown formatting or code fences in your response.""" + + # Send the request to Claude for risk assessment + response = client.messages.create( + model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens=200, + messages=[{"role": "user", "content": assessment_prompt}], + ) + + # Parse the JSON response from Claude + text_block = next(block for block in response.content if block.type == "text") + assessment = json.loads(text_block.text) + + # Extract the risk level, violated categories, and explanation from the assessment + risk_level = assessment["risk_level"] + violated_categories = assessment["categories"] + explanation = assessment.get("explanation") + + return risk_level, violated_categories, explanation + + + # Process each comment and print the results + for comment in user_comments: + print(f"\nComment: {comment}") + risk_level, violated_categories, explanation = assess_risk_level( + comment, unsafe_categories + ) + + print(f"Risk Level: {risk_level}") + if violated_categories: + print(f"Violated Categories: {', '.join(violated_categories)}") + if explanation: + print(f"Explanation: {explanation}") + ``` + + ```typescript TypeScript + // Shape of the JSON risk assessment Claude returns + interface RiskAssessment { + risk_level: number; + categories: string[]; + explanation?: string; + } + + async function assessRiskLevel( + message: string, + unsafeCategories: string[] + ): Promise<{ riskLevel: number; violatedCategories: string[]; explanation?: string }> { + // Convert the unsafe categories into a string, with each category on a new line + const unsafeCategoryStr = unsafeCategories.join("\n"); + + // Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions + const assessmentPrompt = ` + Assess the risk level of the following message, + based on the unsafe categories listed below. + + Message: + ${message} + + Unsafe Categories: + + ${unsafeCategoryStr} + + + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: + + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk + + Respond with ONLY a JSON object, using the format below: + { + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + } + Do not include markdown formatting or code fences in your response.`; + + // Send the request to Claude for risk assessment + const response = await client.messages.create({ + model: "claude-haiku-4-5-20251001", // Using the Haiku model for lower costs + max_tokens: 200, + messages: [{ role: "user", content: assessmentPrompt }] + }); + + // Parse the JSON response from Claude + const textBlock = response.content.find((block) => block.type === "text"); + if (!textBlock) { + throw new Error("Expected a text block in the response"); + } + const assessment: RiskAssessment = JSON.parse(textBlock.text); + + // Extract the risk level, violated categories, and explanation from the assessment + const { risk_level: riskLevel, categories: violatedCategories, explanation } = assessment; + + return { riskLevel, violatedCategories, explanation }; + } + + // Process each comment and print the results + for (const comment of userComments) { + console.log(`\nComment: ${comment}`); + const { riskLevel, violatedCategories, explanation } = await assessRiskLevel( + comment, + unsafeCategories + ); + + console.log(`Risk Level: ${riskLevel}`); + if (violatedCategories.length > 0) { + console.log(`Violated Categories: ${violatedCategories.join(", ")}`); + } + if (explanation) { + console.log(`Explanation: ${explanation}`); + } + } + ``` + + ```csharp C# + async Task<(int RiskLevel, List ViolatedCategories, string? Explanation)> AssessRiskLevel( + string message, + IReadOnlyList categories + ) + { + // Convert the unsafe categories into a string, with each category on a new line + var unsafeCategoryText = string.Join("\n", categories); + + // Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions + var assessmentPrompt = $$""" + + Assess the risk level of the following message, + based on the unsafe categories listed below. + + Message: + {{message}} + + Unsafe Categories: + + {{unsafeCategoryText}} + + + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: + + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk + + Respond with ONLY a JSON object, using the format below: + { + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + } + Do not include markdown formatting or code fences in your response. + """; + + // Send the request to Claude for risk assessment + var response = await client.Messages.Create( + new() + { + Model = Model.ClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens = 200, + Messages = [new() { Role = Role.User, Content = assessmentPrompt }], + } + ); + + // Narrow the first content block to a text block, then parse Claude's JSON response + if (!response.Content[0].TryPickText(out var textBlock)) + { + throw new InvalidOperationException("Expected a text response from Claude."); + } + var assessment = JsonNode.Parse(textBlock.Text)!; + + // Extract the risk level, violated categories, and explanation from the assessment + var riskLevel = assessment["risk_level"]!.GetValue(); + var violatedCategories = assessment["categories"]! + .AsArray() + .Select(category => category!.GetValue()) + .ToList(); + var explanation = assessment["explanation"]?.GetValue(); + + return (riskLevel, violatedCategories, explanation); + } + + // Process each comment and print the results + foreach (var comment in userComments) + { + Console.WriteLine($"\nComment: {comment}"); + var (riskLevel, violatedCategories, explanation) = await AssessRiskLevel(comment, unsafeCategories); + + Console.WriteLine($"Risk Level: {riskLevel}"); + if (violatedCategories.Count > 0) + { + Console.WriteLine($"Violated Categories: {string.Join(", ", violatedCategories)}"); + } + if (!string.IsNullOrEmpty(explanation)) + { + Console.WriteLine($"Explanation: {explanation}"); + } + } + ``` + + ```go Go + func assessRiskLevel(message string, unsafeCategories []string) (int, []string, string) { + // Convert the unsafe categories into a string, with each category on a new line + unsafeCategoryStr := strings.Join(unsafeCategories, "\n") + + // Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions + assessmentPrompt := fmt.Sprintf(` + Assess the risk level of the following message, + based on the unsafe categories listed below. + + Message: + %s + + Unsafe Categories: + + %s + + + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: + + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk + + Respond with ONLY a JSON object, using the format below: + { + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + } + Do not include markdown formatting or code fences in your response.`, message, unsafeCategoryStr) + + // Send the request to Claude for risk assessment + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens: 200, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock(assessmentPrompt)), + }, + }) + if err != nil { + log.Fatal(err) + } + + // Narrow the first content block to a text block before reading its text + textBlock, ok := response.Content[0].AsAny().(anthropic.TextBlock) + if !ok { + log.Fatalf("expected a text block, got %q", response.Content[0].Type) + } + + // Parse the JSON response from Claude + var assessment struct { + RiskLevel int `json:"risk_level"` + Categories []string `json:"categories"` + Explanation string `json:"explanation"` + } + if err := json.Unmarshal([]byte(textBlock.Text), &assessment); err != nil { + log.Fatal(err) + } + + // Return the risk level, violated categories, and explanation from the assessment + return assessment.RiskLevel, assessment.Categories, assessment.Explanation + } + + // assessAllRiskLevels processes each comment and prints the results. + func assessAllRiskLevels() { + for _, comment := range userComments { + fmt.Printf("\nComment: %s\n", comment) + riskLevel, violatedCategories, explanation := assessRiskLevel(comment, unsafeCategories) + + fmt.Printf("Risk Level: %d\n", riskLevel) + if len(violatedCategories) > 0 { + fmt.Printf("Violated Categories: %s\n", strings.Join(violatedCategories, ", ")) + } + if explanation != "" { + fmt.Printf("Explanation: %s\n", explanation) + } + } + } + + ``` + + ```java Java + record RiskAssessment(int riskLevel, List violatedCategories, String explanation) {} + + RiskAssessment assessRiskLevel(String message, List unsafeCategories) + throws JsonProcessingException { + // Convert the unsafe categories into a string, with each category on a new line + String unsafeCategoryStr = String.join("\n", unsafeCategories); + + // Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions + String assessmentPrompt = """ + + Assess the risk level of the following message, + based on the unsafe categories listed below. + + Message: + %s + + Unsafe Categories: + + %s + + + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: + + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk + + Respond with ONLY a JSON object, using the format below: + { + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + } + Do not include markdown formatting or code fences in your response.""" + .formatted(message, unsafeCategoryStr); + + // Send the request to Claude for risk assessment + Message response = client.messages().create(MessageCreateParams.builder() + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(200) + .addUserMessage(assessmentPrompt) + .build()); + + // Parse the JSON response from Claude + String assessmentJson = response.content().stream() + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); + ObjectMapper mapper = new ObjectMapper(); + JsonNode assessment = mapper.readTree(assessmentJson); + + // Extract the risk level, violated categories, and explanation from the assessment + int riskLevel = assessment.required("risk_level").asInt(); + JsonNode categoriesNode = assessment.required("categories"); + List violatedCategories = categoriesNode.isNull() + ? List.of() + : mapper.convertValue(categoriesNode, new TypeReference>() {}); + String explanation = assessment.hasNonNull("explanation") + ? assessment.get("explanation").asText() + : null; + + return new RiskAssessment(riskLevel, violatedCategories, explanation); + } + + // Process each comment and print the results + void printRiskLevels() throws JsonProcessingException { + for (String comment : userComments) { + IO.println("\nComment: " + comment); + RiskAssessment assessment = assessRiskLevel(comment, unsafeCategories); + + IO.println("Risk Level: " + assessment.riskLevel()); + if (!assessment.violatedCategories().isEmpty()) { + IO.println("Violated Categories: " + String.join(", ", assessment.violatedCategories())); + } + if (assessment.explanation() != null && !assessment.explanation().isEmpty()) { + IO.println("Explanation: " + assessment.explanation()); + } + } + } + ``` + + ```php PHP + $assessRiskLevel = function (string $message, array $unsafeCategories) use ($client): array { + // Convert the unsafe categories into a string, with each category on a new line + $unsafeCategoryStr = implode("\n", $unsafeCategories); + + // Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions + $assessmentPrompt = <<{$message} + + Unsafe Categories: + + {$unsafeCategoryStr} + + + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: + + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk + + Respond with ONLY a JSON object, using the format below: + { + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + } + Do not include markdown formatting or code fences in your response. + PROMPT; + + // Send the request to Claude for risk assessment + $response = $client->messages->create( + model: 'claude-haiku-4-5-20251001', // Using the Haiku model for lower costs + maxTokens: 200, + messages: [['role' => 'user', 'content' => $assessmentPrompt]], + ); + + // Parse the JSON response from Claude. The SDK decodes each content block + // into its concrete class, so find the TextBlock before reading the text. + $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock) + ?? throw new RuntimeException('Expected a text block in the response.'); + $assessment = json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR); + + // Extract the risk level, violated categories, and explanation from the assessment + $riskLevel = $assessment['risk_level']; + $violatedCategories = $assessment['categories']; + $explanation = $assessment['explanation'] ?? null; + + return [$riskLevel, $violatedCategories, $explanation]; + }; + + // Process each comment and print the results + foreach ($userComments as $comment) { + echo "\nComment: {$comment}\n"; + [$riskLevel, $violatedCategories, $explanation] = $assessRiskLevel($comment, $unsafeCategories); + + echo "Risk Level: {$riskLevel}\n"; + if ($violatedCategories) { + echo 'Violated Categories: ' . implode(', ', $violatedCategories) . "\n"; + } + if ($explanation) { + echo "Explanation: {$explanation}\n"; + } + } + ``` + + ```ruby Ruby + def assess_risk_level(message, unsafe_categories) + # Convert the unsafe categories into a string, with each category on a new line + unsafe_category_str = unsafe_categories.join("\n") # Construct the prompt for Claude, including the message, unsafe categories, and risk level definitions - assessment_prompt = f""" - Assess the risk level of the following message, - based on the unsafe categories listed below. + assessment_prompt = <<~PROMPT.chomp -Message: -{message} + Assess the risk level of the following message, + based on the unsafe categories listed below. -Unsafe Categories: - -{unsafe_category_str} - + Message: + #{message} -Assign a risk level based on your confidence that the user's message should be moderated -based on the defined unsafe categories: + Unsafe Categories: + + #{unsafe_category_str} + -0 - No risk -1 - Low risk -2 - Medium risk -3 - High risk + Assign a risk level based on your confidence that the user's message should be moderated + based on the defined unsafe categories: -Respond with ONLY a JSON object, using the format below: -{{ - "risk_level": , - "categories": [Comma-separated list of violated categories], - "explanation": -}}""" + 0 - No risk + 1 - Low risk + 2 - Medium risk + 3 - High risk + + Respond with ONLY a JSON object, using the format below: + { + "risk_level": , + "categories": [Comma-separated list of violated categories], + "explanation": + } + Do not include markdown formatting or code fences in your response. + PROMPT # Send the request to Claude for risk assessment - response = client.messages.create( - model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs - max_tokens=200, - temperature=0, # Use 0 temperature for increased consistency - messages=[{"role": "user", "content": assessment_prompt}], + response = CLIENT.messages.create( + model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens: 200, + messages: [{role: :user, content: assessment_prompt}] ) # Parse the JSON response from Claude - assessment = json.loads(response.content[0].text) + text_block = response.content.find { it.type == :text } + assessment = JSON.parse(text_block.text) # Extract the risk level, violated categories, and explanation from the assessment risk_level = assessment["risk_level"] violated_categories = assessment["categories"] - explanation = assessment.get("explanation") + explanation = assessment["explanation"] - return risk_level, violated_categories, explanation + [risk_level, violated_categories, explanation] + end -# Process each comment and print the results -for comment in user_comments: - print(f"\nComment: {comment}") - risk_level, violated_categories, explanation = assess_risk_level( - comment, unsafe_categories - ) + # Process each comment and print the results + USER_COMMENTS.each do |comment| + puts "\nComment: #{comment}" + risk_level, violated_categories, explanation = assess_risk_level(comment, UNSAFE_CATEGORIES) - print(f"Risk Level: {risk_level}") - if violated_categories: - print(f"Violated Categories: {', '.join(violated_categories)}") - if explanation: - print(f"Explanation: {explanation}") -``` + puts "Risk Level: #{risk_level}" + puts "Violated Categories: #{violated_categories.join(", ")}" if violated_categories&.any? + puts "Explanation: #{explanation}" if explanation + end + ``` + -This code implements an `assess_risk_level` function that uses Claude to evaluate the risk level of a message. The function accepts a message and a list of unsafe categories as inputs. +This code implements an `assess_risk_level` function that uses Claude to evaluate the risk level of a message. The function accepts a message and the unsafe categories as inputs. Within the function, a prompt is generated for Claude, including the message to be assessed, the unsafe categories, and specific instructions for evaluating the risk level. The prompt instructs Claude to respond with a JSON object that includes the risk level, the violated categories, and an optional explanation. @@ -322,96 +1448,742 @@ In complex scenarios, it may be helpful to consider additional strategies to imp In addition to listing the unsafe categories in the prompt, further improvements can be made by providing definitions and phrases related to each category. -```python Python -import json - -# Initialize the Anthropic client -client = anthropic.Anthropic() - -# Dictionary of categories considered unsafe for content moderation, with their definitions -unsafe_category_definitions = { - "Child Exploitation": "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children.", - "Conspiracy Theories": """Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, - which can incite harm or undermine public trust in institutions or facts.""", - "Hate": """Content that is hateful toward people on the basis of their protected characteristics - (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), - or content that perpetuates negative stereotypes.""", - "Indiscriminate Weapons": "Content that enables the creation of weapons of mass destruction.", - "Intellectual Property": "Content that violates the intellectual property rights of third parties.", - "Non-Violent Crimes": "Content that enables, encourages, or excuses the commission of non-violent crimes.", - "Privacy": "Content that contains sensitive, personal information about private individuals.", + + ```python Python + # Categories considered unsafe for content moderation, with their definitions + unsafe_category_definitions = { + "Child Exploitation": "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children.", + "Conspiracy Theories": """Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts.""", + "Hate": """Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes.""", + "Indiscriminate Weapons": "Content that enables the creation of weapons of mass destruction.", + "Intellectual Property": "Content that violates the intellectual property rights of third parties.", + "Non-Violent Crimes": "Content that enables, encourages, or excuses the commission of non-violent crimes.", + "Privacy": "Content that contains sensitive, personal information about private individuals.", + "Self-Harm": "Content that enables, encourages, or excuses acts of intentional self-harm.", + "Sex Crimes": "Content that enables, encourages, or excuses the commission of sex crimes.", + "Sexual Content": "Content that contains erotic descriptions or explicit depictions of sex acts.", + "Specialized Advice": """Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning.""", + "Violent Crimes": "Content that enables, encourages, or excuses the commission of violent crimes.", + } + + + def moderate_message_with_definitions(message, unsafe_category_definitions): + # Format unsafe categories string, with each category and its definition on a new line + unsafe_category_str = "\n".join( + f"{category}: {definition}" + for category, definition in unsafe_category_definitions.items() + ) + + # Construct the prompt for Claude, including the message and unsafe categories + assessment_prompt = f"""Determine whether the following message warrants moderation, based on the unsafe categories outlined below. + + Message: + {message} + + Unsafe Categories and Their Definitions: + + {unsafe_category_str} + + + It's important that you remember all unsafe categories and their definitions. + + Respond with ONLY a JSON object, using the format below: + {{ + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + }} + Do not include markdown formatting or code fences in your response.""" + + # Send the request to Claude for content moderation + response = client.messages.create( + model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens=200, + messages=[{"role": "user", "content": assessment_prompt}], + ) + + # Parse the JSON response from Claude + text_block = next(block for block in response.content if block.type == "text") + assessment = json.loads(text_block.text) + + # Extract the violation status from the assessment + contains_violation = assessment["violation"] + + # If there's a violation, get the categories and explanation; otherwise, use empty defaults + violated_categories = assessment.get("categories", []) if contains_violation else [] + explanation = assessment.get("explanation") if contains_violation else None + + return contains_violation, violated_categories, explanation + + + # Process each comment and print the results + for comment in user_comments: + print(f"\nComment: {comment}") + violation, violated_categories, explanation = moderate_message_with_definitions( + comment, unsafe_category_definitions + ) + + if violation: + print(f"Violated Categories: {', '.join(violated_categories)}") + print(f"Explanation: {explanation}") + else: + print("No issues detected.") + ``` + + ```typescript TypeScript + // Shape of the JSON assessment Claude returns + interface DefinitionBasedAssessment { + violation: boolean; + categories?: string[]; + explanation?: string; + } + + // Categories considered unsafe for content moderation, with their definitions + // (object keys preserve insertion order, so categories render in this order) + const unsafeCategoryDefinitions: Record = { + "Child Exploitation": + "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children.", + "Conspiracy Theories": `Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts.`, + "Hate": `Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes.`, + "Indiscriminate Weapons": + "Content that enables the creation of weapons of mass destruction.", + "Intellectual Property": + "Content that violates the intellectual property rights of third parties.", + "Non-Violent Crimes": + "Content that enables, encourages, or excuses the commission of non-violent crimes.", + "Privacy": + "Content that contains sensitive, personal information about private individuals.", "Self-Harm": "Content that enables, encourages, or excuses acts of intentional self-harm.", "Sex Crimes": "Content that enables, encourages, or excuses the commission of sex crimes.", - "Sexual Content": "Content that contains erotic descriptions or explicit depictions of sex acts.", - "Specialized Advice": """Content that contains financial, medical, or legal advice. - Financial advice includes guidance on investments, stocks, bonds, or any financial planning.""", - "Violent Crimes": "Content that enables, encourages, or excuses the commission of violent crimes.", -} - - -def moderate_message_with_definitions(message, unsafe_category_definitions): - # Format unsafe categories string, with each category and its definition on a new line - unsafe_category_str = "\n".join( - f"{category}: {definition}" - for category, definition in unsafe_category_definitions.items() - ) + "Sexual Content": + "Content that contains erotic descriptions or explicit depictions of sex acts.", + "Specialized Advice": `Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning.`, + "Violent Crimes": + "Content that enables, encourages, or excuses the commission of violent crimes." + }; + + async function moderateMessageWithDefinitions( + message: string, + unsafeCategoryDefinitions: Record + ): Promise<{ violation: boolean; violatedCategories: string[]; explanation?: string }> { + // Format the unsafe categories string, with each category and its definition on a new line + const unsafeCategoryStr = Object.entries(unsafeCategoryDefinitions) + .map(([category, definition]) => `${category}: ${definition}`) + .join("\n"); + + // Construct the prompt for Claude, including the message and unsafe categories + const assessmentPrompt = `Determine whether the following message warrants moderation, based on the unsafe categories outlined below. + + Message: + ${message} + + Unsafe Categories and Their Definitions: + + ${unsafeCategoryStr} + + + It's important that you remember all unsafe categories and their definitions. + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response.`; + + // Send the request to Claude for content moderation + const response = await client.messages.create({ + model: "claude-haiku-4-5-20251001", // Using the Haiku model for lower costs + max_tokens: 200, + messages: [{ role: "user", content: assessmentPrompt }] + }); + + // Parse the JSON response from Claude + const textBlock = response.content.find((block) => block.type === "text"); + if (!textBlock) { + throw new Error("Expected a text block in the response"); + } + const assessment: DefinitionBasedAssessment = JSON.parse(textBlock.text); + + // Extract the violation status from the assessment + const containsViolation = assessment.violation; + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + const violatedCategories = containsViolation ? assessment.categories ?? [] : []; + const explanation = containsViolation ? assessment.explanation : undefined; + + return { violation: containsViolation, violatedCategories, explanation }; + } + + // Process each comment and print the results + for (const comment of userComments) { + console.log(`\nComment: ${comment}`); + const { violation, violatedCategories, explanation } = await moderateMessageWithDefinitions( + comment, + unsafeCategoryDefinitions + ); + + if (violation) { + console.log(`Violated Categories: ${violatedCategories.join(", ")}`); + console.log(`Explanation: ${explanation}`); + } else { + console.log("No issues detected."); + } + } + ``` + + ```csharp C# + // Categories considered unsafe for content moderation, with their definitions. + // The entries stay in insertion order, so the rendered prompt lists categories + // in exactly this order. + (string Category, string Definition)[] unsafeCategoryDefinitions = + [ + ( + "Child Exploitation", + "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children." + ), + ( + "Conspiracy Theories", + """ + Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts. + """ + ), + ( + "Hate", + """ + Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes. + """ + ), + ("Indiscriminate Weapons", "Content that enables the creation of weapons of mass destruction."), + ("Intellectual Property", "Content that violates the intellectual property rights of third parties."), + ("Non-Violent Crimes", "Content that enables, encourages, or excuses the commission of non-violent crimes."), + ("Privacy", "Content that contains sensitive, personal information about private individuals."), + ("Self-Harm", "Content that enables, encourages, or excuses acts of intentional self-harm."), + ("Sex Crimes", "Content that enables, encourages, or excuses the commission of sex crimes."), + ("Sexual Content", "Content that contains erotic descriptions or explicit depictions of sex acts."), + ( + "Specialized Advice", + """ + Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning. + """ + ), + ("Violent Crimes", "Content that enables, encourages, or excuses the commission of violent crimes."), + ]; + + + async Task<(bool ContainsViolation, List ViolatedCategories, string? Explanation)> ModerateMessageWithDefinitions( + string message, + IReadOnlyList<(string Category, string Definition)> categoryDefinitions + ) + { + // Format the unsafe categories string, with each category and its definition on a new line + var unsafeCategoryText = string.Join( + "\n", + categoryDefinitions.Select(entry => $"{entry.Category}: {entry.Definition}") + ); + + // Construct the prompt for Claude, including the message and unsafe categories + var assessmentPrompt = $$""" + Determine whether the following message warrants moderation, based on the unsafe categories outlined below. + + Message: + {{message}} + + Unsafe Categories and Their Definitions: + + {{unsafeCategoryText}} + + + It's important that you remember all unsafe categories and their definitions. + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response. + """; + + // Send the request to Claude for content moderation + var response = await client.Messages.Create( + new() + { + Model = Model.ClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens = 200, + Messages = [new() { Role = Role.User, Content = assessmentPrompt }], + } + ); + + // Narrow the first content block to a text block, then parse Claude's JSON response + if (!response.Content[0].TryPickText(out var textBlock)) + { + throw new InvalidOperationException("Expected a text response from Claude."); + } + var assessment = JsonNode.Parse(textBlock.Text)!; + + // Extract the violation status from the assessment + var containsViolation = assessment["violation"]!.GetValue(); + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + List violatedCategories = containsViolation + ? assessment["categories"]?.AsArray().Select(category => category!.GetValue()).ToList() ?? [] + : []; + var explanation = containsViolation ? assessment["explanation"]?.GetValue() : null; + + return (containsViolation, violatedCategories, explanation); + } + + // Process each comment and print the results + foreach (var comment in userComments) + { + Console.WriteLine($"\nComment: {comment}"); + var (violation, violatedCategories, explanation) = await ModerateMessageWithDefinitions( + comment, + unsafeCategoryDefinitions + ); + + if (violation) + { + Console.WriteLine($"Violated Categories: {string.Join(", ", violatedCategories)}"); + Console.WriteLine($"Explanation: {explanation}"); + } + else + { + Console.WriteLine("No issues detected."); + } + } + ``` + + ```go Go + // Categories considered unsafe for content moderation, with their definitions. + // A slice of category/definition pairs (rather than a map) keeps the rendered + // order stable; Go maps iterate in random order. + type categoryDefinition struct { + category string + definition string + } + + var unsafeCategoryDefinitions = []categoryDefinition{ + {"Child Exploitation", "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children."}, + {"Conspiracy Theories", `Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts.`}, + {"Hate", `Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes.`}, + {"Indiscriminate Weapons", "Content that enables the creation of weapons of mass destruction."}, + {"Intellectual Property", "Content that violates the intellectual property rights of third parties."}, + {"Non-Violent Crimes", "Content that enables, encourages, or excuses the commission of non-violent crimes."}, + {"Privacy", "Content that contains sensitive, personal information about private individuals."}, + {"Self-Harm", "Content that enables, encourages, or excuses acts of intentional self-harm."}, + {"Sex Crimes", "Content that enables, encourages, or excuses the commission of sex crimes."}, + {"Sexual Content", "Content that contains erotic descriptions or explicit depictions of sex acts."}, + {"Specialized Advice", `Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning.`}, + {"Violent Crimes", "Content that enables, encourages, or excuses the commission of violent crimes."}, + } + + func moderateMessageWithDefinitions(message string, unsafeCategoryDefinitions []categoryDefinition) (bool, []string, string) { + // Format unsafe categories string, with each category and its definition on a new line + categoryLines := make([]string, len(unsafeCategoryDefinitions)) + for i, entry := range unsafeCategoryDefinitions { + categoryLines[i] = fmt.Sprintf("%s: %s", entry.category, entry.definition) + } + unsafeCategoryStr := strings.Join(categoryLines, "\n") + + // Construct the prompt for Claude, including the message and unsafe categories + assessmentPrompt := fmt.Sprintf(`Determine whether the following message warrants moderation, based on the unsafe categories outlined below. + + Message: + %s + + Unsafe Categories and Their Definitions: + + %s + + + It's important that you remember all unsafe categories and their definitions. + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response.`, message, unsafeCategoryStr) + + // Send the request to Claude for content moderation + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens: 200, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock(assessmentPrompt)), + }, + }) + if err != nil { + log.Fatal(err) + } + + // Narrow the first content block to a text block before reading its text + textBlock, ok := response.Content[0].AsAny().(anthropic.TextBlock) + if !ok { + log.Fatalf("expected a text block, got %q", response.Content[0].Type) + } + + // Parse the JSON response from Claude + var assessment struct { + Violation bool `json:"violation"` + Categories []string `json:"categories"` + Explanation string `json:"explanation"` + } + if err := json.Unmarshal([]byte(textBlock.Text), &assessment); err != nil { + log.Fatal(err) + } + + // If there's a violation, return the categories and explanation; otherwise, use empty defaults + if !assessment.Violation { + return false, nil, "" + } + return true, assessment.Categories, assessment.Explanation + } + + // moderateAllCommentsWithDefinitions processes each comment and prints the results. + func moderateAllCommentsWithDefinitions() { + for _, comment := range userComments { + fmt.Printf("\nComment: %s\n", comment) + violation, violatedCategories, explanation := moderateMessageWithDefinitions(comment, unsafeCategoryDefinitions) + + if violation { + fmt.Printf("Violated Categories: %s\n", strings.Join(violatedCategories, ", ")) + fmt.Printf("Explanation: %s\n", explanation) + } else { + fmt.Println("No issues detected.") + } + } + } + + ``` + + ```java Java + // Categories considered unsafe for content moderation, with their definitions + record CategoryDefinition(String category, String definition) {} + + final List unsafeCategoryDefinitions = List.of( + new CategoryDefinition( + "Child Exploitation", + "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children."), + new CategoryDefinition( + "Conspiracy Theories", + """ + Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts."""), + new CategoryDefinition( + "Hate", + """ + Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes."""), + new CategoryDefinition( + "Indiscriminate Weapons", + "Content that enables the creation of weapons of mass destruction."), + new CategoryDefinition( + "Intellectual Property", + "Content that violates the intellectual property rights of third parties."), + new CategoryDefinition( + "Non-Violent Crimes", + "Content that enables, encourages, or excuses the commission of non-violent crimes."), + new CategoryDefinition( + "Privacy", + "Content that contains sensitive, personal information about private individuals."), + new CategoryDefinition( + "Self-Harm", + "Content that enables, encourages, or excuses acts of intentional self-harm."), + new CategoryDefinition( + "Sex Crimes", + "Content that enables, encourages, or excuses the commission of sex crimes."), + new CategoryDefinition( + "Sexual Content", + "Content that contains erotic descriptions or explicit depictions of sex acts."), + new CategoryDefinition( + "Specialized Advice", + """ + Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning."""), + new CategoryDefinition( + "Violent Crimes", + "Content that enables, encourages, or excuses the commission of violent crimes.")); + + record ModerationDecision(boolean violation, List violatedCategories, String explanation) {} + + ModerationDecision moderateMessageWithDefinitions( + String message, List unsafeCategoryDefinitions) + throws JsonProcessingException { + // Format unsafe categories string, with each category and its definition on a new line + String unsafeCategoryStr = unsafeCategoryDefinitions.stream() + .map(categoryDefinition -> + categoryDefinition.category() + ": " + categoryDefinition.definition()) + .collect(Collectors.joining("\n")); + + // Construct the prompt for Claude, including the message and unsafe categories + String assessmentPrompt = """ + Determine whether the following message warrants moderation, based on the unsafe categories outlined below. + + Message: + %s + + Unsafe Categories and Their Definitions: + + %s + + + It's important that you remember all unsafe categories and their definitions. + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response.""" + .formatted(message, unsafeCategoryStr); + + // Send the request to Claude for content moderation + Message response = client.messages().create(MessageCreateParams.builder() + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(200) + .addUserMessage(assessmentPrompt) + .build()); + + // Parse the JSON response from Claude + String assessmentJson = response.content().stream() + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); + ObjectMapper mapper = new ObjectMapper(); + JsonNode assessment = mapper.readTree(assessmentJson); + + // Extract the violation status from the assessment + boolean containsViolation = assessment.required("violation").asBoolean(); + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + List violatedCategories = containsViolation && assessment.has("categories") + ? mapper.convertValue(assessment.get("categories"), new TypeReference>() {}) + : List.of(); + String explanation = containsViolation && assessment.hasNonNull("explanation") + ? assessment.get("explanation").asText() + : null; + + return new ModerationDecision(containsViolation, violatedCategories, explanation); + } + + // Process each comment and print the results + void printModerationResultsWithDefinitions() throws JsonProcessingException { + for (String comment : userComments) { + IO.println("\nComment: " + comment); + ModerationDecision result = moderateMessageWithDefinitions(comment, unsafeCategoryDefinitions); + + if (result.violation()) { + IO.println("Violated Categories: " + String.join(", ", result.violatedCategories())); + IO.println("Explanation: " + result.explanation()); + } else { + IO.println("No issues detected."); + } + } + } + ``` + + ```php PHP + // Categories considered unsafe for content moderation, with their definitions + $unsafeCategoryDefinitions = [ + 'Child Exploitation' => 'Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children.', + 'Conspiracy Theories' => 'Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts.', + 'Hate' => 'Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes.', + 'Indiscriminate Weapons' => 'Content that enables the creation of weapons of mass destruction.', + 'Intellectual Property' => 'Content that violates the intellectual property rights of third parties.', + 'Non-Violent Crimes' => 'Content that enables, encourages, or excuses the commission of non-violent crimes.', + 'Privacy' => 'Content that contains sensitive, personal information about private individuals.', + 'Self-Harm' => 'Content that enables, encourages, or excuses acts of intentional self-harm.', + 'Sex Crimes' => 'Content that enables, encourages, or excuses the commission of sex crimes.', + 'Sexual Content' => 'Content that contains erotic descriptions or explicit depictions of sex acts.', + 'Specialized Advice' => 'Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning.', + 'Violent Crimes' => 'Content that enables, encourages, or excuses the commission of violent crimes.', + ]; + + $moderateMessageWithDefinitions = function (string $message, array $unsafeCategoryDefinitions) use ($client): array { + // Format the unsafe categories string, with each category and its definition on a new line + $categoryLines = []; + foreach ($unsafeCategoryDefinitions as $category => $definition) { + $categoryLines[] = "{$category}: {$definition}"; + } + $unsafeCategoryStr = implode("\n", $categoryLines); + + // Construct the prompt for Claude, including the message and unsafe categories + $assessmentPrompt = <<{$message} + + Unsafe Categories and Their Definitions: + + {$unsafeCategoryStr} + + + It's important that you remember all unsafe categories and their definitions. + + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response. + PROMPT; + + // Send the request to Claude for content moderation + $response = $client->messages->create( + model: 'claude-haiku-4-5-20251001', // Using the Haiku model for lower costs + maxTokens: 200, + messages: [['role' => 'user', 'content' => $assessmentPrompt]], + ); + + // Parse the JSON response from Claude. The SDK decodes each content block + // into its concrete class, so find the TextBlock before reading the text. + $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock) + ?? throw new RuntimeException('Expected a text block in the response.'); + $assessment = json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR); + + // Extract the violation status from the assessment + $containsViolation = $assessment['violation']; + + // If there's a violation, get the categories and explanation; otherwise, use empty defaults + $violatedCategories = $containsViolation ? ($assessment['categories'] ?? []) : []; + $explanation = $containsViolation ? ($assessment['explanation'] ?? null) : null; + + return [$containsViolation, $violatedCategories, $explanation]; + }; + + // Process each comment and print the results + foreach ($userComments as $comment) { + echo "\nComment: {$comment}\n"; + [$violation, $violatedCategories, $explanation] = $moderateMessageWithDefinitions($comment, $unsafeCategoryDefinitions); + + if ($violation) { + echo 'Violated Categories: ' . implode(', ', $violatedCategories) . "\n"; + echo "Explanation: {$explanation}\n"; + } else { + echo "No issues detected.\n"; + } + } + ``` + + ```ruby Ruby + # Categories considered unsafe for content moderation, with their definitions + UNSAFE_CATEGORY_DEFINITIONS = { + "Child Exploitation" => "Content that depicts child nudity or that enables, encourages, excuses, or depicts the sexual abuse of children.", + "Conspiracy Theories" => "Content that promotes or endorses unfounded, false, or misleading theories about events, situations, or individuals, + which can incite harm or undermine public trust in institutions or facts.", + "Hate" => "Content that is hateful toward people on the basis of their protected characteristics + (race, color, ethnicity, national origin, disability, religious affiliation, caste, sexual orientation, sex, gender identity and serious disease), + or content that perpetuates negative stereotypes.", + "Indiscriminate Weapons" => "Content that enables the creation of weapons of mass destruction.", + "Intellectual Property" => "Content that violates the intellectual property rights of third parties.", + "Non-Violent Crimes" => "Content that enables, encourages, or excuses the commission of non-violent crimes.", + "Privacy" => "Content that contains sensitive, personal information about private individuals.", + "Self-Harm" => "Content that enables, encourages, or excuses acts of intentional self-harm.", + "Sex Crimes" => "Content that enables, encourages, or excuses the commission of sex crimes.", + "Sexual Content" => "Content that contains erotic descriptions or explicit depictions of sex acts.", + "Specialized Advice" => "Content that contains financial, medical, or legal advice. + Financial advice includes guidance on investments, stocks, bonds, or any financial planning.", + "Violent Crimes" => "Content that enables, encourages, or excuses the commission of violent crimes." + } + + + def moderate_message_with_definitions(message, unsafe_category_definitions) + # Format the unsafe categories string, with each category and its definition on a new line + unsafe_category_str = unsafe_category_definitions + .map { |category, definition| "#{category}: #{definition}" } + .join("\n") # Construct the prompt for Claude, including the message and unsafe categories - assessment_prompt = f"""Determine whether the following message warrants moderation, based on the unsafe categories outlined below. + assessment_prompt = <<~PROMPT.chomp + Determine whether the following message warrants moderation, based on the unsafe categories outlined below. -Message: -{message} + Message: + #{message} -Unsafe Categories and Their Definitions: - -{unsafe_category_str} - + Unsafe Categories and Their Definitions: + + #{unsafe_category_str} + -It's important that you remember all unsafe categories and their definitions. + It's important that you remember all unsafe categories and their definitions. -Respond with ONLY a JSON object, using the format below: -{{ - "violation": , - "categories": [Comma-separated list of violated categories], - "explanation": [Optional. Only include if there is a violation.] -}}""" + Respond with ONLY a JSON object, using the format below: + { + "violation": , + "categories": [Comma-separated list of violated categories], + "explanation": [Optional. Only include if there is a violation.] + } + Do not include markdown formatting or code fences in your response. + PROMPT # Send the request to Claude for content moderation - response = client.messages.create( - model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs - max_tokens=200, - temperature=0, # Use 0 temperature for increased consistency - messages=[{"role": "user", "content": assessment_prompt}], + response = CLIENT.messages.create( + model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens: 200, + messages: [{role: :user, content: assessment_prompt}] ) # Parse the JSON response from Claude - assessment = json.loads(response.content[0].text) + text_block = response.content.find { it.type == :text } + assessment = JSON.parse(text_block.text) # Extract the violation status from the assessment contains_violation = assessment["violation"] # If there's a violation, get the categories and explanation; otherwise, use empty defaults - violated_categories = assessment.get("categories", []) if contains_violation else [] - explanation = assessment.get("explanation") if contains_violation else None + violated_categories = contains_violation ? assessment.fetch("categories", []) : [] + explanation = contains_violation ? assessment["explanation"] : nil - return contains_violation, violated_categories, explanation + [contains_violation, violated_categories, explanation] + end -# Process each comment and print the results -for comment in user_comments: - print(f"\nComment: {comment}") - violation, violated_categories, explanation = moderate_message_with_definitions( - comment, unsafe_category_definitions - ) + # Process each comment and print the results + USER_COMMENTS.each do |comment| + puts "\nComment: #{comment}" + violation, violated_categories, explanation = moderate_message_with_definitions(comment, UNSAFE_CATEGORY_DEFINITIONS) - if violation: - print(f"Violated Categories: {', '.join(violated_categories)}") - print(f"Explanation: {explanation}") - else: - print("No issues detected.") -``` + if violation + puts "Violated Categories: #{violated_categories.join(", ")}" + puts "Explanation: #{explanation}" + else + puts "No issues detected." + end + end + ``` + -The `moderate_message_with_definitions` function expands upon the earlier `moderate_message` function by allowing each unsafe category to be paired with a detailed definition. This occurs in the code by replacing the `unsafe_categories` list from the original function with an `unsafe_category_definitions` dictionary. This dictionary maps each unsafe category to its corresponding definition. Both the category names and their definitions are included in the prompt. +The `moderate_message_with_definitions` function expands upon the earlier `moderate_message` function by allowing each unsafe category to be paired with a detailed definition. This occurs in the code by replacing the `unsafe_categories` collection from the original function with an `unsafe_category_definitions` mapping. This mapping pairs each unsafe category with its corresponding definition. Both the category names and their definitions are included in the prompt. Notably, the definition for the `Specialized Advice` category now specifies the types of financial advice that should be prohibited. As a result, the comment `It is a great time to invest in gold!`, which previously passed the `moderate_message` assessment, now triggers a violation. @@ -419,76 +2191,544 @@ Notably, the definition for the `Specialized Advice` category now specifies the To reduce costs in situations where real-time moderation isn't necessary, consider moderating messages in batches. Include multiple messages within the prompt's context, and ask Claude to assess which messages should be moderated. -```python Python -import json - -# Initialize the Anthropic client -client = anthropic.Anthropic() - - -def batch_moderate_messages(messages, unsafe_categories): - # Convert the list of unsafe categories into a string, with each category on a new line - unsafe_category_str = "\n".join(unsafe_categories) - - # Format messages string, with each message wrapped in XML-like tags and given an ID - messages_str = "\n".join( - [f"{msg}" for idx, msg in enumerate(messages)] - ) + + ```python Python + def batch_moderate_messages(messages, unsafe_categories): + # Convert the unsafe categories into a string, with each category on a new line + unsafe_category_str = "\n".join(unsafe_categories) + + # Format messages string, with each message wrapped in XML-like tags and given an ID + messages_str = "\n".join( + [f"{msg}" for idx, msg in enumerate(messages)] + ) + + # Construct the prompt for Claude, including the messages and unsafe categories + assessment_prompt = f"""Determine the messages to moderate, based on the unsafe categories outlined below. + + Messages: + + {messages_str} + + + Unsafe Categories: + + {unsafe_category_str} + + + Respond with ONLY a JSON object, using the format below: + {{ + "violations": [ + {{ + "id": , + "categories": [list of violated categories], + "explanation": + }} + ] + }} + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response.""" + + # Send the request to Claude for content moderation + response = client.messages.create( + model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens=2048, # Increased max token count to handle batches + messages=[{"role": "user", "content": assessment_prompt}], + ) + + # Parse the JSON response from Claude + text_block = next(block for block in response.content if block.type == "text") + assessment = json.loads(text_block.text) + return assessment + + + # Process the batch of comments and get the response + response_obj = batch_moderate_messages(user_comments, unsafe_categories) + + # Print the results for each detected violation + for violation in response_obj["violations"]: + print(f"""Comment: {user_comments[violation["id"]]} + Violated Categories: {", ".join(violation["categories"])} + Explanation: {violation["explanation"]} + """) + ``` + + ```typescript TypeScript + // Shape of the JSON batch assessment Claude returns + interface BatchAssessment { + violations: { + id: number; + categories: string[]; + explanation: string; + }[]; + } + + async function batchModerateMessages( + messages: string[], + unsafeCategories: string[] + ): Promise { + // Convert the unsafe categories into a string, with each category on a new line + const unsafeCategoryStr = unsafeCategories.join("\n"); + + // Format the messages string, with each message wrapped in XML-like tags and given an ID + const messagesStr = messages + .map((msg, idx) => `${msg}`) + .join("\n"); + + // Construct the prompt for Claude, including the messages and unsafe categories + const assessmentPrompt = `Determine the messages to moderate, based on the unsafe categories outlined below. + + Messages: + + ${messagesStr} + + + Unsafe Categories: + + ${unsafeCategoryStr} + + + Respond with ONLY a JSON object, using the format below: + { + "violations": [ + { + "id": , + "categories": [list of violated categories], + "explanation": + } + ] + } + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response.`; + + // Send the request to Claude for content moderation + const response = await client.messages.create({ + model: "claude-haiku-4-5-20251001", // Using the Haiku model for lower costs + max_tokens: 2048, // Increased max token count to handle batches + messages: [{ role: "user", content: assessmentPrompt }] + }); + + // Parse the JSON response from Claude + const textBlock = response.content.find((block) => block.type === "text"); + if (!textBlock) { + throw new Error("Expected a text block in the response"); + } + const assessment: BatchAssessment = JSON.parse(textBlock.text); + return assessment; + } + + // Process the batch of comments and get the response + const batchAssessment = await batchModerateMessages(userComments, unsafeCategories); + + // Print the results for each detected violation + for (const violation of batchAssessment.violations) { + console.log(`Comment: ${userComments[violation.id]} + Violated Categories: ${violation.categories.join(", ")} + Explanation: ${violation.explanation} + `); + } + ``` + + ```csharp C# + async Task BatchModerateMessages(IReadOnlyList messages, IReadOnlyList categories) + { + // Convert the unsafe categories into a string, with each category on a new line + var unsafeCategoryText = string.Join("\n", categories); + + // Format the messages string, with each message wrapped in XML-like tags and given an ID + var messagesText = string.Join( + "\n", + messages.Select((message, index) => $"{message}") + ); + + // Construct the prompt for Claude, including the messages and unsafe categories + var assessmentPrompt = $$""" + Determine the messages to moderate, based on the unsafe categories outlined below. + + Messages: + + {{messagesText}} + + + Unsafe Categories: + + {{unsafeCategoryText}} + + + Respond with ONLY a JSON object, using the format below: + { + "violations": [ + { + "id": , + "categories": [list of violated categories], + "explanation": + } + ] + } + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response. + """; + + // Send the request to Claude for content moderation + var response = await client.Messages.Create( + new() + { + Model = Model.ClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens = 2048, // Increased max token count to handle batches + Messages = [new() { Role = Role.User, Content = assessmentPrompt }], + } + ); + + // Narrow the first content block to a text block, then parse Claude's JSON response + if (!response.Content[0].TryPickText(out var textBlock)) + { + throw new InvalidOperationException("Expected a text response from Claude."); + } + return JsonNode.Parse(textBlock.Text)!; + } + + // Process the batch of comments and get the response + var moderationResults = await BatchModerateMessages(userComments, unsafeCategories); + + // Print the results for each detected violation + foreach (var violation in moderationResults["violations"]!.AsArray()) + { + var flaggedComment = userComments[violation!["id"]!.GetValue()]; + var violatedCategories = string.Join( + ", ", + violation["categories"]!.AsArray().Select(category => category!.GetValue()) + ); + var explanation = violation["explanation"]!.GetValue(); + + Console.WriteLine($""" + Comment: {flaggedComment} + Violated Categories: {violatedCategories} + Explanation: {explanation} + + """); + } + ``` + + ```go Go + // batchViolation is one entry in Claude's "violations" array: the index of the + // offending message plus the categories it violated and why. + type batchViolation struct { + ID int `json:"id"` + Categories []string `json:"categories"` + Explanation string `json:"explanation"` + } + + func batchModerateMessages(messages []string, unsafeCategories []string) []batchViolation { + // Convert the unsafe categories into a string, with each category on a new line + unsafeCategoryStr := strings.Join(unsafeCategories, "\n") + + // Format messages string, with each message wrapped in XML-like tags and given an ID + messageLines := make([]string, len(messages)) + for i, message := range messages { + messageLines[i] = fmt.Sprintf("%s", i, message) + } + messagesStr := strings.Join(messageLines, "\n") + + // Construct the prompt for Claude, including the messages and unsafe categories + assessmentPrompt := fmt.Sprintf(`Determine the messages to moderate, based on the unsafe categories outlined below. + + Messages: + + %s + + + Unsafe Categories: + + %s + + + Respond with ONLY a JSON object, using the format below: + { + "violations": [ + { + "id": , + "categories": [list of violated categories], + "explanation": + } + ] + } + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response.`, messagesStr, unsafeCategoryStr) + + // Send the request to Claude for content moderation + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeHaiku4_5_20251001, // Using the Haiku model for lower costs + MaxTokens: 2048, // Increased max token count to handle batches + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock(assessmentPrompt)), + }, + }) + if err != nil { + log.Fatal(err) + } + + // Narrow the first content block to a text block before reading its text + textBlock, ok := response.Content[0].AsAny().(anthropic.TextBlock) + if !ok { + log.Fatalf("expected a text block, got %q", response.Content[0].Type) + } + + // Parse the JSON response from Claude + var assessment struct { + Violations []batchViolation `json:"violations"` + } + if err := json.Unmarshal([]byte(textBlock.Text), &assessment); err != nil { + log.Fatal(err) + } + return assessment.Violations + } + + // moderateAllCommentsAsBatch moderates the whole batch of comments in a single + // request and prints the results for each detected violation. + func moderateAllCommentsAsBatch() { + // Process the batch of comments and get the response + violations := batchModerateMessages(userComments, unsafeCategories) + + // Print the results for each detected violation + for _, violation := range violations { + fmt.Printf(`Comment: %s + Violated Categories: %s + Explanation: %s + + `, userComments[violation.ID], strings.Join(violation.Categories, ", "), violation.Explanation) + } + } + + ``` + + ```java Java + JsonNode batchModerateMessages(List messages, List unsafeCategories) + throws JsonProcessingException { + // Convert the unsafe categories into a string, with each category on a new line + String unsafeCategoryStr = String.join("\n", unsafeCategories); + + // Format messages string, with each message wrapped in XML-like tags and given an ID + String messagesStr = IntStream.range(0, messages.size()) + .mapToObj(idx -> "%s".formatted(idx, messages.get(idx))) + .collect(Collectors.joining("\n")); + + // Construct the prompt for Claude, including the messages and unsafe categories + String assessmentPrompt = """ + Determine the messages to moderate, based on the unsafe categories outlined below. + + Messages: + + %s + + + Unsafe Categories: + + %s + + + Respond with ONLY a JSON object, using the format below: + { + "violations": [ + { + "id": , + "categories": [list of violated categories], + "explanation": + } + ] + } + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response.""" + .formatted(messagesStr, unsafeCategoryStr); + + // Send the request to Claude for content moderation + Message response = client.messages().create(MessageCreateParams.builder() + .model(Model.CLAUDE_HAIKU_4_5_20251001) // Using the Haiku model for lower costs + .maxTokens(2048) // Increased max token count to handle batches + .addUserMessage(assessmentPrompt) + .build()); + + // Parse the JSON response from Claude + String assessmentJson = response.content().stream() + .flatMap(contentBlock -> contentBlock.text().stream()) + .findFirst() + .orElseThrow() + .text(); + return new ObjectMapper().readTree(assessmentJson); + } + + // Process the batch of comments and print the results for each detected violation + void printBatchViolations() throws JsonProcessingException { + JsonNode response = batchModerateMessages(userComments, unsafeCategories); + + ObjectMapper mapper = new ObjectMapper(); + for (JsonNode violation : response.required("violations")) { + List violatedCategories = + mapper.convertValue(violation.required("categories"), new TypeReference>() {}); + IO.println(""" + Comment: %s + Violated Categories: %s + Explanation: %s + """.formatted( + userComments.get(violation.required("id").asInt()), + String.join(", ", violatedCategories), + violation.required("explanation").asText())); + } + } + ``` + + ```php PHP + $batchModerateMessages = function (array $messages, array $unsafeCategories) use ($client): array { + // Convert the unsafe categories into a string, with each category on a new line + $unsafeCategoryStr = implode("\n", $unsafeCategories); + + // Format the messages string, with each message wrapped in XML-like tags and given an ID + $messageLines = []; + foreach ($messages as $idx => $msg) { + $messageLines[] = "{$msg}"; + } + $messagesStr = implode("\n", $messageLines); + + // Construct the prompt for Claude, including the messages and unsafe categories + $assessmentPrompt = << + {$messagesStr} + + + Unsafe Categories: + + {$unsafeCategoryStr} + + + Respond with ONLY a JSON object, using the format below: + { + "violations": [ + { + "id": , + "categories": [list of violated categories], + "explanation": + } + ] + } + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response. + PROMPT; + + // Send the request to Claude for content moderation + $response = $client->messages->create( + model: 'claude-haiku-4-5-20251001', // Using the Haiku model for lower costs + maxTokens: 2048, // Increased max token count to handle batches + messages: [['role' => 'user', 'content' => $assessmentPrompt]], + ); + + // Parse the JSON response from Claude. The SDK decodes each content block + // into its concrete class, so find the TextBlock before reading the text. + $textBlock = array_find($response->content, fn ($block) => $block instanceof TextBlock) + ?? throw new RuntimeException('Expected a text block in the response.'); + + return json_decode($textBlock->text, associative: true, flags: JSON_THROW_ON_ERROR); + }; + + // Process the batch of comments and get the response + $responseObj = $batchModerateMessages($userComments, $unsafeCategories); + + // Print the results for each detected violation + foreach ($responseObj['violations'] as $violation) { + echo "Comment: {$userComments[$violation['id']]}\n"; + echo 'Violated Categories: ' . implode(', ', $violation['categories']) . "\n"; + echo "Explanation: {$violation['explanation']}\n\n"; + } + ``` + + ```ruby Ruby + def batch_moderate_messages(messages, unsafe_categories) + # Convert the unsafe categories into a string, with each category on a new line + unsafe_category_str = unsafe_categories.join("\n") + + # Format the messages string, with each message wrapped in XML-like tags and given an ID + messages_str = messages + .map.with_index { |message, index| "#{message}" } + .join("\n") # Construct the prompt for Claude, including the messages and unsafe categories - assessment_prompt = f"""Determine the messages to moderate, based on the unsafe categories outlined below. - -Messages: - -{messages_str} - - -Unsafe Categories: - -{unsafe_category_str} - - -Respond with ONLY a JSON object, using the format below: -{{ - "violations": [ - {{ - "id": , - "categories": [list of violated categories], - "explanation": - }}, - ... - ] -}} - -Important Notes: -- Remember to analyze every message for a violation. -- Select any number of violations that reasonably apply.""" + assessment_prompt = <<~PROMPT.chomp + Determine the messages to moderate, based on the unsafe categories outlined below. + + Messages: + + #{messages_str} + + + Unsafe Categories: + + #{unsafe_category_str} + + + Respond with ONLY a JSON object, using the format below: + { + "violations": [ + { + "id": , + "categories": [list of violated categories], + "explanation": + } + ] + } + + Important Notes: + - Remember to analyze every message for a violation. + - Select any number of violations that reasonably apply. + - Do not include markdown formatting or code fences in your response. + PROMPT # Send the request to Claude for content moderation - response = client.messages.create( - model="claude-haiku-4-5-20251001", # Using the Haiku model for lower costs - max_tokens=2048, # Increased max token count to handle batches - temperature=0, # Use 0 temperature for increased consistency - messages=[{"role": "user", "content": assessment_prompt}], + response = CLIENT.messages.create( + model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs + max_tokens: 2048, # Increased max token count to handle batches + messages: [{role: :user, content: assessment_prompt}] ) # Parse the JSON response from Claude - assessment = json.loads(response.content[0].text) - return assessment + text_block = response.content.find { it.type == :text } + JSON.parse(text_block.text) + end + + # Process the batch of comments and get the response + response_obj = batch_moderate_messages(USER_COMMENTS, UNSAFE_CATEGORIES) -# Process the batch of comments and get the response -response_obj = batch_moderate_messages(user_comments, unsafe_categories) + # Print the results for each detected violation + response_obj["violations"].each do |violation| + puts <<~RESULT + Comment: #{USER_COMMENTS[violation["id"]]} + Violated Categories: #{violation["categories"].join(", ")} + Explanation: #{violation["explanation"]} -# Print the results for each detected violation -for violation in response_obj["violations"]: - print(f"""Comment: {user_comments[violation["id"]]} -Violated Categories: {", ".join(violation["categories"])} -Explanation: {violation["explanation"]} -""") -``` + RESULT + end + ``` + -In this example, the `batch_moderate_messages` function handles the moderation of an entire batch of messages with a single Claude API call. Inside the function, a prompt is created that includes the list of messages to evaluate and the unsafe content categories. The prompt directs Claude to return a JSON object listing all messages that contain violations. Each message in the response is identified by its `id`, which corresponds to the message's position in the input list. Keep in mind that finding the optimal batch size for your specific needs may require some experimentation. While larger batch sizes can lower costs, they might also lead to a slight decrease in quality. Additionally, you may need to increase the `max_tokens` parameter in the Claude API call to accommodate longer responses. For details on the maximum number of tokens your chosen model can output, refer to the [model comparison table](/docs/en/about-claude/models/overview#latest-models-comparison). +In this example, the `batch_moderate_messages` function handles the moderation of an entire batch of messages with a single Claude API call. Inside the function, a prompt is created that includes the list of messages to evaluate and the unsafe content categories. The prompt directs Claude to return a JSON object listing all messages that contain violations. Each message in the response is identified by its `id`, which corresponds to the message's position in the batch. Keep in mind that finding the optimal batch size for your specific needs may require some experimentation. While larger batch sizes can lower costs, they might also lead to a slight decrease in quality. Additionally, you may need to increase the `max_tokens` parameter in the Claude API call to accommodate longer responses. For details on the maximum number of tokens your chosen model can output, refer to the [model comparison table](/docs/en/about-claude/models/overview#latest-models-comparison). diff --git a/content/en/about-claude/use-case-guides/customer-support-chat.md b/content/en/about-claude/use-case-guides/customer-support-chat.md index 790b95385..f5e82e207 100644 --- a/content/en/about-claude/use-case-guides/customer-support-chat.md +++ b/content/en/about-claude/use-case-guides/customer-support-chat.md @@ -434,109 +434,635 @@ def get_quote(make, model, year, mileage, driver_age): It's hard to know how well your prompt works without deploying it in a test production setting and [running evaluations](/docs/en/test-and-evaluate/develop-tests). Build a small application using the prompt, the Anthropic SDK, and Streamlit for a user interface. -In a file called `chatbot.py`, start by setting up the ChatBot class, which will encapsulate the interactions with the Anthropic SDK. +In a file called `chatbot.py` (or the equivalent module in your language), set up the ChatBot class, which will encapsulate the interactions with the Anthropic SDK. + +The class should have two main methods: one that calls the API to generate a message, and one that processes each incoming user input. + + + ```python Python + # In your chatbot.py, import these from the config.py you wrote above: + # from config import IDENTITY, TOOLS, MODEL, get_quote + from anthropic import Anthropic + from dotenv import load_dotenv + + load_dotenv() + + + class ChatBot: + def __init__(self, session_state): + self.anthropic = Anthropic() + self.session_state = session_state + + def generate_message( + self, + messages, + max_tokens, + ): + try: + response = self.anthropic.messages.create( + model=MODEL, + system=IDENTITY, + max_tokens=max_tokens, + messages=messages, + tools=TOOLS, + ) + return response + except Exception as e: + return {"error": str(e)} + + def process_user_input(self, user_input): + self.session_state.messages.append({"role": "user", "content": user_input}) + + response_message = self.generate_message( + messages=self.session_state.messages, + max_tokens=2048, + ) + + if "error" in response_message: + return f"An error occurred: {response_message['error']}" + + if response_message.content[-1].type == "tool_use": + tool_use = response_message.content[-1] + func_name = tool_use.name + func_params = tool_use.input + tool_use_id = tool_use.id + + result = self.handle_tool_use(func_name, func_params) + self.session_state.messages.append( + {"role": "assistant", "content": response_message.content} + ) + self.session_state.messages.append( + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": tool_use_id, + "content": f"{result}", + } + ], + } + ) + + follow_up_response = self.generate_message( + messages=self.session_state.messages, + max_tokens=2048, + ) + + if "error" in follow_up_response: + return f"An error occurred: {follow_up_response['error']}" + + response_text = follow_up_response.content[0].text + self.session_state.messages.append( + {"role": "assistant", "content": response_text} + ) + return response_text + + elif response_message.content[0].type == "text": + response_text = response_message.content[0].text + self.session_state.messages.append( + {"role": "assistant", "content": response_text} + ) + return response_text + + else: + raise Exception("An error occurred: Unexpected response type") + + def handle_tool_use(self, func_name, func_params): + if func_name == "get_quote": + premium = get_quote(**func_params) + return f"Quote generated: ${premium:.2f} per month" + + raise Exception("An unexpected tool was used") + ``` + + ```typescript TypeScript + import Anthropic from "@anthropic-ai/sdk"; + + class ChatBot { + // IDENTITY, MODEL, TOOLS, and getQuote mirror the config.py values defined + // earlier in this guide (shown in Python). + readonly anthropic = new Anthropic(); + readonly messages: Anthropic.MessageParam[] = []; + + async generateMessage( + messages: Anthropic.MessageParam[], + maxTokens: number + ): Promise { + return this.anthropic.messages.create({ + model: MODEL, + system: IDENTITY, + max_tokens: maxTokens, + messages, + tools: TOOLS + }); + } -The class should have two main methods: `generate_message` and `process_user_input`. + async processUserInput(userInput: string): Promise { + this.messages.push({ role: "user", content: userInput }); -```python -from anthropic import Anthropic -from config import IDENTITY, TOOLS, MODEL, get_quote -from dotenv import load_dotenv + const responseMessage = await this.generateMessage(this.messages, 2048); -load_dotenv() + const lastBlock = responseMessage.content.at(-1); + if (lastBlock?.type === "tool_use") { + const toolResult = this.handleToolUse(lastBlock.name, lastBlock.input); + this.messages.push({ role: "assistant", content: responseMessage.content }); + this.messages.push({ + role: "user", + content: [{ type: "tool_result", tool_use_id: lastBlock.id, content: toolResult }] + }); -class ChatBot: - def __init__(self, session_state): - self.anthropic = Anthropic() - self.session_state = session_state + const followUpResponse = await this.generateMessage(this.messages, 2048); - def generate_message( - self, - messages, - max_tokens, - ): - try: - response = self.anthropic.messages.create( - model=MODEL, - system=IDENTITY, - max_tokens=max_tokens, - messages=messages, - tools=TOOLS, - ) - return response - except Exception as e: - return {"error": str(e)} - - def process_user_input(self, user_input): - self.session_state.messages.append({"role": "user", "content": user_input}) - - response_message = self.generate_message( - messages=self.session_state.messages, - max_tokens=2048, - ) - - if "error" in response_message: - return f"An error occurred: {response_message['error']}" - - if response_message.content[-1].type == "tool_use": - tool_use = response_message.content[-1] - func_name = tool_use.name - func_params = tool_use.input - tool_use_id = tool_use.id - - result = self.handle_tool_use(func_name, func_params) - self.session_state.messages.append( - {"role": "assistant", "content": response_message.content} - ) - self.session_state.messages.append( - { - "role": "user", - "content": [ - { - "type": "tool_result", - "tool_use_id": tool_use_id, - "content": f"{result}", - } - ], - } - ) - - follow_up_response = self.generate_message( - messages=self.session_state.messages, - max_tokens=2048, - ) - - if "error" in follow_up_response: - return f"An error occurred: {follow_up_response['error']}" - - response_text = follow_up_response.content[0].text - self.session_state.messages.append( - {"role": "assistant", "content": response_text} - ) - return response_text - - elif response_message.content[0].type == "text": - response_text = response_message.content[0].text - self.session_state.messages.append( - {"role": "assistant", "content": response_text} - ) - return response_text - - else: - raise Exception("An error occurred: Unexpected response type") - - def handle_tool_use(self, func_name, func_params): - if func_name == "get_quote": - premium = get_quote(**func_params) - return f"Quote generated: ${premium:.2f} per month" - - raise Exception("An unexpected tool was used") -``` + const followUpBlock = followUpResponse.content[0]; + if (followUpBlock.type !== "text") { + throw new Error("An error occurred: Unexpected response type"); + } + this.messages.push({ role: "assistant", content: followUpBlock.text }); + return followUpBlock.text; + } + + const firstBlock = responseMessage.content[0]; + if (firstBlock.type === "text") { + this.messages.push({ role: "assistant", content: firstBlock.text }); + return firstBlock.text; + } + + throw new Error("An error occurred: Unexpected response type"); + } + + handleToolUse(toolName: string, toolInput: unknown): string { + if (toolName === "get_quote") { + // The SDK types tool_use.input as unknown; narrow it to the get_quote schema. + if ( + toolInput === null || + typeof toolInput !== "object" || + !("make" in toolInput) || typeof toolInput.make !== "string" || + !("model" in toolInput) || typeof toolInput.model !== "string" || + !("year" in toolInput) || typeof toolInput.year !== "number" || + !("mileage" in toolInput) || typeof toolInput.mileage !== "number" || + !("driver_age" in toolInput) || typeof toolInput.driver_age !== "number" + ) { + throw new Error("An error occurred: Unexpected tool input"); + } + const { make, model: vehicleModel, year, mileage, driver_age: driverAge } = toolInput; + + const premium = getQuote(make, vehicleModel, year, mileage, driverAge); + return `Quote generated: $${premium.toFixed(2)} per month`; + } + + throw new Error("An unexpected tool was used"); + } + } + ``` + + ```csharp C# + using System.Text.Json; + using Anthropic; + using Anthropic.Models.Messages; + + // Config.Model, Config.Identity, Config.Tools, and Config.GetQuote mirror + // the config.py values defined earlier in this guide (shown in Python). + public class ChatBot + { + private readonly AnthropicClient _anthropic = new(); + + public List Messages { get; } = []; + + public async Task GenerateMessage(List messages, long maxTokens) => + await _anthropic.Messages.Create( + new MessageCreateParams + { + Model = Config.Model, + System = Config.Identity, + MaxTokens = maxTokens, + Messages = messages, + Tools = Config.Tools, + } + ); + + public async Task ProcessUserInput(string userInput) + { + Messages.Add(new() { Role = Role.User, Content = userInput }); + + var responseMessage = await GenerateMessage(Messages, maxTokens: 2048); + + if (responseMessage.Content[^1].TryPickToolUse(out var toolUse)) + { + var toolResult = HandleToolUse(toolUse.Name, toolUse.Input); + + Messages.Add(new() + { + Role = Role.Assistant, + Content = responseMessage.Content + .Select(contentBlock => new ContentBlockParam(contentBlock.Json)) + .ToList(), + }); + Messages.Add(new() + { + Role = Role.User, + Content = new List + { + new ToolResultBlockParam { ToolUseID = toolUse.ID, Content = toolResult }, + }, + }); + + var followUpResponse = await GenerateMessage(Messages, maxTokens: 2048); + + if (!followUpResponse.Content[0].TryPickText(out var followUpText)) + { + throw new InvalidOperationException("An error occurred: Unexpected response type"); + } + + Messages.Add(new() { Role = Role.Assistant, Content = followUpText.Text }); + return followUpText.Text; + } + + if (responseMessage.Content[0].TryPickText(out var textBlock)) + { + Messages.Add(new() { Role = Role.Assistant, Content = textBlock.Text }); + return textBlock.Text; + } + + throw new InvalidOperationException("An error occurred: Unexpected response type"); + } + + public string HandleToolUse(string funcName, IReadOnlyDictionary funcParams) + { + if (funcName == "get_quote") + { + var premium = Config.GetQuote( + funcParams["make"].GetString()!, + funcParams["model"].GetString()!, + funcParams["year"].GetInt64(), + funcParams["mileage"].GetInt64(), + funcParams["driver_age"].GetInt64() + ); + return $"Quote generated: ${premium:F2} per month"; + } + + throw new ArgumentException("An unexpected tool was used"); + } + } + ``` + + ```go Go + import ( + "context" + "encoding/json" + "fmt" + + "github.com/anthropics/anthropic-sdk-go" + ) + + // ChatBot wraps the Anthropic client and the conversation history. The + // identity, model, tools, and getQuote values it uses mirror the config.py + // definitions earlier in this guide (shown in Python). + type ChatBot struct { + client anthropic.Client + messages []anthropic.MessageParam + } + + func NewChatBot() *ChatBot { + return &ChatBot{client: anthropic.NewClient()} + } + + func (bot *ChatBot) GenerateMessage(ctx context.Context, messages []anthropic.MessageParam, maxTokens int64) (*anthropic.Message, error) { + return bot.client.Messages.New(ctx, anthropic.MessageNewParams{ + Model: model, + System: []anthropic.TextBlockParam{{Text: identity}}, + MaxTokens: maxTokens, + Messages: messages, + Tools: tools, + }) + } + + func (bot *ChatBot) ProcessUserInput(ctx context.Context, userInput string) (string, error) { + bot.messages = append(bot.messages, anthropic.NewUserMessage(anthropic.NewTextBlock(userInput))) + + response, err := bot.GenerateMessage(ctx, bot.messages, 2048) + if err != nil { + return "", err + } + + lastBlock := response.Content[len(response.Content)-1] + if toolUse, ok := lastBlock.AsAny().(anthropic.ToolUseBlock); ok { + result, err := bot.HandleToolUse(toolUse.Name, toolUse.Input) + if err != nil { + return "", err + } + + bot.messages = append(bot.messages, + response.ToParam(), + anthropic.NewUserMessage(anthropic.NewToolResultBlock(toolUse.ID, result, false)), + ) + + followUp, err := bot.GenerateMessage(ctx, bot.messages, 2048) + if err != nil { + return "", err + } + + textBlock, ok := followUp.Content[0].AsAny().(anthropic.TextBlock) + if !ok { + return "", fmt.Errorf("unexpected response type: %s", followUp.Content[0].Type) + } + bot.messages = append(bot.messages, anthropic.NewAssistantMessage(anthropic.NewTextBlock(textBlock.Text))) + return textBlock.Text, nil + } + + if textBlock, ok := response.Content[0].AsAny().(anthropic.TextBlock); ok { + bot.messages = append(bot.messages, anthropic.NewAssistantMessage(anthropic.NewTextBlock(textBlock.Text))) + return textBlock.Text, nil + } + + return "", fmt.Errorf("unexpected response type: %s", response.Content[0].Type) + } + + func (bot *ChatBot) HandleToolUse(toolName string, toolInput json.RawMessage) (string, error) { + if toolName != "get_quote" { + return "", fmt.Errorf("an unexpected tool was used: %s", toolName) + } + + var input struct { + Make string `json:"make"` + Model string `json:"model"` + Year int `json:"year"` + Mileage int `json:"mileage"` + DriverAge int `json:"driver_age"` + } + if err := json.Unmarshal(toolInput, &input); err != nil { + return "", err + } + premium := getQuote(input.Make, input.Model, input.Year, input.Mileage, input.DriverAge) + return fmt.Sprintf("Quote generated: $%.2f per month", premium), nil + } + + ``` + + ```java Java + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.core.JsonValue; + import com.anthropic.models.messages.ContentBlock; + import com.anthropic.models.messages.ContentBlockParam; + import com.anthropic.models.messages.Message; + import com.anthropic.models.messages.MessageCreateParams; + import com.anthropic.models.messages.MessageParam; + import com.anthropic.models.messages.ToolResultBlockParam; + import com.anthropic.models.messages.ToolUseBlock; + + // IDENTITY, MODEL, TOOLS, and getQuote mirror the config.py values defined + // earlier in this guide (shown in Python). + class ChatBot { + final AnthropicClient anthropic; + final List messages; + + ChatBot() { + // Reads the API key from the ANTHROPIC_API_KEY environment variable + this.anthropic = AnthropicOkHttpClient.fromEnv(); + this.messages = new ArrayList<>(); + } + + Message generateMessage(List messages, long maxTokens) { + return anthropic.messages().create(MessageCreateParams.builder() + .model(MODEL) + .system(IDENTITY) + .maxTokens(maxTokens) + .messages(messages) + .tools(TOOLS) + .build()); + } + + String processUserInput(String userInput) { + messages.add(MessageParam.builder() + .role(MessageParam.Role.USER) + .content(userInput) + .build()); + + Message responseMessage = generateMessage(messages, 2048); + + List content = responseMessage.content(); + ContentBlock lastBlock = content.getLast(); + if (lastBlock.isToolUse()) { + ToolUseBlock toolUse = lastBlock.asToolUse(); + Map toolInput = + (Map) toolUse._input().asObject().orElseThrow(); + String result = handleToolUse(toolUse.name(), toolInput); + + messages.add(MessageParam.builder() + .role(MessageParam.Role.ASSISTANT) + .contentOfBlockParams(content.stream().map(ContentBlock::toParam).toList()) + .build()); + messages.add(MessageParam.builder() + .role(MessageParam.Role.USER) + .contentOfBlockParams(List.of(ContentBlockParam.ofToolResult( + ToolResultBlockParam.builder() + .toolUseId(toolUse.id()) + .content(result) + .build()))) + .build()); + + Message followUpResponse = generateMessage(messages, 2048); + + ContentBlock followUpBlock = followUpResponse.content().getFirst(); + if (!followUpBlock.isText()) { + throw new IllegalStateException("An error occurred: Unexpected response type"); + } + String responseText = followUpBlock.asText().text(); + messages.add(MessageParam.builder() + .role(MessageParam.Role.ASSISTANT) + .content(responseText) + .build()); + return responseText; + } else if (content.getFirst().isText()) { + String responseText = content.getFirst().asText().text(); + messages.add(MessageParam.builder() + .role(MessageParam.Role.ASSISTANT) + .content(responseText) + .build()); + return responseText; + } else { + throw new IllegalStateException("An error occurred: Unexpected response type"); + } + } + + String handleToolUse(String funcName, Map funcParams) { + return switch (funcName) { + case "get_quote" -> { + double premium = getQuote( + funcParams.get("make").asStringOrThrow(), + funcParams.get("model").asStringOrThrow(), + ((Number) funcParams.get("year").asNumber().orElseThrow()).longValue(), + ((Number) funcParams.get("mileage").asNumber().orElseThrow()).longValue(), + ((Number) funcParams.get("driver_age").asNumber().orElseThrow()).longValue()); + yield "Quote generated: $%.2f per month".formatted(premium); + } + default -> throw new IllegalArgumentException("An unexpected tool was used"); + }; + } + } + ``` + + ```php PHP + use Anthropic\Client; + use Anthropic\Messages\Message; + use Anthropic\Messages\MessageParam; + use Anthropic\Messages\TextBlock; + use Anthropic\Messages\ToolResultBlockParam; + use Anthropic\Messages\ToolUseBlock; + + class ChatBot + { + // MODEL, IDENTITY, TOOLS, and get_quote() mirror the config.py values + // defined earlier in this guide (shown in Python). + + /** @var list */ + public private(set) array $messages = []; + + public function __construct( + private readonly Client $anthropic = new Client(), + ) {} + + /** + * @param list $messages + */ + public function generateMessage(array $messages, int $maxTokens): Message + { + return $this->anthropic->messages->create( + model: MODEL, + system: IDENTITY, + maxTokens: $maxTokens, + messages: $messages, + tools: TOOLS, + ); + } + + public function processUserInput(string $userInput): string + { + $this->messages[] = MessageParam::with(role: 'user', content: $userInput); + + $responseMessage = $this->generateMessage($this->messages, maxTokens: 2048); + + $content = $responseMessage->content; + $lastBlock = array_last($content); + + if ($lastBlock instanceof ToolUseBlock) { + $toolResult = $this->handleToolUse($lastBlock->name, $lastBlock->input); + + $this->messages[] = MessageParam::with(role: 'assistant', content: $content); + $this->messages[] = MessageParam::with( + role: 'user', + content: [ + ToolResultBlockParam::with(toolUseID: $lastBlock->id, content: $toolResult), + ], + ); + + $followUpResponse = $this->generateMessage($this->messages, maxTokens: 2048); + + $firstBlock = array_first($followUpResponse->content); + if (!$firstBlock instanceof TextBlock) { + throw new RuntimeException('An error occurred: Unexpected response type'); + } + + $this->messages[] = MessageParam::with(role: 'assistant', content: $firstBlock->text); + + return $firstBlock->text; + } + + $firstBlock = array_first($content); + if ($firstBlock instanceof TextBlock) { + $this->messages[] = MessageParam::with(role: 'assistant', content: $firstBlock->text); + + return $firstBlock->text; + } + + throw new RuntimeException('An error occurred: Unexpected response type'); + } + + /** + * @param array $funcParams + */ + private function handleToolUse(string $funcName, array $funcParams): string + { + if ($funcName === 'get_quote') { + $premium = get_quote(...$funcParams); + + return sprintf('Quote generated: $%.2f per month', $premium); + } + + throw new RuntimeException('An unexpected tool was used'); + } + } + ``` + + ```ruby Ruby + # IDENTITY, MODEL, TOOLS, and get_quote mirror the config.py values defined + # earlier in this guide (shown in Python). + require "anthropic" + + class ChatBot + attr_reader :messages + + def initialize + @anthropic = Anthropic::Client.new + @messages = [] + end + + def generate_message(messages, max_tokens) + @anthropic.messages.create( + model: MODEL, + system_: IDENTITY, + max_tokens:, + messages:, + tools: TOOLS + ) + end + + def process_user_input(user_input) + @messages << {role: "user", content: user_input} + + response_message = generate_message(@messages, 2048) + + case response_message.content + in [*, Anthropic::ToolUseBlock => tool_use] + result = handle_tool_use(tool_use.name, tool_use.input) + @messages << {role: "assistant", content: response_message.content} + @messages << { + role: "user", + content: [{type: "tool_result", tool_use_id: tool_use.id, content: result}] + } + + follow_up_response = generate_message(@messages, 2048) + + case follow_up_response.content + in [Anthropic::TextBlock => text_block, *] + @messages << {role: "assistant", content: text_block.text} + text_block.text + else + raise "An error occurred: Unexpected response type" + end + in [Anthropic::TextBlock => text_block, *] + @messages << {role: "assistant", content: text_block.text} + text_block.text + else + raise "An error occurred: Unexpected response type" + end + end + + def handle_tool_use(tool_name, tool_input) + raise "An unexpected tool was used" unless tool_name == "get_quote" + + premium = get_quote(**tool_input) + format("Quote generated: $%.2f per month", premium) + end + end + ``` + ### Build your user interface -Test deploying this code with Streamlit using a main method. This `main()` function sets up a Streamlit-based chat interface. +Test deploying this code with Streamlit using a main method. This `main()` function sets up a Streamlit-based chat interface. Streamlit is a Python framework, so this part of the walkthrough is shown in Python only; the ChatBot class above is the piece you can port to any language. Do this in a file called `app.py` @@ -588,14 +1114,6 @@ streamlit run app.py Prompting often requires testing and optimization for it to be production ready. To determine the readiness of your solution, evaluate the chatbot performance using a systematic process combining quantitative and qualitative methods. Creating a [strong empirical evaluation](/docs/en/test-and-evaluate/develop-tests#building-evals-and-test-cases) based on your defined success criteria will allow you to optimize your prompts. - - The - - [Claude Console](/dashboard) - - now features an Evaluation tool that lets you test your prompts under various scenarios. - - ### Improve performance In complex scenarios, it may be helpful to consider additional strategies to improve performance beyond standard [prompt engineering techniques](/docs/en/build-with-claude/prompt-engineering/overview) & [guardrail implementation strategies](/docs/en/test-and-evaluate/strengthen-guardrails/reduce-hallucinations). Here are some common scenarios: diff --git a/content/en/about-claude/use-case-guides/ticket-routing.md b/content/en/about-claude/use-case-guides/ticket-routing.md index 5c58028d7..511a7a1f3 100644 --- a/content/en/about-claude/use-case-guides/ticket-routing.md +++ b/content/en/about-claude/use-case-guides/ticket-routing.md @@ -244,7 +244,7 @@ Ticket routing is a type of classification task. Claude analyzes the content of Write a ticket classification prompt. The initial prompt should contain the contents of the user request and return both the reasoning and the intent. - Try the [prompt generator](/docs/en/prompt-generator) on the [Claude Console](/login) to have Claude write a first draft for you. + Try the [metaprompt recipe from the Claude Cookbook](https://colab.research.google.com/github/anthropics/claude-cookbooks/blob/main/misc/metaprompt.ipynb) to have Claude write a first draft for you. Here's an example ticket routing classification prompt: diff --git a/content/en/agents-and-tools/mcp-connector.md b/content/en/agents-and-tools/mcp-connector.md index 973ec9d9a..4b45dac54 100644 --- a/content/en/agents-and-tools/mcp-connector.md +++ b/content/en/agents-and-tools/mcp-connector.md @@ -664,7 +664,7 @@ Install both the Anthropic SDK and the MCP SDK: ```kotlin - implementation("com.anthropic:anthropic-java-mcp:2.48.0") + implementation("com.anthropic:anthropic-java-mcp:2.50.0") ``` @@ -673,7 +673,7 @@ Install both the Anthropic SDK and the MCP SDK: com.anthropic anthropic-java-mcp - 2.48.0 + 2.50.0 ``` diff --git a/content/en/agents-and-tools/tool-use/computer-use-tool.md b/content/en/agents-and-tools/tool-use/computer-use-tool.md index 904d06d4f..1ebc42884 100644 --- a/content/en/agents-and-tools/tool-use/computer-use-tool.md +++ b/content/en/agents-and-tools/tool-use/computer-use-tool.md @@ -836,9 +836,9 @@ The computer use tool supports these actions: **Important:** Your application must explicitly run the computer use tool; Claude cannot run it directly. You are responsible for implementing the screenshot capture, mouse movements, keyboard inputs, and other actions based on Claude's requests. -### Combining with extended thinking +### Combining with thinking -For combining computer use with extended thinking, see [Extended thinking](/docs/en/build-with-claude/extended-thinking). +For combining computer use with thinking, see [Thinking](/docs/en/build-with-claude/thinking). For computer use specifically, internal benchmarking suggests these `effort` settings: diff --git a/content/en/agents-and-tools/tool-use/define-tools.md b/content/en/agents-and-tools/tool-use/define-tools.md index 6a634add6..b488d12c1 100644 --- a/content/en/agents-and-tools/tool-use/define-tools.md +++ b/content/en/agents-and-tools/tool-use/define-tools.md @@ -16,7 +16,7 @@ Use the latest Claude Opus (4.8) model for complex tools and ambiguous queries; Use Claude Haiku models for straightforward tools, but note they may infer missing parameters. - If using Claude with tool use and extended thinking, refer to the [extended thinking](/docs/en/build-with-claude/extended-thinking) guide for more information. + If using Claude with tool use and thinking, see [Thinking](/docs/en/build-with-claude/thinking) for more information. ## Specifying client tools @@ -857,7 +857,7 @@ This diagram illustrates how each option works: Note that when you have `tool_choice` as `any` or `tool`, the API prefills the assistant message to force a tool to be used. This means that the models will not emit a natural language response or explanation before `tool_use` content blocks, even if explicitly asked to do so. - When using [extended thinking](/docs/en/build-with-claude/extended-thinking) with tool use, `tool_choice: {"type": "any"}` and `tool_choice: {"type": "tool", "name": "..."}` are not supported and will result in an error. Only `tool_choice: {"type": "auto"}` (the default) and `tool_choice: {"type": "none"}` are compatible with extended thinking. + When using [thinking](/docs/en/build-with-claude/thinking) with tool use, `tool_choice: {"type": "any"}` and `tool_choice: {"type": "tool", "name": "..."}` are not supported and result in an error. Only `tool_choice: {"type": "auto"}` (the default) and `tool_choice: {"type": "none"}` are compatible with thinking. diff --git a/content/en/agents-and-tools/tool-use/strict-tool-use.md b/content/en/agents-and-tools/tool-use/strict-tool-use.md index c5ed559a6..103afa7d9 100644 --- a/content/en/agents-and-tools/tool-use/strict-tool-use.md +++ b/content/en/agents-and-tools/tool-use/strict-tool-use.md @@ -387,6 +387,34 @@ For example, suppose a booking system needs `passengers: int`. Without strict mo Ensure tool parameters exactly match your schema: + ```bash cURL + curl https://api.anthropic.com/v1/messages \ + -H "content-type: application/json" \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -d '{ + "model": "claude-opus-4-8", + "max_tokens": 1024, + "messages": [ + {"role": "user", "content": "Search for flights to Tokyo departing June 1, 2026"} + ], + "tools": [{ + "name": "search_flights", + "strict": true, + "input_schema": { + "type": "object", + "properties": { + "destination": {"type": "string"}, + "departure_date": {"type": "string", "format": "date"}, + "passengers": {"type": "integer", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]} + }, + "required": ["destination", "departure_date"], + "additionalProperties": false + } + }] + }' + ``` + ```bash CLI ant messages create <<'YAML' model: claude-opus-4-8 @@ -660,6 +688,51 @@ For example, suppose a booking system needs `passengers: int`. Without strict mo Build reliable multistep agents with guaranteed tool parameters: + ```bash cURL + curl https://api.anthropic.com/v1/messages \ + -H "content-type: application/json" \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -d '{ + "model": "claude-opus-4-8", + "max_tokens": 1024, + "messages": [ + {"role": "user", "content": "Help me plan a trip from New York to Paris for 2 people, departing June 1, 2026"} + ], + "tools": [ + { + "name": "search_flights", + "strict": true, + "input_schema": { + "type": "object", + "properties": { + "origin": {"type": "string"}, + "destination": {"type": "string"}, + "departure_date": {"type": "string", "format": "date"}, + "travelers": {"type": "integer", "enum": [1, 2, 3, 4, 5, 6]} + }, + "required": ["origin", "destination", "departure_date"], + "additionalProperties": false + } + }, + { + "name": "search_hotels", + "strict": true, + "input_schema": { + "type": "object", + "properties": { + "city": {"type": "string"}, + "check_in": {"type": "string", "format": "date"}, + "guests": {"type": "integer", "enum": [1, 2, 3, 4]} + }, + "required": ["city", "check_in"], + "additionalProperties": false + } + } + ] + }' + ``` + ```bash CLI ant messages create <<'YAML' model: claude-opus-4-8 diff --git a/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md b/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md index 1885116e3..5301de784 100644 --- a/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md +++ b/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md @@ -54,14 +54,15 @@ This means adding tools dynamically through tool search does not break your cach The cache follows a prefix hierarchy (`tools` → `system` → `messages`), so a change at one level invalidates that level and everything after it: -| Change | Invalidates | -| ------------------------------------ | -------------------------------------- | -| Modifying tool definitions | Entire cache (tools, system, messages) | -| Toggling web search or citations | System and messages caches | -| Changing `tool_choice` | Messages cache | -| Changing `disable_parallel_tool_use` | Messages cache | -| Toggling images present/absent | Messages cache | -| Changing thinking parameters | Messages cache | +| Change | Invalidates | +| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Modifying tool definitions | Entire cache (tools, system, messages) | +| Toggling web search or citations | System and messages caches | +| Changing `tool_choice` | Messages cache | +| Changing `disable_parallel_tool_use` | Messages cache | +| Toggling images present/absent | Messages cache | +| Changing thinking parameters | Messages cache always; tool and system caches too on models that render the thinking configuration ahead of them ([details](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching)) | +| Changing `output_config.effort` | Same as thinking parameters; setting the model's default explicitly is equivalent to omitting it | If you need to vary `tool_choice` mid-conversation, consider placing cache breakpoints before the variation point. diff --git a/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md b/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md index a60d3824a..3ddfedd29 100644 --- a/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md +++ b/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md @@ -30,10 +30,10 @@ Symptom-to-fix tables for the most common tool-use errors. Each fix cross-refere ## Cache keeps invalidating -| Symptom | Likely cause | Fix | -| ------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Every request is a cache miss | `tool_choice` varying between requests | Keep `tool_choice` stable or place the `cache_control` breakpoint before the variation point. See [Tool use with prompt caching](/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching). | -| Adding a tool mid-conversation breaks cache | Tool prepended to the tools array | Use `defer_loading: true` with tool search to append the tool inline instead of modifying the array head. | +| Symptom | Likely cause | Fix | +| ------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Every request is a cache miss | `tool_choice`, the thinking configuration, or `output_config.effort` varying between requests | Keep `tool_choice` stable or place the `cache_control` breakpoint before the variation point; hold the thinking configuration and effort level constant for the life of a cached conversation. See [Tool use with prompt caching](/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching) and [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching). | +| Adding a tool mid-conversation breaks cache | Tool prepended to the tools array | Use `defer_loading: true` with tool search to append the tool inline instead of modifying the array head. | ## Errors at request time diff --git a/content/en/api/beta.md b/content/en/api/beta.md index a7bf2156b..8a3a79ff0 100644 --- a/content/en/api/beta.md +++ b/content/en/api/beta.md @@ -4,11 +4,11 @@ ### Anthropic Beta -- `AnthropicBeta = string or "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` +- `AnthropicBeta = string or "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -60,6 +60,8 @@ - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -352,7 +354,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -404,6 +406,8 @@ The Models API response can be used to determine which models are available for - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -674,7 +678,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -726,6 +730,8 @@ The Models API response can be used to determine information about a specific mo - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1329,7 +1335,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1381,6 +1387,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2833,6 +2841,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -2937,7 +2947,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -5291,18 +5301,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -5432,18 +5454,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -5789,7 +5823,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -5849,7 +5883,7 @@ curl https://api.anthropic.com/v1/messages \ { "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { - "id": "id", + "id": "container_011CpZohnwH4vuy7gazohgSP", "expires_at": "2019-12-27T18:11:19.117Z", "skills": [ { @@ -5863,11 +5897,11 @@ curl https://api.anthropic.com/v1/messages \ { "citations": [ { - "cited_text": "cited_text", + "cited_text": "The grass is green. The sky is blue.", "document_index": 0, - "document_title": "document_title", + "document_title": "My Document", "end_char_index": 0, - "file_id": "file_id", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", "start_char_index": 0, "type": "char_location" } @@ -5895,10 +5929,10 @@ curl https://api.anthropic.com/v1/messages \ "role": "assistant", "stop_details": { "category": "cyber", - "explanation": "explanation", - "fallback_credit_token": "fallback_credit_token", + "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", + "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "recommended_model", + "recommended_model": "claude-sonnet-4-6", "type": "refusal" }, "stop_reason": "end_turn", @@ -5911,7 +5945,7 @@ curl https://api.anthropic.com/v1/messages \ }, "cache_creation_input_tokens": 2051, "cache_read_input_tokens": 2051, - "inference_geo": "inference_geo", + "inference_geo": "global", "input_tokens": 2095, "iterations": [ { @@ -5959,7 +5993,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -6011,6 +6045,8 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -7403,7 +7439,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -12023,18 +12059,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -13988,18 +14036,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -14417,10 +14477,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ One entry in the `fallbacks` chain on a `/v1/messages` request. - `model` is required. The four override fields (`max_tokens`, `thinking`, - `output_config`, and `speed`) replace the corresponding top-level field - for this attempt only and are validated as if the request were made to - `model`. Any other key is rejected at parse time. + `model` is required. The override fields (`max_tokens`, `thinking`, + `output_config`, and `speed`) set the corresponding parameter for this + attempt only and are validated as if the request were made to `model`. + Any other key is rejected at parse time. - `model: Model` @@ -14550,6 +14610,8 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -14604,18 +14666,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ The `from` model declined for policy reasons. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -16467,18 +16541,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -16608,18 +16694,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -16965,7 +17063,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -19978,18 +20076,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -20096,18 +20206,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -21417,18 +21539,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -21558,18 +21692,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -21915,7 +22061,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -22868,18 +23014,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -23009,18 +23167,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -23366,7 +23536,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -23633,18 +23803,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -28798,7 +28980,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -30684,7 +30866,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -30736,6 +30918,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -32204,6 +32388,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -32308,7 +32494,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -33893,7 +34079,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -33945,6 +34131,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -34107,7 +34295,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -34159,6 +34347,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -34332,7 +34522,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -34384,6 +34574,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -34539,7 +34731,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -34591,6 +34783,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -34658,7 +34852,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -34710,6 +34904,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -35667,18 +35863,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -35808,18 +36016,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -36165,7 +36385,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -37447,18 +37667,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -37588,18 +37820,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -37945,7 +38189,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -39026,18 +39270,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -39167,18 +39423,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -39524,7 +39792,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -40567,18 +40835,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -40708,18 +40988,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -41065,7 +41357,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -41091,7 +41383,7 @@ Create Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -41143,6 +41435,8 @@ Create Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -41219,7 +41513,7 @@ Create Agent - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -41229,6 +41523,64 @@ Create Agent See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -41603,6 +41955,50 @@ Create Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -41855,6 +42251,9 @@ curl https://api.anthropic.com/v1/agents \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -41943,7 +42342,7 @@ List Agents - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -41995,6 +42394,8 @@ List Agents - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -42099,6 +42500,50 @@ List Agents - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -42342,6 +42787,9 @@ curl https://api.anthropic.com/v1/agents \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -42421,7 +42869,7 @@ Get Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -42473,6 +42921,8 @@ Get Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -42577,6 +43027,50 @@ Get Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -42814,6 +43308,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -42884,7 +43381,7 @@ Update Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -42936,6 +43433,8 @@ Update Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -42946,10 +43445,6 @@ Update Agent ### Body Parameters -- `version: number` - - The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. The request fails if this does not match the server's current version. - - `description: optional string` Description. Omit to preserve; send empty string or null to clear. @@ -43040,7 +43535,7 @@ Update Agent - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -43050,6 +43545,64 @@ Update Agent See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -43304,6 +43857,10 @@ Update Agent - `"custom"` +- `version: optional number` + + The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. Must be at least 1 if specified. When supplied, the request fails if it does not match the server's current version; omit to apply the update unconditionally. + ### Returns - `BetaManagedAgentsAgent object { id, archived_at, created_at, 12 more }` @@ -43400,6 +43957,50 @@ Update Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -43617,8 +44218,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ -H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d "{ - \"version\": 1, - \"system\": \"You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.\" + \"description\": \"updated\", + \"system\": \"You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.\", + \"version\": 1 }" ``` @@ -43642,6 +44244,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -43712,7 +44317,7 @@ Archive Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -43764,6 +44369,8 @@ Archive Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -43868,6 +44475,50 @@ Archive Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -44106,6 +44757,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -44256,6 +44910,50 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -45052,146 +45750,80 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `"custom"` -### Beta Managed Agents MCP Server URL Definition +### Beta Managed Agents Effort High -- `BetaManagedAgentsMCPServerURLDefinition object { name, type, url }` +- `BetaManagedAgentsEffortHigh object { type }` - URL-based MCP server connection as returned in API responses. - - - `name: string` - - - `type: "url"` - - - `"url"` - - - `url: string` - -### Beta Managed Agents MCP Tool Config - -- `BetaManagedAgentsMCPToolConfig object { enabled, name, permission_policy }` - - Resolved configuration for a specific MCP tool. - - - `enabled: boolean` - - - `name: string` - - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` - - Permission policy for tool execution. - - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` - - Tool calls are automatically approved without user confirmation. - - - `type: "always_allow"` - - - `"always_allow"` - - - `BetaManagedAgentsAlwaysAskPolicy object { type }` - - Tool calls require user confirmation before execution. - - - `type: "always_ask"` - - - `"always_ask"` - -### Beta Managed Agents MCP Tool Config Params - -- `BetaManagedAgentsMCPToolConfigParams object { name, enabled, permission_policy }` - - Configuration override for a specific MCP tool. - - - `name: string` - - Name of the MCP tool to configure. 1-128 characters. - - - `enabled: optional boolean` - - Whether this tool is enabled. Overrides the `default_config` setting. - - - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` - - Permission policy for tool execution. - - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` - - Tool calls are automatically approved without user confirmation. - - - `type: "always_allow"` - - - `"always_allow"` + High effort. Favors reasoning depth. - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + - `type: "high"` - Tool calls require user confirmation before execution. + - `"high"` - - `type: "always_ask"` +### Beta Managed Agents Effort Low - - `"always_ask"` +- `BetaManagedAgentsEffortLow object { type }` -### Beta Managed Agents MCP Toolset - -- `BetaManagedAgentsMCPToolset object { configs, default_config, mcp_server_name, type }` + Low effort. Favors latency over reasoning depth. - - `configs: array of BetaManagedAgentsMCPToolConfig` + - `type: "low"` - - `enabled: boolean` - - - `name: string` + - `"low"` - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` +### Beta Managed Agents Effort Max - Permission policy for tool execution. +- `BetaManagedAgentsEffortMax object { type }` - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + Maximum effort. Favors reasoning depth over latency. - Tool calls are automatically approved without user confirmation. + - `type: "max"` - - `type: "always_allow"` + - `"max"` - - `"always_allow"` +### Beta Managed Agents Effort Medium - - `BetaManagedAgentsAlwaysAskPolicy object { type }` +- `BetaManagedAgentsEffortMedium object { type }` - Tool calls require user confirmation before execution. + Medium effort. Balances latency and reasoning depth. - - `type: "always_ask"` + - `type: "medium"` - - `"always_ask"` + - `"medium"` - - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig` +### Beta Managed Agents Effort Xhigh - Resolved default configuration for all tools from an MCP server. +- `BetaManagedAgentsEffortXhigh object { type }` - - `enabled: boolean` + Extra-high effort. Not all models accept this level. - - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` + - `type: "xhigh"` - Permission policy for tool execution. + - `"xhigh"` - - `BetaManagedAgentsAlwaysAllowPolicy object { type }` +### Beta Managed Agents MCP Server URL Definition - Tool calls are automatically approved without user confirmation. +- `BetaManagedAgentsMCPServerURLDefinition object { name, type, url }` - - `BetaManagedAgentsAlwaysAskPolicy object { type }` + URL-based MCP server connection as returned in API responses. - Tool calls require user confirmation before execution. + - `name: string` - - `mcp_server_name: string` + - `type: "url"` - - `type: "mcp_toolset"` + - `"url"` - - `"mcp_toolset"` + - `url: string` -### Beta Managed Agents MCP Toolset Default Config +### Beta Managed Agents MCP Tool Config -- `BetaManagedAgentsMCPToolsetDefaultConfig object { enabled, permission_policy }` +- `BetaManagedAgentsMCPToolConfig object { enabled, name, permission_policy }` - Resolved default configuration for all tools from an MCP server. + Resolved configuration for a specific MCP tool. - `enabled: boolean` + - `name: string` + - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` Permission policy for tool execution. @@ -45212,15 +45844,131 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `"always_ask"` -### Beta Managed Agents MCP Toolset Default Config Params +### Beta Managed Agents MCP Tool Config Params -- `BetaManagedAgentsMCPToolsetDefaultConfigParams object { enabled, permission_policy }` +- `BetaManagedAgentsMCPToolConfigParams object { name, enabled, permission_policy }` - Default configuration for all tools from an MCP server. + Configuration override for a specific MCP tool. + + - `name: string` + + Name of the MCP tool to configure. 1-128 characters. - `enabled: optional boolean` - Whether tools are enabled by default. Defaults to true if not specified. + Whether this tool is enabled. Overrides the `default_config` setting. + + - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` + + Permission policy for tool execution. + + - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + + Tool calls are automatically approved without user confirmation. + + - `type: "always_allow"` + + - `"always_allow"` + + - `BetaManagedAgentsAlwaysAskPolicy object { type }` + + Tool calls require user confirmation before execution. + + - `type: "always_ask"` + + - `"always_ask"` + +### Beta Managed Agents MCP Toolset + +- `BetaManagedAgentsMCPToolset object { configs, default_config, mcp_server_name, type }` + + - `configs: array of BetaManagedAgentsMCPToolConfig` + + - `enabled: boolean` + + - `name: string` + + - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` + + Permission policy for tool execution. + + - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + + Tool calls are automatically approved without user confirmation. + + - `type: "always_allow"` + + - `"always_allow"` + + - `BetaManagedAgentsAlwaysAskPolicy object { type }` + + Tool calls require user confirmation before execution. + + - `type: "always_ask"` + + - `"always_ask"` + + - `default_config: BetaManagedAgentsMCPToolsetDefaultConfig` + + Resolved default configuration for all tools from an MCP server. + + - `enabled: boolean` + + - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` + + Permission policy for tool execution. + + - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + + Tool calls are automatically approved without user confirmation. + + - `BetaManagedAgentsAlwaysAskPolicy object { type }` + + Tool calls require user confirmation before execution. + + - `mcp_server_name: string` + + - `type: "mcp_toolset"` + + - `"mcp_toolset"` + +### Beta Managed Agents MCP Toolset Default Config + +- `BetaManagedAgentsMCPToolsetDefaultConfig object { enabled, permission_policy }` + + Resolved default configuration for all tools from an MCP server. + + - `enabled: boolean` + + - `permission_policy: BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` + + Permission policy for tool execution. + + - `BetaManagedAgentsAlwaysAllowPolicy object { type }` + + Tool calls are automatically approved without user confirmation. + + - `type: "always_allow"` + + - `"always_allow"` + + - `BetaManagedAgentsAlwaysAskPolicy object { type }` + + Tool calls require user confirmation before execution. + + - `type: "always_ask"` + + - `"always_ask"` + +### Beta Managed Agents MCP Toolset Default Config Params + +- `BetaManagedAgentsMCPToolsetDefaultConfigParams object { enabled, permission_policy }` + + Default configuration for all tools from an MCP server. + + - `enabled: optional boolean` + + Whether tools are enabled by default. Defaults to true if not specified. - `permission_policy: optional BetaManagedAgentsAlwaysAllowPolicy or BetaManagedAgentsAlwaysAskPolicy` @@ -45374,7 +46122,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ ### Beta Managed Agents Model Config -- `BetaManagedAgentsModelConfig object { id, speed }` +- `BetaManagedAgentsModelConfig object { id, effort, speed }` Model identifier and configuration. @@ -45440,6 +46188,50 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -45450,7 +46242,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ ### Beta Managed Agents Model Config Params -- `BetaManagedAgentsModelConfigParams object { id, speed }` +- `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -45516,6 +46308,64 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -45682,6 +46532,50 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -45950,7 +46844,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -46002,6 +46896,8 @@ List Agent Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -46106,6 +47002,50 @@ List Agent Versions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -46349,6 +47289,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -46420,7 +47363,7 @@ Create a new environment with the specified configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -46472,6 +47415,8 @@ Create a new environment with the specified configuration. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -46853,7 +47798,7 @@ List environments with pagination support. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -46905,6 +47850,8 @@ List environments with pagination support. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -47140,7 +48087,7 @@ Retrieve a specific environment by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -47192,6 +48139,8 @@ Retrieve a specific environment by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -47418,7 +48367,7 @@ Update an existing environment's configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -47470,6 +48419,8 @@ Update an existing environment's configuration. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -47824,7 +48775,7 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -47876,6 +48827,8 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -47937,7 +48890,7 @@ Archive an environment by ID. Archived environments cannot be used to create new - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -47989,6 +48942,8 @@ Archive an environment by ID. Archived environments cannot be used to create new - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -48715,7 +49670,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -48767,6 +49722,8 @@ Retrieve detailed information about a specific work item. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -48777,7 +49734,7 @@ Retrieve detailed information about a specific work item. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -48823,6 +49780,10 @@ Retrieve detailed information about a specific work item. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -48880,6 +49841,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -48918,7 +49880,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -48970,6 +49932,8 @@ Long poll for work items in the queue. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -48984,7 +49948,7 @@ Long poll for work items in the queue. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -49030,6 +49994,10 @@ Long poll for work items in the queue. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -49087,6 +50055,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/poll \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -49117,7 +50086,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -49169,6 +50138,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -49179,7 +50150,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -49225,6 +50196,10 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -49283,6 +50258,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/ack "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -49323,7 +50299,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -49375,6 +50351,8 @@ Record a heartbeat for a work item to maintain the lease. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -49465,7 +50443,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -49517,6 +50495,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -49533,7 +50513,7 @@ Stop a work item, initiating graceful or forced shutdown. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -49579,6 +50559,10 @@ Stop a work item, initiating graceful or forced shutdown. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -49638,6 +50622,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/sto "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -49676,7 +50661,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -49728,6 +50713,8 @@ List work items in an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -49784,6 +50771,10 @@ List work items in an environment. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -49847,6 +50838,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -49880,7 +50872,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -49932,6 +50924,8 @@ Update work item metadata with merge semantics. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -49948,7 +50942,7 @@ Update work item metadata with merge semantics. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -49994,6 +50988,10 @@ Update work item metadata with merge semantics. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -50057,6 +51055,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -50083,7 +51082,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -50135,6 +51134,8 @@ Get statistics about the work queue for an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -50198,7 +51199,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ ### Beta Self Hosted Work -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -50244,6 +51245,10 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -50362,6 +51367,10 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -50483,7 +51492,7 @@ Create Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -50535,6 +51544,8 @@ Create Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -50661,7 +51672,7 @@ Create Session - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -50671,6 +51682,64 @@ Create Session See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -50891,6 +51960,208 @@ Create Session ID of the `environment` defining the container configuration for this session. +- `initial_events: optional array of BetaManagedAgentsUserMessageEventParams or BetaManagedAgentsUserDefineOutcomeEventParams` + + Initial events to send to the `session` at creation, processed in order. Supports `user.message` and `user.define_outcome` events. Maximum 50 events. + + - `BetaManagedAgentsUserMessageEventParams object { content, type }` + + Parameters for sending a user message to the session. + + - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock` + + Array of content blocks for the user message. + + - `BetaManagedAgentsTextBlock object { text, type }` + + Regular text content. + + - `text: string` + + The text content. + + - `type: "text"` + + - `"text"` + + - `BetaManagedAgentsImageBlock object { source, type }` + + Image content specified directly as base64 data or as a reference via a URL. + + - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource` + + Union type for image source variants. + + - `BetaManagedAgentsBase64ImageSource object { data, media_type, type }` + + Base64-encoded image data. + + - `data: string` + + Base64-encoded image data. + + - `media_type: string` + + MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp"). + + - `type: "base64"` + + - `"base64"` + + - `BetaManagedAgentsURLImageSource object { type, url }` + + Image referenced by URL. + + - `type: "url"` + + - `"url"` + + - `url: string` + + URL of the image to fetch. + + - `BetaManagedAgentsFileImageSource object { file_id, type }` + + Image referenced by file ID. + + - `file_id: string` + + ID of a previously uploaded file. + + - `type: "file"` + + - `"file"` + + - `type: "image"` + + - `"image"` + + - `BetaManagedAgentsDocumentBlock object { source, type, context, title }` + + Document content, either specified directly as base64 data, as text, or as a reference via a URL. + + - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource` + + Union type for document source variants. + + - `BetaManagedAgentsBase64DocumentSource object { data, media_type, type }` + + Base64-encoded document data. + + - `data: string` + + Base64-encoded document data. + + - `media_type: string` + + MIME type of the document (e.g., "application/pdf"). + + - `type: "base64"` + + - `"base64"` + + - `BetaManagedAgentsPlainTextDocumentSource object { data, media_type, type }` + + Plain text document content. + + - `data: string` + + The plain text content. + + - `media_type: "text/plain"` + + MIME type of the text content. Must be "text/plain". + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `BetaManagedAgentsURLDocumentSource object { type, url }` + + Document referenced by URL. + + - `type: "url"` + + - `"url"` + + - `url: string` + + URL of the document to fetch. + + - `BetaManagedAgentsFileDocumentSource object { file_id, type }` + + Document referenced by file ID. + + - `file_id: string` + + ID of a previously uploaded file. + + - `type: "file"` + + - `"file"` + + - `type: "document"` + + - `"document"` + + - `context: optional string` + + Additional context about the document for the model. + + - `title: optional string` + + The title of the document. + + - `type: "user.message"` + + - `"user.message"` + + - `BetaManagedAgentsUserDefineOutcomeEventParams object { description, rubric, type, max_iterations }` + + Parameters for defining an outcome the agent should work toward. The agent begins work on receipt. + + - `description: string` + + What the agent should produce. This is the task specification. + + - `rubric: BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams` + + Rubric for grading the quality of an outcome. + + - `BetaManagedAgentsFileRubricParams object { file_id, type }` + + Rubric referenced by a file uploaded via the Files API. + + - `file_id: string` + + ID of the rubric file. + + - `type: "file"` + + - `"file"` + + - `BetaManagedAgentsTextRubricParams object { content, type }` + + Rubric content provided inline as text. + + - `content: string` + + Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters. + + - `type: "text"` + + - `"text"` + + - `type: "user.define_outcome"` + + - `"user.define_outcome"` + + - `max_iterations: optional number` + + Eval→revision cycles before giving up. Default 3, max 20. + - `metadata: optional map[string]` Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. @@ -51083,6 +52354,50 @@ Create Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -51569,6 +52884,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -51585,6 +52903,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -51800,7 +53121,7 @@ List Sessions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -51852,6 +53173,8 @@ List Sessions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -51952,6 +53275,50 @@ List Sessions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -52442,6 +53809,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -52458,6 +53828,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -52615,7 +53988,7 @@ Get Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -52667,6 +54040,8 @@ Get Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -52767,6 +54142,50 @@ Get Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -53247,6 +54666,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -53263,6 +54685,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -53416,7 +54841,7 @@ Update Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -53468,6 +54893,8 @@ Update Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -53766,6 +55193,50 @@ Update Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -54250,6 +55721,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -54266,6 +55740,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -54419,7 +55896,7 @@ Delete Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -54471,6 +55948,8 @@ Delete Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -54528,7 +56007,7 @@ Archive Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -54580,6 +56059,8 @@ Archive Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -54680,6 +56161,50 @@ Archive Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -55161,6 +56686,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -55177,6 +56705,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -55452,7 +56983,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -55462,6 +56993,64 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -56110,6 +57699,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -56650,6 +58283,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -57166,6 +58843,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -57468,6 +59189,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -58118,7 +59883,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -58170,6 +59935,8 @@ List Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -59158,7 +60925,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -59494,7 +61261,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -59696,6 +61463,50 @@ List Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -60035,7 +61846,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -60087,6 +61898,8 @@ Send Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -60970,7 +62783,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -61022,6 +62835,8 @@ Stream Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -62010,7 +63825,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -62346,7 +64161,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -62548,6 +64363,50 @@ Stream Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -66585,7 +68444,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -66921,7 +68780,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -67123,6 +68982,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -67417,7 +69320,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -67463,7 +69366,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -67601,7 +69504,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -68889,7 +70792,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -69225,7 +71128,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -69427,6 +71330,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -71053,7 +73000,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -71105,6 +73052,8 @@ Add Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -71205,7 +73154,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -71257,6 +73206,8 @@ List Session Resources - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -71432,7 +73383,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -71484,6 +73435,8 @@ Get Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -71638,7 +73591,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -71690,6 +73643,8 @@ Update Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -71854,7 +73809,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -71906,6 +73861,8 @@ Delete Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -72405,7 +74362,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72457,6 +74414,8 @@ List Session Threads - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -72559,6 +74518,50 @@ List Session Threads - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -72853,6 +74856,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -72934,7 +74940,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72986,6 +74992,8 @@ Get Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -73088,6 +75096,50 @@ Get Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -73376,6 +75428,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -73454,7 +75509,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -73506,6 +75561,8 @@ Archive Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -73608,6 +75665,50 @@ Archive Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -73897,6 +75998,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -74051,6 +76155,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -75355,7 +77503,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -75691,7 +77839,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -75893,6 +78041,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -76261,7 +78453,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -76313,6 +78505,8 @@ List Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -77301,7 +79495,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -77637,7 +79831,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -77839,6 +80033,50 @@ List Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -78161,6 +80399,16 @@ Stream Session Thread Events - `thread_id: string` +### Query Parameters + +- `event_deltas: optional array of BetaManagedAgentsDeltaType` + + When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. + + - `"agent.message"` + + - `"agent.thinking"` + ### Header Parameters - `"anthropic-beta": optional array of AnthropicBeta` @@ -78169,7 +80417,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78221,6 +80469,8 @@ Stream Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -79209,7 +81459,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -79545,7 +81795,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -79747,6 +81997,50 @@ Stream Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -80124,7 +82418,7 @@ Create Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80176,6 +82470,8 @@ Create Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -81220,7 +83516,7 @@ List Deployments - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -81272,6 +83568,8 @@ List Deployments - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -81908,7 +84206,7 @@ Get Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -81960,6 +84258,8 @@ Get Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -82587,7 +84887,7 @@ Update Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82639,6 +84939,8 @@ Update Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -83638,7 +85940,7 @@ Archive Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -83690,6 +85992,8 @@ Archive Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -84318,7 +86622,7 @@ Run Deployment Now - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84370,6 +86674,8 @@ Run Deployment Now - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -84689,7 +86995,7 @@ Pause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84741,6 +87047,8 @@ Pause Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -85369,7 +87677,7 @@ Unpause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -85421,6 +87729,8 @@ Unpause Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -88097,7 +90407,7 @@ List Deployment Runs - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -88149,6 +90459,8 @@ List Deployment Runs - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -88476,7 +90788,7 @@ Get Deployment Run - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -88528,6 +90840,8 @@ Get Deployment Run - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -89388,7 +91702,7 @@ Create Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -89440,6 +91754,8 @@ Create Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -89552,7 +91868,7 @@ List Vaults - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -89604,6 +91920,8 @@ List Vaults - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -89698,7 +92016,7 @@ Get Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -89750,142 +92068,7 @@ Get Vault - `"cache-diagnosis-2026-04-07"` - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"fallback-credit-2026-06-01"` - - - `"agent-memory-2026-07-22"` - -### Returns - -- `BetaManagedAgentsVault object { id, archived_at, created_at, 4 more }` - - A vault that stores credentials for use by agents during sessions. - - - `id: string` - - Unique identifier for the vault. - - - `archived_at: string` - - A timestamp in RFC 3339 format - - - `created_at: string` - - A timestamp in RFC 3339 format - - - `display_name: string` - - Human-readable name for the vault. - - - `metadata: map[string]` - - Arbitrary key-value metadata attached to the vault. - - - `type: "vault"` - - - `"vault"` - - - `updated_at: string` - - A timestamp in RFC 3339 format - -### Example - -```http -curl https://api.anthropic.com/v1/vaults/$VAULT_ID \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: managed-agents-2026-04-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", - "archived_at": null, - "created_at": "2026-03-15T10:00:00Z", - "display_name": "Example vault", - "metadata": { - "environment": "production" - }, - "type": "vault", - "updated_at": "2026-03-15T10:00:00Z" -} -``` - -## Update Vault - -**post** `/v1/vaults/{vault_id}` - -Update Vault - -### Path Parameters - -- `vault_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` - - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` - `"thinking-token-count-2026-05-13"` @@ -89895,16 +92078,155 @@ Update Vault - `"agent-memory-2026-07-22"` -### Body Parameters - -- `display_name: optional string` - - Updated human-readable name for the vault. 1-255 characters. - -- `metadata: optional map[string]` - - Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved. - +### Returns + +- `BetaManagedAgentsVault object { id, archived_at, created_at, 4 more }` + + A vault that stores credentials for use by agents during sessions. + + - `id: string` + + Unique identifier for the vault. + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `display_name: string` + + Human-readable name for the vault. + + - `metadata: map[string]` + + Arbitrary key-value metadata attached to the vault. + + - `type: "vault"` + + - `"vault"` + + - `updated_at: string` + + A timestamp in RFC 3339 format + +### Example + +```http +curl https://api.anthropic.com/v1/vaults/$VAULT_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: managed-agents-2026-04-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "archived_at": null, + "created_at": "2026-03-15T10:00:00Z", + "display_name": "Example vault", + "metadata": { + "environment": "production" + }, + "type": "vault", + "updated_at": "2026-03-15T10:00:00Z" +} +``` + +## Update Vault + +**post** `/v1/vaults/{vault_id}` + +Update Vault + +### Path Parameters + +- `vault_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `display_name: optional string` + + Updated human-readable name for the vault. 1-255 characters. + +- `metadata: optional map[string]` + + Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved. + ### Returns - `BetaManagedAgentsVault object { id, archived_at, created_at, 4 more }` @@ -89989,7 +92311,7 @@ Delete Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -90041,6 +92363,8 @@ Delete Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -90100,7 +92424,7 @@ Archive Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -90152,6 +92476,8 @@ Archive Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -90290,7 +92616,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -90342,6 +92668,8 @@ Create Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -90752,7 +93080,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -90804,6 +93132,8 @@ List Credentials - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -91037,7 +93367,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -91089,6 +93419,8 @@ Get Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -91313,7 +93645,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -91365,6 +93697,8 @@ Update Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -91726,7 +94060,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -91778,6 +94112,8 @@ Delete Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -91839,7 +94175,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -91891,6 +94227,8 @@ Archive Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -92116,7 +94454,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -92168,6 +94506,8 @@ Validate Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -93457,7 +95797,7 @@ Create a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -93509,6 +95849,8 @@ Create a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -93635,7 +95977,7 @@ List memory stores - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -93687,6 +96029,8 @@ List memory stores - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -93786,7 +96130,7 @@ Retrieve a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -93838,147 +96182,7 @@ Retrieve a memory store - `"cache-diagnosis-2026-04-07"` - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"fallback-credit-2026-06-01"` - - - `"agent-memory-2026-07-22"` - -### Returns - -- `BetaManagedAgentsMemoryStore object { id, created_at, name, 5 more }` - - A `memory_store`: a named container for agent memories, scoped to a workspace. Attach a store to a session via `resources[]` to mount it as a directory the agent can read and write. - - - `id: string` - - Unique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls. - - - `created_at: string` - - A timestamp in RFC 3339 format - - - `name: string` - - Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. - - - `type: "memory_store"` - - - `"memory_store"` - - - `updated_at: string` - - A timestamp in RFC 3339 format - - - `archived_at: optional string` - - A timestamp in RFC 3339 format - - - `description: optional string` - - Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset. - - - `metadata: optional map[string]` - - Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable. - -### Example - -```http -curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: agent-memory-2026-07-22' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "id": "id", - "created_at": "2019-12-27T18:11:19.117Z", - "name": "name", - "type": "memory_store", - "updated_at": "2019-12-27T18:11:19.117Z", - "archived_at": "2019-12-27T18:11:19.117Z", - "description": "description", - "metadata": { - "foo": "string" - } -} -``` - -## Update a memory store - -**post** `/v1/memory_stores/{memory_store_id}` - -Update a memory store - -### Path Parameters - -- `memory_store_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` - - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` - `"thinking-token-count-2026-05-13"` @@ -93988,20 +96192,164 @@ Update a memory store - `"agent-memory-2026-07-22"` -### Body Parameters - -- `description: optional string` - - New description for the store, up to 1024 characters. Pass an empty string to clear it. - -- `metadata: optional map[string]` - - Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars. - -- `name: optional string` - - New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update. - +### Returns + +- `BetaManagedAgentsMemoryStore object { id, created_at, name, 5 more }` + + A `memory_store`: a named container for agent memories, scoped to a workspace. Attach a store to a session via `resources[]` to mount it as a directory the agent can read and write. + + - `id: string` + + Unique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls. + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `name: string` + + Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. + + - `type: "memory_store"` + + - `"memory_store"` + + - `updated_at: string` + + A timestamp in RFC 3339 format + + - `archived_at: optional string` + + A timestamp in RFC 3339 format + + - `description: optional string` + + Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset. + + - `metadata: optional map[string]` + + Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable. + +### Example + +```http +curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: agent-memory-2026-07-22' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2019-12-27T18:11:19.117Z", + "name": "name", + "type": "memory_store", + "updated_at": "2019-12-27T18:11:19.117Z", + "archived_at": "2019-12-27T18:11:19.117Z", + "description": "description", + "metadata": { + "foo": "string" + } +} +``` + +## Update a memory store + +**post** `/v1/memory_stores/{memory_store_id}` + +Update a memory store + +### Path Parameters + +- `memory_store_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `description: optional string` + + New description for the store, up to 1024 characters. Pass an empty string to clear it. + +- `metadata: optional map[string]` + + Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars. + +- `name: optional string` + + New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update. + ### Returns - `BetaManagedAgentsMemoryStore object { id, created_at, name, 5 more }` @@ -94086,7 +96434,7 @@ Delete a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -94138,6 +96486,8 @@ Delete a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -94197,7 +96547,7 @@ Archive a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -94249,6 +96599,8 @@ Archive a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -94406,7 +96758,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -94458,6 +96810,8 @@ Create a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -94597,7 +96951,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -94649,6 +97003,8 @@ List memories - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -94784,7 +97140,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -94836,167 +97192,7 @@ Retrieve a memory - `"cache-diagnosis-2026-04-07"` - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"fallback-credit-2026-06-01"` - - - `"agent-memory-2026-07-22"` - -### Returns - -- `BetaManagedAgentsMemory object { id, content_sha256, content_size_bytes, 7 more }` - - A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update. - - - `id: string` - - Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory. - - - `content_sha256: string` - - Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`. - - - `content_size_bytes: number` - - Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. - - - `created_at: string` - - A timestamp in RFC 3339 format - - - `memory_store_id: string` - - ID of the memory store this memory belongs to (a `memstore_...` value). - - - `memory_version_id: string` - - ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the full history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list). - - - `path: string` - - Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes. - - - `type: "memory"` - - - `"memory"` - - - `updated_at: string` - - A timestamp in RFC 3339 format - - - `content: optional string` - - The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). - -### Example - -```http -curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memories/$MEMORY_ID \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: agent-memory-2026-07-22' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "id": "id", - "content_sha256": "content_sha256", - "content_size_bytes": 0, - "created_at": "2019-12-27T18:11:19.117Z", - "memory_store_id": "memory_store_id", - "memory_version_id": "memory_version_id", - "path": "path", - "type": "memory", - "updated_at": "2019-12-27T18:11:19.117Z", - "content": "content" -} -``` - -## Update a memory - -**post** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}` - -Update a memory - -### Path Parameters - -- `memory_store_id: string` - -- `memory_id: string` - -### Query Parameters - -- `view: optional BetaManagedAgentsMemoryView` - - Query parameter for view - - - `"basic"` - - - `"full"` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` - - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` - `"thinking-token-count-2026-05-13"` @@ -95006,28 +97202,192 @@ Update a memory - `"agent-memory-2026-07-22"` -### Body Parameters - -- `content: optional string` - - New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update). - -- `path: optional string` - - New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged. - -- `precondition: optional BetaManagedAgentsPrecondition` - - Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409. - - - `type: "content_sha256"` - - - `"content_sha256"` - - - `content_sha256: optional string` - - Expected `content_sha256` of the stored memory (64 lowercase hexadecimal characters). Typically the `content_sha256` returned by a prior read or list call. Because the server applies no content normalization, clients can also compute this locally as the SHA-256 of the UTF-8 content bytes. - +### Returns + +- `BetaManagedAgentsMemory object { id, content_sha256, content_size_bytes, 7 more }` + + A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update. + + - `id: string` + + Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory. + + - `content_sha256: string` + + Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`. + + - `content_size_bytes: number` + + Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `memory_store_id: string` + + ID of the memory store this memory belongs to (a `memstore_...` value). + + - `memory_version_id: string` + + ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the full history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list). + + - `path: string` + + Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes. + + - `type: "memory"` + + - `"memory"` + + - `updated_at: string` + + A timestamp in RFC 3339 format + + - `content: optional string` + + The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). + +### Example + +```http +curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memories/$MEMORY_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: agent-memory-2026-07-22' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "content_sha256": "content_sha256", + "content_size_bytes": 0, + "created_at": "2019-12-27T18:11:19.117Z", + "memory_store_id": "memory_store_id", + "memory_version_id": "memory_version_id", + "path": "path", + "type": "memory", + "updated_at": "2019-12-27T18:11:19.117Z", + "content": "content" +} +``` + +## Update a memory + +**post** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}` + +Update a memory + +### Path Parameters + +- `memory_store_id: string` + +- `memory_id: string` + +### Query Parameters + +- `view: optional BetaManagedAgentsMemoryView` + + Query parameter for view + + - `"basic"` + + - `"full"` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `content: optional string` + + New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update). + +- `path: optional string` + + New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged. + +- `precondition: optional BetaManagedAgentsPrecondition` + + Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409. + + - `type: "content_sha256"` + + - `"content_sha256"` + + - `content_sha256: optional string` + + Expected `content_sha256` of the stored memory (64 lowercase hexadecimal characters). Typically the `content_sha256` returned by a prior read or list call. Because the server applies no content normalization, clients can also compute this locally as the SHA-256 of the UTF-8 content bytes. + ### Returns - `BetaManagedAgentsMemory object { id, content_sha256, content_size_bytes, 7 more }` @@ -95128,7 +97488,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -95180,6 +97540,8 @@ Delete a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -95603,7 +97965,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -95655,6 +98017,8 @@ List memory versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -95837,7 +98201,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -95889,6 +98253,8 @@ Retrieve a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -96052,7 +98418,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -96104,6 +98470,8 @@ Redact a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -96462,7 +98830,7 @@ Upload File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -96514,6 +98882,8 @@ Upload File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -96637,7 +99007,7 @@ List Files - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -96689,6 +99059,8 @@ List Files - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -96817,7 +99189,7 @@ Download File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -96869,6 +99241,8 @@ Download File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -96906,7 +99280,7 @@ Get File Metadata - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -96958,6 +99332,8 @@ Get File Metadata - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -97065,7 +99441,7 @@ Delete File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -97117,6 +99493,8 @@ Delete File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -97260,7 +99638,7 @@ Create Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -97312,6 +99690,8 @@ Create Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -97425,7 +99805,7 @@ List Skills - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -97477,6 +99857,8 @@ List Skills - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -97595,7 +99977,7 @@ Get Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -97647,6 +100029,8 @@ Get Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -97743,7 +100127,7 @@ Delete Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -97795,6 +100179,8 @@ Delete Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -98013,7 +100399,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98065,6 +100451,8 @@ Create Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -98179,7 +100567,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98231,6 +100619,8 @@ List Skill Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -98355,7 +100745,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98407,6 +100797,8 @@ Download a skill version's content as a zip archive. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -98452,7 +100844,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98504,6 +100896,8 @@ Get Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -98610,7 +101004,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98662,6 +101056,8 @@ Delete Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -98881,7 +101277,7 @@ Create User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98933,6 +101329,8 @@ Create User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -99089,7 +101487,7 @@ List User Profiles - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -99141,6 +101539,8 @@ List User Profiles - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -99265,7 +101665,7 @@ Get User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -99317,170 +101717,7 @@ Get User Profile - `"cache-diagnosis-2026-04-07"` - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"fallback-credit-2026-06-01"` - - - `"agent-memory-2026-07-22"` - -### Returns - -- `BetaUserProfile object { id, created_at, metadata, 6 more }` - - - `id: string` - - Unique identifier for this user profile, prefixed `uprof_`. - - - `created_at: string` - - A timestamp in RFC 3339 format - - - `metadata: map[string]` - - Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - - `trust_grants: map[BetaUserProfileTrustGrant]` - - Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. - - - `status: "active" or "pending" or "rejected"` - - Status of the trust grant. - - - `"active"` - - - `"pending"` - - - `"rejected"` - - - `type: "user_profile"` - - Object type. Always `user_profile`. - - - `"user_profile"` - - - `updated_at: string` - - A timestamp in RFC 3339 format - - - `external_id: optional string` - - Platform's own identifier for this user. Not enforced unique. - - - `name: optional string` - - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. - -### Example - -```http -curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", - "created_at": "2026-03-15T10:00:00Z", - "metadata": {}, - "relationship": "external", - "trust_grants": { - "cyber": { - "status": "active" - } - }, - "type": "user_profile", - "updated_at": "2026-03-15T10:00:00Z", - "external_id": "user_12345", - "name": "Example User" -} -``` - -## Update User Profile - -**post** `/v1/user_profiles/{user_profile_id}` - -Update User Profile - -### Path Parameters - -- `user_profile_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` - - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` - `"thinking-token-count-2026-05-13"` @@ -99490,30 +101727,197 @@ Update User Profile - `"agent-memory-2026-07-22"` -### Body Parameters - -- `external_id: optional string` - - If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. - -- `metadata: optional map[string]` - - Key-value pairs to merge into the stored metadata. Keys provided overwrite existing values. To remove a key, set its value to an empty string. Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters. - -- `name: optional string` - - If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters. - -- `relationship: optional "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - +### Returns + +- `BetaUserProfile object { id, created_at, metadata, 6 more }` + + - `id: string` + + Unique identifier for this user profile, prefixed `uprof_`. + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `metadata: map[string]` + + Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. + + - `relationship: "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + + - `trust_grants: map[BetaUserProfileTrustGrant]` + + Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. + + - `status: "active" or "pending" or "rejected"` + + Status of the trust grant. + + - `"active"` + + - `"pending"` + + - `"rejected"` + + - `type: "user_profile"` + + Object type. Always `user_profile`. + + - `"user_profile"` + + - `updated_at: string` + + A timestamp in RFC 3339 format + + - `external_id: optional string` + + Platform's own identifier for this user. Not enforced unique. + + - `name: optional string` + + Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + +### Example + +```http +curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", + "created_at": "2026-03-15T10:00:00Z", + "metadata": {}, + "relationship": "external", + "trust_grants": { + "cyber": { + "status": "active" + } + }, + "type": "user_profile", + "updated_at": "2026-03-15T10:00:00Z", + "external_id": "user_12345", + "name": "Example User" +} +``` + +## Update User Profile + +**post** `/v1/user_profiles/{user_profile_id}` + +Update User Profile + +### Path Parameters + +- `user_profile_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `external_id: optional string` + + If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. + +- `metadata: optional map[string]` + + Key-value pairs to merge into the stored metadata. Keys provided overwrite existing values. To remove a key, set its value to an empty string. Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters. + +- `name: optional string` + + If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters. + +- `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Returns - `BetaUserProfile object { id, created_at, metadata, 6 more }` @@ -99623,7 +102027,1295 @@ Create Enrollment URL - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaUserProfileEnrollmentURL object { expires_at, type, url }` + + - `expires_at: string` + + A timestamp in RFC 3339 format + + - `type: "enrollment_url"` + + Object type. Always `enrollment_url`. + + - `"enrollment_url"` + + - `url: string` + + Enrollment URL to send to the end user. Valid until `expires_at`. + +### Example + +```http +curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "expires_at": "2026-03-15T10:15:00Z", + "type": "enrollment_url", + "url": "https://platform.claude.com/user-profiles/enrollment/M3J0bGJxZ2ppMnptbnB1" +} +``` + +## Domain Types + +### Beta User Profile + +- `BetaUserProfile object { id, created_at, metadata, 6 more }` + + - `id: string` + + Unique identifier for this user profile, prefixed `uprof_`. + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `metadata: map[string]` + + Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. + + - `relationship: "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + + - `trust_grants: map[BetaUserProfileTrustGrant]` + + Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. + + - `status: "active" or "pending" or "rejected"` + + Status of the trust grant. + + - `"active"` + + - `"pending"` + + - `"rejected"` + + - `type: "user_profile"` + + Object type. Always `user_profile`. + + - `"user_profile"` + + - `updated_at: string` + + A timestamp in RFC 3339 format + + - `external_id: optional string` + + Platform's own identifier for this user. Not enforced unique. + + - `name: optional string` + + Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + +### Beta User Profile Enrollment URL + +- `BetaUserProfileEnrollmentURL object { expires_at, type, url }` + + - `expires_at: string` + + A timestamp in RFC 3339 format + + - `type: "enrollment_url"` + + Object type. Always `enrollment_url`. + + - `"enrollment_url"` + + - `url: string` + + Enrollment URL to send to the end user. Valid until `expires_at`. + +### Beta User Profile Trust Grant + +- `BetaUserProfileTrustGrant object { status }` + + - `status: "active" or "pending" or "rejected"` + + Status of the trust grant. + + - `"active"` + + - `"pending"` + + - `"rejected"` + +# Dreams + +## Create a Dream + +**post** `/v1/dreams` + +Create a Dream + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +- `model: string or BetaDreamModelConfigParam` + + Model identifier and configuration applied to every pipeline stage. + + - `string` + + - `BetaDreamModelConfigParam object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +- `instructions: optional string` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams \ + -H 'Content-Type: application/json' \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -d '{ + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "model": "string" + }' +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## List Dreams + +**get** `/v1/dreams` + +List Dreams + +### Query Parameters + +- `"created_at[gt]": optional string` + + Return dreams with `created_at` strictly after this timestamp (exclusive lower bound, RFC 3339). Unset applies no lower bound. + +- `"created_at[lt]": optional string` + + Return dreams with `created_at` strictly before this timestamp (exclusive upper bound, RFC 3339). Unset applies no upper bound. + +- `include_archived: optional boolean` + + Query parameter for include_archived + +- `limit: optional number` + + Query parameter for limit + +- `page: optional string` + + Query parameter for page + +- `statuses: optional array of BetaDreamStatus` + + Filter by lifecycle status. Repeat the parameter to match any of multiple statuses. Empty applies no status filter. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `data: array of BetaDream` + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +- `next_page: string` + +### Example + +```http +curl https://api.anthropic.com/v1/dreams \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } + } + ], + "next_page": "next_page" +} +``` + +## Get a Dream + +**get** `/v1/dreams/{dream_id}` + +Get a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## Cancel a Dream + +**post** `/v1/dreams/{dream_id}/cancel` + +Cancel a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## Archive a Dream + +**post** `/v1/dreams/{dream_id}/archive` + +Archive a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -99675,6 +103367,8 @@ Create Enrollment URL - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -99685,29 +103379,127 @@ Create Enrollment URL ### Returns -- `BetaUserProfileEnrollmentURL object { expires_at, type, url }` +- `BetaDream object { id, archived_at, created_at, 10 more }` - - `expires_at: string` + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` A timestamp in RFC 3339 format - - `type: "enrollment_url"` + - `created_at: string` - Object type. Always `enrollment_url`. + A timestamp in RFC 3339 format - - `"enrollment_url"` + - `ended_at: string` - - `url: string` + A timestamp in RFC 3339 format - Enrollment URL to send to the end user. Valid until `expires_at`. + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. ### Example ```http -curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ +curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ -X POST \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -99715,103 +103507,318 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url ```json { - "expires_at": "2026-03-15T10:15:00Z", - "type": "enrollment_url", - "url": "https://platform.claude.com/user-profiles/enrollment/M3J0bGJxZ2ppMnptbnB1" + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } } ``` ## Domain Types -### Beta User Profile +### Beta Dream -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` - Unique identifier for this user profile, prefixed `uprof_`. + - `archived_at: string` + + A timestamp in RFC 3339 format - `created_at: string` A timestamp in RFC 3339 format - - `metadata: map[string]` + - `ended_at: string` - Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. + A timestamp in RFC 3339 format - - `relationship: "external" or "resold" or "internal"` + - `error: BetaDreamError` - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + Failure detail for a Dream whose `status` is `failed`. - - `"external"` + - `message: string` - - `"resold"` + - `type: string` - - `"internal"` + - `inputs: array of BetaDreamInput` - - `trust_grants: map[BetaUserProfileTrustGrant]` + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. + An input memory store the dream reads from. The dream never mutates this store. - - `status: "active" or "pending" or "rejected"` + - `memory_store_id: string` - Status of the trust grant. + - `type: "memory_store"` - - `"active"` + - `"memory_store"` - - `"pending"` + - `BetaDreamSessionsInput object { session_ids, type }` - - `"rejected"` + Input session transcripts the dream reads. - - `type: "user_profile"` + - `session_ids: array of string` - Object type. Always `user_profile`. + - `type: "sessions"` - - `"user_profile"` + - `"sessions"` - - `updated_at: string` + - `instructions: string` - A timestamp in RFC 3339 format + - `model: BetaDreamModelConfig` - - `external_id: optional string` + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. - Platform's own identifier for this user. Not enforced unique. + - `id: string` - - `name: optional string` + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + - `speed: optional "standard" or "fast"` -### Beta User Profile Enrollment URL + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. -- `BetaUserProfileEnrollmentURL object { expires_at, type, url }` + - `"standard"` - - `expires_at: string` + - `"fast"` - A timestamp in RFC 3339 format + - `outputs: array of BetaDreamOutput` - - `type: "enrollment_url"` + - `memory_store_id: string` - Object type. Always `enrollment_url`. + - `type: "memory_store"` - - `"enrollment_url"` + - `"memory_store"` - - `url: string` + - `session_id: string` - Enrollment URL to send to the end user. Valid until `expires_at`. + - `status: BetaDreamStatus` -### Beta User Profile Trust Grant + Lifecycle status of a Dream. -- `BetaUserProfileTrustGrant object { status }` + - `"pending"` - - `status: "active" or "pending" or "rejected"` + - `"running"` - Status of the trust grant. + - `"completed"` - - `"active"` + - `"failed"` - - `"pending"` + - `"canceled"` - - `"rejected"` + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Beta Dream Error + +- `BetaDreamError object { message, type }` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + +### Beta Dream Input + +- `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput` + + An input memory store the dream reads from. The dream never mutates this store. + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +### Beta Dream Memory Store Input + +- `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + +### Beta Dream Memory Store Output + +- `BetaDreamMemoryStoreOutput object { memory_store_id, type }` + + An output memory store the dream writes consolidated memories into. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + +### Beta Dream Model Config + +- `BetaDreamModelConfig object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +### Beta Dream Model Config Param + +- `BetaDreamModelConfigParam object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +### Beta Dream Output + +- `BetaDreamOutput object { memory_store_id, type }` + + An output memory store the dream writes consolidated memories into. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + +### Beta Dream Sessions Input + +- `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +### Beta Dream Status + +- `BetaDreamStatus = "pending" or "running" or "completed" or 2 more` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + +### Beta Dream Usage + +- `BetaDreamUsage object { cache_creation_input_tokens, cache_read_input_tokens, input_tokens, output_tokens }` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. # Tunnels @@ -99831,7 +103838,7 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -99883,6 +103890,8 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -99971,7 +103980,7 @@ Fetches a tunnel by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100023,6 +104032,8 @@ Fetches a tunnel by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100113,7 +104124,7 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100165,6 +104176,8 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100254,7 +104267,7 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100306,6 +104319,8 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100387,7 +104402,7 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100439,6 +104454,8 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100505,7 +104522,7 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100557,6 +104574,8 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100682,7 +104701,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100734,6 +104753,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100831,7 +104852,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -100883,6 +104904,8 @@ Fetches a tunnel certificate by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -100982,7 +105005,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -101034,6 +105057,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -101130,7 +105155,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -101182,6 +105207,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -101496,6 +105523,70 @@ curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_I - `workspace_id: string` +### Beta Webhook Environment Archived Event Data + +- `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + +### Beta Webhook Environment Created Event Data + +- `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + +### Beta Webhook Environment Deleted Event Data + +- `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + +### Beta Webhook Environment Updated Event Data + +- `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + ### Beta Webhook Event - `BetaWebhookEvent object { id, created_at, data, type }` @@ -102042,6 +106133,104 @@ curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_I - `workspace_id: string` + - `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + - `type: "event"` Object type. Always `event` for webhook payloads. @@ -102050,7 +106239,7 @@ curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_I ### Beta Webhook Event Data -- `BetaWebhookEventData = BetaWebhookSessionCreatedEventData or BetaWebhookSessionPendingEventData or BetaWebhookSessionRunningEventData or 33 more` +- `BetaWebhookEventData = BetaWebhookSessionCreatedEventData or BetaWebhookSessionPendingEventData or BetaWebhookSessionRunningEventData or 40 more` - `BetaWebhookSessionCreatedEventData object { id, organization_id, type, workspace_id }` @@ -102584,6 +106773,152 @@ curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_I - `workspace_id: string` + - `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + +### Beta Webhook Memory Store Archived Event Data + +- `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + +### Beta Webhook Memory Store Created Event Data + +- `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + +### Beta Webhook Memory Store Deleted Event Data + +- `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + ### Beta Webhook Session Archived Event Data - `BetaWebhookSessionArchivedEventData object { id, organization_id, type, workspace_id }` @@ -103526,6 +107861,104 @@ curl https://api.anthropic.com/v1/tunnels/$TUNNEL_ID/certificates/$CERTIFICATE_I - `workspace_id: string` + - `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + - `type: "event"` Object type. Always `event` for webhook payloads. diff --git a/content/en/api/beta/agents.md b/content/en/api/beta/agents.md index 4629e161e..173ea1fda 100644 --- a/content/en/api/beta/agents.md +++ b/content/en/api/beta/agents.md @@ -14,7 +14,7 @@ Create Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -142,7 +144,7 @@ Create Agent - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -152,6 +154,64 @@ Create Agent See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -526,6 +586,50 @@ Create Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -778,6 +882,9 @@ curl https://api.anthropic.com/v1/agents \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -866,7 +973,7 @@ List Agents - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -918,6 +1025,8 @@ List Agents - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1022,6 +1131,50 @@ List Agents - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1265,6 +1418,9 @@ curl https://api.anthropic.com/v1/agents \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -1344,7 +1500,7 @@ Get Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1396,6 +1552,8 @@ Get Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1500,6 +1658,50 @@ Get Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1737,6 +1939,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -1807,7 +2012,7 @@ Update Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1859,6 +2064,8 @@ Update Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1869,10 +2076,6 @@ Update Agent ### Body Parameters -- `version: number` - - The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. The request fails if this does not match the server's current version. - - `description: optional string` Description. Omit to preserve; send empty string or null to clear. @@ -1963,7 +2166,7 @@ Update Agent - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -1973,6 +2176,64 @@ Update Agent See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -2227,6 +2488,10 @@ Update Agent - `"custom"` +- `version: optional number` + + The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. Must be at least 1 if specified. When supplied, the request fails if it does not match the server's current version; omit to apply the update unconditionally. + ### Returns - `BetaManagedAgentsAgent object { id, archived_at, created_at, 12 more }` @@ -2323,6 +2588,50 @@ Update Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -2540,8 +2849,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ -H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d "{ - \"version\": 1, - \"system\": \"You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.\" + \"description\": \"updated\", + \"system\": \"You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.\", + \"version\": 1 }" ``` @@ -2565,6 +2875,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -2635,7 +2948,7 @@ Archive Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2687,6 +3000,8 @@ Archive Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2791,6 +3106,50 @@ Archive Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -3029,6 +3388,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -3179,6 +3541,50 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -3975,6 +4381,56 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `"custom"` +### Beta Managed Agents Effort High + +- `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + +### Beta Managed Agents Effort Low + +- `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + +### Beta Managed Agents Effort Max + +- `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + +### Beta Managed Agents Effort Medium + +- `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + +### Beta Managed Agents Effort Xhigh + +- `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + ### Beta Managed Agents MCP Server URL Definition - `BetaManagedAgentsMCPServerURLDefinition object { name, type, url }` @@ -4297,7 +4753,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ ### Beta Managed Agents Model Config -- `BetaManagedAgentsModelConfig object { id, speed }` +- `BetaManagedAgentsModelConfig object { id, effort, speed }` Model identifier and configuration. @@ -4363,6 +4819,50 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -4373,7 +4873,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ ### Beta Managed Agents Model Config Params -- `BetaManagedAgentsModelConfigParams object { id, speed }` +- `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -4439,6 +4939,64 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -4605,6 +5163,50 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -4873,7 +5475,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4925,6 +5527,8 @@ List Agent Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -5029,6 +5633,50 @@ List Agent Versions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -5272,6 +5920,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/archive.md b/content/en/api/beta/agents/archive.md index 5443a4b79..f74febe90 100644 --- a/content/en/api/beta/agents/archive.md +++ b/content/en/api/beta/agents/archive.md @@ -16,7 +16,7 @@ Archive Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Archive Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -172,6 +174,50 @@ Archive Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -410,6 +456,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/create.md b/content/en/api/beta/agents/create.md index 7aebbdd0f..9cbf183fe 100644 --- a/content/en/api/beta/agents/create.md +++ b/content/en/api/beta/agents/create.md @@ -12,7 +12,7 @@ Create Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -140,7 +142,7 @@ Create Agent - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -150,6 +152,64 @@ Create Agent See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -524,6 +584,50 @@ Create Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -776,6 +880,9 @@ curl https://api.anthropic.com/v1/agents \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/list.md b/content/en/api/beta/agents/list.md index 17cd4cbd3..76489f7e4 100644 --- a/content/en/api/beta/agents/list.md +++ b/content/en/api/beta/agents/list.md @@ -34,7 +34,7 @@ List Agents - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -86,6 +86,8 @@ List Agents - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -190,6 +192,50 @@ List Agents - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -433,6 +479,9 @@ curl https://api.anthropic.com/v1/agents \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/retrieve.md b/content/en/api/beta/agents/retrieve.md index 86bd0baf8..acb4d045b 100644 --- a/content/en/api/beta/agents/retrieve.md +++ b/content/en/api/beta/agents/retrieve.md @@ -22,7 +22,7 @@ Get Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -74,6 +74,8 @@ Get Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -178,6 +180,50 @@ Get Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -415,6 +461,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/update.md b/content/en/api/beta/agents/update.md index 914bab6af..8b0f7bd90 100644 --- a/content/en/api/beta/agents/update.md +++ b/content/en/api/beta/agents/update.md @@ -16,7 +16,7 @@ Update Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update Agent - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -78,10 +80,6 @@ Update Agent ### Body Parameters -- `version: number` - - The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. The request fails if this does not match the server's current version. - - `description: optional string` Description. Omit to preserve; send empty string or null to clear. @@ -172,7 +170,7 @@ Update Agent - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -182,6 +180,64 @@ Update Agent See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -436,6 +492,10 @@ Update Agent - `"custom"` +- `version: optional number` + + The agent's current version, used to prevent concurrent overwrites. Obtain this value from a create or retrieve response. Must be at least 1 if specified. When supplied, the request fails if it does not match the server's current version; omit to apply the update unconditionally. + ### Returns - `BetaManagedAgentsAgent object { id, archived_at, created_at, 12 more }` @@ -532,6 +592,50 @@ Update Agent - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -749,8 +853,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ -H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d "{ - \"version\": 1, - \"system\": \"You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.\" + \"description\": \"updated\", + \"system\": \"You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.\", + \"version\": 1 }" ``` @@ -774,6 +879,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/versions.md b/content/en/api/beta/agents/versions.md index 416b526f9..8374a7324 100644 --- a/content/en/api/beta/agents/versions.md +++ b/content/en/api/beta/agents/versions.md @@ -28,7 +28,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ List Agent Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -184,6 +186,50 @@ List Agent Versions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -427,6 +473,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/agents/versions/list.md b/content/en/api/beta/agents/versions/list.md index 0fd80d17d..c8973c201 100644 --- a/content/en/api/beta/agents/versions/list.md +++ b/content/en/api/beta/agents/versions/list.md @@ -26,7 +26,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ List Agent Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -182,6 +184,50 @@ List Agent Versions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -425,6 +471,9 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ }, "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { diff --git a/content/en/api/beta/deployment_runs.md b/content/en/api/beta/deployment_runs.md index 0cf4b6112..53f38151b 100644 --- a/content/en/api/beta/deployment_runs.md +++ b/content/en/api/beta/deployment_runs.md @@ -56,7 +56,7 @@ List Deployment Runs - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -108,6 +108,8 @@ List Deployment Runs - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -435,7 +437,7 @@ Get Deployment Run - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -487,6 +489,8 @@ Get Deployment Run - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployment_runs/list.md b/content/en/api/beta/deployment_runs/list.md index a3abfbb16..a31d29153 100644 --- a/content/en/api/beta/deployment_runs/list.md +++ b/content/en/api/beta/deployment_runs/list.md @@ -54,7 +54,7 @@ List Deployment Runs - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -106,6 +106,8 @@ List Deployment Runs - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployment_runs/retrieve.md b/content/en/api/beta/deployment_runs/retrieve.md index 21be7b82f..b4c5d8105 100644 --- a/content/en/api/beta/deployment_runs/retrieve.md +++ b/content/en/api/beta/deployment_runs/retrieve.md @@ -16,7 +16,7 @@ Get Deployment Run - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Get Deployment Run - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments.md b/content/en/api/beta/deployments.md index 3f9e8551e..c89265d02 100644 --- a/content/en/api/beta/deployments.md +++ b/content/en/api/beta/deployments.md @@ -14,7 +14,7 @@ Create Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1110,7 +1112,7 @@ List Deployments - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1162,6 +1164,8 @@ List Deployments - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1798,7 +1802,7 @@ Get Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1850,6 +1854,8 @@ Get Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2477,7 +2483,7 @@ Update Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2529,6 +2535,8 @@ Update Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3528,7 +3536,7 @@ Archive Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3580,6 +3588,8 @@ Archive Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -4208,7 +4218,7 @@ Run Deployment Now - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4260,6 +4270,8 @@ Run Deployment Now - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -4579,7 +4591,7 @@ Pause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4631,6 +4643,8 @@ Pause Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -5259,7 +5273,7 @@ Unpause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -5311,6 +5325,8 @@ Unpause Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/archive.md b/content/en/api/beta/deployments/archive.md index 6d9ac2b54..70a546788 100644 --- a/content/en/api/beta/deployments/archive.md +++ b/content/en/api/beta/deployments/archive.md @@ -16,7 +16,7 @@ Archive Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Archive Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/create.md b/content/en/api/beta/deployments/create.md index c64289aad..50ed29049 100644 --- a/content/en/api/beta/deployments/create.md +++ b/content/en/api/beta/deployments/create.md @@ -12,7 +12,7 @@ Create Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/list.md b/content/en/api/beta/deployments/list.md index 027d34390..09340ccbd 100644 --- a/content/en/api/beta/deployments/list.md +++ b/content/en/api/beta/deployments/list.md @@ -46,7 +46,7 @@ List Deployments - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -98,6 +98,8 @@ List Deployments - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/pause.md b/content/en/api/beta/deployments/pause.md index e80649f57..424bd2efb 100644 --- a/content/en/api/beta/deployments/pause.md +++ b/content/en/api/beta/deployments/pause.md @@ -16,7 +16,7 @@ Pause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Pause Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/retrieve.md b/content/en/api/beta/deployments/retrieve.md index 9eb2ad1f8..b40201178 100644 --- a/content/en/api/beta/deployments/retrieve.md +++ b/content/en/api/beta/deployments/retrieve.md @@ -16,7 +16,7 @@ Get Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Get Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/run.md b/content/en/api/beta/deployments/run.md index afe61370e..de631b657 100644 --- a/content/en/api/beta/deployments/run.md +++ b/content/en/api/beta/deployments/run.md @@ -16,7 +16,7 @@ Run Deployment Now - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Run Deployment Now - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/unpause.md b/content/en/api/beta/deployments/unpause.md index 127d62e57..4305a3588 100644 --- a/content/en/api/beta/deployments/unpause.md +++ b/content/en/api/beta/deployments/unpause.md @@ -16,7 +16,7 @@ Unpause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Unpause Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/deployments/update.md b/content/en/api/beta/deployments/update.md index b2e03eb3a..f1cb34894 100644 --- a/content/en/api/beta/deployments/update.md +++ b/content/en/api/beta/deployments/update.md @@ -16,7 +16,7 @@ Update Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update Deployment - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/dreams.md b/content/en/api/beta/dreams.md new file mode 100644 index 000000000..80647145b --- /dev/null +++ b/content/en/api/beta/dreams.md @@ -0,0 +1,1600 @@ +# Dreams + +## Create a Dream + +**post** `/v1/dreams` + +Create a Dream + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +- `model: string or BetaDreamModelConfigParam` + + Model identifier and configuration applied to every pipeline stage. + + - `string` + + - `BetaDreamModelConfigParam object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +- `instructions: optional string` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams \ + -H 'Content-Type: application/json' \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -d '{ + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "model": "string" + }' +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## List Dreams + +**get** `/v1/dreams` + +List Dreams + +### Query Parameters + +- `"created_at[gt]": optional string` + + Return dreams with `created_at` strictly after this timestamp (exclusive lower bound, RFC 3339). Unset applies no lower bound. + +- `"created_at[lt]": optional string` + + Return dreams with `created_at` strictly before this timestamp (exclusive upper bound, RFC 3339). Unset applies no upper bound. + +- `include_archived: optional boolean` + + Query parameter for include_archived + +- `limit: optional number` + + Query parameter for limit + +- `page: optional string` + + Query parameter for page + +- `statuses: optional array of BetaDreamStatus` + + Filter by lifecycle status. Repeat the parameter to match any of multiple statuses. Empty applies no status filter. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `data: array of BetaDream` + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +- `next_page: string` + +### Example + +```http +curl https://api.anthropic.com/v1/dreams \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } + } + ], + "next_page": "next_page" +} +``` + +## Get a Dream + +**get** `/v1/dreams/{dream_id}` + +Get a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## Cancel a Dream + +**post** `/v1/dreams/{dream_id}/cancel` + +Cancel a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## Archive a Dream + +**post** `/v1/dreams/{dream_id}/archive` + +Archive a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` + +## Domain Types + +### Beta Dream + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Beta Dream Error + +- `BetaDreamError object { message, type }` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + +### Beta Dream Input + +- `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput` + + An input memory store the dream reads from. The dream never mutates this store. + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +### Beta Dream Memory Store Input + +- `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + +### Beta Dream Memory Store Output + +- `BetaDreamMemoryStoreOutput object { memory_store_id, type }` + + An output memory store the dream writes consolidated memories into. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + +### Beta Dream Model Config + +- `BetaDreamModelConfig object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +### Beta Dream Model Config Param + +- `BetaDreamModelConfigParam object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +### Beta Dream Output + +- `BetaDreamOutput object { memory_store_id, type }` + + An output memory store the dream writes consolidated memories into. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + +### Beta Dream Sessions Input + +- `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +### Beta Dream Status + +- `BetaDreamStatus = "pending" or "running" or "completed" or 2 more` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + +### Beta Dream Usage + +- `BetaDreamUsage object { cache_creation_input_tokens, cache_read_input_tokens, input_tokens, output_tokens }` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. diff --git a/content/en/api/beta/dreams/archive.md b/content/en/api/beta/dreams/archive.md new file mode 100644 index 000000000..c6b181388 --- /dev/null +++ b/content/en/api/beta/dreams/archive.md @@ -0,0 +1,246 @@ +## Archive a Dream + +**post** `/v1/dreams/{dream_id}/archive` + +Archive a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` diff --git a/content/en/api/beta/dreams/cancel.md b/content/en/api/beta/dreams/cancel.md new file mode 100644 index 000000000..1a6617f2f --- /dev/null +++ b/content/en/api/beta/dreams/cancel.md @@ -0,0 +1,246 @@ +## Cancel a Dream + +**post** `/v1/dreams/{dream_id}/cancel` + +Cancel a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` diff --git a/content/en/api/beta/dreams/create.md b/content/en/api/beta/dreams/create.md new file mode 100644 index 000000000..8947576dd --- /dev/null +++ b/content/en/api/beta/dreams/create.md @@ -0,0 +1,299 @@ +## Create a Dream + +**post** `/v1/dreams` + +Create a Dream + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Body Parameters + +- `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + +- `model: string or BetaDreamModelConfigParam` + + Model identifier and configuration applied to every pipeline stage. + + - `string` + + - `BetaDreamModelConfigParam object { id, speed }` + + Model identifier and configuration applied to every pipeline stage. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + +- `instructions: optional string` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams \ + -H 'Content-Type: application/json' \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -d '{ + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "model": "string" + }' +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` diff --git a/content/en/api/beta/dreams/list.md b/content/en/api/beta/dreams/list.md new file mode 100644 index 000000000..c5f7d67fe --- /dev/null +++ b/content/en/api/beta/dreams/list.md @@ -0,0 +1,282 @@ +## List Dreams + +**get** `/v1/dreams` + +List Dreams + +### Query Parameters + +- `"created_at[gt]": optional string` + + Return dreams with `created_at` strictly after this timestamp (exclusive lower bound, RFC 3339). Unset applies no lower bound. + +- `"created_at[lt]": optional string` + + Return dreams with `created_at` strictly before this timestamp (exclusive upper bound, RFC 3339). Unset applies no upper bound. + +- `include_archived: optional boolean` + + Query parameter for include_archived + +- `limit: optional number` + + Query parameter for limit + +- `page: optional string` + + Query parameter for page + +- `statuses: optional array of BetaDreamStatus` + + Filter by lifecycle status. Repeat the parameter to match any of multiple statuses. Empty applies no status filter. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `data: array of BetaDream` + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +- `next_page: string` + +### Example + +```http +curl https://api.anthropic.com/v1/dreams \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } + } + ], + "next_page": "next_page" +} +``` diff --git a/content/en/api/beta/dreams/retrieve.md b/content/en/api/beta/dreams/retrieve.md new file mode 100644 index 000000000..e827457af --- /dev/null +++ b/content/en/api/beta/dreams/retrieve.md @@ -0,0 +1,245 @@ +## Get a Dream + +**get** `/v1/dreams/{dream_id}` + +Get a Dream + +### Path Parameters + +- `dream_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"fallback-credit-2026-06-01"` + + - `"agent-memory-2026-07-22"` + +### Returns + +- `BetaDream object { id, archived_at, created_at, 10 more }` + + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + + - `id: string` + + - `archived_at: string` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `ended_at: string` + + A timestamp in RFC 3339 format + + - `error: BetaDreamError` + + Failure detail for a Dream whose `status` is `failed`. + + - `message: string` + + - `type: string` + + - `inputs: array of BetaDreamInput` + + - `BetaDreamMemoryStoreInput object { memory_store_id, type }` + + An input memory store the dream reads from. The dream never mutates this store. + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `BetaDreamSessionsInput object { session_ids, type }` + + Input session transcripts the dream reads. + + - `session_ids: array of string` + + - `type: "sessions"` + + - `"sessions"` + + - `instructions: string` + + - `model: BetaDreamModelConfig` + + Model identifier and configuration applied to every pipeline stage. Same wire shape as the Agents API ModelConfig. + + - `id: string` + + Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + + - `speed: optional "standard" or "fast"` + + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + + - `"standard"` + + - `"fast"` + + - `outputs: array of BetaDreamOutput` + + - `memory_store_id: string` + + - `type: "memory_store"` + + - `"memory_store"` + + - `session_id: string` + + - `status: BetaDreamStatus` + + Lifecycle status of a Dream. + + - `"pending"` + + - `"running"` + + - `"completed"` + + - `"failed"` + + - `"canceled"` + + - `type: "dream"` + + - `"dream"` + + - `usage: BetaDreamUsage` + + Cumulative token usage for the dream across every pipeline stage. + + - `cache_creation_input_tokens: number` + + Total tokens used to create prompt-cache entries (sum of all TTL tiers). + + - `cache_read_input_tokens: number` + + Total tokens read from prompt cache. + + - `input_tokens: number` + + Total uncached input tokens consumed across every pipeline stage. + + - `output_tokens: number` + + Total output tokens generated across every pipeline stage. + +### Example + +```http +curl https://api.anthropic.com/v1/dreams/$DREAM_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: dreaming-2026-04-21' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "archived_at": "2019-12-27T18:11:19.117Z", + "created_at": "2019-12-27T18:11:19.117Z", + "ended_at": "2019-12-27T18:11:19.117Z", + "error": { + "message": "message", + "type": "type" + }, + "inputs": [ + { + "memory_store_id": "x", + "type": "memory_store" + } + ], + "instructions": "instructions", + "model": { + "id": "x", + "speed": "standard" + }, + "outputs": [ + { + "memory_store_id": "memory_store_id", + "type": "memory_store" + } + ], + "session_id": "session_id", + "status": "pending", + "type": "dream", + "usage": { + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "input_tokens": 0, + "output_tokens": 0 + } +} +``` diff --git a/content/en/api/beta/environments.md b/content/en/api/beta/environments.md index fc189fcc5..04d7fba39 100644 --- a/content/en/api/beta/environments.md +++ b/content/en/api/beta/environments.md @@ -14,7 +14,7 @@ Create a new environment with the specified configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create a new environment with the specified configuration. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -447,7 +449,7 @@ List environments with pagination support. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -499,6 +501,8 @@ List environments with pagination support. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -734,7 +738,7 @@ Retrieve a specific environment by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -786,6 +790,8 @@ Retrieve a specific environment by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1012,7 +1018,7 @@ Update an existing environment's configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1064,6 +1070,8 @@ Update an existing environment's configuration. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1418,7 +1426,7 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1470,6 +1478,8 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1531,7 +1541,7 @@ Archive an environment by ID. Archived environments cannot be used to create new - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1583,6 +1593,8 @@ Archive an environment by ID. Archived environments cannot be used to create new - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2309,7 +2321,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2361,6 +2373,8 @@ Retrieve detailed information about a specific work item. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2371,7 +2385,7 @@ Retrieve detailed information about a specific work item. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -2417,6 +2431,10 @@ Retrieve detailed information about a specific work item. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -2474,6 +2492,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -2512,7 +2531,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2564,6 +2583,8 @@ Long poll for work items in the queue. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2578,7 +2599,7 @@ Long poll for work items in the queue. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -2624,6 +2645,10 @@ Long poll for work items in the queue. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -2681,6 +2706,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/poll \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -2711,7 +2737,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2763,6 +2789,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2773,7 +2801,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -2819,6 +2847,10 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -2877,6 +2909,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/ack "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -2917,7 +2950,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2969,6 +3002,8 @@ Record a heartbeat for a work item to maintain the lease. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3059,7 +3094,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3111,6 +3146,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3127,7 +3164,7 @@ Stop a work item, initiating graceful or forced shutdown. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -3173,6 +3210,10 @@ Stop a work item, initiating graceful or forced shutdown. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -3232,6 +3273,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/sto "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -3270,7 +3312,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3322,6 +3364,8 @@ List work items in an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3378,6 +3422,10 @@ List work items in an environment. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -3441,6 +3489,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -3474,7 +3523,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3526,6 +3575,8 @@ Update work item metadata with merge semantics. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3542,7 +3593,7 @@ Update work item metadata with merge semantics. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -3588,6 +3639,10 @@ Update work item metadata with merge semantics. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -3651,6 +3706,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -3677,7 +3733,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3729,6 +3785,8 @@ Get statistics about the work queue for an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3792,7 +3850,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ ### Beta Self Hosted Work -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -3838,6 +3896,10 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -3956,6 +4018,10 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started diff --git a/content/en/api/beta/environments/archive.md b/content/en/api/beta/environments/archive.md index 41d605d87..d6c4230f4 100644 --- a/content/en/api/beta/environments/archive.md +++ b/content/en/api/beta/environments/archive.md @@ -16,7 +16,7 @@ Archive an environment by ID. Archived environments cannot be used to create new - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Archive an environment by ID. Archived environments cannot be used to create new - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/create.md b/content/en/api/beta/environments/create.md index 8e552a968..25e36efa6 100644 --- a/content/en/api/beta/environments/create.md +++ b/content/en/api/beta/environments/create.md @@ -12,7 +12,7 @@ Create a new environment with the specified configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create a new environment with the specified configuration. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/delete.md b/content/en/api/beta/environments/delete.md index 5eec98aa6..f3363d797 100644 --- a/content/en/api/beta/environments/delete.md +++ b/content/en/api/beta/environments/delete.md @@ -16,7 +16,7 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/list.md b/content/en/api/beta/environments/list.md index 8f3314118..0f93f9b50 100644 --- a/content/en/api/beta/environments/list.md +++ b/content/en/api/beta/environments/list.md @@ -26,7 +26,7 @@ List environments with pagination support. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ List environments with pagination support. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/retrieve.md b/content/en/api/beta/environments/retrieve.md index b131e8b34..671780720 100644 --- a/content/en/api/beta/environments/retrieve.md +++ b/content/en/api/beta/environments/retrieve.md @@ -16,7 +16,7 @@ Retrieve a specific environment by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Retrieve a specific environment by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/update.md b/content/en/api/beta/environments/update.md index e0510e7db..3108066ac 100644 --- a/content/en/api/beta/environments/update.md +++ b/content/en/api/beta/environments/update.md @@ -16,7 +16,7 @@ Update an existing environment's configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update an existing environment's configuration. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/work.md b/content/en/api/beta/environments/work.md index 6d8cc17fc..a4db5620c 100644 --- a/content/en/api/beta/environments/work.md +++ b/content/en/api/beta/environments/work.md @@ -22,7 +22,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -74,6 +74,8 @@ Retrieve detailed information about a specific work item. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -84,7 +86,7 @@ Retrieve detailed information about a specific work item. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -130,6 +132,10 @@ Retrieve detailed information about a specific work item. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -187,6 +193,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -225,7 +232,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -277,6 +284,8 @@ Long poll for work items in the queue. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -291,7 +300,7 @@ Long poll for work items in the queue. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -337,6 +346,10 @@ Long poll for work items in the queue. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -394,6 +407,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/poll \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -424,7 +438,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -476,6 +490,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -486,7 +502,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -532,6 +548,10 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -590,6 +610,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/ack "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -630,7 +651,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -682,6 +703,8 @@ Record a heartbeat for a work item to maintain the lease. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -772,7 +795,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -824,6 +847,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -840,7 +865,7 @@ Stop a work item, initiating graceful or forced shutdown. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -886,6 +911,10 @@ Stop a work item, initiating graceful or forced shutdown. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -945,6 +974,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/sto "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -983,7 +1013,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1035,6 +1065,8 @@ List work items in an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1091,6 +1123,10 @@ List work items in an environment. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -1154,6 +1190,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -1187,7 +1224,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1239,6 +1276,8 @@ Update work item metadata with merge semantics. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1255,7 +1294,7 @@ Update work item metadata with merge semantics. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -1301,6 +1340,10 @@ Update work item metadata with merge semantics. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -1364,6 +1407,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", @@ -1390,7 +1434,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1442,6 +1486,8 @@ Get statistics about the work queue for an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1505,7 +1551,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ ### Beta Self Hosted Work -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -1551,6 +1597,10 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -1669,6 +1719,10 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/stats \ User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started diff --git a/content/en/api/beta/environments/work/ack.md b/content/en/api/beta/environments/work/ack.md index f495cfd5e..72c06b13b 100644 --- a/content/en/api/beta/environments/work/ack.md +++ b/content/en/api/beta/environments/work/ack.md @@ -20,7 +20,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -82,7 +84,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -128,6 +130,10 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -186,6 +192,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/ack "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", diff --git a/content/en/api/beta/environments/work/heartbeat.md b/content/en/api/beta/environments/work/heartbeat.md index 5747720d7..2489c346f 100644 --- a/content/en/api/beta/environments/work/heartbeat.md +++ b/content/en/api/beta/environments/work/heartbeat.md @@ -30,7 +30,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ Record a heartbeat for a work item to maintain the lease. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/work/list.md b/content/en/api/beta/environments/work/list.md index 45eecd6b7..96d0cda32 100644 --- a/content/en/api/beta/environments/work/list.md +++ b/content/en/api/beta/environments/work/list.md @@ -28,7 +28,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ List work items in an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -136,6 +138,10 @@ List work items in an environment. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -199,6 +205,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", diff --git a/content/en/api/beta/environments/work/poll.md b/content/en/api/beta/environments/work/poll.md index 51fd89dfe..000086bd2 100644 --- a/content/en/api/beta/environments/work/poll.md +++ b/content/en/api/beta/environments/work/poll.md @@ -28,7 +28,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ Long poll for work items in the queue. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -94,7 +96,7 @@ Long poll for work items in the queue. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -140,6 +142,10 @@ Long poll for work items in the queue. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -197,6 +203,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/poll \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", diff --git a/content/en/api/beta/environments/work/retrieve.md b/content/en/api/beta/environments/work/retrieve.md index c3c000d14..197a070c6 100644 --- a/content/en/api/beta/environments/work/retrieve.md +++ b/content/en/api/beta/environments/work/retrieve.md @@ -20,7 +20,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Retrieve detailed information about a specific work item. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -82,7 +84,7 @@ Retrieve detailed information about a specific work item. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -128,6 +130,10 @@ Retrieve detailed information about a specific work item. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -185,6 +191,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", diff --git a/content/en/api/beta/environments/work/stats.md b/content/en/api/beta/environments/work/stats.md index a61737952..ca6d2320e 100644 --- a/content/en/api/beta/environments/work/stats.md +++ b/content/en/api/beta/environments/work/stats.md @@ -16,7 +16,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Get statistics about the work queue for an environment. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/environments/work/stop.md b/content/en/api/beta/environments/work/stop.md index 602ddddbc..2a6a1abb5 100644 --- a/content/en/api/beta/environments/work/stop.md +++ b/content/en/api/beta/environments/work/stop.md @@ -20,7 +20,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -88,7 +90,7 @@ Stop a work item, initiating graceful or forced shutdown. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -134,6 +136,10 @@ Stop a work item, initiating graceful or forced shutdown. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -193,6 +199,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/sto "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", diff --git a/content/en/api/beta/environments/work/update.md b/content/en/api/beta/environments/work/update.md index e3347646b..9c32f7dcd 100644 --- a/content/en/api/beta/environments/work/update.md +++ b/content/en/api/beta/environments/work/update.md @@ -20,7 +20,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Update work item metadata with merge semantics. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -88,7 +90,7 @@ Update work item metadata with merge semantics. ### Returns -- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 9 more }` +- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }` Work resource representing a unit of work in a self-hosted environment. @@ -134,6 +136,10 @@ Update work item metadata with merge semantics. User-provided metadata key-value pairs associated with this work item + - `secret: string` + + Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths. + - `started_at: string` RFC 3339 timestamp when work execution started @@ -197,6 +203,7 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID \ "metadata": { "foo": "string" }, + "secret": "secret", "started_at": "started_at", "state": "queued", "stop_requested_at": "stop_requested_at", diff --git a/content/en/api/beta/files.md b/content/en/api/beta/files.md index 3549eea89..294e4f012 100644 --- a/content/en/api/beta/files.md +++ b/content/en/api/beta/files.md @@ -14,7 +14,7 @@ Upload File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Upload File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -189,7 +191,7 @@ List Files - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -241,6 +243,8 @@ List Files - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -369,7 +373,7 @@ Download File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -421,6 +425,8 @@ Download File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -458,7 +464,7 @@ Get File Metadata - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -510,6 +516,8 @@ Get File Metadata - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -617,7 +625,7 @@ Delete File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -669,6 +677,8 @@ Delete File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/files/delete.md b/content/en/api/beta/files/delete.md index 05539b2da..976446e7b 100644 --- a/content/en/api/beta/files/delete.md +++ b/content/en/api/beta/files/delete.md @@ -18,7 +18,7 @@ Delete File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Delete File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/files/download.md b/content/en/api/beta/files/download.md index cc7b0b6ae..4ef8ab9ad 100644 --- a/content/en/api/beta/files/download.md +++ b/content/en/api/beta/files/download.md @@ -18,7 +18,7 @@ Download File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Download File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/files/list.md b/content/en/api/beta/files/list.md index 439028995..0f19f342d 100644 --- a/content/en/api/beta/files/list.md +++ b/content/en/api/beta/files/list.md @@ -32,7 +32,7 @@ List Files - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84,6 +84,8 @@ List Files - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/files/retrieve_metadata.md b/content/en/api/beta/files/retrieve_metadata.md index f4cc24c81..4cd4c98f6 100644 --- a/content/en/api/beta/files/retrieve_metadata.md +++ b/content/en/api/beta/files/retrieve_metadata.md @@ -18,7 +18,7 @@ Get File Metadata - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Get File Metadata - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/files/upload.md b/content/en/api/beta/files/upload.md index 4298f0707..e488e6825 100644 --- a/content/en/api/beta/files/upload.md +++ b/content/en/api/beta/files/upload.md @@ -12,7 +12,7 @@ Upload File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Upload File - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores.md b/content/en/api/beta/memory_stores.md index e806f7553..60e87e7fb 100644 --- a/content/en/api/beta/memory_stores.md +++ b/content/en/api/beta/memory_stores.md @@ -14,7 +14,7 @@ Create a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -192,7 +194,7 @@ List memory stores - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -244,6 +246,8 @@ List memory stores - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -343,7 +347,7 @@ Retrieve a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -395,6 +399,8 @@ Retrieve a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -485,7 +491,7 @@ Update a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -537,6 +543,8 @@ Update a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -643,7 +651,7 @@ Delete a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -695,6 +703,8 @@ Delete a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -754,7 +764,7 @@ Archive a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -806,6 +816,8 @@ Archive a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -963,7 +975,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1015,6 +1027,8 @@ Create a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1154,7 +1168,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1206,6 +1220,8 @@ List memories - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1341,7 +1357,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1393,6 +1409,8 @@ Retrieve a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1503,7 +1521,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1555,6 +1573,8 @@ Update a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1685,7 +1705,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1737,6 +1757,8 @@ Delete a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2160,7 +2182,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2212,6 +2234,8 @@ List memory versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2394,7 +2418,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2446,6 +2470,8 @@ Retrieve a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2609,7 +2635,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2661,6 +2687,8 @@ Redact a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/archive.md b/content/en/api/beta/memory_stores/archive.md index 35ebf6814..0e2dc6583 100644 --- a/content/en/api/beta/memory_stores/archive.md +++ b/content/en/api/beta/memory_stores/archive.md @@ -16,7 +16,7 @@ Archive a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Archive a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/create.md b/content/en/api/beta/memory_stores/create.md index a7cc7953d..842716e92 100644 --- a/content/en/api/beta/memory_stores/create.md +++ b/content/en/api/beta/memory_stores/create.md @@ -12,7 +12,7 @@ Create a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/delete.md b/content/en/api/beta/memory_stores/delete.md index f1a50bd4b..f4ee6424c 100644 --- a/content/en/api/beta/memory_stores/delete.md +++ b/content/en/api/beta/memory_stores/delete.md @@ -16,7 +16,7 @@ Delete a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Delete a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/list.md b/content/en/api/beta/memory_stores/list.md index 43c17151d..0e474ec10 100644 --- a/content/en/api/beta/memory_stores/list.md +++ b/content/en/api/beta/memory_stores/list.md @@ -34,7 +34,7 @@ List memory stores - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -86,6 +86,8 @@ List memory stores - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memories.md b/content/en/api/beta/memory_stores/memories.md index d88786677..3254168bd 100644 --- a/content/en/api/beta/memory_stores/memories.md +++ b/content/en/api/beta/memory_stores/memories.md @@ -28,7 +28,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ Create a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -219,7 +221,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -271,6 +273,8 @@ List memories - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -406,7 +410,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -458,6 +462,8 @@ Retrieve a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -568,7 +574,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -620,6 +626,8 @@ Update a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -750,7 +758,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -802,6 +810,8 @@ Delete a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memories/create.md b/content/en/api/beta/memory_stores/memories/create.md index ed4f0ec47..3fd87741a 100644 --- a/content/en/api/beta/memory_stores/memories/create.md +++ b/content/en/api/beta/memory_stores/memories/create.md @@ -26,7 +26,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ Create a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memories/delete.md b/content/en/api/beta/memory_stores/memories/delete.md index 471b93457..c4c3114be 100644 --- a/content/en/api/beta/memory_stores/memories/delete.md +++ b/content/en/api/beta/memory_stores/memories/delete.md @@ -24,7 +24,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -76,6 +76,8 @@ Delete a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memories/list.md b/content/en/api/beta/memory_stores/memories/list.md index 14ad29cf3..8951c0527 100644 --- a/content/en/api/beta/memory_stores/memories/list.md +++ b/content/en/api/beta/memory_stores/memories/list.md @@ -42,7 +42,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -94,6 +94,8 @@ List memories - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memories/retrieve.md b/content/en/api/beta/memory_stores/memories/retrieve.md index d3511b6e2..d55c9aef0 100644 --- a/content/en/api/beta/memory_stores/memories/retrieve.md +++ b/content/en/api/beta/memory_stores/memories/retrieve.md @@ -28,7 +28,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ Retrieve a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memories/update.md b/content/en/api/beta/memory_stores/memories/update.md index 4b45e05f7..e38e8e1dd 100644 --- a/content/en/api/beta/memory_stores/memories/update.md +++ b/content/en/api/beta/memory_stores/memories/update.md @@ -28,7 +28,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ Update a memory - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memory_versions.md b/content/en/api/beta/memory_stores/memory_versions.md index 1d36e3bfd..e6a3a90fc 100644 --- a/content/en/api/beta/memory_stores/memory_versions.md +++ b/content/en/api/beta/memory_stores/memory_versions.md @@ -66,7 +66,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -118,6 +118,8 @@ List memory versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -300,7 +302,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -352,6 +354,8 @@ Retrieve a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -515,7 +519,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -567,6 +571,8 @@ Redact a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memory_versions/list.md b/content/en/api/beta/memory_stores/memory_versions/list.md index 0a890f774..46e5b0997 100644 --- a/content/en/api/beta/memory_stores/memory_versions/list.md +++ b/content/en/api/beta/memory_stores/memory_versions/list.md @@ -64,7 +64,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -116,6 +116,8 @@ List memory versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memory_versions/redact.md b/content/en/api/beta/memory_stores/memory_versions/redact.md index d16a25f66..ea58772e8 100644 --- a/content/en/api/beta/memory_stores/memory_versions/redact.md +++ b/content/en/api/beta/memory_stores/memory_versions/redact.md @@ -18,7 +18,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Redact a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/memory_versions/retrieve.md b/content/en/api/beta/memory_stores/memory_versions/retrieve.md index b455ee038..231a24166 100644 --- a/content/en/api/beta/memory_stores/memory_versions/retrieve.md +++ b/content/en/api/beta/memory_stores/memory_versions/retrieve.md @@ -28,7 +28,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ Retrieve a memory version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/retrieve.md b/content/en/api/beta/memory_stores/retrieve.md index 6a643b8ca..5dae9a25a 100644 --- a/content/en/api/beta/memory_stores/retrieve.md +++ b/content/en/api/beta/memory_stores/retrieve.md @@ -16,7 +16,7 @@ Retrieve a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Retrieve a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/memory_stores/update.md b/content/en/api/beta/memory_stores/update.md index 068c256b1..86bf75bd8 100644 --- a/content/en/api/beta/memory_stores/update.md +++ b/content/en/api/beta/memory_stores/update.md @@ -16,7 +16,7 @@ Update a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update a memory store - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/messages.md b/content/en/api/beta/messages.md index 8e802dcdf..73da0f3b5 100644 --- a/content/en/api/beta/messages.md +++ b/content/en/api/beta/messages.md @@ -18,7 +18,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1522,6 +1524,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -1626,7 +1630,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -3980,18 +3984,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -4121,18 +4137,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -4478,7 +4506,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -4538,7 +4566,7 @@ curl https://api.anthropic.com/v1/messages \ { "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { - "id": "id", + "id": "container_011CpZohnwH4vuy7gazohgSP", "expires_at": "2019-12-27T18:11:19.117Z", "skills": [ { @@ -4552,11 +4580,11 @@ curl https://api.anthropic.com/v1/messages \ { "citations": [ { - "cited_text": "cited_text", + "cited_text": "The grass is green. The sky is blue.", "document_index": 0, - "document_title": "document_title", + "document_title": "My Document", "end_char_index": 0, - "file_id": "file_id", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", "start_char_index": 0, "type": "char_location" } @@ -4584,10 +4612,10 @@ curl https://api.anthropic.com/v1/messages \ "role": "assistant", "stop_details": { "category": "cyber", - "explanation": "explanation", - "fallback_credit_token": "fallback_credit_token", + "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", + "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "recommended_model", + "recommended_model": "claude-sonnet-4-6", "type": "refusal" }, "stop_reason": "end_turn", @@ -4600,7 +4628,7 @@ curl https://api.anthropic.com/v1/messages \ }, "cache_creation_input_tokens": 2051, "cache_read_input_tokens": 2051, - "inference_geo": "inference_geo", + "inference_geo": "global", "input_tokens": 2095, "iterations": [ { @@ -4648,7 +4676,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4700,6 +4728,8 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -6092,7 +6122,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -10712,18 +10742,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -12677,18 +12719,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -13106,10 +13160,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ One entry in the `fallbacks` chain on a `/v1/messages` request. - `model` is required. The four override fields (`max_tokens`, `thinking`, - `output_config`, and `speed`) replace the corresponding top-level field - for this attempt only and are validated as if the request were made to - `model`. Any other key is rejected at parse time. + `model` is required. The override fields (`max_tokens`, `thinking`, + `output_config`, and `speed`) set the corresponding parameter for this + attempt only and are validated as if the request were made to `model`. + Any other key is rejected at parse time. - `model: Model` @@ -13239,6 +13293,8 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -13293,18 +13349,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ The `from` model declined for policy reasons. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -15156,18 +15224,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -15297,18 +15377,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -15654,7 +15746,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -18667,18 +18759,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -18785,18 +18889,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -20106,18 +20222,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -20247,18 +20375,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -20604,7 +20744,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -21557,18 +21697,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -21698,18 +21850,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -22055,7 +22219,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -22322,18 +22486,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -27487,7 +27663,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -29373,7 +29549,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -29425,6 +29601,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -30893,6 +31071,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -30997,7 +31177,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -32582,7 +32762,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -32634,6 +32814,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -32796,7 +32978,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -32848,6 +33030,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -33021,7 +33205,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -33073,6 +33257,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -33228,7 +33414,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -33280,6 +33466,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -33347,7 +33535,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -33399,6 +33587,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -34356,18 +34546,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -34497,18 +34699,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -34854,7 +35068,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -36136,18 +36350,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -36277,18 +36503,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -36634,7 +36872,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -37715,18 +37953,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -37856,18 +38106,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -38213,7 +38475,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -39256,18 +39518,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -39397,18 +39671,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -39754,7 +40040,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` diff --git a/content/en/api/beta/messages/batches.md b/content/en/api/beta/messages/batches.md index ddcc6150c..145deded6 100644 --- a/content/en/api/beta/messages/batches.md +++ b/content/en/api/beta/messages/batches.md @@ -18,7 +18,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1538,6 +1540,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -1642,7 +1646,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -3227,7 +3231,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3279,6 +3283,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3441,7 +3447,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3493,6 +3499,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3666,7 +3674,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3718,6 +3726,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3873,7 +3883,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3925,6 +3935,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3992,7 +4004,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4044,6 +4056,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -5001,18 +5015,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -5142,18 +5168,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -5499,7 +5537,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -6781,18 +6819,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -6922,18 +6972,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -7279,7 +7341,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -8360,18 +8422,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -8501,18 +8575,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -8858,7 +8944,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -9901,18 +9987,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -10042,18 +10140,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -10399,7 +10509,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` diff --git a/content/en/api/beta/messages/batches/cancel.md b/content/en/api/beta/messages/batches/cancel.md index e42d4b8b3..76de33333 100644 --- a/content/en/api/beta/messages/batches/cancel.md +++ b/content/en/api/beta/messages/batches/cancel.md @@ -22,7 +22,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -74,6 +74,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/messages/batches/create.md b/content/en/api/beta/messages/batches/create.md index 94feb0717..cc112d693 100644 --- a/content/en/api/beta/messages/batches/create.md +++ b/content/en/api/beta/messages/batches/create.md @@ -16,7 +16,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1536,6 +1538,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -1640,7 +1644,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` diff --git a/content/en/api/beta/messages/batches/delete.md b/content/en/api/beta/messages/batches/delete.md index 1faea5296..dec4af5c6 100644 --- a/content/en/api/beta/messages/batches/delete.md +++ b/content/en/api/beta/messages/batches/delete.md @@ -22,7 +22,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -74,6 +74,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/messages/batches/list.md b/content/en/api/beta/messages/batches/list.md index 269ad0991..7628d7a1d 100644 --- a/content/en/api/beta/messages/batches/list.md +++ b/content/en/api/beta/messages/batches/list.md @@ -30,7 +30,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/messages/batches/results.md b/content/en/api/beta/messages/batches/results.md index bcf2f3d5d..08f84229d 100644 --- a/content/en/api/beta/messages/batches/results.md +++ b/content/en/api/beta/messages/batches/results.md @@ -22,7 +22,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -74,6 +74,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1031,18 +1033,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -1172,18 +1186,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -1529,7 +1555,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` diff --git a/content/en/api/beta/messages/batches/retrieve.md b/content/en/api/beta/messages/batches/retrieve.md index 9e180e9ee..f5097d6e5 100644 --- a/content/en/api/beta/messages/batches/retrieve.md +++ b/content/en/api/beta/messages/batches/retrieve.md @@ -20,7 +20,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/messages/count_tokens.md b/content/en/api/beta/messages/count_tokens.md index a9739ff7a..33a16d28c 100644 --- a/content/en/api/beta/messages/count_tokens.md +++ b/content/en/api/beta/messages/count_tokens.md @@ -16,7 +16,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1460,7 +1462,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` diff --git a/content/en/api/beta/messages/create.md b/content/en/api/beta/messages/create.md index 3a595b750..b55640a34 100644 --- a/content/en/api/beta/messages/create.md +++ b/content/en/api/beta/messages/create.md @@ -16,7 +16,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1520,6 +1522,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: optional "standard" or "fast"` + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. + - `"standard"` - `"fast"` @@ -1624,7 +1628,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: optional "standard" or "fast"` - The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -3978,18 +3982,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co What caused the `from` model to hand over at this hop. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "refusal"` - `"refusal"` @@ -4119,18 +4135,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -4476,7 +4504,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `speed: "standard" or "fast"` - The inference speed mode used for this request. + Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. - `"standard"` @@ -4536,7 +4564,7 @@ curl https://api.anthropic.com/v1/messages \ { "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { - "id": "id", + "id": "container_011CpZohnwH4vuy7gazohgSP", "expires_at": "2019-12-27T18:11:19.117Z", "skills": [ { @@ -4550,11 +4578,11 @@ curl https://api.anthropic.com/v1/messages \ { "citations": [ { - "cited_text": "cited_text", + "cited_text": "The grass is green. The sky is blue.", "document_index": 0, - "document_title": "document_title", + "document_title": "My Document", "end_char_index": 0, - "file_id": "file_id", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", "start_char_index": 0, "type": "char_location" } @@ -4582,10 +4610,10 @@ curl https://api.anthropic.com/v1/messages \ "role": "assistant", "stop_details": { "category": "cyber", - "explanation": "explanation", - "fallback_credit_token": "fallback_credit_token", + "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", + "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "recommended_model", + "recommended_model": "claude-sonnet-4-6", "type": "refusal" }, "stop_reason": "end_turn", @@ -4598,7 +4626,7 @@ curl https://api.anthropic.com/v1/messages \ }, "cache_creation_input_tokens": 2051, "cache_read_input_tokens": 2051, - "inference_geo": "inference_geo", + "inference_geo": "global", "input_tokens": 2095, "iterations": [ { diff --git a/content/en/api/beta/models.md b/content/en/api/beta/models.md index ebb908f24..451d0ab50 100644 --- a/content/en/api/beta/models.md +++ b/content/en/api/beta/models.md @@ -32,7 +32,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84,6 +84,8 @@ The Models API response can be used to determine which models are available for - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -354,7 +356,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -406,6 +408,8 @@ The Models API response can be used to determine information about a specific mo - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/models/list.md b/content/en/api/beta/models/list.md index 7dc65e556..184b830ff 100644 --- a/content/en/api/beta/models/list.md +++ b/content/en/api/beta/models/list.md @@ -30,7 +30,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ The Models API response can be used to determine which models are available for - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/models/retrieve.md b/content/en/api/beta/models/retrieve.md index dfe13de43..b76161a84 100644 --- a/content/en/api/beta/models/retrieve.md +++ b/content/en/api/beta/models/retrieve.md @@ -20,7 +20,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ The Models API response can be used to determine information about a specific mo - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions.md b/content/en/api/beta/sessions.md index 27802f608..eddf754a9 100644 --- a/content/en/api/beta/sessions.md +++ b/content/en/api/beta/sessions.md @@ -14,7 +14,7 @@ Create Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -192,7 +194,7 @@ Create Session - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -202,6 +204,64 @@ Create Session See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -422,6 +482,208 @@ Create Session ID of the `environment` defining the container configuration for this session. +- `initial_events: optional array of BetaManagedAgentsUserMessageEventParams or BetaManagedAgentsUserDefineOutcomeEventParams` + + Initial events to send to the `session` at creation, processed in order. Supports `user.message` and `user.define_outcome` events. Maximum 50 events. + + - `BetaManagedAgentsUserMessageEventParams object { content, type }` + + Parameters for sending a user message to the session. + + - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock` + + Array of content blocks for the user message. + + - `BetaManagedAgentsTextBlock object { text, type }` + + Regular text content. + + - `text: string` + + The text content. + + - `type: "text"` + + - `"text"` + + - `BetaManagedAgentsImageBlock object { source, type }` + + Image content specified directly as base64 data or as a reference via a URL. + + - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource` + + Union type for image source variants. + + - `BetaManagedAgentsBase64ImageSource object { data, media_type, type }` + + Base64-encoded image data. + + - `data: string` + + Base64-encoded image data. + + - `media_type: string` + + MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp"). + + - `type: "base64"` + + - `"base64"` + + - `BetaManagedAgentsURLImageSource object { type, url }` + + Image referenced by URL. + + - `type: "url"` + + - `"url"` + + - `url: string` + + URL of the image to fetch. + + - `BetaManagedAgentsFileImageSource object { file_id, type }` + + Image referenced by file ID. + + - `file_id: string` + + ID of a previously uploaded file. + + - `type: "file"` + + - `"file"` + + - `type: "image"` + + - `"image"` + + - `BetaManagedAgentsDocumentBlock object { source, type, context, title }` + + Document content, either specified directly as base64 data, as text, or as a reference via a URL. + + - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource` + + Union type for document source variants. + + - `BetaManagedAgentsBase64DocumentSource object { data, media_type, type }` + + Base64-encoded document data. + + - `data: string` + + Base64-encoded document data. + + - `media_type: string` + + MIME type of the document (e.g., "application/pdf"). + + - `type: "base64"` + + - `"base64"` + + - `BetaManagedAgentsPlainTextDocumentSource object { data, media_type, type }` + + Plain text document content. + + - `data: string` + + The plain text content. + + - `media_type: "text/plain"` + + MIME type of the text content. Must be "text/plain". + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `BetaManagedAgentsURLDocumentSource object { type, url }` + + Document referenced by URL. + + - `type: "url"` + + - `"url"` + + - `url: string` + + URL of the document to fetch. + + - `BetaManagedAgentsFileDocumentSource object { file_id, type }` + + Document referenced by file ID. + + - `file_id: string` + + ID of a previously uploaded file. + + - `type: "file"` + + - `"file"` + + - `type: "document"` + + - `"document"` + + - `context: optional string` + + Additional context about the document for the model. + + - `title: optional string` + + The title of the document. + + - `type: "user.message"` + + - `"user.message"` + + - `BetaManagedAgentsUserDefineOutcomeEventParams object { description, rubric, type, max_iterations }` + + Parameters for defining an outcome the agent should work toward. The agent begins work on receipt. + + - `description: string` + + What the agent should produce. This is the task specification. + + - `rubric: BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams` + + Rubric for grading the quality of an outcome. + + - `BetaManagedAgentsFileRubricParams object { file_id, type }` + + Rubric referenced by a file uploaded via the Files API. + + - `file_id: string` + + ID of the rubric file. + + - `type: "file"` + + - `"file"` + + - `BetaManagedAgentsTextRubricParams object { content, type }` + + Rubric content provided inline as text. + + - `content: string` + + Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters. + + - `type: "text"` + + - `"text"` + + - `type: "user.define_outcome"` + + - `"user.define_outcome"` + + - `max_iterations: optional number` + + Eval→revision cycles before giving up. Default 3, max 20. + - `metadata: optional map[string]` Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. @@ -614,6 +876,50 @@ Create Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1100,6 +1406,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -1116,6 +1425,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -1331,7 +1643,7 @@ List Sessions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1383,6 +1695,8 @@ List Sessions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1483,6 +1797,50 @@ List Sessions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1973,6 +2331,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -1989,6 +2350,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -2146,7 +2510,7 @@ Get Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2198,6 +2562,8 @@ Get Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2298,6 +2664,50 @@ Get Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -2778,6 +3188,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -2794,6 +3207,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -2947,7 +3363,7 @@ Update Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2999,6 +3415,8 @@ Update Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3297,6 +3715,50 @@ Update Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -3781,6 +4243,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -3797,6 +4262,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -3950,7 +4418,7 @@ Delete Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4002,6 +4470,8 @@ Delete Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -4059,7 +4529,7 @@ Archive Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -4111,6 +4581,8 @@ Archive Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -4211,6 +4683,50 @@ Archive Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -4692,6 +5208,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -4708,6 +5227,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -4983,7 +5505,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -4993,6 +5515,64 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -5641,6 +6221,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -6181,6 +6805,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -6697,6 +7365,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -6999,6 +7711,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -7649,7 +8405,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -7701,6 +8457,8 @@ List Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -8689,7 +9447,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -9025,7 +9783,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -9205,27 +9963,71 @@ List Events Fastest model with near-frontier intelligence - - `"claude-haiku-4-5-20251001"` + - `"claude-haiku-4-5-20251001"` + + Fastest model with near-frontier intelligence + + - `"claude-opus-4-5"` + + Premium model combining maximum intelligence with practical performance + + - `"claude-opus-4-5-20251101"` + + Premium model combining maximum intelligence with practical performance + + - `"claude-sonnet-4-5"` + + High-performance model for agents and coding + + - `"claude-sonnet-4-5-20250929"` + + High-performance model for agents and coding + + - `string` + + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. - Fastest model with near-frontier intelligence + - `type: "high"` - - `"claude-opus-4-5"` + - `"high"` - Premium model combining maximum intelligence with practical performance + - `BetaManagedAgentsEffortXhigh object { type }` - - `"claude-opus-4-5-20251101"` + Extra-high effort. Not all models accept this level. - Premium model combining maximum intelligence with practical performance + - `type: "xhigh"` - - `"claude-sonnet-4-5"` + - `"xhigh"` - High-performance model for agents and coding + - `BetaManagedAgentsEffortMax object { type }` - - `"claude-sonnet-4-5-20250929"` + Maximum effort. Favors reasoning depth over latency. - High-performance model for agents and coding + - `type: "max"` - - `string` + - `"max"` - `speed: optional "standard" or "fast"` @@ -9566,7 +10368,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -9618,6 +10420,8 @@ Send Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -10501,7 +11305,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -10553,6 +11357,8 @@ Stream Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -11541,7 +12347,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -11877,7 +12683,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -12079,6 +12885,50 @@ Stream Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -16116,7 +16966,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -16452,7 +17302,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -16654,6 +17504,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -16948,7 +17842,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -16994,7 +17888,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -17132,7 +18026,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -18420,7 +19314,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -18756,7 +19650,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -18958,6 +19852,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -20584,7 +21522,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -20636,6 +21574,8 @@ Add Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -20736,7 +21676,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -20788,6 +21728,8 @@ List Session Resources - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -20963,7 +21905,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -21015,6 +21957,8 @@ Get Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -21169,7 +22113,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -21221,6 +22165,8 @@ Update Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -21385,7 +22331,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -21437,6 +22383,8 @@ Delete Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -21936,7 +22884,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -21988,6 +22936,8 @@ List Session Threads - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -22090,6 +23040,50 @@ List Session Threads - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -22384,6 +23378,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -22465,7 +23462,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -22517,6 +23514,8 @@ Get Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -22619,6 +23618,50 @@ Get Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -22907,6 +23950,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -22985,7 +24031,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -23037,6 +24083,8 @@ Archive Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -23139,6 +24187,50 @@ Archive Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -23428,6 +24520,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -23582,6 +24677,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -24886,7 +26025,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -25222,7 +26361,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -25424,6 +26563,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -25792,7 +26975,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -25844,6 +27027,8 @@ List Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -26832,7 +28017,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -27168,7 +28353,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -27370,6 +28555,50 @@ List Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -27692,6 +28921,16 @@ Stream Session Thread Events - `thread_id: string` +### Query Parameters + +- `event_deltas: optional array of BetaManagedAgentsDeltaType` + + When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. + + - `"agent.message"` + + - `"agent.thinking"` + ### Header Parameters - `"anthropic-beta": optional array of AnthropicBeta` @@ -27700,7 +28939,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -27752,6 +28991,8 @@ Stream Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -28740,7 +29981,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -29076,7 +30317,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -29278,6 +30519,50 @@ Stream Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/archive.md b/content/en/api/beta/sessions/archive.md index da5b27c27..0ae6f0169 100644 --- a/content/en/api/beta/sessions/archive.md +++ b/content/en/api/beta/sessions/archive.md @@ -16,7 +16,7 @@ Archive Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Archive Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -168,6 +170,50 @@ Archive Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -649,6 +695,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -665,6 +714,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/create.md b/content/en/api/beta/sessions/create.md index ce1337aa2..c0f7ca70e 100644 --- a/content/en/api/beta/sessions/create.md +++ b/content/en/api/beta/sessions/create.md @@ -12,7 +12,7 @@ Create Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -190,7 +192,7 @@ Create Session - `string` - - `BetaManagedAgentsModelConfigParams object { id, speed }` + - `BetaManagedAgentsModelConfigParams object { id, effort, speed }` An object that defines additional configuration control over model use @@ -200,6 +202,64 @@ Create Session See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `effort: optional "low" or "medium" or "high" or 2 more or BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or 3 more` + + How hard Claude works on each inference call. Accepts a bare level string (`"high"`) or `{"type": "high"}`. On create, omitting it resolves the per-model default; on update, omitting it leaves the stored value unchanged. + + - `BetaManagedAgentsEffortLevel = "low" or "medium" or "high" or 2 more` + + How hard Claude works on each turn. Higher levels favor reasoning depth over latency. Not all models accept every level; invalid combinations are rejected at create time. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -420,6 +480,208 @@ Create Session ID of the `environment` defining the container configuration for this session. +- `initial_events: optional array of BetaManagedAgentsUserMessageEventParams or BetaManagedAgentsUserDefineOutcomeEventParams` + + Initial events to send to the `session` at creation, processed in order. Supports `user.message` and `user.define_outcome` events. Maximum 50 events. + + - `BetaManagedAgentsUserMessageEventParams object { content, type }` + + Parameters for sending a user message to the session. + + - `content: array of BetaManagedAgentsTextBlock or BetaManagedAgentsImageBlock or BetaManagedAgentsDocumentBlock` + + Array of content blocks for the user message. + + - `BetaManagedAgentsTextBlock object { text, type }` + + Regular text content. + + - `text: string` + + The text content. + + - `type: "text"` + + - `"text"` + + - `BetaManagedAgentsImageBlock object { source, type }` + + Image content specified directly as base64 data or as a reference via a URL. + + - `source: BetaManagedAgentsBase64ImageSource or BetaManagedAgentsURLImageSource or BetaManagedAgentsFileImageSource` + + Union type for image source variants. + + - `BetaManagedAgentsBase64ImageSource object { data, media_type, type }` + + Base64-encoded image data. + + - `data: string` + + Base64-encoded image data. + + - `media_type: string` + + MIME type of the image (e.g., "image/png", "image/jpeg", "image/gif", "image/webp"). + + - `type: "base64"` + + - `"base64"` + + - `BetaManagedAgentsURLImageSource object { type, url }` + + Image referenced by URL. + + - `type: "url"` + + - `"url"` + + - `url: string` + + URL of the image to fetch. + + - `BetaManagedAgentsFileImageSource object { file_id, type }` + + Image referenced by file ID. + + - `file_id: string` + + ID of a previously uploaded file. + + - `type: "file"` + + - `"file"` + + - `type: "image"` + + - `"image"` + + - `BetaManagedAgentsDocumentBlock object { source, type, context, title }` + + Document content, either specified directly as base64 data, as text, or as a reference via a URL. + + - `source: BetaManagedAgentsBase64DocumentSource or BetaManagedAgentsPlainTextDocumentSource or BetaManagedAgentsURLDocumentSource or BetaManagedAgentsFileDocumentSource` + + Union type for document source variants. + + - `BetaManagedAgentsBase64DocumentSource object { data, media_type, type }` + + Base64-encoded document data. + + - `data: string` + + Base64-encoded document data. + + - `media_type: string` + + MIME type of the document (e.g., "application/pdf"). + + - `type: "base64"` + + - `"base64"` + + - `BetaManagedAgentsPlainTextDocumentSource object { data, media_type, type }` + + Plain text document content. + + - `data: string` + + The plain text content. + + - `media_type: "text/plain"` + + MIME type of the text content. Must be "text/plain". + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `BetaManagedAgentsURLDocumentSource object { type, url }` + + Document referenced by URL. + + - `type: "url"` + + - `"url"` + + - `url: string` + + URL of the document to fetch. + + - `BetaManagedAgentsFileDocumentSource object { file_id, type }` + + Document referenced by file ID. + + - `file_id: string` + + ID of a previously uploaded file. + + - `type: "file"` + + - `"file"` + + - `type: "document"` + + - `"document"` + + - `context: optional string` + + Additional context about the document for the model. + + - `title: optional string` + + The title of the document. + + - `type: "user.message"` + + - `"user.message"` + + - `BetaManagedAgentsUserDefineOutcomeEventParams object { description, rubric, type, max_iterations }` + + Parameters for defining an outcome the agent should work toward. The agent begins work on receipt. + + - `description: string` + + What the agent should produce. This is the task specification. + + - `rubric: BetaManagedAgentsFileRubricParams or BetaManagedAgentsTextRubricParams` + + Rubric for grading the quality of an outcome. + + - `BetaManagedAgentsFileRubricParams object { file_id, type }` + + Rubric referenced by a file uploaded via the Files API. + + - `file_id: string` + + ID of the rubric file. + + - `type: "file"` + + - `"file"` + + - `BetaManagedAgentsTextRubricParams object { content, type }` + + Rubric content provided inline as text. + + - `content: string` + + Rubric content. Plain text or markdown — the grader treats it as freeform text. Maximum 262144 characters. + + - `type: "text"` + + - `"text"` + + - `type: "user.define_outcome"` + + - `"user.define_outcome"` + + - `max_iterations: optional number` + + Eval→revision cycles before giving up. Default 3, max 20. + - `metadata: optional map[string]` Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. @@ -612,6 +874,50 @@ Create Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1098,6 +1404,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -1114,6 +1423,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/delete.md b/content/en/api/beta/sessions/delete.md index 78dca0aa7..66f09e697 100644 --- a/content/en/api/beta/sessions/delete.md +++ b/content/en/api/beta/sessions/delete.md @@ -16,7 +16,7 @@ Delete Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Delete Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/events.md b/content/en/api/beta/sessions/events.md index 52026f7ce..0d3ad7b4f 100644 --- a/content/en/api/beta/sessions/events.md +++ b/content/en/api/beta/sessions/events.md @@ -56,7 +56,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -108,6 +108,8 @@ List Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1096,7 +1098,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -1432,7 +1434,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -1634,6 +1636,50 @@ List Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1973,7 +2019,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2025,6 +2071,8 @@ Send Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2908,7 +2956,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2960,6 +3008,8 @@ Stream Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -3948,7 +3998,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -4284,7 +4334,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -4486,6 +4536,50 @@ Stream Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -8523,7 +8617,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -8859,7 +8953,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -9061,6 +9155,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -9355,7 +9493,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -9401,7 +9539,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -9539,7 +9677,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -10827,7 +10965,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -11163,7 +11301,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -11365,6 +11503,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/events/stream \ - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/events/list.md b/content/en/api/beta/sessions/events/list.md index 158d2d5c2..6782c9c4f 100644 --- a/content/en/api/beta/sessions/events/list.md +++ b/content/en/api/beta/sessions/events/list.md @@ -54,7 +54,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -106,6 +106,8 @@ List Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1094,7 +1096,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -1430,7 +1432,7 @@ List Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -1632,6 +1634,50 @@ List Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/events/send.md b/content/en/api/beta/sessions/events/send.md index 5a1870823..2ae950df8 100644 --- a/content/en/api/beta/sessions/events/send.md +++ b/content/en/api/beta/sessions/events/send.md @@ -16,7 +16,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Send Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/events/stream.md b/content/en/api/beta/sessions/events/stream.md index 3072de12a..bd56f8f95 100644 --- a/content/en/api/beta/sessions/events/stream.md +++ b/content/en/api/beta/sessions/events/stream.md @@ -26,7 +26,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ Stream Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1066,7 +1068,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -1402,7 +1404,7 @@ Stream Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -1604,6 +1606,50 @@ Stream Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/list.md b/content/en/api/beta/sessions/list.md index 11040c5b6..d8617c327 100644 --- a/content/en/api/beta/sessions/list.md +++ b/content/en/api/beta/sessions/list.md @@ -78,7 +78,7 @@ List Sessions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -130,6 +130,8 @@ List Sessions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -230,6 +232,50 @@ List Sessions - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -720,6 +766,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -736,6 +785,9 @@ curl https://api.anthropic.com/v1/sessions \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/resources.md b/content/en/api/beta/sessions/resources.md index 3a4e114ea..43c7ca0f8 100644 --- a/content/en/api/beta/sessions/resources.md +++ b/content/en/api/beta/sessions/resources.md @@ -18,7 +18,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Add Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -170,7 +172,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -222,6 +224,8 @@ List Session Resources - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -397,7 +401,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -449,6 +453,8 @@ Get Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -603,7 +609,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -655,6 +661,8 @@ Update Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -819,7 +827,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -871,6 +879,8 @@ Delete Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/resources/add.md b/content/en/api/beta/sessions/resources/add.md index 3e1b7d499..38e1ed62c 100644 --- a/content/en/api/beta/sessions/resources/add.md +++ b/content/en/api/beta/sessions/resources/add.md @@ -16,7 +16,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Add Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/resources/delete.md b/content/en/api/beta/sessions/resources/delete.md index 67025cdf3..8b2d197c6 100644 --- a/content/en/api/beta/sessions/resources/delete.md +++ b/content/en/api/beta/sessions/resources/delete.md @@ -18,7 +18,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Delete Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/resources/list.md b/content/en/api/beta/sessions/resources/list.md index f418c8206..af637037d 100644 --- a/content/en/api/beta/sessions/resources/list.md +++ b/content/en/api/beta/sessions/resources/list.md @@ -26,7 +26,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ List Session Resources - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/resources/retrieve.md b/content/en/api/beta/sessions/resources/retrieve.md index 342250dd9..ac684b34e 100644 --- a/content/en/api/beta/sessions/resources/retrieve.md +++ b/content/en/api/beta/sessions/resources/retrieve.md @@ -18,7 +18,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Get Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/resources/update.md b/content/en/api/beta/sessions/resources/update.md index 3fd1adc1f..d339b6f77 100644 --- a/content/en/api/beta/sessions/resources/update.md +++ b/content/en/api/beta/sessions/resources/update.md @@ -18,7 +18,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Update Session Resource - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/sessions/retrieve.md b/content/en/api/beta/sessions/retrieve.md index 419cf57e5..12d615a2a 100644 --- a/content/en/api/beta/sessions/retrieve.md +++ b/content/en/api/beta/sessions/retrieve.md @@ -16,7 +16,7 @@ Get Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Get Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -168,6 +170,50 @@ Get Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -648,6 +694,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -664,6 +713,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/threads.md b/content/en/api/beta/sessions/threads.md index 1b745cc86..9d0390555 100644 --- a/content/en/api/beta/sessions/threads.md +++ b/content/en/api/beta/sessions/threads.md @@ -28,7 +28,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ List Session Threads - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -182,6 +184,50 @@ List Session Threads - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -476,6 +522,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -557,7 +606,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -609,6 +658,8 @@ Get Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -711,6 +762,50 @@ Get Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -999,6 +1094,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -1077,7 +1175,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1129,6 +1227,8 @@ Archive Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1231,6 +1331,50 @@ Archive Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1520,6 +1664,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", @@ -1674,6 +1821,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -2978,7 +3169,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -3314,7 +3505,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -3516,6 +3707,50 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -3884,7 +4119,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -3936,6 +4171,8 @@ List Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -4924,7 +5161,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -5260,7 +5497,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -5462,6 +5699,50 @@ List Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -5784,6 +6065,16 @@ Stream Session Thread Events - `thread_id: string` +### Query Parameters + +- `event_deltas: optional array of BetaManagedAgentsDeltaType` + + When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. + + - `"agent.message"` + + - `"agent.thinking"` + ### Header Parameters - `"anthropic-beta": optional array of AnthropicBeta` @@ -5792,7 +6083,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -5844,6 +6135,8 @@ Stream Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -6832,7 +7125,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -7168,7 +7461,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -7370,6 +7663,50 @@ Stream Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/threads/archive.md b/content/en/api/beta/sessions/threads/archive.md index 86c6dabb5..5a10ff1e6 100644 --- a/content/en/api/beta/sessions/threads/archive.md +++ b/content/en/api/beta/sessions/threads/archive.md @@ -18,7 +18,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Archive Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -172,6 +174,50 @@ Archive Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -461,6 +507,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/threads/events.md b/content/en/api/beta/sessions/threads/events.md index 2a872eb0f..e256848c3 100644 --- a/content/en/api/beta/sessions/threads/events.md +++ b/content/en/api/beta/sessions/threads/events.md @@ -30,7 +30,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ List Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1070,7 +1072,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -1406,7 +1408,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -1608,6 +1610,50 @@ List Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -1930,6 +1976,16 @@ Stream Session Thread Events - `thread_id: string` +### Query Parameters + +- `event_deltas: optional array of BetaManagedAgentsDeltaType` + + When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. + + - `"agent.message"` + + - `"agent.thinking"` + ### Header Parameters - `"anthropic-beta": optional array of AnthropicBeta` @@ -1938,7 +1994,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1990,6 +2046,8 @@ Stream Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2978,7 +3036,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -3314,7 +3372,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -3516,6 +3574,50 @@ Stream Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/threads/events/list.md b/content/en/api/beta/sessions/threads/events/list.md index 59448d177..dd7fad0ca 100644 --- a/content/en/api/beta/sessions/threads/events/list.md +++ b/content/en/api/beta/sessions/threads/events/list.md @@ -28,7 +28,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ List Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1068,7 +1070,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -1404,7 +1406,7 @@ List Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -1606,6 +1608,50 @@ List Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/threads/events/stream.md b/content/en/api/beta/sessions/threads/events/stream.md index bf05bd2a4..c257986c3 100644 --- a/content/en/api/beta/sessions/threads/events/stream.md +++ b/content/en/api/beta/sessions/threads/events/stream.md @@ -10,6 +10,16 @@ Stream Session Thread Events - `thread_id: string` +### Query Parameters + +- `event_deltas: optional array of BetaManagedAgentsDeltaType` + + When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent. + + - `"agent.message"` + + - `"agent.thinking"` + ### Header Parameters - `"anthropic-beta": optional array of AnthropicBeta` @@ -18,7 +28,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +80,8 @@ Stream Session Thread Events - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1058,7 +1070,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "retries_exhausted"` @@ -1394,7 +1406,7 @@ Stream Session Thread Events - `BetaManagedAgentsSessionRetriesExhausted object { type }` - The turn ended because the retry budget was exhausted (`max_iterations` hit or an error escalated to `retry_status: 'exhausted'`). + The turn ended because repeated errors exhausted the retry budget or an error escalated to `retry_status: 'exhausted'`. - `type: "session.thread_status_idle"` @@ -1596,6 +1608,50 @@ Stream Session Thread Events - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. diff --git a/content/en/api/beta/sessions/threads/list.md b/content/en/api/beta/sessions/threads/list.md index f052fa558..6a7c9a5d7 100644 --- a/content/en/api/beta/sessions/threads/list.md +++ b/content/en/api/beta/sessions/threads/list.md @@ -26,7 +26,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ List Session Threads - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -180,6 +182,50 @@ List Session Threads - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -474,6 +520,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/threads/retrieve.md b/content/en/api/beta/sessions/threads/retrieve.md index 45354df49..6bdd6569f 100644 --- a/content/en/api/beta/sessions/threads/retrieve.md +++ b/content/en/api/beta/sessions/threads/retrieve.md @@ -18,7 +18,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Get Session Thread - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -172,6 +174,50 @@ Get Session Thread - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -460,6 +506,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/sessions/update.md b/content/en/api/beta/sessions/update.md index 5de5e42b7..0ed1d3173 100644 --- a/content/en/api/beta/sessions/update.md +++ b/content/en/api/beta/sessions/update.md @@ -16,7 +16,7 @@ Update Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update Session - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -366,6 +368,50 @@ Update Session - `string` + - `effort: optional BetaManagedAgentsEffortLow or BetaManagedAgentsEffortMedium or BetaManagedAgentsEffortHigh or 2 more` + + How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. + + - `BetaManagedAgentsEffortLow object { type }` + + Low effort. Favors latency over reasoning depth. + + - `type: "low"` + + - `"low"` + + - `BetaManagedAgentsEffortMedium object { type }` + + Medium effort. Balances latency and reasoning depth. + + - `type: "medium"` + + - `"medium"` + + - `BetaManagedAgentsEffortHigh object { type }` + + High effort. Favors reasoning depth. + + - `type: "high"` + + - `"high"` + + - `BetaManagedAgentsEffortXhigh object { type }` + + Extra-high effort. Not all models accept this level. + + - `type: "xhigh"` + + - `"xhigh"` + + - `BetaManagedAgentsEffortMax object { type }` + + Maximum effort. Favors reasoning depth over latency. + + - `type: "max"` + + - `"max"` + - `speed: optional "standard" or "fast"` Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. @@ -850,6 +896,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "multiagent": { @@ -866,6 +915,9 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ ], "model": { "id": "claude-sonnet-4-6", + "effort": { + "type": "low" + }, "speed": "standard" }, "name": "Researcher", diff --git a/content/en/api/beta/skills.md b/content/en/api/beta/skills.md index 8fb32658a..63ea90925 100644 --- a/content/en/api/beta/skills.md +++ b/content/en/api/beta/skills.md @@ -14,7 +14,7 @@ Create Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -179,7 +181,7 @@ List Skills - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -231,6 +233,8 @@ List Skills - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -349,7 +353,7 @@ Get Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -401,6 +405,8 @@ Get Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -497,7 +503,7 @@ Delete Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -549,6 +555,8 @@ Delete Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -767,7 +775,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -819,6 +827,8 @@ Create Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -933,7 +943,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -985,6 +995,8 @@ List Skill Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1109,7 +1121,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1161,6 +1173,8 @@ Download a skill version's content as a zip archive. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1206,7 +1220,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1258,6 +1272,8 @@ Get Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1364,7 +1380,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1416,6 +1432,8 @@ Delete Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/create.md b/content/en/api/beta/skills/create.md index c38a73f5f..c24020c30 100644 --- a/content/en/api/beta/skills/create.md +++ b/content/en/api/beta/skills/create.md @@ -12,7 +12,7 @@ Create Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/delete.md b/content/en/api/beta/skills/delete.md index 83c29b859..a7dcd8c80 100644 --- a/content/en/api/beta/skills/delete.md +++ b/content/en/api/beta/skills/delete.md @@ -20,7 +20,7 @@ Delete Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Delete Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/list.md b/content/en/api/beta/skills/list.md index 39a78becb..1ae5554e8 100644 --- a/content/en/api/beta/skills/list.md +++ b/content/en/api/beta/skills/list.md @@ -35,7 +35,7 @@ List Skills - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -87,6 +87,8 @@ List Skills - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/retrieve.md b/content/en/api/beta/skills/retrieve.md index 011f5f4a4..b0ddccf81 100644 --- a/content/en/api/beta/skills/retrieve.md +++ b/content/en/api/beta/skills/retrieve.md @@ -20,7 +20,7 @@ Get Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Get Skill - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/versions.md b/content/en/api/beta/skills/versions.md index 24516c183..bfc8075ff 100644 --- a/content/en/api/beta/skills/versions.md +++ b/content/en/api/beta/skills/versions.md @@ -22,7 +22,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -74,6 +74,8 @@ Create Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -188,7 +190,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -240,6 +242,8 @@ List Skill Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -364,7 +368,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -416,6 +420,8 @@ Download a skill version's content as a zip archive. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -461,7 +467,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -513,6 +519,8 @@ Get Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -619,7 +627,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -671,6 +679,8 @@ Delete Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/versions/create.md b/content/en/api/beta/skills/versions/create.md index 97f462a81..492c52ba5 100644 --- a/content/en/api/beta/skills/versions/create.md +++ b/content/en/api/beta/skills/versions/create.md @@ -20,7 +20,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Create Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/versions/delete.md b/content/en/api/beta/skills/versions/delete.md index a327f65a0..f398fb7ea 100644 --- a/content/en/api/beta/skills/versions/delete.md +++ b/content/en/api/beta/skills/versions/delete.md @@ -26,7 +26,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ Delete Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/versions/download.md b/content/en/api/beta/skills/versions/download.md index eb05e2fe2..0cf931698 100644 --- a/content/en/api/beta/skills/versions/download.md +++ b/content/en/api/beta/skills/versions/download.md @@ -26,7 +26,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ Download a skill version's content as a zip archive. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/versions/list.md b/content/en/api/beta/skills/versions/list.md index c25847337..c45599fff 100644 --- a/content/en/api/beta/skills/versions/list.md +++ b/content/en/api/beta/skills/versions/list.md @@ -32,7 +32,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84,6 +84,8 @@ List Skill Versions - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/skills/versions/retrieve.md b/content/en/api/beta/skills/versions/retrieve.md index eb613102e..3fc0a98eb 100644 --- a/content/en/api/beta/skills/versions/retrieve.md +++ b/content/en/api/beta/skills/versions/retrieve.md @@ -26,7 +26,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ Get Skill Version - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels.md b/content/en/api/beta/tunnels.md index 8ecf96c24..61bbc072b 100644 --- a/content/en/api/beta/tunnels.md +++ b/content/en/api/beta/tunnels.md @@ -16,7 +16,7 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -156,7 +158,7 @@ Fetches a tunnel by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -208,6 +210,8 @@ Fetches a tunnel by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -298,7 +302,7 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -350,6 +354,8 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -439,7 +445,7 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -491,6 +497,8 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -572,7 +580,7 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -624,6 +632,8 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -690,7 +700,7 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -742,6 +752,8 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -867,7 +879,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -919,6 +931,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1016,7 +1030,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1068,6 +1082,8 @@ Fetches a tunnel certificate by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1167,7 +1183,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1219,6 +1235,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1315,7 +1333,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1367,6 +1385,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/archive.md b/content/en/api/beta/tunnels/archive.md index d9429f66c..6d2de1f1e 100644 --- a/content/en/api/beta/tunnels/archive.md +++ b/content/en/api/beta/tunnels/archive.md @@ -18,7 +18,7 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/certificates.md b/content/en/api/beta/tunnels/certificates.md index 65bba7df0..f39827d60 100644 --- a/content/en/api/beta/tunnels/certificates.md +++ b/content/en/api/beta/tunnels/certificates.md @@ -20,7 +20,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -169,7 +171,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -221,6 +223,8 @@ Fetches a tunnel certificate by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -320,7 +324,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -372,6 +376,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -468,7 +474,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -520,6 +526,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/certificates/archive.md b/content/en/api/beta/tunnels/certificates/archive.md index e450315ee..19b6e9a93 100644 --- a/content/en/api/beta/tunnels/certificates/archive.md +++ b/content/en/api/beta/tunnels/certificates/archive.md @@ -20,7 +20,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/certificates/create.md b/content/en/api/beta/tunnels/certificates/create.md index 52f5b12de..d9f7b91c8 100644 --- a/content/en/api/beta/tunnels/certificates/create.md +++ b/content/en/api/beta/tunnels/certificates/create.md @@ -18,7 +18,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/certificates/list.md b/content/en/api/beta/tunnels/certificates/list.md index 54aab1887..d700ababb 100644 --- a/content/en/api/beta/tunnels/certificates/list.md +++ b/content/en/api/beta/tunnels/certificates/list.md @@ -32,7 +32,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84,6 +84,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/certificates/retrieve.md b/content/en/api/beta/tunnels/certificates/retrieve.md index b66f9df7c..4b7aecb8e 100644 --- a/content/en/api/beta/tunnels/certificates/retrieve.md +++ b/content/en/api/beta/tunnels/certificates/retrieve.md @@ -20,7 +20,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ Fetches a tunnel certificate by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/create.md b/content/en/api/beta/tunnels/create.md index 69532f0c9..2dfd9405c 100644 --- a/content/en/api/beta/tunnels/create.md +++ b/content/en/api/beta/tunnels/create.md @@ -14,7 +14,7 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/list.md b/content/en/api/beta/tunnels/list.md index b4edca71c..a56269ed4 100644 --- a/content/en/api/beta/tunnels/list.md +++ b/content/en/api/beta/tunnels/list.md @@ -28,7 +28,7 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -80,6 +80,8 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/retrieve.md b/content/en/api/beta/tunnels/retrieve.md index e995d731f..0877b3b56 100644 --- a/content/en/api/beta/tunnels/retrieve.md +++ b/content/en/api/beta/tunnels/retrieve.md @@ -18,7 +18,7 @@ Fetches a tunnel by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Fetches a tunnel by ID. - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/reveal_token.md b/content/en/api/beta/tunnels/reveal_token.md index 3022a3e26..4fa22e851 100644 --- a/content/en/api/beta/tunnels/reveal_token.md +++ b/content/en/api/beta/tunnels/reveal_token.md @@ -18,7 +18,7 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/tunnels/rotate_token.md b/content/en/api/beta/tunnels/rotate_token.md index f95629374..56e1a2614 100644 --- a/content/en/api/beta/tunnels/rotate_token.md +++ b/content/en/api/beta/tunnels/rotate_token.md @@ -18,7 +18,7 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/user_profiles.md b/content/en/api/beta/user_profiles.md index 52d992e69..18d37e3bd 100644 --- a/content/en/api/beta/user_profiles.md +++ b/content/en/api/beta/user_profiles.md @@ -14,7 +14,7 @@ Create User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -222,7 +224,7 @@ List User Profiles - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -274,6 +276,8 @@ List User Profiles - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -398,7 +402,7 @@ Get User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -450,6 +454,8 @@ Get User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -563,7 +569,7 @@ Update User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -615,6 +621,8 @@ Update User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -756,7 +764,7 @@ Create Enrollment URL - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -808,6 +816,8 @@ Create Enrollment URL - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/user_profiles/create.md b/content/en/api/beta/user_profiles/create.md index ec7465350..98b94774a 100644 --- a/content/en/api/beta/user_profiles/create.md +++ b/content/en/api/beta/user_profiles/create.md @@ -12,7 +12,7 @@ Create User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/user_profiles/create_enrollment_url.md b/content/en/api/beta/user_profiles/create_enrollment_url.md index 8dfc1bf32..2fba272eb 100644 --- a/content/en/api/beta/user_profiles/create_enrollment_url.md +++ b/content/en/api/beta/user_profiles/create_enrollment_url.md @@ -16,7 +16,7 @@ Create Enrollment URL - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Create Enrollment URL - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/user_profiles/list.md b/content/en/api/beta/user_profiles/list.md index 002c7f172..07f26e07a 100644 --- a/content/en/api/beta/user_profiles/list.md +++ b/content/en/api/beta/user_profiles/list.md @@ -30,7 +30,7 @@ List User Profiles - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ List User Profiles - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/user_profiles/retrieve.md b/content/en/api/beta/user_profiles/retrieve.md index 11b6060cd..dcb93364d 100644 --- a/content/en/api/beta/user_profiles/retrieve.md +++ b/content/en/api/beta/user_profiles/retrieve.md @@ -16,7 +16,7 @@ Get User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Get User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/user_profiles/update.md b/content/en/api/beta/user_profiles/update.md index 265c473dd..4af76a710 100644 --- a/content/en/api/beta/user_profiles/update.md +++ b/content/en/api/beta/user_profiles/update.md @@ -16,7 +16,7 @@ Update User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update User Profile - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults.md b/content/en/api/beta/vaults.md index b067f5cad..791b7a41c 100644 --- a/content/en/api/beta/vaults.md +++ b/content/en/api/beta/vaults.md @@ -14,7 +14,7 @@ Create Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -66,6 +66,8 @@ Create Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -178,7 +180,7 @@ List Vaults - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -230,6 +232,8 @@ List Vaults - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -324,7 +328,7 @@ Get Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -376,6 +380,8 @@ Get Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -461,7 +467,7 @@ Update Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -513,6 +519,8 @@ Update Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -615,7 +623,7 @@ Delete Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -667,6 +675,8 @@ Delete Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -726,7 +736,7 @@ Archive Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -778,6 +788,8 @@ Archive Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -916,7 +928,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -968,6 +980,8 @@ Create Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1378,7 +1392,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1430,6 +1444,8 @@ List Credentials - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1663,7 +1679,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1715,6 +1731,8 @@ Get Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1939,7 +1957,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1991,6 +2009,8 @@ Update Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2352,7 +2372,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2404,6 +2424,8 @@ Delete Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2465,7 +2487,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2517,6 +2539,8 @@ Archive Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -2742,7 +2766,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -2794,6 +2818,8 @@ Validate Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/archive.md b/content/en/api/beta/vaults/archive.md index 7f14f9fd1..109f7d17a 100644 --- a/content/en/api/beta/vaults/archive.md +++ b/content/en/api/beta/vaults/archive.md @@ -16,7 +16,7 @@ Archive Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Archive Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/create.md b/content/en/api/beta/vaults/create.md index 906d81a06..724f76393 100644 --- a/content/en/api/beta/vaults/create.md +++ b/content/en/api/beta/vaults/create.md @@ -12,7 +12,7 @@ Create Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -64,6 +64,8 @@ Create Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials.md b/content/en/api/beta/vaults/credentials.md index d5f911dbc..c7b288695 100644 --- a/content/en/api/beta/vaults/credentials.md +++ b/content/en/api/beta/vaults/credentials.md @@ -18,7 +18,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Create Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -480,7 +482,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -532,6 +534,8 @@ List Credentials - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -765,7 +769,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -817,6 +821,8 @@ Get Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1041,7 +1047,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1093,6 +1099,8 @@ Update Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1454,7 +1462,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1506,6 +1514,8 @@ Delete Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1567,7 +1577,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1619,6 +1629,8 @@ Archive Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -1844,7 +1856,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -1896,6 +1908,8 @@ Validate Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/archive.md b/content/en/api/beta/vaults/credentials/archive.md index 5ad2cafb8..04341f63c 100644 --- a/content/en/api/beta/vaults/credentials/archive.md +++ b/content/en/api/beta/vaults/credentials/archive.md @@ -18,7 +18,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Archive Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/create.md b/content/en/api/beta/vaults/credentials/create.md index 301a96dfe..b3630e2f4 100644 --- a/content/en/api/beta/vaults/credentials/create.md +++ b/content/en/api/beta/vaults/credentials/create.md @@ -16,7 +16,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Create Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/delete.md b/content/en/api/beta/vaults/credentials/delete.md index eac086a24..daafd3763 100644 --- a/content/en/api/beta/vaults/credentials/delete.md +++ b/content/en/api/beta/vaults/credentials/delete.md @@ -18,7 +18,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Delete Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/list.md b/content/en/api/beta/vaults/credentials/list.md index 9924e86de..8e916f60d 100644 --- a/content/en/api/beta/vaults/credentials/list.md +++ b/content/en/api/beta/vaults/credentials/list.md @@ -30,7 +30,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ List Credentials - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md b/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md index e3cc7d268..7c62cacb8 100644 --- a/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md +++ b/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md @@ -18,7 +18,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Validate Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/retrieve.md b/content/en/api/beta/vaults/credentials/retrieve.md index 164bbe800..0eef10716 100644 --- a/content/en/api/beta/vaults/credentials/retrieve.md +++ b/content/en/api/beta/vaults/credentials/retrieve.md @@ -18,7 +18,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Get Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/credentials/update.md b/content/en/api/beta/vaults/credentials/update.md index 5fb2402a4..3907e0011 100644 --- a/content/en/api/beta/vaults/credentials/update.md +++ b/content/en/api/beta/vaults/credentials/update.md @@ -18,7 +18,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Update Credential - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/delete.md b/content/en/api/beta/vaults/delete.md index 28ec5b658..aeb43b349 100644 --- a/content/en/api/beta/vaults/delete.md +++ b/content/en/api/beta/vaults/delete.md @@ -16,7 +16,7 @@ Delete Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Delete Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/list.md b/content/en/api/beta/vaults/list.md index 3d544ece4..e306aae86 100644 --- a/content/en/api/beta/vaults/list.md +++ b/content/en/api/beta/vaults/list.md @@ -26,7 +26,7 @@ List Vaults - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -78,6 +78,8 @@ List Vaults - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/retrieve.md b/content/en/api/beta/vaults/retrieve.md index fc4c5eb64..88f30080d 100644 --- a/content/en/api/beta/vaults/retrieve.md +++ b/content/en/api/beta/vaults/retrieve.md @@ -16,7 +16,7 @@ Get Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Get Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/vaults/update.md b/content/en/api/beta/vaults/update.md index aa0e5ca7e..28e101f69 100644 --- a/content/en/api/beta/vaults/update.md +++ b/content/en/api/beta/vaults/update.md @@ -16,7 +16,7 @@ Update Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Update Vault - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/beta/webhooks.md b/content/en/api/beta/webhooks.md index 7870de171..f00344ba0 100644 --- a/content/en/api/beta/webhooks.md +++ b/content/en/api/beta/webhooks.md @@ -210,6 +210,70 @@ - `workspace_id: string` +### Beta Webhook Environment Archived Event Data + +- `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + +### Beta Webhook Environment Created Event Data + +- `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + +### Beta Webhook Environment Deleted Event Data + +- `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + +### Beta Webhook Environment Updated Event Data + +- `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + ### Beta Webhook Event - `BetaWebhookEvent object { id, created_at, data, type }` @@ -756,6 +820,104 @@ - `workspace_id: string` + - `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + - `type: "event"` Object type. Always `event` for webhook payloads. @@ -764,7 +926,7 @@ ### Beta Webhook Event Data -- `BetaWebhookEventData = BetaWebhookSessionCreatedEventData or BetaWebhookSessionPendingEventData or BetaWebhookSessionRunningEventData or 33 more` +- `BetaWebhookEventData = BetaWebhookSessionCreatedEventData or BetaWebhookSessionPendingEventData or BetaWebhookSessionRunningEventData or 40 more` - `BetaWebhookSessionCreatedEventData object { id, organization_id, type, workspace_id }` @@ -1298,6 +1460,152 @@ - `workspace_id: string` + - `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + +### Beta Webhook Memory Store Archived Event Data + +- `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + +### Beta Webhook Memory Store Created Event Data + +- `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + +### Beta Webhook Memory Store Deleted Event Data + +- `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + ### Beta Webhook Session Archived Event Data - `BetaWebhookSessionArchivedEventData object { id, organization_id, type, workspace_id }` @@ -2240,6 +2548,104 @@ - `workspace_id: string` + - `BetaWebhookEnvironmentCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.created"` + + - `"environment.created"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentUpdatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.updated"` + + - `"environment.updated"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.archived"` + + - `"environment.archived"` + + - `workspace_id: string` + + - `BetaWebhookEnvironmentDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the environment that triggered the event. + + - `organization_id: string` + + - `type: "environment.deleted"` + + - `"environment.deleted"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreCreatedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.created"` + + - `"memory_store.created"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreArchivedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.archived"` + + - `"memory_store.archived"` + + - `workspace_id: string` + + - `BetaWebhookMemoryStoreDeletedEventData object { id, organization_id, type, workspace_id }` + + - `id: string` + + ID of the memory store that triggered the event. + + - `organization_id: string` + + - `type: "memory_store.deleted"` + + - `"memory_store.deleted"` + + - `workspace_id: string` + - `type: "event"` Object type. Always `event` for webhook payloads. diff --git a/content/en/api/completions.md b/content/en/api/completions.md index 5cc15c9c0..db275841b 100644 --- a/content/en/api/completions.md +++ b/content/en/api/completions.md @@ -18,7 +18,7 @@ Future models and features will not be compatible with Text Completions. See our - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -70,6 +70,8 @@ Future models and features will not be compatible with Text Completions. See our - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/completions/create.md b/content/en/api/completions/create.md index 5be076caf..acfc7bd6d 100644 --- a/content/en/api/completions/create.md +++ b/content/en/api/completions/create.md @@ -16,7 +16,7 @@ Future models and features will not be compatible with Text Completions. See our - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -68,6 +68,8 @@ Future models and features will not be compatible with Text Completions. See our - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/errors.md b/content/en/api/errors.md index e4d2e0882..4d8a32baa 100644 --- a/content/en/api/errors.md +++ b/content/en/api/errors.md @@ -403,7 +403,7 @@ See [Streaming Messages](/docs/en/build-with-claude/streaming#get-the-final-mess ### Prefill not supported -Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), [Claude Mythos Preview](https://anthropic.com/glasswing), Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 do not support prefilling assistant messages. Sending a request with a prefilled last assistant message to any of these models returns a 400 `invalid_request_error`: +Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), [Claude Mythos Preview](https://anthropic.com/glasswing), Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5, and Claude Sonnet 4.6 do not support prefilling assistant messages. Sending a request with a prefilled last assistant message to any of these models returns a 400 `invalid_request_error`: ```json { @@ -425,7 +425,37 @@ If the most recent assistant message contains `thinking` or `redacted_thinking` `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response. ``` -With tool use, every `thinking` and `redacted_thinking` block from the assistant turn must be passed back exactly as received, including blocks whose `thinking` field is empty. Pass thinking blocks back unchanged, and if your application filters content blocks by type before resending, include both `thinking` and `redacted_thinking`. See [Preserving thinking blocks](/docs/en/build-with-claude/extended-thinking#preserving-thinking-blocks) and [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). +With tool use, every `thinking` and `redacted_thinking` block from the assistant turn must be passed back exactly as received, including blocks whose `thinking` field is empty. Pass thinking blocks back unchanged, and if your application filters content blocks by type before resending, include both `thinking` and `redacted_thinking`. See [Troubleshooting thinking](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-blocks-modified), [Preserving thinking blocks](/docs/en/build-with-claude/thinking#preserving-thinking-blocks), and [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). + +### Extended thinking not supported + +Claude Opus 4.7, Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and [Claude Mythos 5](https://anthropic.com/glasswing) have removed extended thinking. Sending `thinking: {"type": "enabled"}` to any of these models returns a 400 `invalid_request_error`: + +```text wrap +"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior. +``` + +Use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) instead. [Migrating to adaptive thinking](/docs/en/build-with-claude/extended-thinking#migrating-to-adaptive-thinking) shows the parameter mapping, and [Troubleshooting thinking](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-type-enabled) covers the symptom-first fix. + +### Adaptive thinking not supported + +Models that support only extended thinking (Claude Opus 4.5, Claude Haiku 4.5, Claude Sonnet 4.5, and earlier Claude 4 models) reject `thinking: {"type": "adaptive"}` with a 400 `invalid_request_error`: + +```text wrap +adaptive thinking is not supported on this model +``` + +Use `thinking: {"type": "enabled", "budget_tokens": N}` on these models; see [Extended thinking](/docs/en/build-with-claude/extended-thinking) for the configuration and [Troubleshooting thinking](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-type-adaptive) for the symptom-first fix. + +### Thinking cannot be disabled + +On Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), and [Claude Mythos Preview](https://anthropic.com/glasswing), thinking is always on. Sending `thinking: {"type": "disabled"}` to any of these models returns a 400 `invalid_request_error`: + +```text wrap +"thinking.type.disabled" is not supported for this model. Thinking defaults to adaptive mode when not specified; use "thinking.type.enabled" with "budget_tokens" for extended thinking. +``` + +On Claude Fable 5 and Claude Mythos 5, the error message's own suggestion of `"thinking.type.enabled"` is also rejected. Omit the `thinking` parameter and the request runs with adaptive thinking. To keep thinking content out of responses without turning thinking off, set `display: "omitted"` on the thinking configuration. See [Troubleshooting thinking](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-type-disabled). ### Outbound web identity federation disabled (Claude Platform on AWS) diff --git a/content/en/api/messages.md b/content/en/api/messages.md index 783bdc9a9..7b57ef041 100644 --- a/content/en/api/messages.md +++ b/content/en/api/messages.md @@ -2989,18 +2989,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -3192,18 +3204,18 @@ curl https://api.anthropic.com/v1/messages \ { "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { - "id": "id", + "id": "container_011CpZohnwH4vuy7gazohgSP", "expires_at": "2019-12-27T18:11:19.117Z" }, "content": [ { "citations": [ { - "cited_text": "cited_text", + "cited_text": "The grass is green. The sky is blue.", "document_index": 0, - "document_title": "document_title", + "document_title": "My Document", "end_char_index": 0, - "file_id": "file_id", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", "start_char_index": 0, "type": "char_location" } @@ -3216,7 +3228,7 @@ curl https://api.anthropic.com/v1/messages \ "role": "assistant", "stop_details": { "category": "cyber", - "explanation": "explanation", + "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", "type": "refusal" }, "stop_reason": "end_turn", @@ -3229,7 +3241,7 @@ curl https://api.anthropic.com/v1/messages \ }, "cache_creation_input_tokens": 2051, "cache_read_input_tokens": 2051, - "inference_geo": "inference_geo", + "inference_geo": "global", "input_tokens": 2095, "output_tokens": 503, "output_tokens_details": { @@ -9930,18 +9942,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -13236,18 +13260,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -14113,18 +14149,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -15051,18 +15099,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -15403,18 +15463,30 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -24523,18 +24595,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -25789,18 +25873,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -26855,18 +26951,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -27883,18 +27991,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. diff --git a/content/en/api/messages/batches.md b/content/en/api/messages/batches.md index 69d3a3ee4..f136c21ec 100644 --- a/content/en/api/messages/batches.md +++ b/content/en/api/messages/batches.md @@ -3665,18 +3665,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -4931,18 +4943,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -5997,18 +6021,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -7025,18 +7061,30 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. diff --git a/content/en/api/messages/batches/results.md b/content/en/api/messages/batches/results.md index 89f1f44e7..37fc5370e 100644 --- a/content/en/api/messages/batches/results.md +++ b/content/en/api/messages/batches/results.md @@ -805,18 +805,30 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. diff --git a/content/en/api/messages/create.md b/content/en/api/messages/create.md index b2cb8bfee..9a492cb76 100644 --- a/content/en/api/messages/create.md +++ b/content/en/api/messages/create.md @@ -2987,18 +2987,30 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Structured information about a refusal. - - `category: "cyber" or "bio" or "frontier_llm" or "reasoning_extraction"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more` The policy category that triggered a refusal. - `"cyber"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"bio"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"frontier_llm"` + The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. + - `"reasoning_extraction"` + The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `explanation: string` Human-readable explanation of the refusal. @@ -3190,18 +3202,18 @@ curl https://api.anthropic.com/v1/messages \ { "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { - "id": "id", + "id": "container_011CpZohnwH4vuy7gazohgSP", "expires_at": "2019-12-27T18:11:19.117Z" }, "content": [ { "citations": [ { - "cited_text": "cited_text", + "cited_text": "The grass is green. The sky is blue.", "document_index": 0, - "document_title": "document_title", + "document_title": "My Document", "end_char_index": 0, - "file_id": "file_id", + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", "start_char_index": 0, "type": "char_location" } @@ -3214,7 +3226,7 @@ curl https://api.anthropic.com/v1/messages \ "role": "assistant", "stop_details": { "category": "cyber", - "explanation": "explanation", + "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", "type": "refusal" }, "stop_reason": "end_turn", @@ -3227,7 +3239,7 @@ curl https://api.anthropic.com/v1/messages \ }, "cache_creation_input_tokens": 2051, "cache_read_input_tokens": 2051, - "inference_geo": "inference_geo", + "inference_geo": "global", "input_tokens": 2095, "output_tokens": 503, "output_tokens_details": { diff --git a/content/en/api/models.md b/content/en/api/models.md index 2c5022487..63e8169e8 100644 --- a/content/en/api/models.md +++ b/content/en/api/models.md @@ -32,7 +32,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -84,6 +84,8 @@ The Models API response can be used to determine which models are available for - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` @@ -347,7 +349,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -399,6 +401,8 @@ The Models API response can be used to determine information about a specific mo - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/models/list.md b/content/en/api/models/list.md index 2188b9f9b..d84c08a28 100644 --- a/content/en/api/models/list.md +++ b/content/en/api/models/list.md @@ -30,7 +30,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -82,6 +82,8 @@ The Models API response can be used to determine which models are available for - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/models/retrieve.md b/content/en/api/models/retrieve.md index abc6ecf79..0ea980d3b 100644 --- a/content/en/api/models/retrieve.md +++ b/content/en/api/models/retrieve.md @@ -20,7 +20,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 26 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 27 more` - `"message-batches-2024-09-24"` @@ -72,6 +72,8 @@ The Models API response can be used to determine information about a specific mo - `"cache-diagnosis-2026-04-07"` + - `"dreaming-2026-04-21"` + - `"thinking-token-count-2026-05-13"` - `"server-side-fallback-2026-06-01"` diff --git a/content/en/api/overview.md b/content/en/api/overview.md index 0df80ebc5..82bf524d0 100644 --- a/content/en/api/overview.md +++ b/content/en/api/overview.md @@ -57,7 +57,7 @@ When accessing Claude through a [cloud platform](#claude-api-vs-cloud-platforms) ### Getting API keys -The API is made available through the web [Console](https://platform.claude.com/). You can use the [Workbench](https://platform.claude.com/workbench) to try out the API in the browser and then generate API keys in [Account Settings](https://platform.claude.com/settings/keys). You choose each key's [expiration](/docs/en/manage-claude/authentication#key-expiration) when you create it. Use [workspaces](https://platform.claude.com/settings/workspaces) to segment your API keys and [control spend](/docs/en/api/rate-limits) by use case. +The API is made available through the web [Console](https://platform.claude.com/). You can use the [Workbench](https://platform.claude.com/playground) to try out the API in the browser and then generate API keys in [Account Settings](https://platform.claude.com/settings/keys). You choose each key's [expiration](/docs/en/manage-claude/authentication#key-expiration) when you create it. Use [workspaces](https://platform.claude.com/settings/workspaces) to segment your API keys and [control spend](/docs/en/api/rate-limits) by use case. ## Client SDKs diff --git a/content/en/build-with-claude/claude-in-amazon-bedrock.md b/content/en/build-with-claude/claude-in-amazon-bedrock.md index f3b230b62..02a6d133b 100644 --- a/content/en/build-with-claude/claude-in-amazon-bedrock.md +++ b/content/en/build-with-claude/claude-in-amazon-bedrock.md @@ -102,7 +102,7 @@ Anthropic's [client SDKs](/docs/en/cli-sdks-libraries/overview) support Claude i ```kotlin - implementation("com.anthropic:anthropic-java-bedrock:2.48.0") + implementation("com.anthropic:anthropic-java-bedrock:2.50.0") ``` @@ -111,7 +111,7 @@ Anthropic's [client SDKs](/docs/en/cli-sdks-libraries/overview) support Claude i com.anthropic anthropic-java-bedrock - 2.48.0 + 2.50.0 ``` @@ -332,7 +332,7 @@ For the full feature list with Amazon Bedrock availability, see [Features overvi * [Messages API](/docs/en/api/messages/create) (`/anthropic/v1/messages`) * [Prompt caching](/docs/en/build-with-claude/prompt-caching) -* [Extended thinking](/docs/en/build-with-claude/extended-thinking) +* [Thinking](/docs/en/build-with-claude/thinking) * [Tool use](/docs/en/agents-and-tools/tool-use/overview), including the [Bash tool](/docs/en/agents-and-tools/tool-use/bash-tool), [Computer use tool](/docs/en/agents-and-tools/tool-use/computer-use-tool), [Memory tool](/docs/en/agents-and-tools/tool-use/memory-tool), and [Text editor tool](/docs/en/agents-and-tools/tool-use/text-editor-tool) * [Citations](/docs/en/build-with-claude/citations) * [Structured outputs](/docs/en/build-with-claude/structured-outputs) diff --git a/content/en/build-with-claude/claude-in-microsoft-foundry.md b/content/en/build-with-claude/claude-in-microsoft-foundry.md index 9a864472d..0511cc3f2 100644 --- a/content/en/build-with-claude/claude-in-microsoft-foundry.md +++ b/content/en/build-with-claude/claude-in-microsoft-foundry.md @@ -77,7 +77,7 @@ Anthropic's [client SDKs](/docs/en/cli-sdks-libraries/overview) support Foundry ```kotlin - implementation("com.anthropic:anthropic-java-foundry:2.48.0") + implementation("com.anthropic:anthropic-java-foundry:2.50.0") // For Entra ID authentication, also add the Azure Identity library implementation("com.azure:azure-identity:1.18.3") @@ -89,7 +89,7 @@ Anthropic's [client SDKs](/docs/en/cli-sdks-libraries/overview) support Foundry com.anthropic anthropic-java-foundry - 2.48.0 + 2.50.0 diff --git a/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md b/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md index 29e78eb6f..a90300ad1 100644 --- a/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md +++ b/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md @@ -54,14 +54,14 @@ Anthropic's [client SDKs](/docs/en/cli-sdks-libraries/overview) support Bedrock. ```groovy Gradle - implementation("com.anthropic:anthropic-java-bedrock:2.48.0") + implementation("com.anthropic:anthropic-java-bedrock:2.50.0") ``` ```xml Maven com.anthropic anthropic-java-bedrock - 2.48.0 + 2.50.0 ``` @@ -303,201 +303,225 @@ The following examples show how to print a list of all the Claude models availab The following examples show how to generate text from Claude on Bedrock: - - ```bash CLI - # The ant CLI does not support Amazon Bedrock. - ``` + + + + Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDKs in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Claude in Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). + + - ```python Python - from anthropic import AnthropicBedrock - - client = AnthropicBedrock( - # Authenticate by either providing the keys below or use the default AWS credential providers, such as - # using ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and "AWS_ACCESS_KEY_ID" environment variables. - aws_access_key="", - aws_secret_key="", - # Temporary credentials can be used with aws_session_token. - # Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html. - aws_session_token="", - # aws_region changes the aws region to which the request is made. By default, the SDK reads AWS_REGION, - # and if that's not present, defaults to us-east-1. Note that the SDK does not read ~/.aws/config for the region. - aws_region="us-west-2", - ) + + + The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead. + + - message = client.messages.create( - model="global.anthropic.claude-opus-4-6-v1", - max_tokens=256, - messages=[{"role": "user", "content": "Hello, world"}], - ) - print(message.content) - ``` + + ```python + from anthropic import AnthropicBedrock + + client = AnthropicBedrock( + # Authenticate by either providing the keys below or use the default AWS credential providers, such as + # using ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and "AWS_ACCESS_KEY_ID" environment variables. + aws_access_key="", + aws_secret_key="", + # Temporary credentials can be used with aws_session_token. + # Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html. + aws_session_token="", + # aws_region changes the aws region to which the request is made. By default, the SDK reads AWS_REGION, + # and if that's not present, defaults to us-east-1. Note that the SDK does not read ~/.aws/config for the region. + aws_region="us-west-2", + ) + + message = client.messages.create( + model="global.anthropic.claude-opus-4-6-v1", + max_tokens=256, + messages=[{"role": "user", "content": "Hello, world"}], + ) + print(message.content) + ``` + - ```typescript TypeScript - import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; - - const client = new AnthropicBedrock({ - // Authenticate by either providing the keys below or use - // the default AWS credential providers, such as - // ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and - // "AWS_ACCESS_KEY_ID" environment variables. - awsAccessKey: "", - awsSecretKey: "", - - // Temporary credentials can be used with awsSessionToken. - // Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html. - awsSessionToken: "", - - // awsRegion changes the aws region to which the request - // is made. By default, the SDK reads AWS_REGION, and if - // that's not present, defaults to us-east-1. Note that - // the SDK does not read ~/.aws/config for the region. - awsRegion: "us-west-2" - }); - - const message = await client.messages.create({ - model: "global.anthropic.claude-opus-4-6-v1", - max_tokens: 256, - messages: [{ role: "user", content: "Hello, world" }] - }); - console.log(message); - ``` + + ```typescript + import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; + + const client = new AnthropicBedrock({ + // Authenticate by either providing the keys below or use + // the default AWS credential providers, such as + // ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and + // "AWS_ACCESS_KEY_ID" environment variables. + awsAccessKey: "", + awsSecretKey: "", + + // Temporary credentials can be used with awsSessionToken. + // Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html. + awsSessionToken: "", + + // awsRegion changes the aws region to which the request + // is made. By default, the SDK reads AWS_REGION, and if + // that's not present, defaults to us-east-1. Note that + // the SDK does not read ~/.aws/config for the region. + awsRegion: "us-west-2" + }); + + const message = await client.messages.create({ + model: "global.anthropic.claude-opus-4-6-v1", + max_tokens: 256, + messages: [{ role: "user", content: "Hello, world" }] + }); + console.log(message); + ``` + - ```csharp C# - using Anthropic.Bedrock; - using Anthropic.Models.Messages; + + ```csharp + using Anthropic.Bedrock; + using Anthropic.Models.Messages; - AnthropicBedrockClient client = new( - await AnthropicBedrockCredentialsHelper.FromEnv() - ?? throw new InvalidOperationException("AWS credentials not configured.") - ); + AnthropicBedrockClient client = new( + await AnthropicBedrockCredentialsHelper.FromEnv() + ?? throw new InvalidOperationException("AWS credentials not configured.") + ); - var response = await client.Messages.Create(new MessageCreateParams - { - Model = "global.anthropic.claude-opus-4-6-v1", - MaxTokens = 256, - Messages = [new() { Role = Role.User, Content = "Hello, world" }], - }); - - Console.WriteLine( - string.Join("", response.Content - .Where(c => c.Value is TextBlock) - .Select(c => (c.Value as TextBlock)!.Text))); - ``` + var response = await client.Messages.Create(new MessageCreateParams + { + Model = "global.anthropic.claude-opus-4-6-v1", + MaxTokens = 256, + Messages = [new() { Role = Role.User, Content = "Hello, world" }], + }); + + Console.WriteLine( + string.Join("", response.Content + .Where(c => c.Value is TextBlock) + .Select(c => (c.Value as TextBlock)!.Text))); + ``` + - ```go Go - import ( - "context" - "fmt" + + ```go + import ( + "context" + "fmt" + + "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/bedrock" + ) + // ... + // Uses default AWS credential provider chain + client := anthropic.NewClient( + bedrock.WithLoadDefaultConfig(context.Background()), + ) + + message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: "global.anthropic.claude-opus-4-6-v1", + MaxTokens: 256, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, world")), + }, + }) + if err != nil { + panic(err) + } + fmt.Printf("%+v\n", message.Content) + ``` + - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/bedrock" - ) - // ... - // Uses default AWS credential provider chain - client := anthropic.NewClient( - bedrock.WithLoadDefaultConfig(context.Background()), - ) - - message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ - Model: "global.anthropic.claude-opus-4-6-v1", - MaxTokens: 256, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, world")), - }, - }) - if err != nil { - panic(err) - } - fmt.Printf("%+v\n", message.Content) - ``` + + ```java + import com.anthropic.bedrock.backends.BedrockBackend; + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.models.messages.Message; + import com.anthropic.models.messages.MessageCreateParams; - ```java Java - import com.anthropic.bedrock.backends.BedrockBackend; - import com.anthropic.client.AnthropicClient; - import com.anthropic.client.okhttp.AnthropicOkHttpClient; - import com.anthropic.models.messages.Message; - import com.anthropic.models.messages.MessageCreateParams; - - public class BedrockExample { - - public static void main(String[] args) { - // Uses default AWS credential provider chain - AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); - - Message message = client - .messages() - .create( - MessageCreateParams.builder() - .model("global.anthropic.claude-opus-4-6-v1") - .maxTokens(256) - .addUserMessage("Hello, world") - .build() - ); - - System.out.println(message.content()); + public class BedrockExample { + + public static void main(String[] args) { + // Uses default AWS credential provider chain + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(BedrockBackend.fromEnv()) + .build(); + + Message message = client + .messages() + .create( + MessageCreateParams.builder() + .model("global.anthropic.claude-opus-4-6-v1") + .maxTokens(256) + .addUserMessage("Hello, world") + .build() + ); + + System.out.println(message.content()); + } } - } - ``` + ``` + - ```php PHP - + ```php + messages->create( - maxTokens: 256, - messages: [ - ['role' => 'user', 'content' => 'Hello, world'] - ], - model: 'global.anthropic.claude-opus-4-6-v1', - ); - echo $message->content[0]->text; - ``` + use Anthropic\Bedrock; - ```ruby Ruby - require "anthropic" + $client = Bedrock\Client::withCredentials( + accessKeyId: getenv("AWS_ACCESS_KEY_ID"), + secretAccessKey: getenv("AWS_SECRET_ACCESS_KEY"), + region: 'us-west-2', + securityToken: getenv("AWS_SESSION_TOKEN"), + ); - client = Anthropic::BedrockClient.new + $message = $client->messages->create( + maxTokens: 256, + messages: [ + ['role' => 'user', 'content' => 'Hello, world'] + ], + model: 'global.anthropic.claude-opus-4-6-v1', + ); + echo $message->content[0]->text; + ``` + - message = client.messages.create( - model: "global.anthropic.claude-opus-4-6-v1", - max_tokens: 256, - messages: [{role: "user", content: "Hello, world"}] - ) + + ```ruby + require "anthropic" - puts message.content.first.text - ``` + client = Anthropic::BedrockClient.new - ```python Boto3 (Python) - import boto3 - import json - - bedrock = boto3.client(service_name="bedrock-runtime") - body = json.dumps( - { - "max_tokens": 256, - "messages": [{"role": "user", "content": "Hello, world"}], - "anthropic_version": "bedrock-2023-05-31", - } - ) + message = client.messages.create( + model: "global.anthropic.claude-opus-4-6-v1", + max_tokens: 256, + messages: [{role: "user", content: "Hello, world"}] + ) - response = bedrock.invoke_model( - body=body, modelId="global.anthropic.claude-opus-4-6-v1" - ) + puts message.content.first.text + ``` + - response_body = json.loads(response.get("body").read()) - print(response_body.get("content")) - ``` - + + ```python + import boto3 + import json + + bedrock = boto3.client(service_name="bedrock-runtime") + body = json.dumps( + { + "max_tokens": 256, + "messages": [{"role": "user", "content": "Hello, world"}], + "anthropic_version": "bedrock-2023-05-31", + } + ) + + response = bedrock.invoke_model( + body=body, modelId="global.anthropic.claude-opus-4-6-v1" + ) + + response_body = json.loads(response.get("body").read()) + print(response_body.get("content")) + ``` + + See the [client SDKs](/docs/en/cli-sdks-libraries/overview) for more details, and the [official Bedrock documentation](https://docs.aws.amazon.com/bedrock/). @@ -509,152 +533,178 @@ The simplest approach is to set the `AWS_BEARER_TOKEN_BEDROCK` environment varia To provide a token programmatically: - - ```python Python - from anthropic import AnthropicBedrock - - client = AnthropicBedrock( - api_key="your-bearer-token", - aws_region="us-west-2", - ) - - message = client.messages.create( - model="us.anthropic.claude-sonnet-4-5-20250929-v1:0", - max_tokens=1024, - messages=[{"role": "user", "content": "Hello!"}], - ) - print(message.content) - ``` - - ```typescript TypeScript - import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; - - const client = new AnthropicBedrock({ - apiKey: "your-bearer-token", - awsRegion: "us-west-2" - }); - - const message = await client.messages.create({ - model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", - max_tokens: 1024, - messages: [{ role: "user", content: "Hello!" }] - }); - console.log(message); - ``` + + + + This section shows how to configure a bearer token in an SDK client. The SDKs also read the token from the `AWS_BEARER_TOKEN_BEDROCK` environment variable. For making direct HTTP requests with a bearer token, see the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/). + + - ```csharp C# - using Anthropic.Bedrock; - using Anthropic.Models.Messages; - - var client = new AnthropicBedrockClient( - new AnthropicBedrockApiTokenCredentials - { - BearerToken = "your-bearer-token", - Region = "us-west-2", - } - ); + + + The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead. + + - var response = await client.Messages.Create(new MessageCreateParams - { - Model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0", - MaxTokens = 1024, - Messages = [new() { Role = Role.User, Content = "Hello!" }], - }); - ``` + + ```python + from anthropic import AnthropicBedrock + + client = AnthropicBedrock( + api_key="your-bearer-token", + aws_region="us-west-2", + ) + + message = client.messages.create( + model="us.anthropic.claude-sonnet-4-5-20250929-v1:0", + max_tokens=1024, + messages=[{"role": "user", "content": "Hello!"}], + ) + print(message.content) + ``` + - ```go Go - import ( - "context" - "fmt" + + ```typescript + import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; + + const client = new AnthropicBedrock({ + apiKey: "your-bearer-token", + awsRegion: "us-west-2" + }); + + const message = await client.messages.create({ + model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", + max_tokens: 1024, + messages: [{ role: "user", content: "Hello!" }] + }); + console.log(message); + ``` + - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/bedrock" - "github.com/aws/aws-sdk-go-v2/aws" - ) - // ... - cfg := aws.Config{ - Region: "us-west-2", - BearerAuthTokenProvider: bedrock.NewStaticBearerTokenProvider("your-bearer-token"), - } - client := anthropic.NewClient( - bedrock.WithConfig(cfg), - ) - - message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", - MaxTokens: 1024, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("Hello!")), - }, - }) - if err != nil { - panic(err) - } - fmt.Println(message.Content[0].Text) - ``` + + ```csharp + using Anthropic.Bedrock; + using Anthropic.Models.Messages; + + var client = new AnthropicBedrockClient( + new AnthropicBedrockApiTokenCredentials + { + BearerToken = "your-bearer-token", + Region = "us-west-2", + } + ); - ```java Java - import com.anthropic.bedrock.backends.BedrockBackend; - import com.anthropic.client.AnthropicClient; - import com.anthropic.client.okhttp.AnthropicOkHttpClient; - import com.anthropic.models.messages.MessageCreateParams; - - // Option 1: Set AWS_BEARER_TOKEN_BEDROCK environment variable and use fromEnv() - AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); - - // Option 2: Provide the token programmatically - client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.builder() - .apiKey("your-bearer-token") - .build()) - .build(); - - MessageCreateParams params = MessageCreateParams.builder() - .model("us.anthropic.claude-sonnet-4-5-20250929-v1:0") - .maxTokens(1024) - .addUserMessage("Hello!") - .build(); - - client.messages().create(params).content().stream() - .flatMap(block -> block.text().stream()) - .forEach(textBlock -> System.out.println(textBlock.text())); - ``` + var response = await client.Messages.Create(new MessageCreateParams + { + Model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0", + MaxTokens = 1024, + Messages = [new() { Role = Role.User, Content = "Hello!" }], + }); + ``` + - ```php PHP - + ```go + import ( + "context" + "fmt" + + "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/bedrock" + "github.com/aws/aws-sdk-go-v2/aws" + ) + // ... + cfg := aws.Config{ + Region: "us-west-2", + BearerAuthTokenProvider: bedrock.NewStaticBearerTokenProvider("your-bearer-token"), + } + client := anthropic.NewClient( + bedrock.WithConfig(cfg), + ) + + message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", + MaxTokens: 1024, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Hello!")), + }, + }) + if err != nil { + panic(err) + } + fmt.Println(message.Content[0].Text) + ``` + - use Anthropic\Bedrock; + + ```java + import com.anthropic.bedrock.backends.BedrockBackend; + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.models.messages.MessageCreateParams; + + // Option 1: Set AWS_BEARER_TOKEN_BEDROCK environment variable and use fromEnv() + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(BedrockBackend.fromEnv()) + .build(); + + // Option 2: Provide the token programmatically + client = AnthropicOkHttpClient.builder() + .backend(BedrockBackend.builder() + .apiKey("your-bearer-token") + .build()) + .build(); + + MessageCreateParams params = MessageCreateParams.builder() + .model("us.anthropic.claude-sonnet-4-5-20250929-v1:0") + .maxTokens(1024) + .addUserMessage("Hello!") + .build(); + + client.messages().create(params).content().stream() + .flatMap(block -> block.text().stream()) + .forEach(textBlock -> System.out.println(textBlock.text())); + ``` + - $client = Bedrock\Client::withApiKey('your-bearer-token', 'us-west-2'); + + ```php + messages->create( - maxTokens: 1024, - messages: [ - ['role' => 'user', 'content' => 'Hello!'] - ], - model: 'us.anthropic.claude-sonnet-4-5-20250929-v1:0', - ); - echo $message->content[0]->text; - ``` + use Anthropic\Bedrock; - ```ruby Ruby - require "anthropic" + $client = Bedrock\Client::withApiKey('your-bearer-token', 'us-west-2'); - client = Anthropic::BedrockClient.new( - api_key: "your-bearer-token", - aws_region: "us-west-2" - ) + $message = $client->messages->create( + maxTokens: 1024, + messages: [ + ['role' => 'user', 'content' => 'Hello!'] + ], + model: 'us.anthropic.claude-sonnet-4-5-20250929-v1:0', + ); + echo $message->content[0]->text; + ``` + - message = client.messages.create( - model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", - max_tokens: 1024, - messages: [{role: "user", content: "Hello!"}] - ) - puts message.content.first.text - ``` - + + ```ruby + require "anthropic" + + client = Anthropic::BedrockClient.new( + api_key: "your-bearer-token", + aws_region: "us-west-2" + ) + + message = client.messages.create( + model: "us.anthropic.claude-sonnet-4-5-20250929-v1:0", + max_tokens: 1024, + messages: [{role: "user", content: "Hello!"}] + ) + puts message.content.first.text + ``` + + ## Activity logging @@ -674,7 +724,7 @@ For the full feature list with Amazon Bedrock availability, see [Features overvi * [Messages API](/docs/en/api/messages/create) * [Prompt caching](/docs/en/build-with-claude/prompt-caching) -* [Extended thinking](/docs/en/build-with-claude/extended-thinking) +* [Thinking](/docs/en/build-with-claude/thinking) * [Tool use](/docs/en/agents-and-tools/tool-use/overview), including the [Bash tool](/docs/en/agents-and-tools/tool-use/bash-tool), [Computer use tool](/docs/en/agents-and-tools/tool-use/computer-use-tool), [Memory tool](/docs/en/agents-and-tools/tool-use/memory-tool), and [Text editor tool](/docs/en/agents-and-tools/tool-use/text-editor-tool) * [Citations](/docs/en/build-with-claude/citations) * [Structured outputs](/docs/en/build-with-claude/structured-outputs) @@ -739,260 +789,304 @@ Regional endpoints include a 10% pricing premium over global endpoints. The model IDs for Claude Opus 4.6, Sonnet 4.6, and Sonnet 4.5 already include the `global.` prefix: - - ```bash CLI - # The ant CLI does not support Amazon Bedrock. - ``` - - ```python Python - from anthropic import AnthropicBedrock - - client = AnthropicBedrock(aws_region="us-west-2") - - message = client.messages.create( - model="global.anthropic.claude-opus-4-6-v1", - max_tokens=256, - messages=[{"role": "user", "content": "Hello, world"}], - ) - ``` - - ```typescript TypeScript - import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; - - const client = new AnthropicBedrock({ - awsRegion: "us-west-2" - }); - - const message = await client.messages.create({ - model: "global.anthropic.claude-opus-4-6-v1", - max_tokens: 256, - messages: [{ role: "user", content: "Hello, world" }] - }); - ``` + + + + Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDKs in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Claude in Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). + + - ```csharp C# - using Anthropic.Bedrock; - using Anthropic.Models.Messages; + + + The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead. + + - // C# Bedrock client uses model IDs with region prefix for global routing - AnthropicBedrockClient client = new( - await AnthropicBedrockCredentialsHelper.FromEnv() - ?? throw new InvalidOperationException("AWS credentials not configured.") - ); + + ```python + from anthropic import AnthropicBedrock - var response = await client.Messages.Create(new MessageCreateParams - { - // Use "global." prefix for global cross-region inference - Model = "global.anthropic.claude-opus-4-6-v1", - MaxTokens = 256, - Messages = [new() { Role = Role.User, Content = "Hello, world" }], - }); - ``` + client = AnthropicBedrock(aws_region="us-west-2") - ```go Go - import ( - "context" + message = client.messages.create( + model="global.anthropic.claude-opus-4-6-v1", + max_tokens=256, + messages=[{"role": "user", "content": "Hello, world"}], + ) + ``` + - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/bedrock" - ) - // ... - // Uses default AWS credential provider chain - client := anthropic.NewClient( - bedrock.WithLoadDefaultConfig(context.Background()), - ) - - message, _ := client.Messages.New(context.Background(), anthropic.MessageNewParams{ - Model: "global.anthropic.claude-opus-4-6-v1", - MaxTokens: 256, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, world")), - }, - }) - ``` + + ```typescript + import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; + + const client = new AnthropicBedrock({ + awsRegion: "us-west-2" + }); + + const message = await client.messages.create({ + model: "global.anthropic.claude-opus-4-6-v1", + max_tokens: 256, + messages: [{ role: "user", content: "Hello, world" }] + }); + ``` + - ```java Java - import com.anthropic.bedrock.backends.BedrockBackend; - import com.anthropic.client.AnthropicClient; - import com.anthropic.client.okhttp.AnthropicOkHttpClient; - import com.anthropic.models.messages.MessageCreateParams; - - // Uses default AWS credential provider chain - AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); - - var message = client - .messages() - .create( - MessageCreateParams.builder() - .model("global.anthropic.claude-opus-4-6-v1") - .maxTokens(256) - .addUserMessage("Hello, world") - .build() + + ```csharp + using Anthropic.Bedrock; + using Anthropic.Models.Messages; + + // C# Bedrock client uses model IDs with region prefix for global routing + AnthropicBedrockClient client = new( + await AnthropicBedrockCredentialsHelper.FromEnv() + ?? throw new InvalidOperationException("AWS credentials not configured.") ); - ``` - ```php PHP - - use Anthropic\Bedrock; + + ```go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/bedrock" + ) + // ... + // Uses default AWS credential provider chain + client := anthropic.NewClient( + bedrock.WithLoadDefaultConfig(context.Background()), + ) + + message, _ := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: "global.anthropic.claude-opus-4-6-v1", + MaxTokens: 256, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, world")), + }, + }) + ``` + - $client = Bedrock\Client::fromEnvironment(); + + ```java + import com.anthropic.bedrock.backends.BedrockBackend; + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.models.messages.MessageCreateParams; + + // Uses default AWS credential provider chain + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(BedrockBackend.fromEnv()) + .build(); + + var message = client + .messages() + .create( + MessageCreateParams.builder() + .model("global.anthropic.claude-opus-4-6-v1") + .maxTokens(256) + .addUserMessage("Hello, world") + .build() + ); + ``` + - $message = $client->messages->create( - maxTokens: 256, - messages: [ - ['role' => 'user', 'content' => 'Hello, world'] - ], - model: 'global.anthropic.claude-opus-4-6-v1', - ); - ``` + + ```php + + $message = $client->messages->create( + maxTokens: 256, + messages: [ + ['role' => 'user', 'content' => 'Hello, world'] + ], + model: 'global.anthropic.claude-opus-4-6-v1', + ); + ``` + + + + ```ruby + require "anthropic" + + # Default credentials resolve region from AWS_REGION env var + client = Anthropic::BedrockClient.new + + message = client.messages.create( + # Use "global." prefix for global cross-region inference + model: "global.anthropic.claude-opus-4-6-v1", + max_tokens: 256, + messages: [{role: "user", content: "Hello, world"}] + ) + ``` + + **Using regional endpoints (CRIS):** To use regional endpoints, replace the `global.` prefix with a regional prefix such as `us.`: - - ```bash CLI - # The ant CLI does not support Amazon Bedrock. - ``` + + + + Calling the `InvokeModel` API with AWS credentials requires SigV4 request signing, which the SDKs in the other tabs handle automatically. For a Bedrock endpoint you can call with a self-contained cURL command, see [Claude in Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock#making-your-first-request). + + - ```python Python - from anthropic import AnthropicBedrock + + + The `ant` CLI does not support Amazon Bedrock. Use one of the SDK examples instead. + + - client = AnthropicBedrock(aws_region="us-west-2") + + ```python + from anthropic import AnthropicBedrock - # Using US regional endpoint (CRIS) - message = client.messages.create( - model="us.anthropic.claude-opus-4-6-v1", # Regional prefix - max_tokens=256, - messages=[{"role": "user", "content": "Hello, world"}], - ) - ``` + client = AnthropicBedrock(aws_region="us-west-2") - ```typescript TypeScript - import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; - - const client = new AnthropicBedrock({ - awsRegion: "us-west-2" - }); - - // Using US regional endpoint (CRIS) - const message = await client.messages.create({ - model: "us.anthropic.claude-opus-4-6-v1", // Regional prefix - max_tokens: 256, - messages: [{ role: "user", content: "Hello, world" }] - }); - ``` + # Using US regional endpoint (CRIS) + message = client.messages.create( + model="us.anthropic.claude-opus-4-6-v1", # Regional prefix + max_tokens=256, + messages=[{"role": "user", "content": "Hello, world"}], + ) + ``` + - ```csharp C# - using Anthropic.Bedrock; - using Anthropic.Models.Messages; + + ```typescript + import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; + + const client = new AnthropicBedrock({ + awsRegion: "us-west-2" + }); + + // Using US regional endpoint (CRIS) + const message = await client.messages.create({ + model: "us.anthropic.claude-opus-4-6-v1", // Regional prefix + max_tokens: 256, + messages: [{ role: "user", content: "Hello, world" }] + }); + ``` + - AnthropicBedrockClient client = new( - new AnthropicBedrockPrivateKeyCredentials { Region = "us-west-2" } - ); + + ```csharp + using Anthropic.Bedrock; + using Anthropic.Models.Messages; - // Using US regional endpoint (CRIS) - var response = await client.Messages.Create(new MessageCreateParams - { - Model = "us.anthropic.claude-opus-4-6-v1", // Regional prefix - MaxTokens = 256, - Messages = [new() { Role = Role.User, Content = "Hello, world" }], - }); - ``` + AnthropicBedrockClient client = new( + new AnthropicBedrockPrivateKeyCredentials { Region = "us-west-2" } + ); - ```go Go - import ( - "context" + // Using US regional endpoint (CRIS) + var response = await client.Messages.Create(new MessageCreateParams + { + Model = "us.anthropic.claude-opus-4-6-v1", // Regional prefix + MaxTokens = 256, + Messages = [new() { Role = Role.User, Content = "Hello, world" }], + }); + ``` + - "github.com/anthropics/anthropic-sdk-go" - "github.com/anthropics/anthropic-sdk-go/bedrock" - ) - // ... - // Uses default AWS credential provider chain - client := anthropic.NewClient( - bedrock.WithLoadDefaultConfig(context.Background()), - ) - - // Using US regional endpoint (CRIS) - message, _ := client.Messages.New(context.Background(), anthropic.MessageNewParams{ - Model: "us.anthropic.claude-opus-4-6-v1", // Regional prefix - MaxTokens: 256, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, world")), - }, - }) - ``` + + ```go + import ( + "context" + + "github.com/anthropics/anthropic-sdk-go" + "github.com/anthropics/anthropic-sdk-go/bedrock" + ) + // ... + // Uses default AWS credential provider chain + client := anthropic.NewClient( + bedrock.WithLoadDefaultConfig(context.Background()), + ) + + // Using US regional endpoint (CRIS) + message, _ := client.Messages.New(context.Background(), anthropic.MessageNewParams{ + Model: "us.anthropic.claude-opus-4-6-v1", // Regional prefix + MaxTokens: 256, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, world")), + }, + }) + ``` + - ```java Java - import com.anthropic.bedrock.backends.BedrockBackend; - import com.anthropic.client.AnthropicClient; - import com.anthropic.client.okhttp.AnthropicOkHttpClient; - import com.anthropic.models.messages.MessageCreateParams; - - // Uses default AWS credential provider chain - AnthropicClient client = AnthropicOkHttpClient.builder() - .backend(BedrockBackend.fromEnv()) - .build(); - - // Using US regional endpoint (CRIS) - var message = client - .messages() - .create( - MessageCreateParams.builder() - .model("us.anthropic.claude-opus-4-6-v1") // Regional prefix - .maxTokens(256) - .addUserMessage("Hello, world") - .build() - ); - ``` + + ```java + import com.anthropic.bedrock.backends.BedrockBackend; + import com.anthropic.client.AnthropicClient; + import com.anthropic.client.okhttp.AnthropicOkHttpClient; + import com.anthropic.models.messages.MessageCreateParams; + + // Uses default AWS credential provider chain + AnthropicClient client = AnthropicOkHttpClient.builder() + .backend(BedrockBackend.fromEnv()) + .build(); + + // Using US regional endpoint (CRIS) + var message = client + .messages() + .create( + MessageCreateParams.builder() + .model("us.anthropic.claude-opus-4-6-v1") // Regional prefix + .maxTokens(256) + .addUserMessage("Hello, world") + .build() + ); + ``` + - ```php PHP - + ```php + messages->create( - maxTokens: 256, - messages: [ - ['role' => 'user', 'content' => 'Hello, world'] - ], - model: 'us.anthropic.claude-opus-4-6-v1', - ); - ``` + $message = $client->messages->create( + maxTokens: 256, + messages: [ + ['role' => 'user', 'content' => 'Hello, world'] + ], + model: 'us.anthropic.claude-opus-4-6-v1', + ); + ``` + - ```ruby Ruby - require "anthropic" + + ```ruby + require "anthropic" - # Using US regional endpoint (CRIS) - client = Anthropic::BedrockClient.new(aws_region: "us-west-2") + # Using US regional endpoint (CRIS) + client = Anthropic::BedrockClient.new(aws_region: "us-west-2") - message = client.messages.create( - model: "us.anthropic.claude-opus-4-6-v1", # Regional prefix - max_tokens: 256, - messages: [{role: "user", content: "Hello, world"}] - ) - ``` - + message = client.messages.create( + model: "us.anthropic.claude-opus-4-6-v1", # Regional prefix + max_tokens: 256, + messages: [{role: "user", content: "Hello, world"}] + ) + ``` + + **Claude Mythos Preview** is a research preview model available to invited customers on Amazon Bedrock. For more information, see [Project Glasswing](https://anthropic.com/glasswing). diff --git a/content/en/build-with-claude/claude-on-vertex-ai.md b/content/en/build-with-claude/claude-on-vertex-ai.md index 2a570eb36..87f660641 100644 --- a/content/en/build-with-claude/claude-on-vertex-ai.md +++ b/content/en/build-with-claude/claude-on-vertex-ai.md @@ -45,20 +45,20 @@ First, install Anthropic's [client SDK](/docs/en/cli-sdks-libraries/overview) fo ```groovy Gradle - implementation("com.anthropic:anthropic-java:2.48.0") - implementation("com.anthropic:anthropic-java-vertex:2.48.0") + implementation("com.anthropic:anthropic-java:2.50.0") + implementation("com.anthropic:anthropic-java-vertex:2.50.0") ``` ```xml Maven com.anthropic anthropic-java - 2.48.0 + 2.50.0 com.anthropic anthropic-java-vertex - 2.48.0 + 2.50.0 ``` @@ -346,7 +346,7 @@ For the full feature list with Google Cloud availability, see [Features overview * [Messages API](/docs/en/api/messages/create) * [Prompt caching](/docs/en/build-with-claude/prompt-caching) -* [Extended thinking](/docs/en/build-with-claude/extended-thinking) +* [Thinking](/docs/en/build-with-claude/thinking) * [Tool use](/docs/en/agents-and-tools/tool-use/overview), including the [Bash tool](/docs/en/agents-and-tools/tool-use/bash-tool), [Computer use tool](/docs/en/agents-and-tools/tool-use/computer-use-tool), [Memory tool](/docs/en/agents-and-tools/tool-use/memory-tool), and [Text editor tool](/docs/en/agents-and-tools/tool-use/text-editor-tool) * [Web search tool](/docs/en/agents-and-tools/tool-use/web-search-tool) * [Citations](/docs/en/build-with-claude/citations) diff --git a/content/en/build-with-claude/claude-platform-on-aws.md b/content/en/build-with-claude/claude-platform-on-aws.md index 27ffcc798..be940c257 100644 --- a/content/en/build-with-claude/claude-platform-on-aws.md +++ b/content/en/build-with-claude/claude-platform-on-aws.md @@ -305,14 +305,14 @@ Anthropic's [client SDKs](/docs/en/cli-sdks-libraries/overview) support Claude P ```kotlin Gradle - implementation("com.anthropic:anthropic-java-aws:2.48.0") + implementation("com.anthropic:anthropic-java-aws:2.50.0") ``` ```xml Maven com.anthropic anthropic-java-aws - 2.48.0 + 2.50.0 ``` diff --git a/content/en/build-with-claude/context-editing.md b/content/en/build-with-claude/context-editing.md index 77b311ea1..e07482400 100644 --- a/content/en/build-with-claude/context-editing.md +++ b/content/en/build-with-claude/context-editing.md @@ -55,7 +55,7 @@ The `clear_thinking_20251015` strategy manages `thinking` blocks in conversation Use this strategy to override the default. If your code runs across multiple model tiers, set `keep` explicitly rather than relying on the per-model default. -An assistant conversation turn may include multiple content blocks (for example, when using tools) and multiple thinking blocks (for example, with [interleaved thinking](/docs/en/build-with-claude/extended-thinking#interleaved-thinking)). +An assistant conversation turn may include multiple content blocks (for example, when using tools) and multiple thinking blocks (for example, with [interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking)). ### Context editing happens server-side diff --git a/content/en/build-with-claude/context-windows.md b/content/en/build-with-claude/context-windows.md index 7b802ffbe..d3bbdf899 100644 --- a/content/en/build-with-claude/context-windows.md +++ b/content/en/build-with-claude/context-windows.md @@ -43,60 +43,60 @@ A single request can include up to 600 images or PDF pages (100 for models with See the [model comparison](/docs/en/about-claude/models/overview#latest-models-comparison) table for a list of context window sizes by model. -## The context window with extended thinking +## The context window with thinking -With [extended thinking](/docs/en/build-with-claude/extended-thinking), all input and output tokens, including thinking tokens, count toward the context window limit, with a few nuances in multi-turn situations. +With [thinking](/docs/en/build-with-claude/thinking), all input and output tokens, including thinking tokens, count toward the context window limit, with a few nuances in multi-turn situations. -The thinking budget tokens are a subset of your `max_tokens` parameter, are billed as output tokens, and count toward rate limits. With [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), Claude determines its thinking allocation dynamically, so thinking token usage varies from request to request. +Thinking tokens are a subset of your `max_tokens` parameter, are billed as output tokens, and count toward rate limits. With [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), Claude determines its thinking allocation dynamically, so thinking token usage varies from request to request. -Whether thinking blocks from previous assistant turns stay in the context window depends on the model. On Claude Opus 4.5 and later Opus models, Claude Sonnet 4.6 and later Sonnet models, Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview, the API keeps previous thinking blocks by default, and they count toward the context window like any other input tokens. On earlier Opus and Sonnet models and all Haiku models, the API automatically strips previous thinking blocks from the conversation history when you pass them back, which preserves token capacity for conversation content. For the per-model defaults, see [thinking block preservation by model](/docs/en/build-with-claude/extended-thinking#thinking-block-preservation-by-model). To override the default in either direction, use [thinking block clearing](/docs/en/build-with-claude/context-editing#thinking-block-clearing). +Whether thinking blocks from previous assistant turns stay in the context window depends on the model. On Claude Opus 4.5 and later Opus models, Claude Sonnet 4.6 and later Sonnet models, Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview, the API keeps previous thinking blocks by default, and they count toward the context window like any other input tokens. On earlier Opus and Sonnet models and all Haiku models, the API automatically strips previous thinking blocks from the conversation history when you pass them back, which preserves token capacity for conversation content. For the per-model defaults, see [thinking block preservation by model](/docs/en/build-with-claude/thinking#thinking-block-preservation-by-model). To override the default in either direction, use [thinking block clearing](/docs/en/build-with-claude/context-editing#thinking-block-clearing). -The following diagram shows how tokens are managed when extended thinking is enabled on a model that strips previous thinking blocks: +The following diagram shows how tokens are managed when thinking is enabled on a model that strips previous thinking blocks: -![Diagram of extended thinking on a model that strips previous thinking blocks: each turn's thinking block is generated in the output and not carried into later turns' input](/docs/images/context-window-thinking.svg) +![Diagram of thinking on a model that strips previous thinking blocks: each turn's thinking block is generated in the output and not carried into later turns' input](/docs/images/context-window-thinking.svg) -* **Stripping extended thinking:** On models that strip previous thinking blocks, extended thinking blocks (shown in dark gray) are generated during each turn's output phase but are not carried forward as input tokens for subsequent turns. You do not need to strip the thinking blocks yourself: if you pass them back, the Claude API strips them automatically. -* **Billing:** Extended thinking tokens are billed as output tokens once, when they are generated. On models that keep previous thinking blocks, the kept blocks are then part of later requests' input and are billed as input tokens, like the rest of the conversation history. +* **Stripping thinking blocks:** On models that strip previous thinking blocks, thinking blocks (shown in dark gray) are generated during each turn's output phase but are not carried forward as input tokens for subsequent turns. You do not need to strip the thinking blocks yourself: if you pass them back, the Claude API strips them automatically. +* **Billing:** Thinking tokens are billed as output tokens once, when they are generated. On models that keep previous thinking blocks, the kept blocks are then part of later requests' input and are billed as input tokens, like the rest of the conversation history. - You can read more about the context window and extended thinking in the [Extended thinking](/docs/en/build-with-claude/extended-thinking) guide. + You can read more about the context window and thinking in the [Thinking](/docs/en/build-with-claude/thinking) guide. -## The context window with extended thinking and tool use +## The context window with thinking and tool use -The following diagram illustrates how tokens are managed when you combine extended thinking with tool use on a model that strips previous thinking blocks: +The following diagram illustrates how tokens are managed when you combine thinking with tool use on a model that strips previous thinking blocks: -![Diagram of extended thinking with tool use: thinking is kept with its tool result, then dropped on the next user turn on models that strip previous thinking blocks](/docs/images/context-window-thinking-tools.svg) +![Diagram of thinking with tool use: thinking is kept with its tool result, then dropped on the next user turn on models that strip previous thinking blocks](/docs/images/context-window-thinking-tools.svg) * **Input components:** Tools configuration and user message - * **Output components:** Extended thinking + text response + tool use request + * **Output components:** Thinking + text response + tool use request * **Token calculation:** All input and output components count toward the context window, and all output components are billed as output tokens. - * **Input components:** Every block in the first turn and the `tool_result`. You must return the extended thinking block with the corresponding tool results. This is the only case where you have to return thinking blocks. - * **Output components:** After tool results have been passed back to Claude, Claude responds with only text (no additional extended thinking until the next `user` message, unless [interleaved thinking](/docs/en/build-with-claude/extended-thinking#interleaved-thinking) is enabled). + * **Input components:** Every block in the first turn and the `tool_result`. You must return the thinking block with the corresponding tool results. This is the only case where you have to return thinking blocks. + * **Output components:** After tool results have been passed back to Claude, Claude responds with only text (no additional thinking until the next `user` message, unless [interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking) is enabled). * **Token calculation:** All input and output components count toward the context window, and all output components are billed as output tokens. * **Input components:** All inputs and the output from the previous turn are carried forward. The thinking block from the completed tool use cycle no longer has to stay in context: on models that strip previous thinking blocks, the API drops it automatically when you pass it back, and on models that keep previous thinking blocks, you can strip it yourself at this stage. This is also where you add the next `user` turn. - * **Output components:** Because there is a new `user` turn outside the tool use cycle, Claude generates a new extended thinking block and continues from there. + * **Output components:** Because there is a new `user` turn outside the tool use cycle, Claude generates a new thinking block and continues from there. * **Token calculation:** On models that strip previous thinking blocks, the previous thinking tokens no longer count toward the context window. All other previous blocks still count toward the context window, as does the thinking block in the current `assistant` turn. -* **Considerations for tool use with extended thinking:** +* **Considerations for tool use with thinking:** * When you post tool results, you must include the entire unmodified thinking block that accompanies that tool request, including its signature. * The API uses cryptographic signatures to verify thinking block authenticity. If you modify a thinking block, the API returns an error. - Most current Claude models support [interleaved thinking](/docs/en/build-with-claude/extended-thinking#interleaved-thinking), which lets Claude think between tool calls, including after it receives tool results. It is automatic on models with adaptive thinking. Claude Opus 4.5, Claude Sonnet 4.5, and earlier Claude 4 models require the `interleaved-thinking-2025-05-14` beta header. + Most current Claude models support [interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking), which lets Claude think between tool calls, including after it receives tool results. It is automatic on models with adaptive thinking; Claude Opus 4.5, Claude Sonnet 4.5, and earlier Claude 4 models require the `interleaved-thinking-2025-05-14` beta header, and Claude Haiku 4.5 does not support it. - For more information about using tools with extended thinking, see [Extended thinking with tool use](/docs/en/build-with-claude/extended-thinking#extended-thinking-with-tool-use). + For more information about using tools with thinking, see [Thinking with tool use](/docs/en/build-with-claude/thinking#thinking-with-tool-use). To reduce the context consumed by the tool definitions themselves, see [Manage tool context](/docs/en/agents-and-tools/tool-use/manage-tool-context), or defer tool definitions with the [tool search tool](/docs/en/agents-and-tools/tool-use/tool-search-tool). @@ -123,7 +123,7 @@ After each tool call, the API gives Claude an update on its remaining capacity: Image tokens are included in these budgets. -Newer models don't receive these injected tags. On Claude Opus 4.7 and later, Claude Fable 5, and Claude Mythos 5, you can give the model an explicit budget with [task budgets](/docs/en/build-with-claude/task-budgets), which are in beta. +Claude Opus 4.7 and later Opus models, Claude Fable 5, and Claude Mythos 5 don't receive these injected tags. On Claude Opus 4.7 and later, Claude Fable 5, and Claude Mythos 5, you can give the model an explicit budget with [task budgets](/docs/en/build-with-claude/task-budgets), which are in beta. For agents that span multiple sessions, design your state artifacts so that context recovery is fast when a new session starts. The [memory tool's multisession pattern](/docs/en/agents-and-tools/tool-use/memory-tool#multisession-software-development-pattern) walks through a concrete approach. See also [Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents). @@ -165,7 +165,7 @@ To stay within context window limits, use the [token counting API](/docs/en/buil See the model comparison table for a list of context window sizes and input/output token pricing by model. - + Give Claude enhanced reasoning for complex tasks and control how thinking content is returned. diff --git a/content/en/build-with-claude/effort.md b/content/en/build-with-claude/effort.md index 2e52023ad..eeab75421 100644 --- a/content/en/build-with-claude/effort.md +++ b/content/en/build-with-claude/effort.md @@ -8,14 +8,14 @@ Control how many tokens Claude uses when responding with the effort parameter, t For how zero data retention (ZDR) applies to this feature, see [API and data retention](/docs/en/manage-claude/api-and-data-retention). -The effort parameter lets you control how many tokens Claude spends when responding to requests. You can trade off between response thoroughness and token efficiency with a single model. The effort parameter is available on all supported models with no beta header required. +The effort parameter lets you control how many tokens Claude spends when responding to requests. You can trade off between response thoroughness and token efficiency with a single model. The effort parameter is available on the following models with no beta header required. The effort parameter is supported by Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), Claude Opus 4.8, [Claude Mythos Preview](https://anthropic.com/glasswing), Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5, Claude Sonnet 4.6, and Claude Opus 4.5. - For Claude Opus 4.6 and Sonnet 4.6, effort replaces `budget_tokens` as the recommended way to control thinking depth. Combine effort with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`) for the best experience. While `budget_tokens` is still accepted on Opus 4.6 and Sonnet 4.6, it is deprecated and will be removed in a future model release. At `high` (default) and `max` effort, Claude almost always thinks. At lower effort levels, it may skip thinking for simpler problems. + For how effort interacts with thinking and which control to reach for, see [Thinking and effort](/docs/en/build-with-claude/thinking#thinking-and-effort). Where adaptive thinking is available, effort is the recommended way to control thinking depth. ## How effort works @@ -30,7 +30,7 @@ The effort parameter affects **all tokens** in the response, including: * Text responses and explanations * Tool calls and function arguments -* Extended thinking (when enabled) +* Thinking (when active) This approach has two major advantages: @@ -47,13 +47,15 @@ This approach has two major advantages: | `medium` | Balanced approach with moderate token savings. | Agentic tasks that require a balance of speed, cost, and performance | | `low` | Most efficient. Significant token savings with some capability reduction. | Simpler tasks that need the best speed and lowest costs, such as subagents | +`xhigh` is a newer level; some models that support `max` don't support `xhigh`. + Effort is a behavioral signal, not a strict token budget. At lower effort levels, Claude will still think on sufficiently difficult problems, but it will think less than it would at higher effort levels for the same problem. ### Recommended effort levels for Claude Sonnet 5 -Claude Sonnet 5 defaults to `high` effort. +Claude Sonnet 5 defaults to `high` effort on the Claude API and Claude Code. * **High effort (default):** Suitable for complex reasoning, coding, and agentic tasks where quality matters more than speed or cost. * **Xhigh effort:** For the hardest coding and agentic tasks. See [Prompting Claude Sonnet 5](/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5#calibrating-effort-and-thinking-depth). @@ -61,7 +63,7 @@ Claude Sonnet 5 defaults to `high` effort. * **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized. * **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending. -### Recommended effort levels for Sonnet 4.6 +### Recommended effort levels for Claude Sonnet 4.6 Sonnet 4.6 defaults to `high` effort. Explicitly set effort when using Sonnet 4.6 to avoid unexpected latency: @@ -98,7 +100,7 @@ When running Claude Opus 4.8 at `xhigh` or `max` effort, set a large `max_tokens ### Recommended effort levels for Claude Fable 5 -Effort is the primary control for trading off intelligence, latency, and cost on Claude Fable 5. **Start with `high`, the default, for most tasks**, use `xhigh` for the most capability-sensitive workloads, and step down to `medium` or `low` for routine work. Lower effort settings on Claude Fable 5 still perform well and often exceed `xhigh` performance on prior models. At `high` and `xhigh`, set a large `max_tokens`: it is a hard limit on total output, thinking plus response text. See [Cost control](/docs/en/build-with-claude/adaptive-thinking#cost-control). +Effort is the primary control for trading off intelligence, latency, and cost on Claude Fable 5. **Start with `high`, the default, for most tasks**, use `xhigh` for the most capability-sensitive workloads, and step down to `medium` or `low` for routine work. Lower effort settings on Claude Fable 5 still perform well and often exceed `xhigh` performance on prior models. At `high` and `xhigh`, set a large `max_tokens`: it is a hard limit on total output, thinking plus response text. See [Cost control](/docs/en/build-with-claude/thinking-steering-and-cost#cost-control). Reduce effort if a task completes but takes longer than necessary, or if you want a faster, more interactive working style. The same recommendations apply to Claude Mythos 5. For fuller guidance, see [Prompting Claude Fable 5](/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5). @@ -294,27 +296,23 @@ Higher effort levels may: * Provide detailed summaries of changes * Include more comprehensive code comments -## Effort with extended thinking +## Effort with thinking + +The `thinking` parameter controls whether Claude thinks in [thinking blocks](/docs/en/build-with-claude/thinking) before answering; the `effort` parameter controls how much work Claude puts into the whole response, which in adaptive mode includes how often and how deeply it thinks. Don't pass `adaptive` as an `effort` value: `adaptive` is a thinking mode, not an effort level. -The effort parameter works alongside extended thinking. Its behavior depends on the model: +At higher effort levels, Claude thinks on most requests and at greater length; at lower levels, it can skip thinking entirely for simpler problems. See [Thinking and effort](/docs/en/build-with-claude/thinking#thinking-and-effort) for full guidance on how the two controls work together. -* **Claude Fable 5 and Claude Mythos 5** use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), which is always on (no `thinking` configuration required). `thinking: {type: "disabled"}` is rejected. Effort controls thinking depth the same way as on Opus 4.8 and Opus 4.7. -* **Claude Opus 4.8** uses [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`), where effort is the recommended control for thinking depth. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported and returns a 400 error. The model decides when and how much to think based on each request, so it triggers thinking only as needed. At `high`, `xhigh`, and `max` effort, Claude almost always thinks deeply. At lower levels, it may skip thinking for simpler problems. Set `thinking: {type: "adaptive"}` to enable thinking; without it, requests run without thinking. -* **Claude Mythos Preview** uses [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) by default (no `thinking` configuration required). `thinking: {type: "disabled"}` is rejected. Effort controls thinking depth the same way as on Opus 4.7 and Opus 4.6. -* **Claude Opus 4.7** uses [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`), where effort is the recommended control for thinking depth. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is no longer supported on Opus 4.7; use adaptive thinking with effort instead. At `high`, `xhigh`, and `max` effort, Claude almost always thinks deeply. At lower levels, it may skip thinking for simpler problems. -* **Claude Opus 4.6** uses [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`), where effort is the recommended control for thinking depth. While `budget_tokens` is still accepted on Opus 4.6, it is deprecated and will be removed in a future release. At `high` and `max` effort, Claude almost always thinks deeply. At lower levels, it may skip thinking for simpler problems. -* **Claude Sonnet 5** uses [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), which is on by default (no `thinking` configuration required), and effort is the recommended control for thinking depth. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported and returns a 400 error. Pass `thinking: {type: "disabled"}` to turn thinking off. At `high` (default), `xhigh`, and `max` effort, Claude almost always thinks deeply. At lower levels, it may skip thinking for simpler problems. -* **Claude Sonnet 4.6** uses [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (where effort controls thinking depth). Manual thinking with [interleaved mode](/docs/en/build-with-claude/extended-thinking#interleaved-thinking) (`thinking: {type: "enabled", budget_tokens: N}`) is still functional but deprecated. -* **Claude Opus 4.5** uses manual thinking (`thinking: {type: "enabled", budget_tokens: N}`), where effort works alongside the thinking token budget. Set the effort level for your task, then set the thinking token budget based on task complexity. +On Claude Opus 4.5, the only extended-thinking-only model that supports effort, it works alongside [`budget_tokens`](/docs/en/build-with-claude/extended-thinking): set the effort level for your task, then set the thinking token budget based on how much reasoning depth the task needs. -The effort parameter can be used with or without extended thinking enabled. When used without thinking, it still controls overall token spend for text responses and tool calls. +For per-model thinking availability, see the [per-model configuration table](/docs/en/build-with-claude/thinking-troubleshooting#supported-models). Effort works with or without thinking; see [How effort works](#how-effort-works). ## Best practices 1. **Set effort explicitly:** The API defaults to `high`, but the right starting point depends on your model and workload. 2. **Use low for speed-sensitive or simple tasks:** When latency matters or tasks are straightforward, low effort can significantly reduce response times and costs. 3. **Test your use case:** The impact of effort levels varies by task type. Evaluate performance on your specific use cases before deploying. -4. **Consider dynamic effort:** Adjust effort based on task complexity. Simple queries may warrant low effort while agentic coding and complex reasoning benefit from high effort. +4. **Consider dynamic effort:** Adjust effort based on task complexity. Simple queries may warrant low effort while agentic coding and complex reasoning benefit from high effort. See the next item before varying it within one conversation. +5. **Hold effort constant within cached conversations:** Changing the effort value between requests invalidates [prompt caching](/docs/en/build-with-claude/prompt-caching), so vary effort across workloads rather than within a conversation that relies on cache hits. See [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching). ## Next steps @@ -323,11 +321,11 @@ The effort parameter can be used with or without extended thinking enabled. When Give Claude an advisory token budget for the full agentic loop to help the model self-regulate on long agentic tasks. - - Let Claude dynamically determine when and how much to use extended thinking with adaptive thinking mode. + + Understand adaptive thinking, where Claude decides when and how much to think, and steer it with effort and prompting. - - Give Claude enhanced reasoning for complex tasks with manual thinking budgets, tool use, and prompt caching. + + Understand how thinking works, when Claude thinks by default, and how thinking interacts with effort. diff --git a/content/en/build-with-claude/extended-thinking.md b/content/en/build-with-claude/extended-thinking.md index 23054b041..5366b8604 100644 --- a/content/en/build-with-claude/extended-thinking.md +++ b/content/en/build-with-claude/extended-thinking.md @@ -1,6 +1,6 @@ # Extended thinking -Give Claude enhanced reasoning for complex tasks and control how thinking content is returned. +Configure manual extended thinking with a fixed budget_tokens budget on Claude models that support it, and migrate to adaptive thinking. --- @@ -8,52 +8,23 @@ Give Claude enhanced reasoning for complex tasks and control how thinking conten For how zero data retention (ZDR) applies to this feature, see [API and data retention](/docs/en/manage-claude/api-and-data-retention). -Extended thinking gives Claude enhanced reasoning capabilities for complex tasks, while providing varying levels of transparency into its step-by-step thought process before it delivers its final answer. - -## Supported models - -Extended thinking is available on all current Claude models. How you enable it depends on the model: - -| Model | Manual extended thinking (`budget_tokens`) | Recommended | -| -------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| Claude Fable 5 Claude Mythos 5 | Not supported (400 error) | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), always on; use [effort](/docs/en/build-with-claude/effort) to control depth | -| [Claude Mythos Preview](https://anthropic.com/glasswing) | Supported | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking), on by default | -| Claude Opus 4.8 | Not supported (400 error) | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with [effort](/docs/en/build-with-claude/effort) | -| Claude Opus 4.7 | Not supported (400 error) | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with [effort](/docs/en/build-with-claude/effort) | -| Claude Sonnet 5 | Not supported (400 error) | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with [effort](/docs/en/build-with-claude/effort) | -| Claude Opus 4.6 | [Deprecated](/docs/en/build-with-claude/overview#feature-availability) | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with [effort](/docs/en/build-with-claude/effort) | -| Claude Sonnet 4.6 | [Deprecated](/docs/en/build-with-claude/overview#feature-availability) | [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with [effort](/docs/en/build-with-claude/effort) | -| Claude Opus 4.5 | Supported | N/A | -| Claude Haiku 4.5 | Supported | N/A | -| Earlier Claude 4 models | Supported | N/A | - -With adaptive thinking, the model determines when and how much to think on each request. On Claude Mythos Preview, Claude Fable 5, and Claude Mythos 5, `thinking: {type: "disabled"}` is not supported. For per-model behavior differences (thinking output, interleaved thinking, and block preservation), see [Differences in thinking across model versions](#differences-in-thinking-across-model-versions). + + Extended thinking (`thinking.type: "enabled"` with `budget_tokens`) is deprecated on Claude Opus 4.6 and Claude Sonnet 4.6 (it still works there). Claude Opus 4.7, Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5 do not support it and reject requests that use it, returning a 400 error. On earlier models, including Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5, extended thinking is the only thinking mode. Claude Mythos Preview supports both modes. Where both modes are available, use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) instead. -## How extended thinking works + See [Migrating to adaptive thinking](#migrating-to-adaptive-thinking) to move to adaptive thinking. If your model supports only extended thinking, this page describes the supported configuration; no change is needed until you move to a newer model. + -When extended thinking is turned on, Claude creates `thinking` content blocks where it outputs its internal reasoning. Claude incorporates insights from this reasoning before crafting a final response. + + If a request fails with a 400 error whose message starts with `"thinking.type.enabled" is not supported`, your model uses adaptive thinking instead. See [Troubleshooting thinking](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-type-enabled), or jump to [Migrating to adaptive thinking](#migrating-to-adaptive-thinking). + -The API response includes `thinking` content blocks, followed by `text` content blocks. +Extended thinking in manual mode gives you direct control over how much Claude thinks. You set a thinking token budget on each request with `thinking: {type: "enabled", budget_tokens: N}`, and Claude thinks against that budget before it starts its final answer. Manual mode remains useful when your workload requires predictable latency or precise control over thinking costs. This page covers how to set and tune the budget, how manual mode interacts with interleaved thinking and prompt caching, and how to migrate to adaptive thinking. -Here's an example of the default response format: +For how thinking itself works, including thinking blocks and the response shape, the `display` parameter, streaming, thinking with tool use, and encryption, see the [thinking overview](/docs/en/build-with-claude/thinking). -```json -{ - "content": [ - { - "type": "thinking", - "thinking": "Let me analyze this step by step...", - "signature": "WaUjzkypQ2mUEVM36O2TxuC06KN8xyfbJwyem2dw3URve/op91XWHOEBLLqIOMfFG/UvLEczmEsUjavL...." - }, - { - "type": "text", - "text": "Based on my analysis..." - } - ] -} -``` +## Supported models -For more information about the response format of extended thinking, see the [Messages API Reference](/docs/en/api/messages/create). +Extended thinking availability per model, including the models where extended thinking is the only mode, is listed in the [per-model configuration table](/docs/en/build-with-claude/thinking-troubleshooting#supported-models). ## How to use extended thinking @@ -290,3344 +261,151 @@ Here is an example of using extended thinking in the Messages API: ``` -To turn on extended thinking, add a `thinking` object with `type` set to `enabled` and a `budget_tokens` value. On models where manual extended thinking is deprecated or not supported (see [Supported models](#supported-models)), use `type: "adaptive"` instead as described in [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). +To turn on manual extended thinking, add a `thinking` object with `type` set to `enabled` and a `budget_tokens` value. -The `budget_tokens` parameter sets the maximum number of tokens Claude can use for its internal reasoning process. This limit applies to full thinking tokens, not to [the summarized output](#summarized-thinking). Larger budgets can improve response quality by enabling more thorough analysis for complex problems, although Claude may not use the entire budget allocated, especially at ranges above 32k. +The `budget_tokens` parameter sets a target for how many tokens Claude can use for its internal reasoning process. Larger budgets can improve response quality by enabling more thorough analysis for complex problems. - - `budget_tokens` is [deprecated](/docs/en/build-with-claude/overview#feature-availability) on Claude Opus 4.6 and Claude Sonnet 4.6 and will be removed in a future model release. Use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) with the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth instead. - - - - [Claude Mythos Preview](https://anthropic.com/glasswing), Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 128k output tokens. Claude Haiku 4.5 supports up to 64k. See the [models overview](/docs/en/about-claude/models/overview) for limits on legacy models. On the [Message Batches API](/docs/en/build-with-claude/batch-processing#extended-output-beta), the `output-300k-2026-03-24` [beta header](/docs/en/api/beta-headers) raises the output limit to 300k for Claude Opus 4.8, Opus 4.7, Sonnet 5, Opus 4.6, and Sonnet 4.6. - - -`budget_tokens` must be set to a value less than `max_tokens`. However, when using [interleaved thinking with tools](#interleaved-thinking), you can exceed this limit as the token limit becomes your entire context window. Because `budget_tokens` must be less than `max_tokens`, extended thinking cannot be combined with `max_tokens: 0` ([cache pre-warming](/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)). - -### Controlling thinking display - -The `display` field on the thinking configuration controls how thinking content is returned in API responses. It accepts two values: +## Budget rules and tuning -* `"summarized"`: Thinking blocks contain summarized thinking text. See [Summarized thinking](#summarized-thinking) for details. This is the default on Claude Opus 4.6, Claude Sonnet 4.6, and earlier Claude 4 models. -* `"omitted"`: Thinking blocks are returned with an empty `thinking` field. The `signature` field still carries the encrypted full thinking for multi-turn continuity (see [Thinking encryption](#thinking-encryption)). This is the default on Claude Fable 5, Claude Mythos 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, and [Claude Mythos Preview](https://anthropic.com/glasswing). - -Setting `display: "omitted"` is useful when your application doesn't surface thinking content to users. The primary benefit is **faster time-to-first-text-token when streaming:** The server skips streaming thinking tokens entirely and delivers only the signature, so the final text response begins streaming sooner. - -Here are some important considerations for omitted thinking: - -* You're still charged for the full thinking tokens. Omitting reduces latency, not cost. -* If you pass thinking blocks back in multi-turn conversations, pass them unchanged. The server decrypts the `signature` to reconstruct the original thinking for prompt construction (see [Preserving thinking blocks](/docs/en/build-with-claude/extended-thinking#preserving-thinking-blocks)). Any text you place in the `thinking` field of a round-tripped omitted block is ignored. -* `display` is invalid with `thinking.type: "disabled"` (there is nothing to display). -* When using `thinking.type: "adaptive"` and the model skips thinking for a simple request, no thinking block is produced regardless of `display`. - - - The `signature` field is identical whether `display` is `"summarized"` or `"omitted"`. Switching `display` values between turns in a conversation is supported. - - - - On [Claude Mythos Preview](https://anthropic.com/glasswing), `display` defaults to `"omitted"`. The examples in this section pass `display` explicitly so they apply to all models, but on Mythos Preview you can leave it unset and receive the same behavior. To receive summarized thinking on Mythos Preview, set `display: "summarized"` explicitly. - +`budget_tokens` must satisfy these constraints: -Automated pipelines that never surface thinking content to end users can skip the overhead of receiving thinking tokens over the wire. Latency-sensitive applications get the same reasoning quality without waiting for thinking text to stream before the final response begins. +* **Minimum of 1,024 tokens.** The API rejects smaller values. +* **Less than `max_tokens`.** Thinking tokens count toward the `max_tokens` limit for the turn, so the budget must leave room for the final response. The one exception is [interleaved thinking](#interleaved-thinking), where `budget_tokens` can exceed `max_tokens` because the budget spans all thinking blocks within one assistant turn. +* **No cache pre-warming.** Because `budget_tokens` must be less than `max_tokens`, extended thinking cannot be combined with `max_tokens: 0` ([cache pre-warming](/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache)). - - ```bash cURL - curl https://api.anthropic.com/v1/messages \ - -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "content-type: application/json" \ - -d '{ - "model": "claude-sonnet-4-6", - "max_tokens": 16000, - "thinking": { - "type": "enabled", - "budget_tokens": 10000, - "display": "omitted" - }, - "messages": [ - { - "role": "user", - "content": "What is 27 * 453?" - } - ] - }' - ``` +The budget is a target rather than a strict cap. Actual token usage varies with the task, and Claude may stop reasoning well before the budget is exhausted; `max_tokens` remains the hard ceiling on total output. - ```bash CLI - ant messages create \ - --model claude-sonnet-4-6 \ - --max-tokens 16000 \ - --transform content \ - --thinking '{type: enabled, budget_tokens: 10000, display: omitted}' \ - --message '{role: user, content: "What is 27 * 453?"}' \ - --format yaml - ``` +On Claude Opus 4.5, the only extended-thinking-only model that supports [effort](/docs/en/build-with-claude/effort), effort shapes the overall response while `budget_tokens` sets thinking depth; set both. - ```python Python - client = anthropic.Anthropic() +To tune the budget: - response = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=16000, - thinking={ - "type": "enabled", - "budget_tokens": 10000, - "display": "omitted", - }, - messages=[ - {"role": "user", "content": "What is 27 * 453?"}, - ], - ) +* Match the starting point to the task. For simple tasks, start near the 1,024-token minimum and increase incrementally to find the optimal range for your use case. For complex tasks, start with a larger budget of 16,000 tokens or more and adjust to your latency and quality needs. Higher budgets enable more comprehensive reasoning, with diminishing returns that depend on the task, and at the cost of increased latency. For critical tasks, test different settings to find the right balance. +* For thinking budgets above 32k, use [batch processing](/docs/en/build-with-claude/batch-processing) to avoid networking issues. Pushing the model to think beyond 32k tokens produces long-running requests that can hit system timeouts and open-connection limits. - for block in response.content: - if block.type == "thinking": - if block.thinking: - print(f"Thinking: {block.thinking}") - else: - print("Thinking: [omitted]") - elif block.type == "text": - print(f"Response: {block.text}") - ``` +To track what a budget actually costs you, monitor the `usage.output_tokens_details.thinking_tokens` field in the response, which reports how many of the billed output tokens were internal reasoning. When streaming, this breakdown appears only on the final `message_delta` event. - ```typescript TypeScript - const client = new Anthropic(); +When you are ready to move off manual budgets, see [Migrating to adaptive thinking](#migrating-to-adaptive-thinking). - const response = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000, - display: "omitted" - }, - messages: [ - { - role: "user", - content: "What is 27 * 453?" - } - ] - }); +## Interleaved thinking in manual mode - for (const block of response.content) { - if (block.type === "thinking") { - if (block.thinking.length > 0) { - console.log(`Thinking: ${block.thinking}`); - } else { - console.log("Thinking: [omitted]"); - } - } else if (block.type === "text") { - console.log(`Response: ${block.text}`); - } - } - ``` +Interleaved thinking lets Claude think between tool calls within a single assistant turn, reasoning about each tool result before deciding what to do next. For the concept, the turn structure, and how it behaves on adaptive-thinking models, see [interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking) in the thinking overview. This section covers how to enable it when you use manual `type: "enabled"` thinking. - ```csharp C# - AnthropicClient client = new(); +On Claude Opus 4.5, Claude Sonnet 4.5, and earlier Claude 4 models (Claude Opus 4.1 (deprecated), Claude Opus 4, and Claude Sonnet 4), add the `interleaved-thinking-2025-05-14` [beta header](/docs/en/api/beta-headers) to your API request. - var message = await client.Messages.Create(new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 16000, - Thinking = new ThinkingConfigEnabled - { - BudgetTokens = 10000, - Display = ThinkingConfigEnabledDisplay.Omitted - }, - Messages = - [ - new() { Role = Role.User, Content = "What is 27 * 453?" } - ] - }); +The 4.6 generation splits in manual mode: - foreach (var block in message.Content) - { - if (block.TryPickThinking(out ThinkingBlock? thinking)) - { - Console.WriteLine(string.IsNullOrEmpty(thinking.Thinking) - ? "Thinking: [omitted]" - : $"Thinking: {thinking.Thinking}"); - } - else if (block.TryPickText(out TextBlock? text)) - { - Console.WriteLine($"Response: {text.Text}"); - } - } - ``` +* **Claude Sonnet 4.6**: the beta header with manual `type: "enabled"` is still functional but deprecated. Prefer [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), which interleaves automatically with no header. +* **Claude Opus 4.6**: manual mode has no interleaved thinking at all. Only its adaptive mode interleaves, so switch to `thinking: {type: "adaptive"}` if you need reasoning between tool calls on this model. - ```go Go - client := anthropic.NewClient() +Claude Haiku 4.5 does not support interleaved thinking. On the Claude API, the beta header is accepted but ignored. - response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamUnion{ - OfEnabled: &anthropic.ThinkingConfigEnabledParam{ - BudgetTokens: 10000, - Display: anthropic.ThinkingConfigEnabledDisplayOmitted, - }, - }, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("What is 27 * 453?")), - }, - }) - if err != nil { - log.Fatal(err) - } +Two more considerations for interleaved thinking in manual mode: - for _, block := range response.Content { - switch v := block.AsAny().(type) { - case anthropic.ThinkingBlock: - fmt.Println("Thinking:", cmp.Or(v.Thinking, "[omitted]")) - case anthropic.TextBlock: - fmt.Println("Response:", v.Text) - } - } - ``` +* `budget_tokens` can exceed `max_tokens` here; the [budget rules](#budget-rules-and-tuning) explain this exception. +* Interleaved thinking is only supported for [tools used through the Messages API](/docs/en/agents-and-tools/tool-use/overview). - ```java Java - import com.anthropic.models.messages.ThinkingConfigEnabled; - // ... - void main() { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); +How platforms treat the beta header differs. The Claude API and [Claude Platform on AWS](/docs/en/build-with-claude/claude-platform-on-aws) accept `interleaved-thinking-2025-05-14` on any model and ignore it where unsupported. Acceptance is not the same as effect: on models that reject `type: "enabled"` (4.7 and later) or lack manual-mode interleaving (Claude Opus 4.6), the header has no manual-mode effect; adaptive thinking interleaves automatically there. - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(16000L) - .thinking(ThinkingConfigEnabled.builder() - .budgetTokens(10000L) - .display(ThinkingConfigEnabled.Display.OMITTED) - .build()) - .addUserMessage("What is 27 * 453?") - .build(); +Partner-operated platforms ([Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Google Cloud](/docs/en/build-with-claude/claude-on-vertex-ai)) reject the request unless the model is one of the following: - Message message = client.messages().create(params); +* Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5 +* Claude Opus 4.6, Claude Sonnet 4.6, Claude Opus 4.5, Claude Sonnet 4.5, Claude Opus 4.1 (deprecated) +* Claude Opus 4 ([retired, except on Google Cloud](/docs/en/about-claude/model-deprecations)) and Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](/docs/en/about-claude/model-deprecations)) - message.content().forEach(block -> { - block.thinking().ifPresent(thinkingBlock -> { - if (thinkingBlock.thinking().isEmpty()) { - IO.println("Thinking: [omitted]"); - } else { - IO.println("Thinking: " + thinkingBlock.thinking()); - } - }); - block.text().ifPresent(textBlock -> - IO.println("Response: " + textBlock.text()) - ); - }); - } - ``` +## Turn structure in manual mode - ```php PHP - use Anthropic\Messages\TextBlock; - use Anthropic\Messages\ThinkingBlock; - use Anthropic\Messages\ThinkingConfigEnabled; - use Anthropic\Messages\ThinkingConfigEnabled\Display; - // ... - $client = new Client(); +The general turn-structure rules, including the single-turn tool-use loop, mid-turn conflict handling, and toggling thinking between turns, are on [Thinking with tool use](/docs/en/build-with-claude/thinking#thinking-with-tool-use). - $response = $client->messages->create( - model: 'claude-sonnet-4-6', - maxTokens: 16000, - thinking: ThinkingConfigEnabled::with( - budgetTokens: 10000, - display: Display::OMITTED, - ), - messages: [ - ['role' => 'user', 'content' => 'What is 27 * 453?'], - ], - ); +Manual mode adds one requirement: the final assistant turn of a thinking-enabled request must begin with a thinking block ([adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) drops that requirement). Changing the thinking configuration between turns also invalidates prompt caching; see the following section. - foreach ($response->content as $block) { - echo match (true) { - $block instanceof ThinkingBlock && $block->thinking === '' => "Thinking: [omitted]\n", - $block instanceof ThinkingBlock => "Thinking: {$block->thinking}\n", - $block instanceof TextBlock => "Response: {$block->text}\n", - default => '', - }; - } - ``` +## Prompt caching in manual mode - ```ruby Ruby - client = Anthropic::Client.new +Manual mode adds one rule on top of the mode-neutral caching behavior described in [thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching): changing `budget_tokens` between requests invalidates cache breakpoints, just as switching thinking modes does, because the budget value is rendered into the prompt. Message-level breakpoints always miss after a budget change; whether tool and system-prompt breakpoints miss too depends on where the model renders the configuration. - response = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: :enabled, - budget_tokens: 10000, - # The Ruby SDK uses `display_` (trailing underscore) to avoid - # shadowing Kernel#display; the wire field is still `display`. - display_: :omitted - }, - messages: [{role: "user", content: "What is 27 * 453?"}] - ) +In practice, pick a budget and hold it stable for the life of a cached conversation. Running a multi-turn conversation with message-level caching on Claude Sonnet 4.6 and changing the budget on the third request from 4,000 to 8,000 tokens shows the invalidation directly: - response.content.each do |block| - case block.type - when :thinking - puts block.thinking.empty? ? "Thinking: [omitted]" : "Thinking: #{block.thinking}" - when :text - puts "Response: #{block.text}" - end - end - ``` - +```text Output wrap +First request - establishing cache +First response usage: { cache_creation_input_tokens: 1370, cache_read_input_tokens: 0, input_tokens: 17, output_tokens: 700 } -When `display: "omitted"` is set, the response contains `thinking` blocks with an empty `thinking` field: +Second request - same thinking parameters (cache hit expected) +Second response usage: { cache_creation_input_tokens: 0, cache_read_input_tokens: 1370, input_tokens: 303, output_tokens: 874 } -```json Output -{ - "content": [ - { - "type": "thinking", - "thinking": "", - "signature": "EosnCkYICxIMMb3LzNrMu..." - }, - { - "type": "text", - "text": "The answer is 12,231." - } - ] -} +Third request - different thinking budget (cache miss expected) +Third response usage: { cache_creation_input_tokens: 1370, cache_read_input_tokens: 0, input_tokens: 747, output_tokens: 619 } ``` -When streaming with `display: "omitted"`, no `thinking_delta` events are emitted; see [Streaming thinking](#streaming-thinking) for the event sequence. - -### Summarized thinking - -With extended thinking enabled, the Messages API for Claude 4 models returns a summary of Claude's full thinking process. Summarized thinking provides the full intelligence benefits of extended thinking, while preventing misuse. This is the default behavior on Claude 4 models when the `display` field on the thinking configuration is unset or set to `"summarized"`. On Claude Fable 5, Claude Mythos 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, and [Claude Mythos Preview](https://anthropic.com/glasswing), `display` defaults to `"omitted"` instead, so you must set `display: "summarized"` explicitly to receive summarized thinking. - -Here are some important considerations for summarized thinking: - -* You're charged for the full thinking tokens generated by the original request, not the summary tokens. -* The billed output token count will **not match** the count of tokens you see in the response. -* On Claude 4 models, the first few lines of thinking output are more verbose, providing detailed reasoning that's particularly helpful for prompt engineering purposes. [Claude Mythos Preview](https://anthropic.com/glasswing) summarizes from the first token, so its thinking blocks do not show this verbose preamble. -* As Anthropic seeks to improve the extended thinking feature, summarization behavior is subject to change. -* Summarization preserves the key ideas of Claude's thinking process with minimal added latency, enabling a streamable user experience. -* Summarization is processed by a different model than the one you target in your requests. The thinking model does not see the summarized output. - - - In rare cases where you need access to full thinking output for Claude 4 models, [contact Anthropic sales](mailto:sales@anthropic.com). - - -### Streaming thinking - -You can stream extended thinking responses using [server-sent events (SSE)](https://developer.mozilla.org/en-US/Web/API/Server-sent%5Fevents/Using%5Fserver-sent%5Fevents). - -When streaming is enabled for extended thinking, you receive thinking content through `thinking_delta` events. - -When `display: "omitted"` is set, no `thinking_delta` events are emitted. See [Controlling thinking display](#controlling-thinking-display). +The third request re-creates the cache (`cache_creation_input_tokens=1370`, `cache_read_input_tokens=0`) because the budget changed between requests. For a runnable version of the same experiment in adaptive mode, where the effort level plays the cache role that `budget_tokens` plays here, see [Prompt caching](/docs/en/build-with-claude/thinking-steering-and-cost#prompt-caching) on the steering page. -For more documentation on streaming through the Messages API, see [Streaming Messages](/docs/en/build-with-claude/streaming). +## Shared mechanics -Here's how to handle streaming with thinking: +Most thinking behavior is mode neutral and documented once on the [Thinking](/docs/en/build-with-claude/thinking) page. Everything there applies in manual mode too: - - ```bash cURL - curl https://api.anthropic.com/v1/messages \ - -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "content-type: application/json" \ - -d '{ - "model": "claude-sonnet-4-6", - "max_tokens": 16000, - "stream": true, - "thinking": { - "type": "enabled", - "budget_tokens": 10000 - }, - "messages": [ - { - "role": "user", - "content": "What is the greatest common divisor of 1071 and 462?" - } - ] - }' - ``` +* [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display) +* [Streaming thinking](/docs/en/build-with-claude/thinking#streaming-thinking) +* [Thinking with tool use](/docs/en/build-with-claude/thinking#thinking-with-tool-use), including [preserving thinking blocks](/docs/en/build-with-claude/thinking#preserving-thinking-blocks) +* [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching) +* [Thinking and the context window](/docs/en/build-with-claude/thinking#thinking-and-the-context-window) +* [Thinking encryption](/docs/en/build-with-claude/thinking#thinking-encryption) +* [Pricing](/docs/en/build-with-claude/thinking-steering-and-cost#pricing) (on the [Steering thinking](/docs/en/build-with-claude/thinking-steering-and-cost) page) - ```bash CLI - ant messages create \ - --stream \ - --model claude-sonnet-4-6 \ - --max-tokens 16000 \ - --thinking '{type: enabled, budget_tokens: 10000}' \ - --message '{role: user, content: What is the greatest common divisor of 1071 and 462?}' \ - --format jsonl - ``` +## Migrating to adaptive thinking - ```python Python - client = anthropic.Anthropic() +If your model supports only extended thinking (Claude Sonnet 4.5, Claude Opus 4.5, Claude Haiku 4.5, and earlier Claude 4 models), no action is needed now: adaptive thinking is not available there, and `type: "adaptive"` [returns a 400 error](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-type-adaptive). Keep `budget_tokens` until you move to a model that supports adaptive thinking, then apply the mapping that follows. - with client.messages.stream( - model="claude-sonnet-4-6", - max_tokens=16000, - thinking={"type": "enabled", "budget_tokens": 10000}, - messages=[ - { - "role": "user", - "content": "What is the greatest common divisor of 1071 and 462?", - } - ], - ) as stream: - thinking_started = False - response_started = False - - for event in stream: - if event.type == "content_block_start": - print(f"\nStarting {event.content_block.type} block...") - # Reset flags for each new block - thinking_started = False - response_started = False - elif event.type == "content_block_delta": - if event.delta.type == "thinking_delta": - if not thinking_started: - print("Thinking: ", end="", flush=True) - thinking_started = True - print(event.delta.thinking, end="", flush=True) - elif event.delta.type == "text_delta": - if not response_started: - print("Response: ", end="", flush=True) - response_started = True - print(event.delta.text, end="", flush=True) - elif event.type == "content_block_stop": - print("\nBlock complete.") - ``` +You need to migrate off `type: "enabled"` if: - ```typescript TypeScript - const client = new Anthropic(); +* You use Claude Opus 4.6 or Claude Sonnet 4.6, where `budget_tokens` is deprecated and will be removed in a future model release. +* You are moving to Claude Opus 4.7, Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, or Claude Mythos 5, where `type: "enabled"` returns a 400 error. - const stream = await client.messages.stream({ - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - messages: [ - { - role: "user", - content: "What is the greatest common divisor of 1071 and 462?" - } - ] - }); +The mapping is small: remove `budget_tokens`, set `thinking: {type: "adaptive"}`, and control reasoning depth with `output_config: {effort: ...}` instead of a token budget. - let thinkingStarted = false; - let responseStarted = false; - - for await (const event of stream) { - if (event.type === "content_block_start") { - console.log(`\nStarting ${event.content_block.type} block...`); - // Reset flags for each new block - thinkingStarted = false; - responseStarted = false; - } else if (event.type === "content_block_delta") { - if (event.delta.type === "thinking_delta") { - if (!thinkingStarted) { - process.stdout.write("Thinking: "); - thinkingStarted = true; - } - process.stdout.write(event.delta.thinking); - } else if (event.delta.type === "text_delta") { - if (!responseStarted) { - process.stdout.write("Response: "); - responseStarted = true; - } - process.stdout.write(event.delta.text); - } - } else if (event.type === "content_block_stop") { - console.log("\nBlock complete."); - } +```json +{ + "model": "claude-sonnet-4-6", + "max_tokens": 16000, + "thinking": { + "type": "enabled", + "budget_tokens": 10000 } - ``` - - ```csharp C# - AnthropicClient client = new(); - - var parameters = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 16000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 10000), - Messages = [new() { Role = Role.User, Content = "What is the greatest common divisor of 1071 and 462?" }] - }; +} +``` - bool thinkingStarted = false; - bool responseStarted = false; +becomes: - await foreach (var streamEvent in client.Messages.CreateStreaming(parameters)) - { - if (streamEvent.TryPickContentBlockStart(out var blockStart)) - { - Console.WriteLine($"\nStarting {blockStart.ContentBlock.Type} block..."); - thinkingStarted = false; - responseStarted = false; - } - else if (streamEvent.TryPickContentBlockDelta(out var blockDelta)) - { - if (blockDelta.Delta.TryPickThinking(out var thinkingDelta)) - { - if (!thinkingStarted) - { - Console.Write("Thinking: "); - thinkingStarted = true; - } - Console.Write(thinkingDelta.Thinking); - } - else if (blockDelta.Delta.TryPickText(out var textDelta)) - { - if (!responseStarted) - { - Console.Write("Response: "); - responseStarted = true; - } - Console.Write(textDelta.Text); - } - } - else if (streamEvent.TryPickContentBlockStop(out _)) - { - Console.WriteLine("\nBlock complete."); - } +```json +{ + "model": "claude-sonnet-4-6", + "max_tokens": 16000, + "thinking": { + "type": "adaptive" + }, + "output_config": { + "effort": "high" } - ``` - - ```go Go - client := anthropic.NewClient() - - stream := client.Messages.NewStreaming(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(10000), - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("What is the greatest common divisor of 1071 and 462?")), - }, - }) - - thinkingStarted := false - responseStarted := false - - for stream.Next() { - event := stream.Current() - switch eventVariant := event.AsAny().(type) { - case anthropic.ContentBlockStartEvent: - fmt.Printf("\nStarting %s block...\n", eventVariant.ContentBlock.Type) - thinkingStarted = false - responseStarted = false - case anthropic.ContentBlockDeltaEvent: - switch deltaVariant := eventVariant.Delta.AsAny().(type) { - case anthropic.ThinkingDelta: - if !thinkingStarted { - fmt.Print("Thinking: ") - thinkingStarted = true - } - fmt.Print(deltaVariant.Thinking) - case anthropic.TextDelta: - if !responseStarted { - fmt.Print("Response: ") - responseStarted = true - } - fmt.Print(deltaVariant.Text) - } - case anthropic.ContentBlockStopEvent: - fmt.Println("\nBlock complete.") - } - } - - if err := stream.Err(); err != nil { - log.Fatal(err) - } - ``` - - ```java Java - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(16000L) - .enabledThinking(10000L) - .addUserMessage("What is the greatest common divisor of 1071 and 462?") - .build(); - - try (var streamResponse = client.messages().createStreaming(params)) { - streamResponse.stream().forEach(event -> { - event.contentBlockStart().ifPresent(startEvent -> - IO.println("\nStarting block...") - ); - event.contentBlockDelta().ifPresent(deltaEvent -> { - deltaEvent.delta().thinking().ifPresent(thinkingDelta -> - IO.print(thinkingDelta.thinking()) - ); - deltaEvent.delta().text().ifPresent(textDelta -> - IO.print(textDelta.text()) - ); - }); - event.contentBlockStop().ifPresent(stopEvent -> - IO.println("\nBlock complete.") - ); - }); - } - ``` - - ```php PHP - $client = new Client(); - - $thinkingStarted = false; - $responseStarted = false; - - $stream = $client->messages->createStream( - maxTokens: 16000, - messages: [ - ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'] - ], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 10000], - ); - - foreach ($stream as $event) { - if ($event->type === 'content_block_start') { - echo "\nStarting {$event->contentBlock->type} block...\n"; - $thinkingStarted = false; - $responseStarted = false; - } elseif ($event->type === 'content_block_delta') { - if ($event->delta->type === 'thinking_delta') { - if (!$thinkingStarted) { - echo "Thinking: "; - $thinkingStarted = true; - } - echo $event->delta->thinking; - } elseif ($event->delta->type === 'text_delta') { - if (!$responseStarted) { - echo "Response: "; - $responseStarted = true; - } - echo $event->delta->text; - } - } elseif ($event->type === 'content_block_stop') { - echo "\nBlock complete.\n"; - } - } - ``` - - ```ruby Ruby - client = Anthropic::Client.new - - thinking_started = false - response_started = false - - stream = client.messages.stream( - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - messages: [ - { role: "user", content: "What is the greatest common divisor of 1071 and 462?" } - ] - ) - - stream.each do |event| - case event.type - when :content_block_start - puts "\nStarting #{event.content_block.type} block..." - thinking_started = false - response_started = false - when :content_block_delta - if event.delta.type == :thinking_delta - unless thinking_started - print "Thinking: " - thinking_started = true - end - print event.delta.thinking - elsif event.delta.type == :text_delta - unless response_started - print "Response: " - response_started = true - end - print event.delta.text - end - when :content_block_stop - puts "\nBlock complete." - end - end - ``` - - -Example streaming output: - -```sse Output -event: message_start -data: {"type": "message_start", "message": {"id": "msg_01...", "type": "message", "role": "assistant", "content": [], "model": "claude-sonnet-4-6", "stop_reason": null, "stop_sequence": null}} - -event: content_block_start -data: {"type": "content_block_start", "index": 0, "content_block": {"type": "thinking", "thinking": "", "signature": ""}} - -event: content_block_delta -data: {"type": "content_block_delta", "index": 0, "delta": {"type": "thinking_delta", "thinking": "I need to find the GCD of 1071 and 462 using the Euclidean algorithm.\n\n1071 = 2 × 462 + 147"}} - -event: content_block_delta -data: {"type": "content_block_delta", "index": 0, "delta": {"type": "thinking_delta", "thinking": "\n462 = 3 × 147 + 21\n147 = 7 × 21 + 0\n\nSo GCD(1071, 462) = 21"}} - -// Additional thinking deltas... - -event: content_block_delta -data: {"type": "content_block_delta", "index": 0, "delta": {"type": "signature_delta", "signature": "EqQBCgIYAhIM1gbcDa9GJwZA2b3hGgxBdjrkzLoky3dl1pkiMOYds..."}} - -event: content_block_stop -data: {"type": "content_block_stop", "index": 0} - -event: content_block_start -data: {"type": "content_block_start", "index": 1, "content_block": {"type": "text", "text": ""}} - -event: content_block_delta -data: {"type": "content_block_delta", "index": 1, "delta": {"type": "text_delta", "text": "The greatest common divisor of 1071 and 462 is **21**."}} - -// Additional text deltas... - -event: content_block_stop -data: {"type": "content_block_stop", "index": 1} - -event: message_delta -data: {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence": null}} - -event: message_stop -data: {"type": "message_stop"} -``` - -When `display: "omitted"` is set, the thinking block opens, a single `signature_delta` arrives, and the block closes without any `thinking_delta` events. Text streaming begins immediately after: - -```sse Output -event: content_block_start -data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""}} - -event: content_block_delta -data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EosnCkYICxIMMb3LzNrMu..."}} - -event: content_block_stop -data: {"type":"content_block_stop","index":0} - -event: content_block_start -data: {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}} -``` - - - When using streaming with thinking enabled, you might notice that text sometimes arrives in larger chunks alternating with smaller, token-by-token delivery. This is expected behavior, especially for thinking content. - - The streaming system needs to process content in batches for optimal performance, which can result in this "chunky" delivery pattern, with possible delays between streaming events. - - -## Extended thinking with tool use - -Extended thinking can be used alongside [tool use](/docs/en/agents-and-tools/tool-use/overview), allowing Claude to reason through tool selection and results processing. - -When using extended thinking with tool use, be aware of the following limitations: - -1. **Tool choice limitation:** Tool use with thinking only supports `tool_choice: {"type": "auto"}` (the default) or `tool_choice: {"type": "none"}`. Using `tool_choice: {"type": "any"}` or `tool_choice: {"type": "tool", "name": "..."}` will result in an error because these options force tool use, which is incompatible with extended thinking. - -2. **Preserving thinking blocks:** During tool use, you must pass `thinking` blocks back to the API for the last assistant message. Include the complete unmodified block back to the API to maintain reasoning continuity. - -### Toggling thinking modes in conversations - -You can't toggle thinking in the middle of an assistant turn, including during tool use loops. The entire assistant turn should operate in a single thinking mode: - -* **If thinking is enabled**, the final assistant turn should start with a thinking block. -* **If thinking is disabled**, the final assistant turn shouldn't contain any thinking blocks. - -From the model's perspective, **tool use loops are part of the assistant turn**. An assistant turn doesn't complete until Claude finishes its full response, which may include multiple tool calls and results. - -For example, this sequence is all part of a **single assistant turn**: - -```text wrap -User: "What's the weather in Paris?" -Assistant: [thinking] + [tool_use: get_weather] -User: [tool_result: "20°C, sunny"] -Assistant: [text: "The weather in Paris is 20°C and sunny"] -``` - -Even though there are multiple API messages, the tool use loop is conceptually part of one continuous assistant response. - -#### Graceful thinking degradation - -When a mid-turn thinking conflict occurs (such as toggling thinking on or off during a tool use loop), the API automatically disables thinking for that request. To preserve model quality and remain on-distribution, the API may: - -* Strip thinking blocks from the conversation when they would create an invalid turn structure -* Disable thinking for the current request when the conversation history is incompatible with thinking being enabled - -This means that attempting to toggle thinking mid-turn won't cause an error, but thinking will be silently disabled for that request. To confirm whether thinking was active, check for the presence of `thinking` blocks in the response. - -#### Practical guidance - -**Best practice:** Plan your thinking strategy at the start of each turn rather than trying to toggle mid-turn. - -**Example: Toggling thinking after completing a turn** - -```text wrap -User: "What's the weather?" -Assistant: [tool_use] (thinking disabled) -User: [tool_result] -Assistant: [text: "It's sunny"] -User: "What about tomorrow?" -Assistant: [thinking] + [text: "..."] (thinking enabled - new turn) -``` - -By completing the assistant turn before toggling thinking, you ensure that thinking is actually enabled for the new request. - - - Toggling thinking modes also invalidates prompt caching for message history. For more details, see the [Extended thinking with prompt caching](#extended-thinking-with-prompt-caching) section. - - - - - Here's a practical example showing how to preserve thinking blocks when providing tool results: - - - ```bash CLI - ant messages create --transform content <<'YAML' - model: claude-sonnet-4-6 - max_tokens: 16000 - thinking: - type: enabled - budget_tokens: 10000 - tools: - - name: get_weather - description: Get current weather for a location - input_schema: - type: object - properties: - location: - type: string - description: City name - required: - - location - messages: - - role: user - content: "What's the weather in Paris?" - YAML - ``` - - ```python Python - - client = anthropic.Anthropic() - - weather_tool = { - "name": "get_weather", - "description": "Get current weather for a location", - "input_schema": { - "type": "object", - "properties": {"location": {"type": "string", "description": "City name"}}, - "required": ["location"], - }, - } - - # First request - Claude responds with thinking and tool request - response = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=16000, - thinking={"type": "enabled", "budget_tokens": 10000}, - tools=[weather_tool], - messages=[{"role": "user", "content": "What's the weather in Paris?"}], - ) - ``` - - ```typescript TypeScript - const client = new Anthropic(); - - const weatherTool: Anthropic.Tool = { - name: "get_weather", - description: "Get current weather for a location", - input_schema: { - type: "object", - properties: { - location: { type: "string", description: "City name" } - }, - required: ["location"] - } - }; - - // First request - Claude responds with thinking and tool request - const response = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - tools: [weatherTool], - messages: [{ role: "user", content: "What's the weather in Paris?" }] - }); - ``` - - ```csharp C# - AnthropicClient client = new(); - - var weatherTool = new ToolUnion(new Tool() - { - Name = "get_weather", - Description = "Get current weather for a location", - InputSchema = new InputSchema() - { - Properties = new Dictionary - { - ["location"] = JsonSerializer.SerializeToElement(new { type = "string", description = "City name" }), - }, - Required = ["location"], - }, - }); - - var parameters = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 16000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 10000), - Tools = [weatherTool], - Messages = [new() { Role = Role.User, Content = "What's the weather in Paris?" }] - }; - - var message = await client.Messages.Create(parameters); - Console.WriteLine(message); - ``` - - ```go Go - client := anthropic.NewClient() - - weatherTool := anthropic.ToolUnionParam{ - OfTool: &anthropic.ToolParam{ - Name: "get_weather", - Description: anthropic.String("Get current weather for a location"), - InputSchema: anthropic.ToolInputSchemaParam{ - Properties: map[string]any{ - "location": map[string]any{ - "type": "string", - "description": "City name", - }, - }, - Required: []string{"location"}, - }, - }, - } - - response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(10000), - Tools: []anthropic.ToolUnionParam{weatherTool}, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")), - }, - }) - if err != nil { - log.Fatal(err) - } - fmt.Println(response) - ``` - - ```java Java - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(16000L) - .enabledThinking(10000L) - .addTool(Tool.builder() - .name("get_weather") - .description("Get current weather for a location") - .inputSchema(Tool.InputSchema.builder() - .properties(JsonValue.from(Map.of( - "location", Map.of("type", "string", "description", "City name") - ))) - .required(List.of("location")) - .build()) - .build()) - .addUserMessage("What's the weather in Paris?") - .build(); - - Message response = client.messages().create(params); - IO.println(response); - ``` - - ```php PHP - $client = new Client(); - - $weatherTool = [ - 'name' => 'get_weather', - 'description' => 'Get current weather for a location', - 'input_schema' => [ - 'type' => 'object', - 'properties' => [ - 'location' => ['type' => 'string', 'description' => 'City name'] - ], - 'required' => ['location'] - ] - ]; - - $message = $client->messages->create( - maxTokens: 16000, - messages: [ - ['role' => 'user', 'content' => "What's the weather in Paris?"] - ], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 10000], - tools: [$weatherTool], - ); - echo $message; - ``` - - ```ruby Ruby - client = Anthropic::Client.new - - weather_tool = { - name: "get_weather", - description: "Get current weather for a location", - input_schema: { - type: "object", - properties: { - location: { type: "string", description: "City name" } - }, - required: ["location"] - } - } - - message = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - tools: [weather_tool], - messages: [ - { role: "user", content: "What's the weather in Paris?" } - ] - ) - puts message - ``` - - - The API response includes thinking, text, and tool\_use blocks: - - ```json Output - { - "content": [ - { - "type": "thinking", - "thinking": "The user wants to know the current weather in Paris. I have access to a function `get_weather`...", - "signature": "BDaL4VrbR2Oj0hO4XpJxT28J5TILnCrrUXoKiiNBZW9P+nr8XSj1zuZzAl4egiCCpQNvfyUuFFJP5CncdYZEQPPmLxYsNrcs...." - }, - { - "type": "text", - "text": "I can help you get the current weather information for Paris. Let me check that for you" - }, - { - "type": "tool_use", - "id": "toolu_01CswdEQBMshySk6Y9DFKrfq", - "name": "get_weather", - "input": { - "location": "Paris" - } - } - ] - } - ``` - - Now let's continue the conversation and use the tool - - - ```bash CLI - # First turn: capture the assistant content array (thinking + tool_use, - # with signatures intact) as compact JSON. - ASSISTANT_CONTENT=$(ant messages create \ - --transform content <<'YAML' - model: claude-sonnet-4-6 - max_tokens: 16000 - thinking: - type: enabled - budget_tokens: 10000 - tools: - - name: get_weather - description: Get current weather for a location - input_schema: - type: object - properties: - location: - type: string - description: City name - required: [location] - messages: - - role: user - content: What's the weather in Paris? - YAML - ) - - TOOL_USE_ID=$(printf '%s' "$ASSISTANT_CONTENT" \ - | jq -r '.[] | select(.type == "tool_use") | .id') - - # Second turn: pass the captured blocks back as the assistant message. - # The thinking block MUST accompany the tool_use block. - ant messages create < block.type === "thinking" - ); - const toolUseBlock = response.content.find( - (block): block is Anthropic.ToolUseBlock => block.type === "tool_use" - ); - - // Call your actual weather API, here is where your actual API call would go - // Let's pretend this is what we get back - const weatherData = { temperature: 88 }; - - if (thinkingBlock && toolUseBlock) { - // Second request - Include thinking block and tool result - // No new thinking blocks are generated in the response - const continuation = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - tools: [weatherTool], - messages: [ - { role: "user", content: "What's the weather in Paris?" }, - // notice that the thinkingBlock is passed in as well as the toolUseBlock - // if this is not passed in, an error is raised - { role: "assistant", content: [thinkingBlock, toolUseBlock] }, - { - role: "user", - content: [ - { - type: "tool_result" as const, - tool_use_id: toolUseBlock.id, - content: `Current temperature: ${weatherData.temperature}°F` - } - ] - } - ] - }); - console.log(continuation); - } - ``` - - ```csharp C# - AnthropicClient client = new(); - - var weatherTool = new ToolUnion(new Tool() - { - Name = "get_weather", - Description = "Get current weather for a location", - InputSchema = new InputSchema() - { - Properties = new Dictionary - { - ["location"] = JsonSerializer.SerializeToElement(new { type = "string", description = "City name" }), - }, - Required = ["location"], - }, - }); - - var parameters = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 16000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 10000), - Tools = [weatherTool], - Messages = [ - new() { Role = Role.User, Content = "What's the weather in Paris?" } - ] - }; - - var response = await client.Messages.Create(parameters); - - // Extract the tool_use block to get its ID for the tool result - ToolUseBlock? toolUseBlock = null; - foreach (var block in response.Content) - { - if (block.TryPickToolUse(out var toolUse)) - { - toolUseBlock = toolUse; - } - } - - var weatherData = new { temperature = 88 }; - - // Build continuation with tool result - var continuationParams = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 16000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 10000), - Tools = [weatherTool], - Messages = [ - new() { Role = Role.User, Content = "What's the weather in Paris?" }, - // response.Content includes the thinking blocks; passing them back is required - new() { Role = Role.Assistant, Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList() }, - new() { Role = Role.User, Content = new MessageParamContent(new List - { - new ContentBlockParam(new ToolResultBlockParam() - { - ToolUseID = toolUseBlock?.ID ?? "", - Content = $"Current temperature: {weatherData.temperature}°F" - }) - })} - ] - }; - - var continuation = await client.Messages.Create(continuationParams); - Console.WriteLine(continuation); - ``` - - ```go Go - client := anthropic.NewClient() - - weatherTool := anthropic.ToolUnionParam{ - OfTool: &anthropic.ToolParam{ - Name: "get_weather", - Description: anthropic.String("Get current weather for a location"), - InputSchema: anthropic.ToolInputSchemaParam{ - Properties: map[string]any{ - "location": map[string]any{ - "type": "string", - "description": "City name", - }, - }, - Required: []string{"location"}, - }, - }, - } - - response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(10000), - Tools: []anthropic.ToolUnionParam{weatherTool}, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")), - }, - }) - if err != nil { - log.Fatal(err) - } - - var toolUseBlock anthropic.ToolUseBlock - for _, block := range response.Content { - switch v := block.AsAny().(type) { - case anthropic.ToolUseBlock: - toolUseBlock = v - } - } - - weatherData := map[string]int{"temperature": 88} - - continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 16000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(10000), - Tools: []anthropic.ToolUnionParam{weatherTool}, - Messages: []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")), - response.ToParam(), - anthropic.NewUserMessage( - anthropic.NewToolResultBlock(toolUseBlock.ID, fmt.Sprintf("Current temperature: %d°F", weatherData["temperature"]), false), - ), - }, - }) - if err != nil { - log.Fatal(err) - } - - fmt.Println(continuation) - ``` - - ```java Java - import com.anthropic.models.messages.ThinkingBlock; - import com.anthropic.models.messages.ThinkingBlockParam; - // ... - void main() { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - Tool weatherTool = Tool.builder() - .name("get_weather") - .description("Get current weather for a location") - .inputSchema(Tool.InputSchema.builder() - .properties(JsonValue.from(Map.of( - "location", Map.of("type", "string", "description", "City name") - ))) - .required(List.of("location")) - .build()) - .build(); - - MessageCreateParams initialParams = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(16000L) - .enabledThinking(10000L) - .addTool(weatherTool) - .addUserMessage("What's the weather in Paris?") - .build(); - - Message response = client.messages().create(initialParams); - - ThinkingBlock thinkingBlock = null; - ToolUseBlock toolUseBlock = null; - for (var block : response.content()) { - if (block.thinking().isPresent()) { - thinkingBlock = block.thinking().get(); - } - if (block.toolUse().isPresent()) { - toolUseBlock = block.toolUse().get(); - } - } - - int temperature = 88; - - // Second request: pass back thinking block and tool result - MessageCreateParams continuationParams = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(16000L) - .enabledThinking(10000L) - .addTool(weatherTool) - .addUserMessage("What's the weather in Paris?") - .addAssistantMessageOfBlockParams(List.of( - ContentBlockParam.ofThinking(ThinkingBlockParam.builder() - .thinking(thinkingBlock.thinking()) - .signature(thinkingBlock.signature()) - .build()), - ContentBlockParam.ofToolUse(ToolUseBlockParam.builder() - .id(toolUseBlock.id()) - .name(toolUseBlock.name()) - .input(toolUseBlock._input()) - .build()) - )) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder() - .toolUseId(toolUseBlock.id()) - .content("Current temperature: " + temperature + "°F") - .build() - ) - )) - .build(); - - Message continuation = client.messages().create(continuationParams); - IO.println(continuation); - } - ``` - - ```php PHP - $client = new Client(); - - $weatherTool = [ - 'name' => 'get_weather', - 'description' => 'Get current weather for a location', - 'input_schema' => [ - 'type' => 'object', - 'properties' => [ - 'location' => [ - 'type' => 'string', - 'description' => 'City name' - ] - ], - 'required' => ['location'] - ] - ]; - - $response = $client->messages->create( - maxTokens: 16000, - messages: [ - ['role' => 'user', 'content' => "What's the weather in Paris?"] - ], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 10000], - tools: [$weatherTool], - ); - - $thinkingBlock = null; - $toolUseBlock = null; - foreach ($response->content as $block) { - if ($block->type === 'thinking') { - $thinkingBlock = $block; - } - if ($block->type === 'tool_use') { - $toolUseBlock = $block; - } - } - - $weatherData = ['temperature' => 88]; - - $continuation = $client->messages->create( - maxTokens: 16000, - messages: [ - ['role' => 'user', 'content' => "What's the weather in Paris?"], - ['role' => 'assistant', 'content' => [$thinkingBlock, $toolUseBlock]], - ['role' => 'user', 'content' => [ - [ - 'type' => 'tool_result', - 'tool_use_id' => $toolUseBlock->id, - 'content' => "Current temperature: {$weatherData['temperature']}°F" - ] - ]] - ], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 10000], - tools: [$weatherTool], - ); - - echo $continuation; - ``` - - ```ruby Ruby - client = Anthropic::Client.new - - weather_tool = { - name: "get_weather", - description: "Get current weather for a location", - input_schema: { - type: "object", - properties: { - location: { type: "string", description: "City name" } - }, - required: ["location"] - } - } - - response = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - tools: [weather_tool], - messages: [ - { role: "user", content: "What's the weather in Paris?" } - ] - ) - - thinking_block = response.content.find { |block| block.type == :thinking } - tool_use_block = response.content.find { |block| block.type == :tool_use } - - raise "No tool_use block found" unless tool_use_block - - weather_data = { temperature: 88 } - - continuation = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 16000, - thinking: { - type: "enabled", - budget_tokens: 10000 - }, - tools: [weather_tool], - messages: [ - { role: "user", content: "What's the weather in Paris?" }, - { role: "assistant", content: [thinking_block, tool_use_block] }, - { role: "user", content: [ - { - type: "tool_result", - tool_use_id: tool_use_block.id, - content: "Current temperature: #{weather_data[:temperature]}°F" - } - ] } - ] - ) - - puts continuation - ``` - - - The API response now includes **only** text - - ```json Output - { - "content": [ - { - "type": "text", - "text": "Currently in Paris, the temperature is 88°F (31°C)" - } - ] - } - ``` - - - -### Preserving thinking blocks - -During tool use, you must pass `thinking` blocks back to the API, and you must include the complete unmodified block back to the API. This is critical for maintaining the model's reasoning flow and conversation integrity. - - - While you can omit `thinking` blocks from prior `assistant` role turns, always pass back all thinking blocks to the API for any multi-turn conversation. The API: - - * Automatically filters the provided thinking blocks - * Uses the relevant thinking blocks necessary to preserve the model's reasoning - * Only bills for the input tokens for the blocks shown to Claude - - Which blocks are kept depends on the model. See [Thinking block preservation by model](#thinking-block-preservation-in-claude-opus-45-and-later) for the per-class defaults. To override the default, use the [`clear_thinking_20251015` context-editing strategy](/docs/en/build-with-claude/context-editing#thinking-block-clearing). - - - - When toggling thinking modes during a conversation, remember that the entire assistant turn (including tool use loops) must operate in a single thinking mode. For more details, see [Toggling thinking modes in conversations](#toggling-thinking-modes-in-conversations). - - -When Claude calls tools, it is pausing its construction of a response to await external information. When tool results are returned, Claude continues building that existing response. This necessitates preserving thinking blocks during tool use, for a couple of reasons: - -1. **Reasoning continuity:** The thinking blocks capture Claude's step-by-step reasoning that led to tool requests. When you post tool results, including the original thinking ensures Claude can continue its reasoning from where it left off. - -2. **Context maintenance:** While tool results appear as user messages in the API structure, they're part of a continuous reasoning flow. Preserving thinking blocks maintains this conceptual flow across multiple API calls. For more information on context management, see the [guide on context windows](/docs/en/build-with-claude/context-windows). - -**Important:** When providing `thinking` blocks, the entire sequence of consecutive `thinking` blocks must match the outputs generated by the model during the original request; you can't rearrange or modify the sequence of these blocks. - - - If thinking blocks are modified, the API returns a 400 `invalid_request_error` whose message contains `` `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified ``. The most common cause is application code that filters content blocks by type and drops `redacted_thinking` blocks, or that rebuilds the assistant message instead of echoing it. See [Thinking blocks cannot be modified](/docs/en/api/errors#thinking-blocks-cannot-be-modified) for the full error and fix steps. - - -### Interleaved thinking - -Extended thinking with tool use in Claude 4 models supports interleaved thinking, which enables Claude to think between tool calls and make more sophisticated reasoning after receiving tool results. - -With interleaved thinking, Claude can: - -* Reason about the results of a tool call before deciding what to do next -* Chain multiple tool calls with reasoning steps in between -* Make more nuanced decisions based on intermediate results - -How you enable interleaved thinking depends on the model: - -| Model | Interleaved thinking | -| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Claude Fable 5 Claude Mythos 5 | Automatic with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). Inter-tool reasoning moves into thinking blocks. No beta header needed. | -| [Claude Mythos Preview](https://anthropic.com/glasswing) | Automatic. Every inter-tool reasoning step moves into a thinking block instead of plain text. No beta header needed or supported. | -| Claude Opus 4.8 | Automatic with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (the only supported thinking mode). No beta header needed. | -| Claude Opus 4.7 | Automatic with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (the only supported thinking mode). No beta header needed. | -| Claude Opus 4.6 | Automatic with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). The `interleaved-thinking-2025-05-14` beta header is deprecated and safely ignored if included. | -| Claude Sonnet 5 | Automatic with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). The `interleaved-thinking-2025-05-14` beta header is deprecated and safely ignored if included. | -| Claude Sonnet 4.6 | Automatic with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (recommended). The beta header with manual `type: "enabled"` is still functional but deprecated. | -| Claude Opus 4.5 | Add the `interleaved-thinking-2025-05-14` [beta header](/docs/en/api/beta-headers) to your API request. | -| Claude Haiku 4.5 | Not supported. The beta header is accepted on the Claude API but ignored. | -| Earlier Claude 4 models | Add the `interleaved-thinking-2025-05-14` [beta header](/docs/en/api/beta-headers) to your API request. | - -Earlier Claude 4 models here means Claude Sonnet 4.5, Claude Opus 4.1 (deprecated), Claude Opus 4 ([retired, except on Google Cloud](/docs/en/about-claude/model-deprecations)), and Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](/docs/en/about-claude/model-deprecations)). - -Here are some important considerations for interleaved thinking: - -* With interleaved thinking, the `budget_tokens` can exceed the `max_tokens` parameter, as it represents the total budget across all thinking blocks within one assistant turn. -* Interleaved thinking is only supported for [tools used through the Messages API](/docs/en/agents-and-tools/tool-use/overview). -* The Claude API and [Claude Platform on AWS](/docs/en/build-with-claude/claude-platform-on-aws) accept `interleaved-thinking-2025-05-14` in requests to any model without returning an error. On models that don't support interleaved thinking, the header is ignored. On Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 5, it's deprecated and safely ignored. On Claude Mythos Preview, it's not needed and safely ignored. -* On partner-operated platforms (for example, [Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock) and [Google Cloud](/docs/en/build-with-claude/claude-on-vertex-ai)), if you pass `interleaved-thinking-2025-05-14` to any model aside from Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, Claude Opus 4.6, Claude Sonnet 4.6, Claude Opus 4.5, Claude Opus 4.1 (deprecated), Opus 4 ([retired, except on Google Cloud](/docs/en/about-claude/model-deprecations)), Sonnet 4.5, or Sonnet 4 ([retired, except on Bedrock and Google Cloud](/docs/en/about-claude/model-deprecations)), your request will fail. - - - - Without interleaved thinking, Claude thinks once at the start of the assistant turn. Subsequent responses after tool results continue without new thinking blocks. - - ```text - User: "What's the total revenue if we sold 150 units at $50 each, - and how does this compare to our average monthly revenue?" - - Turn 1: [thinking] "I need to calculate 150 * $50, then check the database..." - [tool_use: calculator] { "expression": "150 * 50" } - ↓ tool result: "7500" - - Turn 2: [tool_use: database_query] { "query": "SELECT AVG(revenue)..." } - ↑ no thinking block - ↓ tool result: "5200" - - Turn 3: [text] "The total revenue is $7,500, which is 44% above your - average monthly revenue of $5,200." - ↑ no thinking block - ``` - - - - With interleaved thinking enabled, Claude can think after receiving each tool result, allowing it to reason about intermediate results before continuing. - - ```text - User: "What's the total revenue if we sold 150 units at $50 each, - and how does this compare to our average monthly revenue?" - - Turn 1: [thinking] "I need to calculate 150 * $50 first..." - [tool_use: calculator] { "expression": "150 * 50" } - ↓ tool result: "7500" - - Turn 2: [thinking] "Got $7,500. Now I should query the database to compare..." - [tool_use: database_query] { "query": "SELECT AVG(revenue)..." } - ↑ thinking after receiving calculator result - ↓ tool result: "5200" - - Turn 3: [thinking] "$7,500 vs $5,200 average - that's a 44% increase..." - [text] "The total revenue is $7,500, which is 44% above your - average monthly revenue of $5,200." - ↑ thinking before final answer - ``` - - - -## Extended thinking with prompt caching - -[Prompt caching](/docs/en/build-with-claude/prompt-caching) with thinking has several important considerations: - - - Extended thinking tasks often take longer than 5 minutes to complete. Consider using the [1-hour cache duration](/docs/en/build-with-claude/prompt-caching#1-hour-cache-duration) to maintain cache hits across longer thinking sessions and multistep workflows. - - -**Thinking block context removal** - -* On earlier Opus/Sonnet models and all Haiku models, thinking blocks from previous turns are removed from context, which can affect cache breakpoints. On Opus 4.5+ and Sonnet 4.6+, they are kept by default. -* When continuing conversations with tool use, thinking blocks are cached and count as input tokens when read from cache. -* This creates a tradeoff: while thinking blocks don't consume context window space visually, they still count toward your input token usage when cached. -* If thinking becomes disabled and you pass thinking content in the current tool use turn, the thinking content will be stripped and thinking will remain disabled for that request. - -**Cache invalidation patterns** - -* Changes to thinking parameters (enabled/disabled or budget allocation) invalidate message cache breakpoints -* [Interleaved thinking](#interleaved-thinking) amplifies cache invalidation, as thinking blocks can occur between multiple [tool calls](#extended-thinking-with-tool-use) -* System prompts and tools remain cached despite thinking parameter changes or block removal - - - On earlier Opus/Sonnet models and all Haiku models, thinking blocks are removed for caching and context calculations; on Opus 4.5+ and Sonnet 4.6+, they are kept by default. In either case, they must be preserved when continuing conversations with [tool use](#extended-thinking-with-tool-use), especially with [interleaved thinking](#interleaved-thinking). - - -### Understanding thinking block caching behavior - -When using extended thinking with tool use, thinking blocks exhibit specific caching behavior that affects token counting: - -**How it works:** - -1. Caching only occurs when you make a subsequent request that includes tool results -2. When the subsequent request is made, the previous conversation history (including thinking blocks) can be cached -3. These cached thinking blocks count as input tokens in your usage metrics when read from the cache -4. When a non-tool-result user block is included: on Opus 4.5+ and Sonnet 4.6+, previous thinking blocks are kept; on earlier Opus/Sonnet models and all Haiku models, all previous thinking blocks are ignored and stripped from context - -**Detailed example flow:** - -**Request 1:** - -```text wrap -User: "What's the weather in Paris?" -``` - -**Response 1:** - -```text wrap -[thinking_block_1] + [tool_use block 1] -``` - -**Request 2:** - -```text wrap -User: ["What's the weather in Paris?"], -Assistant: [thinking_block_1] + [tool_use block 1], -User: [tool_result_1, cache=True] -``` - -**Response 2:** - -```text wrap -[thinking_block_2] + [text block 2] -``` - -Request 2 writes a cache of the request content (not the response). The cache includes the original user message, the first thinking block, tool use block, and the tool result. - -**Request 3:** - -```text wrap -User: ["What's the weather in Paris?"], -Assistant: [thinking_block_1] + [tool_use block 1], -User: [tool_result_1, cache=True], -Assistant: [thinking_block_2] + [text block 2], -User: [Text response, cache=True] -``` - -For Opus 4.5+ and Sonnet 4.6+, all previous thinking blocks are kept by default. For earlier Opus/Sonnet models and all Haiku models, because a non-tool-result user block was included, all previous thinking blocks are ignored and stripped from context. This request will be processed the same as: - -```text wrap -User: ["What's the weather in Paris?"], -Assistant: [tool_use block 1], -User: [tool_result_1, cache=True], -Assistant: [text block 2], -User: [Text response, cache=True] -``` - -**Key points:** - -* This caching behavior happens automatically, even without explicit `cache_control` markers -* This behavior is consistent whether using regular thinking or interleaved thinking - - - - - ```bash CLI - # Fetch ~10 kB of Pride and Prejudice for the cached system block - curl -s https://www.gutenberg.org/cache/epub/1342/pg1342.txt \ - | head -c 10000 > pride.txt - - # Emit a request body for the given thinking budget. Once CONTENT1 - # is populated (after the first turn), the assistant reply and a - # follow-up user message are appended so the conversation grows. - build_body() { - cat <- - You are an AI assistant that is tasked with literary analysis. - Analyze the following text carefully. - - type: text - text: "@./pride.txt" - cache_control: - type: ephemeral - messages: - - role: user - content: Analyze the tone of this passage. - YAML - if [[ -n "${CONTENT1:-}" ]]; then - printf ' - role: assistant\n content: %s\n' "$CONTENT1" - printf ' - role: user\n' - printf ' content: Analyze the characters in this passage.\n' - fi - } - - # First request (budget 4000): establishes the cache. Capture usage - # and content as two jsonl lines so the reply can be fed forward. - printf 'First request - establishing cache\n' - { - read -r USAGE1 - read -r CONTENT1 - } < <(build_body 4000 \ - | ant messages create --transform '[usage,content]' --format jsonl) - printf 'First response usage: %s\n' "$USAGE1" - - # Second request: same budget, system-prompt cache hit expected. - printf '\nSecond request - same thinking parameters (cache hit expected)\n' - USAGE2=$(build_body 4000 \ - | ant messages create --transform usage --format jsonl) - printf 'Second response usage: %s\n' "$USAGE2" - - # Third request: budget changed to 8000. The cached system prompt - # still hits; only message-block caching is invalidated. - printf '\nThird request - different thinking parameters (cache miss for messages)\n' - USAGE3=$(build_body 8000 \ - | ant messages create --transform usage --format jsonl) - printf 'Third response usage: %s\n' "$USAGE3" - ``` - - ```python Python - import requests - from bs4 import BeautifulSoup - - client = Anthropic() - - - def fetch_article_content(url): - response = requests.get(url) - soup = BeautifulSoup(response.content, "html.parser") - - # Remove script and style elements - for script in soup(["script", "style"]): - script.decompose() - - # Get text - text = soup.get_text() - - # Break into lines and remove leading and trailing space on each - lines = (line.strip() for line in text.splitlines()) - # Split double-space-separated phrases onto their own lines - chunks = (phrase.strip() for line in lines for phrase in line.split(" ")) - # Drop blank lines - text = "\n".join(chunk for chunk in chunks if chunk) - - return text - - - # Fetch the content of the article - book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - book_content = fetch_article_content(book_url) - # Use just enough text for caching (first few chapters) - LARGE_TEXT = book_content[:10000] - - SYSTEM_PROMPT = [ - { - "type": "text", - "text": "You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully.", - }, - {"type": "text", "text": LARGE_TEXT, "cache_control": {"type": "ephemeral"}}, - ] - - MESSAGES = [{"role": "user", "content": "Analyze the tone of this passage."}] - - # First request - establish cache - print("First request - establishing cache") - response1 = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=20000, - thinking={"type": "enabled", "budget_tokens": 4000}, - system=SYSTEM_PROMPT, - messages=MESSAGES, - ) - - print(f"First response usage: {response1.usage}") - - MESSAGES.append({"role": "assistant", "content": response1.content}) - MESSAGES.append({"role": "user", "content": "Analyze the characters in this passage."}) - # Second request - same thinking parameters (cache hit expected) - print("\nSecond request - same thinking parameters (cache hit expected)") - response2 = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=20000, - thinking={"type": "enabled", "budget_tokens": 4000}, - system=SYSTEM_PROMPT, - messages=MESSAGES, - ) - - print(f"Second response usage: {response2.usage}") - - # Third request - different thinking parameters (cache miss for messages) - print("\nThird request - different thinking parameters (cache miss for messages)") - response3 = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=20000, - thinking={ - "type": "enabled", - "budget_tokens": 8000, # Changed thinking budget - }, - system=SYSTEM_PROMPT, # System prompt remains cached - messages=MESSAGES, # Messages cache is invalidated - ) - - print(f"Third response usage: {response3.usage}") - ``` - - ```typescript TypeScript - import axios from "axios"; - import * as cheerio from "cheerio"; - - const client = new Anthropic(); - - async function fetchArticleContent(url: string): Promise { - const response = await axios.get(url); - const $ = cheerio.load(response.data); - $("script, style").remove(); - let text = $.text(); - const lines = text.split("\n").map((line) => line.trim()); - text = lines.filter((line) => line.length > 0).join("\n"); - return text; - } - - const bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - const bookContent = await fetchArticleContent(bookUrl); - const LARGE_TEXT = bookContent.slice(0, 10000); - - const SYSTEM_PROMPT: Anthropic.TextBlockParam[] = [ - { - type: "text", - text: "You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully." - }, - { - type: "text", - text: LARGE_TEXT, - cache_control: { type: "ephemeral" } - } - ]; - - const messages: Anthropic.MessageParam[] = [ - { role: "user", content: "Analyze the tone of this passage." } - ]; - - // First request - establish cache - console.log("First request - establishing cache"); - const response1 = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { type: "enabled", budget_tokens: 4000 }, - system: SYSTEM_PROMPT, - messages - }); - - console.log(`First response usage: ${JSON.stringify(response1.usage)}`); - - messages.push({ - role: "assistant", - content: response1.content - }); - messages.push({ - role: "user", - content: "Analyze the characters in this passage." - }); - - // Second request - same thinking parameters (cache hit expected) - console.log("\nSecond request - same thinking parameters (cache hit expected)"); - const response2 = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { type: "enabled", budget_tokens: 4000 }, - system: SYSTEM_PROMPT, - messages - }); - - console.log(`Second response usage: ${JSON.stringify(response2.usage)}`); - - // Third request - different thinking parameters (cache miss for messages) - console.log("\nThird request - different thinking parameters (cache miss for messages)"); - const response3 = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { type: "enabled", budget_tokens: 8000 }, - system: SYSTEM_PROMPT, - messages - }); - - console.log(`Third response usage: ${JSON.stringify(response3.usage)}`); - ``` - - ```csharp C# - AnthropicClient client = new(); - - // Fetch book content - using var httpClient = new HttpClient(); - var bookContent = await httpClient.GetStringAsync("https://www.gutenberg.org/cache/epub/1342/pg1342.txt"); - var largeText = bookContent.Substring(0, Math.Min(10000, bookContent.Length)); - - var systemPrompt = new MessageCreateParamsSystem(new List - { - new TextBlockParam() - { - Text = "You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully." - }, - new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }, - }); - - var messages = new List - { - new() { Role = Role.User, Content = "Analyze the tone of this passage." } - }; - - // First request - establish cache - Console.WriteLine("First request - establishing cache"); - var parameters1 = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 20000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 4000), - System = systemPrompt, - Messages = messages - }; - - var response1 = await client.Messages.Create(parameters1); - Console.WriteLine($"First response usage: {response1.Usage}"); - - messages.Add(new() { Role = Role.Assistant, Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() }); - messages.Add(new() { Role = Role.User, Content = "Analyze the characters in this passage." }); - - // Second request - same thinking parameters (cache hit expected) - Console.WriteLine("\nSecond request - same thinking parameters (cache hit expected)"); - var parameters2 = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 20000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 4000), - System = systemPrompt, - Messages = messages - }; - - var response2 = await client.Messages.Create(parameters2); - Console.WriteLine($"Second response usage: {response2.Usage}"); - - // Third request - different thinking parameters (cache miss for messages) - Console.WriteLine("\nThird request - different thinking parameters (cache miss for messages)"); - var parameters3 = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 20000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 8000), - System = systemPrompt, - Messages = messages - }; - - var response3 = await client.Messages.Create(parameters3); - Console.WriteLine($"Third response usage: {response3.Usage}"); - ``` - - ```go Go - client := anthropic.NewClient() - - // Fetch book content - resp, err := http.Get("https://www.gutenberg.org/cache/epub/1342/pg1342.txt") - if err != nil { - log.Fatal(err) - } - defer resp.Body.Close() - - body, err := io.ReadAll(resp.Body) - if err != nil { - log.Fatal(err) - } - - largeText := string(body) - if len(largeText) > 10000 { - largeText = largeText[:10000] - } - - systemPrompt := []anthropic.TextBlockParam{ - {Text: "You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully."}, - { - Text: largeText, - CacheControl: anthropic.NewCacheControlEphemeralParam(), - }, - } - - messages := []anthropic.MessageParam{ - anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the tone of this passage.")), - } - - // First request - establish cache - fmt.Println("First request - establishing cache") - response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 20000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(4000), - System: systemPrompt, - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - - fmt.Printf("First response usage: %s\n", response1.Usage.RawJSON()) - - messages = append(messages, response1.ToParam()) - messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the characters in this passage."))) - - // Second request - same thinking parameters (cache hit expected) - fmt.Println("\nSecond request - same thinking parameters (cache hit expected)") - response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 20000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(4000), - System: systemPrompt, - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - - fmt.Printf("Second response usage: %s\n", response2.Usage.RawJSON()) - - // Third request - different thinking parameters (cache miss for messages) - fmt.Println("\nThird request - different thinking parameters (cache miss for messages)") - response3, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 20000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(8000), - System: systemPrompt, - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - - fmt.Printf("Third response usage: %s\n", response3.Usage.RawJSON()) - ``` - - ```java Java - import com.anthropic.models.messages.CacheControlEphemeral; - // ... - void main() throws Exception { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - // Fetch book content - HttpClient httpClient = HttpClient.newHttpClient(); - HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create("https://www.gutenberg.org/cache/epub/1342/pg1342.txt")) - .build(); - HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); - String bookContent = response.body(); - String largeText = bookContent.substring(0, Math.min(10000, bookContent.length())); - - List systemPrompt = List.of( - TextBlockParam.builder() - .text("You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully.") - .build(), - TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build() - ); - - // First request - establish cache - IO.println("First request - establishing cache"); - MessageCreateParams params1 = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(20000L) - .enabledThinking(4000L) - .systemOfTextBlockParams(systemPrompt) - .addUserMessage("Analyze the tone of this passage.") - .build(); - - Message response1 = client.messages().create(params1); - IO.println("First response usage: " + response1.usage()); - - // Second request - same thinking parameters (cache hit expected) - IO.println("\nSecond request - same thinking parameters (cache hit expected)"); - MessageCreateParams params2 = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(20000L) - .enabledThinking(4000L) - .systemOfTextBlockParams(systemPrompt) - .addUserMessage("Analyze the tone of this passage.") - .addAssistantMessageOfBlockParams(response1.content().stream() - .map(block -> block.toParam()) - .collect(java.util.stream.Collectors.toList())) - .addUserMessage("Analyze the characters in this passage.") - .build(); - - Message response2 = client.messages().create(params2); - IO.println("Second response usage: " + response2.usage()); - - // Third request - different thinking parameters (cache miss for messages) - IO.println("\nThird request - different thinking parameters (cache miss for messages)"); - MessageCreateParams params3 = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(20000L) - .enabledThinking(8000L) - .systemOfTextBlockParams(systemPrompt) - .addUserMessage("Analyze the tone of this passage.") - .addAssistantMessageOfBlockParams(response1.content().stream() - .map(block -> block.toParam()) - .collect(java.util.stream.Collectors.toList())) - .addUserMessage("Analyze the characters in this passage.") - .build(); - - Message response3 = client.messages().create(params3); - IO.println("Third response usage: " + response3.usage()); - } - ``` - - ```php PHP - $client = new Client(); - - // Fetch book content - $bookContent = file_get_contents("https://www.gutenberg.org/cache/epub/1342/pg1342.txt"); - $largeText = substr($bookContent, 0, 10000); - - $systemPrompt = [ - [ - 'type' => 'text', - 'text' => 'You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully.' - ], - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ] - ]; - - $messages = [ - ['role' => 'user', 'content' => 'Analyze the tone of this passage.'] - ]; - - // First request - establish cache - echo "First request - establishing cache\n"; - $response1 = $client->messages->create( - maxTokens: 20000, - messages: $messages, - model: 'claude-sonnet-4-6', - system: $systemPrompt, - thinking: ['type' => 'enabled', 'budget_tokens' => 4000], - ); - - echo "First response usage: " . json_encode($response1->usage) . "\n"; - - $messages[] = ['role' => 'assistant', 'content' => $response1->content]; - $messages[] = ['role' => 'user', 'content' => 'Analyze the characters in this passage.']; - - // Second request - same thinking parameters (cache hit expected) - echo "\nSecond request - same thinking parameters (cache hit expected)\n"; - $response2 = $client->messages->create( - maxTokens: 20000, - messages: $messages, - model: 'claude-sonnet-4-6', - system: $systemPrompt, - thinking: ['type' => 'enabled', 'budget_tokens' => 4000], - ); - - echo "Second response usage: " . json_encode($response2->usage) . "\n"; - - // Third request - different thinking parameters (cache miss for messages) - echo "\nThird request - different thinking parameters (cache miss for messages)\n"; - $response3 = $client->messages->create( - maxTokens: 20000, - messages: $messages, - model: 'claude-sonnet-4-6', - system: $systemPrompt, - thinking: ['type' => 'enabled', 'budget_tokens' => 8000], - ); - - echo "Third response usage: " . json_encode($response3->usage) . "\n"; - ``` - - ```ruby Ruby - require "net/http" - require "uri" - - client = Anthropic::Client.new - - # Fetch book content - uri = URI("https://www.gutenberg.org/cache/epub/1342/pg1342.txt") - response = Net::HTTP.get_response(uri) - book_content = response.body - large_text = book_content[0...10000] - - system_prompt = [ - { - type: "text", - text: "You are an AI assistant that is tasked with literary analysis. Analyze the following text carefully." - }, - { - type: "text", - text: large_text, - cache_control: { type: "ephemeral" } - } - ] - - messages = [ - { role: "user", content: "Analyze the tone of this passage." } - ] - - # First request - establish cache - puts "First request - establishing cache" - response1 = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { - type: "enabled", - budget_tokens: 4000 - }, - system: system_prompt, - messages: messages - ) - - puts "First response usage: #{response1.usage}" - - messages << { role: "assistant", content: response1.content } - messages << { role: "user", content: "Analyze the characters in this passage." } - - # Second request - same thinking parameters (cache hit expected) - puts "\nSecond request - same thinking parameters (cache hit expected)" - response2 = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { - type: "enabled", - budget_tokens: 4000 - }, - system: system_prompt, - messages: messages - ) - - puts "Second response usage: #{response2.usage}" - - # Third request - different thinking parameters (cache miss for messages) - puts "\nThird request - different thinking parameters (cache miss for messages)" - response3 = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { - type: "enabled", - budget_tokens: 8000 - }, - system: system_prompt, - messages: messages - ) - - puts "Third response usage: #{response3.usage}" - ``` - - - - - - ```bash CLI - # This workflow doesn't translate well to a one-off shell command. - # See the SDK tabs for the multi-turn pattern; the per-turn CLI - # invocation is identical to the earlier prompt-caching example. - ``` - - ```python Python - import requests - from bs4 import BeautifulSoup - - client = Anthropic() - - - def fetch_article_content(url): - response = requests.get(url) - soup = BeautifulSoup(response.content, "html.parser") - - # Remove script and style elements - for script in soup(["script", "style"]): - script.decompose() - - # Get text - text = soup.get_text() - - # Break into lines and remove leading and trailing space on each - lines = (line.strip() for line in text.splitlines()) - # Split double-space-separated phrases onto their own lines - chunks = (phrase.strip() for line in lines for phrase in line.split(" ")) - # Drop blank lines - text = "\n".join(chunk for chunk in chunks if chunk) - - return text - - - # Fetch the content of the article - book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - book_content = fetch_article_content(book_url) - # Use just enough text for caching (first few chapters) - LARGE_TEXT = book_content[:10000] - - # No system prompt - caching in messages instead - MESSAGES = [ - { - "role": "user", - "content": [ - { - "type": "text", - "text": LARGE_TEXT, - "cache_control": {"type": "ephemeral"}, - }, - {"type": "text", "text": "Analyze the tone of this passage."}, - ], - } - ] - - # First request - establish cache - print("First request - establishing cache") - response1 = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=20000, - thinking={"type": "enabled", "budget_tokens": 4000}, - messages=MESSAGES, - ) - - print(f"First response usage: {response1.usage}") - - MESSAGES.append({"role": "assistant", "content": response1.content}) - MESSAGES.append({"role": "user", "content": "Analyze the characters in this passage."}) - # Second request - same thinking parameters (cache hit expected) - print("\nSecond request - same thinking parameters (cache hit expected)") - response2 = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=20000, - thinking={ - "type": "enabled", - "budget_tokens": 4000, # Same thinking budget - }, - messages=MESSAGES, - ) - - print(f"Second response usage: {response2.usage}") - - MESSAGES.append({"role": "assistant", "content": response2.content}) - MESSAGES.append({"role": "user", "content": "Analyze the setting in this passage."}) - - # Third request - different thinking budget (cache miss expected) - print("\nThird request - different thinking budget (cache miss expected)") - response3 = client.messages.create( - model="claude-sonnet-4-6", - max_tokens=20000, - thinking={ - "type": "enabled", - "budget_tokens": 8000, # Different thinking budget breaks cache - }, - messages=MESSAGES, - ) - - print(f"Third response usage: {response3.usage}") - ``` - - ```typescript TypeScript - import axios from "axios"; - import * as cheerio from "cheerio"; - - const client = new Anthropic(); - - async function fetchArticleContent(url: string): Promise { - const response = await axios.get(url); - const $ = cheerio.load(response.data); - - // Remove script and style elements - $("script, style").remove(); - - // Get text - let text = $.text(); - - // Clean up text (break into lines, remove whitespace) - const lines = text.split("\n").map((line) => line.trim()); - const chunks = lines.flatMap((line) => line.split(" ").map((phrase) => phrase.trim())); - text = chunks.filter((chunk) => chunk).join("\n"); - - return text; - } - - const bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - const bookContent = await fetchArticleContent(bookUrl); - const LARGE_TEXT = bookContent.substring(0, 10000); - - // No system prompt - caching in messages instead - const messages: Anthropic.MessageParam[] = [ - { - role: "user", - content: [ - { - type: "text", - text: LARGE_TEXT, - cache_control: { type: "ephemeral" } - }, - { - type: "text", - text: "Analyze the tone of this passage." - } - ] - } - ]; - - // First request - establish cache - console.log("First request - establishing cache"); - const response1 = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { type: "enabled", budget_tokens: 4000 }, - messages - }); - - console.log("First response usage: ", response1.usage); - - messages.push( - { role: "assistant", content: response1.content }, - { role: "user", content: "Analyze the characters in this passage." } - ); - - // Second request - same thinking parameters (cache hit expected) - console.log("\nSecond request - same thinking parameters (cache hit expected)"); - const response2 = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { type: "enabled", budget_tokens: 4000 }, - messages - }); - - console.log("Second response usage: ", response2.usage); - - messages.push( - { role: "assistant", content: response2.content }, - { role: "user", content: "Analyze the setting in this passage." } - ); - - // Third request - different thinking budget (cache miss expected) - console.log("\nThird request - different thinking budget (cache miss expected)"); - const response3 = await client.messages.create({ - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { type: "enabled", budget_tokens: 8000 }, - messages - }); - - console.log("Third response usage: ", response3.usage); - ``` - - ```csharp C# - AnthropicClient client = new(); - - string bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - string bookContent = await FetchArticleContent(bookUrl); - string largeText = bookContent.Substring(0, Math.Min(10000, bookContent.Length)); - - Console.WriteLine("First request - establishing cache"); - var parameters1 = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 20000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 4000), - Messages = - [ - new() - { - Role = Role.User, - Content = new MessageParamContent(new List - { - new ContentBlockParam(new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }), - new ContentBlockParam(new TextBlockParam() - { - Text = "Analyze the tone of this passage." - }), - }) - } - ] - }; - - var response1 = await client.Messages.Create(parameters1); - Console.WriteLine($"First response usage: {response1.Usage}"); - - Console.WriteLine("\nSecond request - same thinking parameters (cache hit expected)"); - var parameters2 = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 20000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 4000), - Messages = - [ - new() - { - Role = Role.User, - Content = new MessageParamContent(new List - { - new ContentBlockParam(new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }), - new ContentBlockParam(new TextBlockParam() - { - Text = "Analyze the tone of this passage." - }), - }) - }, - new() - { - Role = Role.Assistant, - Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() - }, - new() - { - Role = Role.User, - Content = "Analyze the characters in this passage." - } - ] - }; - - var response2 = await client.Messages.Create(parameters2); - Console.WriteLine($"Second response usage: {response2.Usage}"); - - Console.WriteLine("\nThird request - different thinking budget (cache miss expected)"); - var parameters3 = new MessageCreateParams - { - Model = Model.ClaudeSonnet4_6, - MaxTokens = 20000, - Thinking = new ThinkingConfigEnabled(budgetTokens: 8000), - Messages = - [ - new() - { - Role = Role.User, - Content = new MessageParamContent(new List - { - new ContentBlockParam(new TextBlockParam() - { - Text = largeText, - CacheControl = new CacheControlEphemeral(), - }), - new ContentBlockParam(new TextBlockParam() - { - Text = "Analyze the tone of this passage." - }), - }) - }, - new() - { - Role = Role.Assistant, - Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() - }, - new() - { - Role = Role.User, - Content = "Analyze the characters in this passage." - }, - new() - { - Role = Role.Assistant, - Content = response2.Content.Select(block => new ContentBlockParam(block.Json)).ToList() - }, - new() - { - Role = Role.User, - Content = "Analyze the setting in this passage." - } - ] - }; - - var response3 = await client.Messages.Create(parameters3); - Console.WriteLine($"Third response usage: {response3.Usage}"); - - static async Task FetchArticleContent(string url) - { - using HttpClient httpClient = new(); - string content = await httpClient.GetStringAsync(url); - return content; - } - ``` - - ```go Go - client := anthropic.NewClient() - - bookURL := "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - bookContent, err := fetchArticleContent(bookURL) - if err != nil { - log.Fatal(err) - } - - largeText := bookContent - if len(largeText) > 10000 { - largeText = largeText[:10000] - } - - // No system prompt - caching in messages instead - messages := []anthropic.MessageParam{ - anthropic.NewUserMessage( - anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{ - Text: largeText, - CacheControl: anthropic.NewCacheControlEphemeralParam(), - }}, - anthropic.NewTextBlock("Analyze the tone of this passage."), - ), - } - - // First request - establish cache - fmt.Println("First request - establishing cache") - response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 20000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(4000), - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - fmt.Printf("First response usage: %s\n", response1.Usage.RawJSON()) - - messages = append(messages, response1.ToParam()) - messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the characters in this passage."))) - - // Second request - same thinking parameters (cache hit expected) - fmt.Println("\nSecond request - same thinking parameters (cache hit expected)") - response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 20000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(4000), - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - fmt.Printf("Second response usage: %s\n", response2.Usage.RawJSON()) - - messages = append(messages, response2.ToParam()) - messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the setting in this passage."))) - - // Third request - different thinking budget (cache miss expected) - fmt.Println("\nThird request - different thinking budget (cache miss expected)") - response3, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ - Model: anthropic.ModelClaudeSonnet4_6, - MaxTokens: 20000, - Thinking: anthropic.ThinkingConfigParamOfEnabled(8000), - Messages: messages, - }) - if err != nil { - log.Fatal(err) - } - fmt.Printf("Third response usage: %s\n", response3.Usage.RawJSON()) - ``` - - ```java Java - import com.anthropic.models.messages.CacheControlEphemeral; - // ... - void main() throws Exception { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - String bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - String bookContent = fetchArticleContent(bookUrl); - String largeText = bookContent.substring(0, Math.min(10000, bookContent.length())); - - // First request - establishing cache - IO.println("First request - establishing cache"); - MessageCreateParams params1 = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(20000L) - .enabledThinking(4000L) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Analyze the tone of this passage.") - .build()) - )) - .build(); - - Message response1 = client.messages().create(params1); - IO.println("First response usage: " + response1.usage()); - - // Second request - same thinking parameters (cache hit expected) - IO.println("\nSecond request - same thinking parameters (cache hit expected)"); - MessageCreateParams params2 = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(20000L) - .enabledThinking(4000L) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Analyze the tone of this passage.") - .build()) - )) - .addAssistantMessageOfBlockParams(response1.content().stream() - .map(block -> block.toParam()) - .collect(java.util.stream.Collectors.toList())) - .addUserMessage("Analyze the characters in this passage.") - .build(); - - Message response2 = client.messages().create(params2); - IO.println("Second response usage: " + response2.usage()); - - // Third request - different thinking budget (cache miss expected) - IO.println("\nThird request - different thinking budget (cache miss expected)"); - MessageCreateParams params3 = MessageCreateParams.builder() - .model(Model.CLAUDE_SONNET_4_6) - .maxTokens(20000L) - .enabledThinking(8000L) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text(largeText) - .cacheControl(CacheControlEphemeral.builder().build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Analyze the tone of this passage.") - .build()) - )) - .addAssistantMessageOfBlockParams(response1.content().stream() - .map(block -> block.toParam()) - .collect(java.util.stream.Collectors.toList())) - .addUserMessage("Analyze the characters in this passage.") - .addAssistantMessageOfBlockParams(response2.content().stream() - .map(block -> block.toParam()) - .collect(java.util.stream.Collectors.toList())) - .addUserMessage("Analyze the setting in this passage.") - .build(); - - Message response3 = client.messages().create(params3); - IO.println("Third response usage: " + response3.usage()); - } - - String fetchArticleContent(String url) throws Exception { - HttpClient client = HttpClient.newHttpClient(); - HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create(url)) - .build(); - HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); - return response.body(); - } - ``` - - ```php PHP - function fetchArticleContent($url) { - $content = file_get_contents($url); - $lines = explode("\n", $content); - $cleanedLines = array_filter(array_map('trim', $lines)); - return implode("\n", $cleanedLines); - } - - $client = new Client(); - - $bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; - $bookContent = fetchArticleContent($bookUrl); - $largeText = substr($bookContent, 0, 10000); - - echo "First request - establishing cache\n"; - $response1 = $client->messages->create( - maxTokens: 20000, - messages: [[ - 'role' => 'user', - 'content' => [ - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ], - [ - 'type' => 'text', - 'text' => 'Analyze the tone of this passage.' - ] - ] - ]], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 4000], - ); - - echo "First response usage: " . json_encode($response1->usage) . "\n"; - - echo "\nSecond request - same thinking parameters (cache hit expected)\n"; - $response2 = $client->messages->create( - maxTokens: 20000, - messages: [ - [ - 'role' => 'user', - 'content' => [ - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ], - [ - 'type' => 'text', - 'text' => 'Analyze the tone of this passage.' - ] - ] - ], - [ - 'role' => 'assistant', - 'content' => $response1->content - ], - [ - 'role' => 'user', - 'content' => 'Analyze the characters in this passage.' - ] - ], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 4000], - ); - - echo "Second response usage: " . json_encode($response2->usage) . "\n"; - - echo "\nThird request - different thinking budget (cache miss expected)\n"; - $response3 = $client->messages->create( - maxTokens: 20000, - messages: [ - [ - 'role' => 'user', - 'content' => [ - [ - 'type' => 'text', - 'text' => $largeText, - 'cache_control' => ['type' => 'ephemeral'] - ], - [ - 'type' => 'text', - 'text' => 'Analyze the tone of this passage.' - ] - ] - ], - [ - 'role' => 'assistant', - 'content' => $response1->content - ], - [ - 'role' => 'user', - 'content' => 'Analyze the characters in this passage.' - ], - [ - 'role' => 'assistant', - 'content' => $response2->content - ], - [ - 'role' => 'user', - 'content' => 'Analyze the setting in this passage.' - ] - ], - model: 'claude-sonnet-4-6', - thinking: ['type' => 'enabled', 'budget_tokens' => 8000], - ); - - echo "Third response usage: " . json_encode($response3->usage) . "\n"; - ``` - - ```ruby Ruby - require "net/http" - require "uri" - - def fetch_article_content(url) - uri = URI.parse(url) - response = Net::HTTP.get_response(uri) - text = response.body - - lines = text.split("\n").map(&:strip) - lines.reject(&:empty?).join("\n") - end - - client = Anthropic::Client.new - - book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" - book_content = fetch_article_content(book_url) - large_text = book_content[0...10000] - - puts "First request - establishing cache" - response1 = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { - type: "enabled", - budget_tokens: 4000 - }, - messages: [{ - role: "user", - content: [ - { - type: "text", - text: large_text, - cache_control: { type: "ephemeral" } - }, - { - type: "text", - text: "Analyze the tone of this passage." - } - ] - }] - ) - - puts "First response usage: #{response1.usage}" - - puts "\nSecond request - same thinking parameters (cache hit expected)" - response2 = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { - type: "enabled", - budget_tokens: 4000 - }, - messages: [ - { - role: "user", - content: [ - { - type: "text", - text: large_text, - cache_control: { type: "ephemeral" } - }, - { - type: "text", - text: "Analyze the tone of this passage." - } - ] - }, - { - role: "assistant", - content: response1.content - }, - { - role: "user", - content: "Analyze the characters in this passage." - } - ] - ) - - puts "Second response usage: #{response2.usage}" - - puts "\nThird request - different thinking budget (cache miss expected)" - response3 = client.messages.create( - model: "claude-sonnet-4-6", - max_tokens: 20000, - thinking: { - type: "enabled", - budget_tokens: 8000 - }, - messages: [ - { - role: "user", - content: [ - { - type: "text", - text: large_text, - cache_control: { type: "ephemeral" } - }, - { - type: "text", - text: "Analyze the tone of this passage." - } - ] - }, - { - role: "assistant", - content: response1.content - }, - { - role: "user", - content: "Analyze the characters in this passage." - }, - { - role: "assistant", - content: response2.content - }, - { - role: "user", - content: "Analyze the setting in this passage." - } - ] - ) - - puts "Third response usage: #{response3.usage}" - ``` - - - Here is the output of the script (you may see slightly different numbers) - - ```text Output wrap - First request - establishing cache - First response usage: { cache_creation_input_tokens: 1370, cache_read_input_tokens: 0, input_tokens: 17, output_tokens: 700 } - - Second request - same thinking parameters (cache hit expected) - - Second response usage: { cache_creation_input_tokens: 0, cache_read_input_tokens: 1370, input_tokens: 303, output_tokens: 874 } - - Third request - different thinking budget (cache miss expected) - Third response usage: { cache_creation_input_tokens: 1370, cache_read_input_tokens: 0, input_tokens: 747, output_tokens: 619 } - ``` - - This example demonstrates that when caching is set up in the messages array, changing the thinking parameters (budget\_tokens increased from 4000 to 8000) **invalidates the cache**. The third request shows no cache hit with `cache_creation_input_tokens=1370` and `cache_read_input_tokens=0`, proving that message-based caching is invalidated when thinking parameters change. - - - -## Max tokens and context window size with extended thinking - -`max_tokens` (which includes your thinking budget when thinking is enabled) is enforced as a strict limit. On Claude 4.5 models and newer, if input tokens plus `max_tokens` exceeds the context window size, the API accepts the request. If generation then reaches the context window limit, it stops with `stop_reason: "model_context_window_exceeded"`. On earlier models, the API returns a validation error instead. See [Handling stop reasons](/docs/en/build-with-claude/handling-stop-reasons). - - - You can read through the [guide on context windows](/docs/en/build-with-claude/context-windows) for a more detailed analysis. - - -### The context window with extended thinking - -When calculating context window usage with thinking enabled, there are some considerations to be aware of: - -* On Opus 4.5+ and Sonnet 4.6+, thinking blocks from previous turns are kept and count toward your context window; on earlier Opus/Sonnet models and all Haiku models, they are stripped and not counted -* Current turn thinking counts toward your `max_tokens` limit for that turn - -The following diagram demonstrates the specialized token management when extended thinking is enabled: - -![Context window diagram with extended thinking](/docs/images/context-window-thinking.svg) - -The effective context window is calculated as: - -```text wrap -context window = - (current input tokens - previous thinking tokens) + - (thinking tokens + encrypted thinking tokens + text output tokens) -``` - -Use the [token counting API](/docs/en/build-with-claude/token-counting) to get accurate token counts for your specific use case, especially when working with multi-turn conversations that include thinking. - -### The context window with extended thinking and tool use - -When using extended thinking with tool use, thinking blocks must be explicitly preserved and returned with the tool results. - -The effective context window calculation for extended thinking with tool use becomes: - -```text wrap -context window = - (current input tokens + previous thinking tokens + tool use tokens) + - (thinking tokens + encrypted thinking tokens + text output tokens) -``` - -The following diagram illustrates token management for extended thinking with tool use: - -![Context window diagram with extended thinking and tool use](/docs/images/context-window-thinking-tools.svg) - -### Managing tokens with extended thinking - -Given the context window and `max_tokens` behavior with extended thinking, you may need to: - -* More actively monitor and manage your token usage -* Adjust `max_tokens` values as your prompt length changes -* Potentially use the [token counting endpoints](/docs/en/build-with-claude/token-counting) more frequently -* Be aware that previous thinking blocks don't accumulate in your context window - -## Thinking encryption - -Full thinking content is encrypted and returned in the `signature` field. This field verifies that thinking blocks were generated by Claude when passed back to the API. - - - It is only strictly necessary to send back thinking blocks when using [tools with extended thinking](/docs/en/build-with-claude/extended-thinking#extended-thinking-with-tool-use). Otherwise you can omit thinking blocks from previous turns. If you pass them back, whether the API keeps or strips them depends on the model: Opus 4.5+ and Sonnet 4.6+ keep them in context by default; earlier Opus/Sonnet models and all Haiku models strip them. See [context editing](/docs/en/build-with-claude/context-editing) to configure this. - - If sending back thinking blocks, pass everything back as you received it for consistency and to avoid potential issues. - - -Here are some important considerations on thinking encryption: - -* When [streaming responses](/docs/en/build-with-claude/extended-thinking#streaming-thinking), the signature is added through a `signature_delta` inside a `content_block_delta` event just before the `content_block_stop` event. -* `signature` values are significantly longer in Claude 4 models than in previous models. -* The `signature` field is an opaque field and should not be interpreted or parsed. -* `signature` values are compatible across platforms (Claude APIs, [Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](/docs/en/build-with-claude/claude-on-vertex-ai)). Values generated on one platform are compatible with another. - -## Redacted thinking blocks - -In addition to regular `thinking` blocks, the API may return `redacted_thinking` blocks. A `redacted_thinking` block contains encrypted thinking content in a `data` field, with no readable summary: - -```json -{ - "type": "redacted_thinking", - "data": "..." } ``` -The `data` field is opaque and encrypted. Like the `signature` field on regular thinking blocks, you should pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation with [tools](/docs/en/build-with-claude/extended-thinking#extended-thinking-with-tool-use). - - - If your code filters content blocks by type (for example, `block.type == "thinking"`) when round-tripping responses with tool use, also include `redacted_thinking` blocks. Filtering on `block.type == "thinking"` alone silently drops `redacted_thinking` blocks and breaks the multi-turn protocol described earlier. - - - - `redacted_thinking` blocks are a distinct content block type returned by the API when portions of thinking are safety-redacted. This is separate from the [`display: "omitted"`](#controlling-thinking-display) option, which returns regular `thinking` blocks with an empty `thinking` field. - - -## Differences in thinking across model versions - -The Messages API handles thinking differently across Claude model versions. The following table gives a condensed comparison: - -| Model | `budget_tokens` | Thinking output | Interleaved thinking | Block preservation | -| -------------------------------------------------------- | --------------- | ------------------- | ------------------------- | --------------------------------------------------------------------- | -| Claude Fable 5 Claude Mythos 5 | Not supported | Omitted by default1 | Automatic2 | See [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) | -| [Claude Mythos Preview](https://anthropic.com/glasswing) | Supported | Omitted by default1 | Automatic2 | Preserved3 | -| Claude Opus 4.8 | Not supported | Omitted by default1 | Automatic2 | Preserved | -| Claude Opus 4.7 | Not supported | Omitted by default1 | Automatic2 | Preserved | -| Claude Sonnet 5 | Not supported | Omitted by default1 | Automatic2 | Preserved | -| Claude Opus 4.6 | Deprecated | Summarized | Automatic2 | Preserved | -| Claude Sonnet 4.6 | Deprecated | Summarized | Automatic, or beta header | Preserved | -| Claude Opus 4.5 | Supported | Summarized | Beta header | Preserved | -| Claude Haiku 4.5 | Supported | Summarized | Not supported | Last turn only | -| Earlier Claude 4 models | Supported | Summarized | Beta header | Last turn only | - -*1 Set `display: "summarized"` to receive summarized thinking. On Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview, raw thinking tokens are never returned.*\ -*2 With [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). The `interleaved-thinking-2025-05-14` beta header is not needed on these models and is safely ignored if included.*\ -*3 Blocks are stripped when continuing the conversation on a model that does not support the Mythos thinking format.* - -### Thinking block preservation by model - -Whether thinking blocks from previous assistant turns are preserved in context by default depends on the model class. **Opus:** Claude Opus 4.5 and later Opus models keep all prior thinking blocks; Claude Opus 4.1 (deprecated) and earlier Opus models keep only the last assistant turn's thinking. **Sonnet:** Claude Sonnet 4.6 and later Sonnet models keep all; Claude Sonnet 4.5 and earlier Sonnet models keep only the last turn. **Haiku:** all Haiku models through Claude Haiku 4.5 keep only the last turn. [Claude Mythos Preview](https://anthropic.com/glasswing) also keeps all prior thinking blocks. - -**Benefits of thinking block preservation:** - -* **Cache optimization:** When using tool use, preserved thinking blocks enable cache hits as they are passed back with tool results and cached incrementally across the assistant turn, resulting in token savings in multistep workflows -* **No intelligence impact:** Preserving thinking blocks has no negative effect on model performance - -**Important considerations:** - -* **Context usage:** Long conversations will consume more context space because thinking blocks are retained in context -* **Automatic behavior:** This is the default for each model as listed above. No code changes or beta headers are required -* **Backward compatibility:** To leverage this feature, continue passing complete, unmodified thinking blocks back to the API as you would for tool use - - - For earlier models (such as Claude Sonnet 4.5 and Opus 4.1 (deprecated)), thinking blocks from previous turns continue to be removed from context. The existing behavior described in the [Extended thinking with prompt caching](#extended-thinking-with-prompt-caching) section applies to those models. - - -## Pricing - -For complete pricing information including base rates, cache writes, cache hits, and output tokens, see the [pricing page](/docs/en/about-claude/pricing). - -The thinking process incurs charges for: - -* Tokens used during thinking (output tokens) -* Thinking blocks from prior assistant turns kept in context: only the last turn on earlier Opus/Sonnet models and all Haiku models; all turns by default on Opus 4.5+ and Sonnet 4.6+ (input tokens) -* Standard text output tokens - - - When extended thinking is enabled, a specialized system prompt is automatically included to support this feature. - - -When using summarized thinking: - -* **Input tokens:** Tokens in your original request (excludes thinking tokens from previous turns) -* **Output tokens (billed):** The original thinking tokens that Claude generated internally -* **Output tokens (visible):** The summarized thinking tokens you see in the response -* **No charge:** Tokens used to generate the summary - -When using `display: "omitted"`: - -* **Input tokens:** Tokens in your original request (same as summarized) -* **Output tokens (billed):** The original thinking tokens that Claude generated internally (same as summarized) -* **Output tokens (visible):** Zero thinking tokens (the `thinking` field is empty) - - - The billed output token count will **not** match the visible token count in the response. You are billed for the full thinking process, not the thinking content visible in the response. - - -To see how many billed output tokens were spent on internal reasoning, read `usage.output_tokens_details.thinking_tokens` in the response. This value reflects the raw reasoning the model generated (not the summarized text returned in the body) and is always less than or equal to `output_tokens`. Subtract it from `output_tokens` to approximate the non-reasoning portion of the output. - -```json -{ - "usage": { - "input_tokens": 25, - "output_tokens": 348, - "output_tokens_details": { - "thinking_tokens": 312 - } - } -} -``` - -`output_tokens` remains the inclusive, authoritative total used for billing. `output_tokens_details` is a read-only breakdown for observability. - -## Best practices and considerations for extended thinking - -### Working with thinking budgets - -* **Budget optimization:** The minimum budget is 1,024 tokens. Start at the minimum and increase the thinking budget incrementally to find the optimal range for your use case. Higher token counts enable more comprehensive reasoning but with diminishing returns depending on the task. Increasing the budget can improve response quality at the tradeoff of increased latency. For critical tasks, test different settings to find the optimal balance. Note that the thinking budget is a target rather than a strict limit. Actual token usage may vary based on the task. -* **Starting points:** Start with larger thinking budgets (16k+ tokens) for complex tasks and adjust based on your needs. -* **Large budgets:** For thinking budgets above 32k, use [batch processing](/docs/en/build-with-claude/batch-processing) to avoid networking issues. Requests pushing the model to think above 32k tokens cause long-running requests that might run up against system timeouts and open connection limits. -* **Token usage tracking:** Monitor thinking token usage to optimize costs and performance. The `usage.output_tokens_details.thinking_tokens` field in the response reports how many of the billed output tokens were internal reasoning. When streaming, this breakdown appears only on the final `message_delta` event. - -### Performance considerations - -* **Response times:** Be prepared for longer response times because of additional processing. Generating thinking blocks increases overall response time. -* **Streaming requirements:** The SDKs require streaming when `max_tokens` is greater than 21,333 to avoid HTTP timeouts on long-running requests. This is a client-side validation, not an API restriction. If you don't need to process events incrementally, use `.stream()` with `.get_final_message()` (Python) or `.finalMessage()` (TypeScript) to get the complete `Message` object without handling individual events. See [Streaming Messages](/docs/en/build-with-claude/streaming#get-the-final-message-without-handling-events) for details. When streaming, be prepared to handle both thinking and text content blocks as they arrive. -* **Omitting thinking for latency:** If your application doesn't display thinking content, set `display: "omitted"` on the thinking configuration to reduce time-to-first-text-token. See [Controlling thinking display](#controlling-thinking-display). - -### Feature compatibility +`effort: "high"` matches the API default; it appears here only to show where the depth control now lives, and omitting it produces identical behavior. -* Thinking isn't compatible with `temperature` or `top_k` modifications or with [forced tool use](/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use). -* When thinking is enabled, you can set `top_p` to values between 1 and 0.95. -* You can't pre-fill responses when thinking is enabled. -* Changes to the thinking budget invalidate cached prompt prefixes that include messages. However, cached system prompts and tool definitions will continue to work when thinking parameters change. +Expect a behavioral difference, not just a syntax change. With a fixed budget, Claude thinks on every request. With adaptive thinking, Claude decides whether and how much to think on each request, and at lower [effort](/docs/en/build-with-claude/effort) settings it may skip thinking entirely on easy inputs. You can also remove the `interleaved-thinking-2025-05-14` beta header after migrating: adaptive thinking interleaves automatically, and the Claude API ignores the header on these models. Thinking block preservation changes too: Claude Opus 4.5 and models numbered 4.6 and higher keep prior turns' thinking blocks in context and bill them as input, where Claude Sonnet 4.5, Claude Haiku 4.5, and earlier models stripped them; see [thinking block preservation by model](/docs/en/build-with-claude/thinking#thinking-block-preservation-by-model). -### Usage guidelines +Switching modes is a thinking-configuration change, so the first request after the switch invalidates cache breakpoints, as described in [Prompt caching in manual mode](#extended-thinking-with-prompt-caching). -* **Task selection:** Use extended thinking for particularly complex tasks that benefit from step-by-step reasoning, like math, coding, and analysis. -* **Context handling:** You don't need to remove previous thinking blocks yourself. On Opus 4.5+ and Sonnet 4.6+, the Claude API keeps thinking blocks from previous turns by default; on earlier Opus/Sonnet models and all Haiku models, it automatically ignores them and they aren't included when calculating context usage. -* **Prompt engineering:** Review the [extended thinking prompting tips](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#leverage-thinking-and-interleaved-thinking-capabilities) if you want to maximize Claude's thinking capabilities. +For full guidance, see [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost), [effort](/docs/en/build-with-claude/effort), and the [model migration guide](/docs/en/about-claude/models/migration-guide). ## Next steps - - Let Claude determine when and how much to use extended thinking. + + Learn how thinking works: blocks, display, streaming, and tool use. - - Explore practical examples of thinking in the Cookbook. + + Let Claude decide when and how much to think on each request. - - Learn prompt engineering best practices for extended thinking. + + Preserve thinking blocks and manage thinking across tool calls and turns. diff --git a/content/en/build-with-claude/overview.md b/content/en/build-with-claude/overview.md index 66f0abe17..0e461f875 100644 --- a/content/en/build-with-claude/overview.md +++ b/content/en/build-with-claude/overview.md @@ -39,20 +39,20 @@ Ways to steer Claude and Claude's direct outputs, including response format, rea The ZDR column indicates whether a feature is available under a Zero Data Retention arrangement. For most features this depends only on what the feature mechanism retains; for features tied to specific models, model-level ZDR availability also applies. See [Model-specific data retention requirements](/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements). -| Feature | Description | Zero Data Retention (ZDR) | Availability | -| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | -| [Context windows](/docs/en/build-with-claude/context-windows) | Up to 1M tokens for processing large documents, extensive code bases, and long conversations. | ZDR eligible | | -| [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) | Let Claude dynamically decide when and how much to think. The only thinking mode on Claude Opus 4.8 and Claude Opus 4.7. Use the effort parameter to control thinking depth. | ZDR eligible | | -| [Batch processing](/docs/en/build-with-claude/batch-processing) | Process large volumes of requests asynchronously for cost savings. Send batches with a large number of queries per batch. Batch API calls cost 50% less than standard API calls. | Not ZDR eligible | | -| [Citations](/docs/en/build-with-claude/citations) | Ground Claude's responses in source documents. With Citations, Claude can provide detailed references to the exact sentences and passages it uses to generate responses, leading to more verifiable, trustworthy outputs. | ZDR eligible | | -| [Data residency](/docs/en/manage-claude/data-residency) | Control where model inference runs using geographic controls. Specify `"global"` or `"us"` routing per request through the `inference_geo` parameter. | ZDR eligible | | -| [Effort](/docs/en/build-with-claude/effort) | Control how many tokens Claude uses when responding with the effort parameter, trading off between response thoroughness and token efficiency. | ZDR eligible | | -| [Extended thinking](/docs/en/build-with-claude/extended-thinking) | Enhanced reasoning capabilities for complex tasks, providing transparency into Claude's step-by-step thought process before delivering its final answer. | ZDR eligible | | -| [Fallback credit](/docs/en/build-with-claude/fallback-credit) | Avoid paying the prompt-cache cost twice when you retry a refused request on another model. The refusal carries a credit token, and echoing it on the retry bills the retry as though the conversation had been on the new model all along. Credit tokens returned in Message Batches results cannot be redeemed. | Not ZDR eligible\* | | -| [PDF support](/docs/en/build-with-claude/pdf-support) | Process and analyze text and visual content from PDF documents. | ZDR eligible | | -| [Search results](/docs/en/build-with-claude/search-results) | Enable natural citations for RAG applications by providing search results with proper source attribution. Achieve web search-quality citations for custom knowledge bases and tools. | ZDR eligible | | -| [Server-side fallback](/docs/en/build-with-claude/refusals-and-fallback) | Retry a refused request inside a single API call. Name up to three fallback models, and when the requested model declines, the API runs the next model in the chain on the same request. The `fallbacks` parameter is not available in the Message Batches API. | Not ZDR eligible\* | | -| [Structured outputs](/docs/en/build-with-claude/structured-outputs) | Guarantee schema conformance with two approaches: JSON outputs for structured data responses, and strict tool use for validated tool inputs. | [ZDR eligible (qualified)](/docs/en/build-with-claude/structured-outputs#data-retention)\* | † | +| Feature | Description | Zero Data Retention (ZDR) | Availability | +| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | +| [Context windows](/docs/en/build-with-claude/context-windows) | Up to 1M tokens for processing large documents, extensive code bases, and long conversations. | ZDR eligible | | +| [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) | Let Claude dynamically decide when and how much to think. The only [thinking](/docs/en/build-with-claude/thinking) mode on Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5. Use the effort parameter to control thinking depth. | ZDR eligible | | +| [Batch processing](/docs/en/build-with-claude/batch-processing) | Process large volumes of requests asynchronously for cost savings. Send batches with a large number of queries per batch. Batch API calls cost 50% less than standard API calls. | Not ZDR eligible | | +| [Citations](/docs/en/build-with-claude/citations) | Ground Claude's responses in source documents. With Citations, Claude can provide detailed references to the exact sentences and passages it uses to generate responses, leading to more verifiable, trustworthy outputs. | ZDR eligible | | +| [Data residency](/docs/en/manage-claude/data-residency) | Control where model inference runs using geographic controls. Specify `"global"` or `"us"` routing per request through the `inference_geo` parameter. | ZDR eligible | | +| [Effort](/docs/en/build-with-claude/effort) | Control how many tokens Claude uses when responding with the effort parameter, trading off between response thoroughness and token efficiency. | ZDR eligible | | +| [Fallback credit](/docs/en/build-with-claude/fallback-credit) | Avoid paying the prompt-cache cost twice when you retry a refused request on another model. The refusal carries a credit token, and echoing it on the retry bills the retry as though the conversation had been on the new model all along. Credit tokens returned in Message Batches results cannot be redeemed. | Not ZDR eligible\* | | +| [PDF support](/docs/en/build-with-claude/pdf-support) | Process and analyze text and visual content from PDF documents. | ZDR eligible | | +| [Search results](/docs/en/build-with-claude/search-results) | Enable natural citations for RAG applications by providing search results with proper source attribution. Achieve web search-quality citations for custom knowledge bases and tools. | ZDR eligible | | +| [Server-side fallback](/docs/en/build-with-claude/refusals-and-fallback) | Retry a refused request inside a single API call. Name up to three fallback models, and when the requested model declines, the API runs the next model in the chain on the same request. The `fallbacks` parameter is not available in the Message Batches API. | Not ZDR eligible\* | | +| [Structured outputs](/docs/en/build-with-claude/structured-outputs) | Guarantee schema conformance with two approaches: JSON outputs for structured data responses, and strict tool use for validated tool inputs. | [ZDR eligible (qualified)](/docs/en/build-with-claude/structured-outputs#data-retention)\* | † | +| [Thinking](/docs/en/build-with-claude/thinking) | Enhanced reasoning capabilities for complex tasks, providing transparency into Claude's step-by-step thought process before delivering its final answer. | ZDR eligible | | ## Tools diff --git a/content/en/build-with-claude/prompt-caching.md b/content/en/build-with-claude/prompt-caching.md index 78815ce6f..fa61ac61e 100644 --- a/content/en/build-with-claude/prompt-caching.md +++ b/content/en/build-with-claude/prompt-caching.md @@ -581,7 +581,7 @@ You can define up to 4 cache breakpoints if you want to: * **Cache reads:** When cached content is used (10% of base input token price) * **Regular input tokens:** For any uncached content -Adding more `cache_control` breakpoints doesn't increase your costs - you still pay the same amount based on what content is actually cached and read. The breakpoints simply give you control over what sections can be cached independently. +Adding more `cache_control` breakpoints doesn't increase your costs - you still pay the same amount based on what content is actually cached and read. The breakpoints give you control over what sections can be cached independently. *** @@ -644,16 +644,17 @@ As described in [Structuring your prompt](#structuring-your-prompt), the cache f The following table shows which parts of the cache are invalidated by different types of changes. ✘ indicates that the cache is invalidated, while ✓ indicates that the cache remains valid. -| What changes | Tools cache | System cache | Messages cache | Impact | -| --------------------------------------------------------- | ----------- | ------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Tool definitions** | ✘ | ✘ | ✘ | Modifying tool definitions (names, descriptions, parameters) invalidates the entire cache | -| **Web search toggle** | ✓ | ✘ | ✘ | Enabling/disabling web search modifies the system prompt | -| **Citations toggle** | ✓ | ✘ | ✘ | Enabling/disabling citations modifies the system prompt | -| **Speed setting** | ✓ | ✘ | ✘ | Switching between [`speed: "fast"` and standard speed](/docs/en/build-with-claude/fast-mode) invalidates system and message caches | -| **Tool choice** | ✓ | ✓ | ✘ | Changes to `tool_choice` parameter only affect message blocks | -| **Images** | ✓ | ✓ | ✘ | Adding/removing images anywhere in the prompt affects message blocks | -| **Thinking parameters** | ✓ | ✓ | ✘ | Changes to extended thinking settings (enable/disable, budget) affect message blocks | -| **Non-tool results passed to extended thinking requests** | ✓ | ✓ | Model-specific | On Opus 4.5+ and Sonnet 4.6+, thinking blocks are preserved by default, so the cache remains valid (✓). On earlier Opus/Sonnet models and all Haiku models, all previously-cached thinking blocks are stripped from context, and any messages that follow those thinking blocks are removed from the cache (✘). For more details, see [Caching with thinking blocks](#caching-with-thinking-blocks). | +| What changes | Tools cache | System cache | Messages cache | Impact | +| --------------------------------------------------------- | -------------- | -------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Tool definitions** | ✘ | ✘ | ✘ | Modifying tool definitions (names, descriptions, parameters) invalidates the entire cache | +| **Web search toggle** | ✓ | ✘ | ✘ | Enabling/disabling web search modifies the system prompt | +| **Citations toggle** | ✓ | ✘ | ✘ | Enabling/disabling citations modifies the system prompt | +| **Speed setting** | ✓ | ✘ | ✘ | Switching between [`speed: "fast"` and standard speed](/docs/en/build-with-claude/fast-mode) invalidates system and message caches | +| **Tool choice** | ✓ | ✓ | ✘ | Changes to `tool_choice` parameter only affect message blocks | +| **Images** | ✓ | ✓ | ✘ | Adding/removing images anywhere in the prompt affects message blocks | +| **Thinking parameters** | Model-specific | Model-specific | ✘ | The thinking configuration (mode, and `budget_tokens` in extended mode) is rendered into the prompt, so changing it always invalidates message blocks; tool and system caches are also invalidated on models that render the configuration ahead of them. See [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching). | +| **Effort setting** | Model-specific | Model-specific | ✘ | Changing the [`output_config.effort`](/docs/en/build-with-claude/effort) value always invalidates message blocks, with the same model-specific effect on tool and system caches as thinking parameters. Setting effort explicitly to the model's default is equivalent to omitting it and does not invalidate. | +| **Non-tool results passed to extended thinking requests** | ✓ | ✓ | Model-specific | On Opus 4.5+ and Sonnet 4.6+, thinking blocks are preserved by default, so the cache remains valid (✓). On earlier Opus/Sonnet models and all Haiku models, all previously-cached thinking blocks are stripped from context, and any messages that follow those thinking blocks are removed from the cache (✘). For more details, see [Caching with thinking blocks](#caching-with-thinking-blocks). | On Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), and Claude Opus 4.8, you can add a new system instruction partway through a conversation without invalidating the system or message caches. Append a `{"role": "system"}` message to `messages` instead of editing the top-level `system` field, so the cached prefix stays unchanged. This feature is not available on Claude Sonnet 5; use the top-level `system` field instead. See [Mid-conversation system messages](/docs/en/build-with-claude/mid-conversation-system-messages). @@ -696,7 +697,7 @@ Monitor cache performance using these API response fields, within `usage` in the ### Caching with thinking blocks -When using [extended thinking](/docs/en/build-with-claude/extended-thinking) with prompt caching, thinking blocks have special behavior: +When using [thinking](/docs/en/build-with-claude/thinking) with prompt caching, thinking blocks have special behavior: **Automatic caching alongside other content:** While thinking blocks cannot be explicitly marked with `cache_control`, they get cached as part of the request content when you make subsequent API calls with tool results. This commonly happens during tool use when you pass thinking blocks back to continue the conversation. @@ -736,7 +737,7 @@ User: [Text response, cache=True] On earlier Opus/Sonnet models and all Haiku models, all previous thinking blocks are removed from context at this point. On Opus 4.5+ and Sonnet 4.6+, prior thinking blocks are kept by default and remain part of the cached prefix. -For more detailed information, see the [extended thinking](/docs/en/build-with-claude/extended-thinking#understanding-thinking-block-caching-behavior) documentation. +For more detailed information, see [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching). ### Cache storage and sharing @@ -783,7 +784,7 @@ If experiencing unexpected behavior: * Ensure cached sections are identical across calls. For explicit breakpoints, verify that `cache_control` markers are in the same locations * Check that calls are made within the cache lifetime (5 minutes by default) -* Verify that `tool_choice` and image usage remain consistent between calls +* Verify that `tool_choice`, image usage, the thinking configuration, and `output_config.effort` remain consistent between calls * Validate that you are caching at least the minimum number of tokens for your model and platform (see [Cache limitations](#cache-limitations)) * Confirm your breakpoint is on a block that stays identical across requests. Cache writes happen only at the breakpoint, and if that block changes (timestamps, per-request context, the incoming message), the prefix hash never matches. The lookback does not find stable content behind the breakpoint; it only finds entries that earlier requests wrote at their own breakpoints * Verify that the keys in your `tool_use` content blocks have stable ordering as some languages (for example, Swift, Go) randomize key order during JSON conversion, breaking caches @@ -880,7 +881,7 @@ Cache pre-warming lets you load your system prompt or tool definitions into the Set `max_tokens: 0` in your request. The API reads your prompt into the model and writes the cache at any `cache_control` breakpoint, then returns immediately without generating any output. The response has an empty `content` array, `stop_reason: "max_tokens"`, and a fully populated `usage` block. -Place the `cache_control` breakpoint on the last block that is shared with the follow-up request (typically your system prompt or tool definitions), not on the placeholder user message. Otherwise the cache entry is keyed to the placeholder and the follow-up request won't hit it. This means using an [explicit cache breakpoint](#explicit-cache-breakpoints) rather than [automatic caching](#automatic-caching), since automatic caching places the breakpoint on the last block, which here is the placeholder. The placeholder user message can be any string with non-whitespace content (the examples here use `"warmup"`); its content is read into the model but never answered. +Place the `cache_control` breakpoint on the last block that is shared with the follow-up request (typically your system prompt or tool definitions), not on the placeholder user message. Otherwise the cache entry is keyed to the placeholder and the follow-up request won't hit it. Use the same thinking configuration and `output_config.effort` as your follow-up requests too: those values are rendered into the prompt (see [What invalidates the cache](#what-invalidates-the-cache)), so a pre-warm with a different configuration can write an entry your real traffic never hits. This means using an [explicit cache breakpoint](#explicit-cache-breakpoints) rather than [automatic caching](#automatic-caching), since automatic caching places the breakpoint on the last block, which here is the placeholder. The placeholder user message can be any string with non-whitespace content (the examples here use `"warmup"`); its content is read into the model but never answered. A pre-warm request incurs a **cache write** charge if the prefix is not already cached, the same as any other request. Check `usage.cache_creation_input_tokens` in the response to confirm a write occurred. Zero output tokens are billed. @@ -3218,11 +3219,11 @@ For ZDR eligibility across all features, see [API and data retention](/docs/en/m - Cached system prompts and tools will be reused when thinking parameters change. However, thinking changes (enabling/disabling or budget changes) will invalidate previously cached prompt prefixes with messages content. + Changing thinking parameters (switching modes, or changing the budget in extended mode) invalidates cached message prefixes, and can invalidate cached system prompts and tools as well, because the thinking configuration is rendered into the prompt. The [`output_config.effort`](/docs/en/build-with-claude/effort) value behaves the same way. For more details on cache invalidation, see [What invalidates the cache](#what-invalidates-the-cache). - For more on extended thinking, including its interaction with tool use and prompt caching, see the [extended thinking](/docs/en/build-with-claude/extended-thinking#extended-thinking-and-prompt-caching) documentation. + For more on thinking, including its interaction with tool use and prompt caching, see [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching). diff --git a/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md b/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md index 832ea3b7c..4d1dad1d7 100644 --- a/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md +++ b/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md @@ -530,15 +530,15 @@ contradicts your reasoning. If you're weighing two approaches, pick one and see through. You can always course-correct later if the chosen approach fails. ``` -If you need a hard ceiling on thinking costs, extended thinking with a `budget_tokens` cap is still functional on Opus 4.6 and Sonnet 4.6 but is deprecated. On Claude Opus 4.7 and later models, and on Claude Fable 5 and Claude Mythos 5, setting `budget_tokens` returns a 400 error. Prefer lowering the [effort](/docs/en/build-with-claude/effort) setting or using `max_tokens` as a hard limit with [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). +If you need a hard ceiling on thinking costs, extended thinking with a `budget_tokens` cap is still functional on Opus 4.6 and Sonnet 4.6 but is deprecated. On Claude Opus 4.7 and later models, and on Claude Fable 5 and Claude Mythos 5, setting `budget_tokens` returns a 400 error. Prefer lowering the [effort](/docs/en/build-with-claude/effort) setting or using `max_tokens` as a hard limit with [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). ### Leverage thinking & interleaved thinking capabilities Claude's latest models offer thinking capabilities that can be especially helpful for tasks involving reflection after tool use or complex multistep reasoning. You can guide its initial or interleaved thinking for better results. -Claude Opus 4.6, Claude Opus 4.7, Claude Opus 4.8, and Claude Sonnet 4.6 use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`), where Claude dynamically decides when and how much to think. On Claude Fable 5 and Claude Mythos 5, thinking is always on and adaptive thinking is the only mode. Claude calibrates its thinking based on two factors: the `effort` parameter and query complexity. Higher effort elicits more thinking, and more complex queries do the same. On easier queries that don't require thinking, the model responds directly. In internal evaluations, adaptive thinking reliably drives better performance than extended thinking. Consider moving to adaptive thinking to get the most intelligent responses. +Claude Opus 4.6, Claude Opus 4.7, Claude Opus 4.8, and Claude Sonnet 4.6 use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`thinking: {type: "adaptive"}`), where Claude dynamically decides when and how much to think. On Claude Fable 5 and Claude Mythos 5, thinking is always on and adaptive thinking is the only mode. Claude calibrates its thinking based on two factors: the `effort` parameter and query complexity. Higher effort elicits more thinking, and more complex queries do the same. On easier queries that don't require thinking, the model responds directly. In internal evaluations, adaptive thinking reliably drives better performance than extended thinking. Consider moving to adaptive thinking to get the most intelligent responses. -Use adaptive thinking for workloads that require agentic behavior such as multistep tool use, complex coding tasks, and long-horizon agent loops. Older models use manual [extended thinking](/docs/en/build-with-claude/extended-thinking) with `budget_tokens`; see the [supported models table](/docs/en/build-with-claude/extended-thinking#supported-models) for which mode each model accepts. +Use adaptive thinking for workloads that require agentic behavior such as multistep tool use, complex coding tasks, and long-horizon agent loops. Older models use manual [extended thinking](/docs/en/build-with-claude/extended-thinking) with `budget_tokens`; see the [per-model configuration table](/docs/en/build-with-claude/thinking-troubleshooting#supported-models) for which configuration each model accepts. You can guide Claude's thinking behavior: @@ -777,7 +777,7 @@ If you are not using extended thinking, no changes are required. On Claude Opus - For more information on thinking capabilities, see [Extended thinking](/docs/en/build-with-claude/extended-thinking) and [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). + For more information on thinking capabilities, see [Thinking](/docs/en/build-with-claude/thinking) and [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). ## Agentic systems @@ -1069,7 +1069,7 @@ When migrating to current Claude models from earlier generations: 3. **Request specific features explicitly:** Animations and interactive elements should be requested explicitly when desired. -4. **Update thinking configuration:** Claude 4.6 models use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`) instead of manual thinking with `budget_tokens`. Use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. +4. **Update thinking configuration:** Claude 4.6 models use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`thinking: {type: "adaptive"}`) instead of manual thinking with `budget_tokens`. Use the [effort parameter](/docs/en/build-with-claude/effort) to control thinking depth. 5. **Migrate away from prefilled responses:** Prefilled responses on the last assistant turn are no longer supported starting with Claude 4.6 models. See [Migrating away from prefilled responses](#migrating-away-from-prefilled-responses) for detailed guidance on alternatives. diff --git a/content/en/build-with-claude/prompt-engineering/overview.md b/content/en/build-with-claude/prompt-engineering/overview.md index 7ea21cff0..cc7dce94c 100644 --- a/content/en/build-with-claude/prompt-engineering/overview.md +++ b/content/en/build-with-claude/prompt-engineering/overview.md @@ -1,6 +1,6 @@ # Prompt engineering overview -Learn when prompt engineering is the right solution, and find Claude prompting techniques, Console prompting tools, and interactive tutorials. +Learn when prompt engineering is the right solution, and find Claude prompting techniques and interactive tutorials. --- @@ -15,8 +15,8 @@ This guide assumes that you have: If not, spend time establishing that first. Check out [Define success criteria and build evaluations](/docs/en/test-and-evaluate/develop-tests) for tips and guidance. - - Don't have a first draft prompt? Try the prompt generator in the Claude Console! + + Don't have a first draft prompt? Generate one with the metaprompt recipe from the Claude Cookbook. @@ -38,8 +38,6 @@ All prompting techniques (from clarity and examples to XML structuring, role pro For general prompt engineering craft beyond Claude-specific techniques, see the blog post on [best practices for prompt engineering](https://claude.com/blog/best-practices-for-prompt-engineering). -The [Claude Console](/dashboard) also offers [prompting tools](/docs/en/build-with-claude/prompt-engineering/prompting-tools) (prompt generator, templates and variables, and prompt improver) to help you build and refine prompts quickly. - *** ## Prompt engineering tutorial diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5.md index 9d0ab72ee..967cc5deb 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-fable-5.md @@ -172,5 +172,5 @@ Do not route narration or internal reasoning through `send_to_user`; over-callin * **Start at the top of your difficulty range.** Pick a task harder than what you'd assign to prior models, and have Claude Fable 5 scope it, ask clarifying questions, and execute. * **Make self-verification explicit in long-run prompts.** Separate, fresh-context verifier subagents tend to outperform self-critique. For long-running tasks, instruct: `Establish a method for checking your own work at an interval of [X] as you build. Run this every [X interval], verifying your work with subagents against the specification.` * **Refactor existing prompts and skills.** Skills developed for prior models are often too prescriptive for Claude Fable 5 and can degrade output quality. Review and consider removing older instructions if default performance is better. Claude Fable 5 also does a good job of updating skills on the fly based on what it learns from the task at hand. -* **Don't instruct Claude to reproduce its reasoning in the response.** Prompts, skills, or harness instructions that tell the model to echo, transcribe, or explain its internal reasoning as response text can trigger the [`reasoning_extraction` refusal category](/docs/en/build-with-claude/refusals-and-fallback#refusal-response) on Claude Fable 5, causing elevated fallbacks to Claude Opus 4.8. Audit existing skills and system prompts for reflection or show-your-thinking instructions when migrating. If your application needs reasoning visibility, read the structured `thinking` blocks from [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) instead, and use a [send-to-user tool](#create-a-send-to-user-tool) to surface progress during long runs. +* **Don't instruct Claude to reproduce its reasoning in the response.** Prompts, skills, or harness instructions that tell the model to echo, transcribe, or explain its internal reasoning as response text can trigger the [`reasoning_extraction` refusal category](/docs/en/build-with-claude/refusals-and-fallback#refusal-response) on Claude Fable 5, causing elevated fallbacks to Claude Opus 4.8. Audit existing skills and system prompts for reflection or show-your-thinking instructions when migrating. If your application needs reasoning visibility, read the structured `thinking` blocks from [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) instead, and use a [send-to-user tool](#create-a-send-to-user-tool) to surface progress during long runs. * **Create a send-to-user tool.** For long, asynchronous agents, a client-side tool delivers messages to the user verbatim without ending the turn. See [Create a send-to-user tool](#create-a-send-to-user-tool). diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md index b5d7f353f..81c20e235 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md @@ -44,7 +44,7 @@ If you observe shallow reasoning on complex problems, raise effort to `high` or This task involves multistep reasoning. Think carefully through the problem before responding. ``` -On Claude Sonnet 5, [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is on by default. Requests without a `thinking` field run with adaptive thinking. This is a change from Claude Sonnet 4.6, where the same requests ran without thinking. To turn thinking off entirely, pass `thinking: {type: "disabled"}`. Because `max_tokens` is a hard limit on total output (thinking plus response text), revisit it for workloads that ran without thinking on Claude Sonnet 4.6. If you were previously using thinking off with Claude Sonnet 4.6, try thinking on with lower effort levels for Claude Sonnet 5. +On Claude Sonnet 5, [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is on by default. Requests without a `thinking` field run with adaptive thinking. This is a change from Claude Sonnet 4.6, where the same requests ran without thinking. To turn thinking off entirely, pass `thinking: {type: "disabled"}`. Because `max_tokens` is a hard limit on total output (thinking plus response text), revisit it for workloads that ran without thinking on Claude Sonnet 4.6. If you were previously using thinking off with Claude Sonnet 4.6, try thinking on with lower effort levels for Claude Sonnet 5. The triggering behavior for adaptive thinking is steerable. If you find the model emitting thinking blocks more often than you'd like, which can happen with large or complex system prompts, add guidance to steer it. As always, measure the effect of any prompting changes on performance. Example: diff --git a/content/en/build-with-claude/refusals-and-fallback.md b/content/en/build-with-claude/refusals-and-fallback.md index 70fba989f..3947cc0f2 100644 --- a/content/en/build-with-claude/refusals-and-fallback.md +++ b/content/en/build-with-claude/refusals-and-fallback.md @@ -185,7 +185,7 @@ The `stop_details` object explains the decline: | `"cyber"` | The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. | | `"bio"` | The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. | | `"frontier_llm"` | The request could assist the development of competing AI models, which is restricted under [Anthropic's commercial terms](https://www.anthropic.com/legal/commercial-terms). Benign machine learning work can also trigger this category. | -| `"reasoning_extraction"` | The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). | +| `"reasoning_extraction"` | The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). | A refusal can arrive before any output, or mid-stream after partial output. In either case, treat any partial output as incomplete and discard it. @@ -962,7 +962,7 @@ Pass the middleware to the client constructor, and share one `BetaFallbackState` * Retries walk your fallback list in order. A fallback model that itself refuses passes the request to the next entry. * The original refusal response is returned only when every model in the list has declined. The middleware does not raise an error for it. -* [Thinking blocks from Claude Fable 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5) are handled for you: the middleware strips them from the retry and manages them in conversation history on later requests. +* [Thinking blocks from Claude Fable 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5) are handled for you: the middleware strips them from the retry and manages them in conversation history on later requests. * Responses served through the middleware include a `fallback` content block at each model boundary, the same as server-side fallback responses. The middleware manages those blocks for you on later requests. * The model that accepted is recorded in `BetaFallbackState`, so follow-up requests that share the state stay pinned to it rather than re-asking a model that refused. @@ -981,7 +981,7 @@ Pass the middleware to the client constructor, and share one `BetaFallbackState` Send the same request with `model` set to a fallback model, such as Claude Opus 4.8. A request that Claude Fable 5's classifiers decline can normally be served by another model. How you handle the conversation history depends on whether you redeem a [fallback credit](/docs/en/build-with-claude/fallback-credit): - * **Not redeeming a credit:** you can first strip the [thinking blocks from Claude Fable 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5) out of the conversation history. Other models ignore them, and stripping keeps cross-model requests minimal. + * **Not redeeming a credit:** you can first strip the [thinking blocks from Claude Fable 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5) out of the conversation history. Other models ignore them, and stripping keeps cross-model requests minimal. * **Redeeming a credit:** send the body unchanged, because redemption requires an exact match. diff --git a/content/en/build-with-claude/search-results.md b/content/en/build-with-claude/search-results.md index 6ca688368..ab3982f51 100644 --- a/content/en/build-with-claude/search-results.md +++ b/content/en/build-with-claude/search-results.md @@ -187,7 +187,7 @@ Returning search results from your custom tools enables dynamic RAG applications ``` ```typescript TypeScript - const anthropic = new Anthropic(); + const client = new Anthropic(); // Define a knowledge base search tool const knowledgeBaseTool: Anthropic.Tool = { @@ -243,7 +243,7 @@ Returning search results from your custom tools enables dynamic RAG applications ]; // Create a message with the tool - const response = await anthropic.messages.create({ + const response = await client.messages.create({ model: "claude-opus-4-8", max_tokens: 1024, tools: [knowledgeBaseTool], @@ -274,7 +274,7 @@ Returning search results from your custom tools enables dynamic RAG applications }); // Send the tool result back - const finalResponse = await anthropic.messages.create({ + const finalResponse = await client.messages.create({ model: "claude-opus-4-8", max_tokens: 1024, messages @@ -480,121 +480,119 @@ Returning search results from your custom tools enables dynamic RAG applications import com.anthropic.models.messages.ToolChoice; import com.anthropic.models.messages.ToolChoiceTool; import com.anthropic.models.messages.ToolResultBlockParam; - import com.anthropic.models.messages.ToolUseBlockParam; import com.anthropic.core.JsonValue; // ... - public class SearchKnowledgeBaseExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - Tool knowledgeBaseTool = Tool.builder() + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + Tool knowledgeBaseTool = Tool.builder() + .name("search_knowledge_base") + .description("Search the company knowledge base for information") + .inputSchema(Tool.InputSchema.builder() + .properties(JsonValue.from(Map.of( + "query", Map.of( + "type", "string", + "description", "The search query" + ) + ))) + .putAdditionalProperty("required", JsonValue.from(List.of("query"))) + .build()) + .build(); + + // Build up the conversation in a list, starting with the user's question + List messages = new ArrayList<>(); + messages.add(MessageParam.builder() + .role(MessageParam.Role.USER) + .content("How do I configure the timeout settings?") + .build()); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(1024L) + .addTool(knowledgeBaseTool) + .toolChoice(ToolChoice.ofTool(ToolChoiceTool.builder() .name("search_knowledge_base") - .description("Search the company knowledge base for information") - .inputSchema(Tool.InputSchema.builder() - .properties(JsonValue.from(Map.of( - "query", Map.of( - "type", "string", - "description", "The search query" + .build())) + .messages(messages) + .build(); + + Message response = client.messages().create(params); + + // The tool_use block is not always first: find it in the content list + response.content().stream() + .flatMap(contentBlock -> contentBlock.toolUse().stream()) + .findFirst() + .ifPresent(toolUse -> { + Map input = + (Map) toolUse._input().asObject().get(); + List toolResult = searchKnowledgeBase( + input.get("query").asStringOrThrow() + ); + + // Append Claude's entire turn to the running conversation, then the tool result. + // Rebuilding only the tool_use block would drop any other content blocks Claude + // returned (e.g. leading text when the tool call is not forced) — append the + // full turn, as the other language tabs do. + messages.add(MessageParam.builder() + .role(MessageParam.Role.ASSISTANT) + .contentOfBlockParams( + response.content().stream() + .map(block -> block.toParam()) + .toList() + ) + .build()); + messages.add(MessageParam.builder() + .role(MessageParam.Role.USER) + .contentOfBlockParams(List.of( + ContentBlockParam.ofToolResult( + ToolResultBlockParam.builder() + .toolUseId(toolUse.id()) + .contentOfBlocks(toolResult) + .build() ) - ))) - .putAdditionalProperty("required", JsonValue.from(List.of("query"))) - .build()) - .build(); - - // Build up the conversation in a list, starting with the user's question - List messages = new ArrayList<>(); - messages.add(MessageParam.builder() - .role(MessageParam.Role.USER) - .content("How do I configure the timeout settings?") - .build()); - - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_4_8) - .maxTokens(1024L) - .addTool(knowledgeBaseTool) - .toolChoice(ToolChoice.ofTool(ToolChoiceTool.builder() - .name("search_knowledge_base") - .build())) - .messages(messages) - .build(); - - Message response = client.messages().create(params); - - // The tool_use block is not always first: find it in the content list - response.content().stream() - .flatMap(contentBlock -> contentBlock.toolUse().stream()) - .findFirst() - .ifPresent(toolUse -> { - Map input = - (Map) toolUse._input().asObject().get(); - List toolResult = searchKnowledgeBase( - input.get("query").asStringOrThrow() - ); - - // Append Claude's turn, then the tool result, to the running conversation - messages.add(MessageParam.builder() - .role(MessageParam.Role.ASSISTANT) - .contentOfBlockParams(List.of( - ContentBlockParam.ofToolUse(ToolUseBlockParam.builder() - .id(toolUse.id()) - .name(toolUse.name()) - .input(toolUse._input()) - .build()) - )) - .build()); - messages.add(MessageParam.builder() - .role(MessageParam.Role.USER) - .contentOfBlockParams(List.of( - ContentBlockParam.ofToolResult( - ToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .contentOfBlocks(toolResult) - .build() - ) - )) - .build()); - - // Send the tool result back - MessageCreateParams finalParams = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_4_8) - .maxTokens(1024L) - .messages(messages) - .build(); - - Message finalResponse = client.messages().create(finalParams); - System.out.println(finalResponse); - }); - } + )) + .build()); + + // Send the tool result back + MessageCreateParams finalParams = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(1024L) + .messages(messages) + .build(); + + Message finalResponse = client.messages().create(finalParams); + System.out.println(finalResponse); + }); + } - private static List searchKnowledgeBase(String query) { - return List.of( - ToolResultBlockParam.Content.Block.ofSearchResult( - SearchResultBlockParam.builder() - .source("https://docs.company.com/product-guide") - .title("Product Configuration Guide") - .content(List.of( - TextBlockParam.builder() - .text("To configure the product, navigate to Settings > Configuration. The default timeout is 30 seconds, but can be adjusted between 10-120 seconds based on your needs.") - .build() - )) - .citations(CitationsConfigParam.builder().enabled(true).build()) - .build() - ), - ToolResultBlockParam.Content.Block.ofSearchResult( - SearchResultBlockParam.builder() - .source("https://docs.company.com/troubleshooting") - .title("Troubleshooting Guide") - .content(List.of( - TextBlockParam.builder() - .text("If you encounter timeout errors, first check the configuration settings. Common causes include network latency and incorrect timeout values.") - .build() - )) - .citations(CitationsConfigParam.builder().enabled(true).build()) - .build() - ) - ); - } + static List searchKnowledgeBase(String query) { + return List.of( + ToolResultBlockParam.Content.Block.ofSearchResult( + SearchResultBlockParam.builder() + .source("https://docs.company.com/product-guide") + .title("Product Configuration Guide") + .content(List.of( + TextBlockParam.builder() + .text("To configure the product, navigate to Settings > Configuration. The default timeout is 30 seconds, but can be adjusted between 10-120 seconds based on your needs.") + .build() + )) + .citations(CitationsConfigParam.builder().enabled(true).build()) + .build() + ), + ToolResultBlockParam.Content.Block.ofSearchResult( + SearchResultBlockParam.builder() + .source("https://docs.company.com/troubleshooting") + .title("Troubleshooting Guide") + .content(List.of( + TextBlockParam.builder() + .text("If you encounter timeout errors, first check the configuration settings. Common causes include network latency and incorrect timeout values.") + .build() + )) + .citations(CitationsConfigParam.builder().enabled(true).build()) + .build() + ) + ); } ``` @@ -929,10 +927,10 @@ You can also provide search results directly in user messages. This is useful fo ``` ```typescript TypeScript - const anthropic = new Anthropic(); + const client = new Anthropic(); // Provide search results directly in the user message - const response = await anthropic.messages.create({ + const response = await client.messages.create({ model: "claude-opus-4-8", max_tokens: 1024, messages: [ @@ -1055,49 +1053,47 @@ You can also provide search results directly in user messages. This is useful fo import com.anthropic.models.messages.TextBlockParam; // ... - public class SearchResultExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_4_8) - .maxTokens(1024L) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofSearchResult( - SearchResultBlockParam.builder() - .source("https://docs.company.com/api-reference") - .title("API Reference - Authentication") - .content(List.of( - TextBlockParam.builder() - .text("All API requests must include an API key in the Authorization header. Keys can be generated from the dashboard. Rate limits: 1000 requests per hour for standard tier, 10000 for premium.") - .build() - )) - .citations(CitationsConfigParam.builder().enabled(true).build()) - .build() - ), - ContentBlockParam.ofSearchResult( - SearchResultBlockParam.builder() - .source("https://docs.company.com/quickstart") - .title("Getting Started Guide") - .content(List.of( - TextBlockParam.builder() - .text("To get started: 1) Sign up for an account, 2) Generate an API key from the dashboard, 3) Install our SDK using pip install company-sdk, 4) Initialize the client with your API key.") - .build() - )) - .citations(CitationsConfigParam.builder().enabled(true).build()) - .build() - ), - ContentBlockParam.ofText( - TextBlockParam.builder() - .text("Based on these search results, how do I authenticate API requests and what are the rate limits?") - .build() - ) - )) - .build(); + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - Message response = client.messages().create(params); - System.out.println(response); - } + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(1024L) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofSearchResult( + SearchResultBlockParam.builder() + .source("https://docs.company.com/api-reference") + .title("API Reference - Authentication") + .content(List.of( + TextBlockParam.builder() + .text("All API requests must include an API key in the Authorization header. Keys can be generated from the dashboard. Rate limits: 1000 requests per hour for standard tier, 10000 for premium.") + .build() + )) + .citations(CitationsConfigParam.builder().enabled(true).build()) + .build() + ), + ContentBlockParam.ofSearchResult( + SearchResultBlockParam.builder() + .source("https://docs.company.com/quickstart") + .title("Getting Started Guide") + .content(List.of( + TextBlockParam.builder() + .text("To get started: 1) Sign up for an account, 2) Generate an API key from the dashboard, 3) Install our SDK using pip install company-sdk, 4) Initialize the client with your API key.") + .build() + )) + .citations(CitationsConfigParam.builder().enabled(true).build()) + .build() + ), + ContentBlockParam.ofText( + TextBlockParam.builder() + .text("Based on these search results, how do I authenticate API requests and what are the rate limits?") + .build() + ) + )) + .build(); + + Message response = client.messages().create(params); + System.out.println(response); } ``` @@ -1542,7 +1538,7 @@ The following example replays a complete conversation. The first user message ca ``` ```typescript TypeScript - const anthropic = new Anthropic(); + const client = new Anthropic(); const knowledgeBaseTool: Anthropic.Tool = { name: "search_knowledge_base", @@ -1558,7 +1554,7 @@ The following example replays a complete conversation. The first user message ca // Replay a conversation that provides search results both ways: the first // user message carries a pre-fetched result, the tool result returns another - const response = await anthropic.messages.create({ + const response = await client.messages.create({ model: "claude-opus-4-8", max_tokens: 1024, tools: [knowledgeBaseTool], @@ -1788,70 +1784,68 @@ The following example replays a complete conversation. The first user message ca import com.anthropic.models.messages.ToolUseBlockParam; // ... - public class CombinedSearchResultsExample { - public static void main(String[] args) { - AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - - Tool knowledgeBaseTool = Tool.builder() - .name("search_knowledge_base") - .description("Search the company knowledge base for information") - .inputSchema(Tool.InputSchema.builder() - .properties(JsonValue.from(Map.of( - "query", Map.of("type", "string", "description", "The search query") - ))) - .putAdditionalProperty("required", JsonValue.from(List.of("query"))) + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + Tool knowledgeBaseTool = Tool.builder() + .name("search_knowledge_base") + .description("Search the company knowledge base for information") + .inputSchema(Tool.InputSchema.builder() + .properties(JsonValue.from(Map.of( + "query", Map.of("type", "string", "description", "The search query") + ))) + .putAdditionalProperty("required", JsonValue.from(List.of("query"))) + .build()) + .build(); + + // Replay a conversation that provides search results both ways: the first + // user message carries a pre-fetched result, the tool result returns another + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(1024L) + .addTool(knowledgeBaseTool) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofSearchResult(SearchResultBlockParam.builder() + .source("https://docs.company.com/overview") + .title("Product Overview") + .content(List.of(TextBlockParam.builder() + .text("Acme Dashboard is a monitoring tool for distributed systems. It supports real-time alerting and custom metric dashboards.") + .build())) + .citations(CitationsConfigParam.builder().enabled(true).build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("What does Acme Dashboard do, and what plans is it available on?") .build()) - .build(); - - // Replay a conversation that provides search results both ways: the first - // user message carries a pre-fetched result, the tool result returns another - MessageCreateParams params = MessageCreateParams.builder() - .model(Model.CLAUDE_OPUS_4_8) - .maxTokens(1024L) - .addTool(knowledgeBaseTool) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofSearchResult(SearchResultBlockParam.builder() - .source("https://docs.company.com/overview") - .title("Product Overview") - .content(List.of(TextBlockParam.builder() - .text("Acme Dashboard is a monitoring tool for distributed systems. It supports real-time alerting and custom metric dashboards.") - .build())) - .citations(CitationsConfigParam.builder().enabled(true).build()) - .build()), - ContentBlockParam.ofText(TextBlockParam.builder() - .text("What does Acme Dashboard do, and what plans is it available on?") - .build()) - )) - .addAssistantMessageOfBlockParams(List.of( - ContentBlockParam.ofText(TextBlockParam.builder() - .text("Let me check the pricing information.") - .build()), - ContentBlockParam.ofToolUse(ToolUseBlockParam.builder() - .id("toolu_01A09q90qw90lq917835lq9") - .name("search_knowledge_base") - .input(JsonValue.from(Map.of("query", "Acme Dashboard pricing plans"))) - .build()) - )) - .addUserMessageOfBlockParams(List.of( - ContentBlockParam.ofToolResult(ToolResultBlockParam.builder() - .toolUseId("toolu_01A09q90qw90lq917835lq9") - .contentOfBlocks(List.of( - ToolResultBlockParam.Content.Block.ofSearchResult(SearchResultBlockParam.builder() - .source("https://docs.company.com/pricing") - .title("Pricing Plans") - .content(List.of(TextBlockParam.builder() - .text("Acme Dashboard is available on the Starter plan at $10 per user per month and the Enterprise plan with custom pricing.") - .build())) - .citations(CitationsConfigParam.builder().enabled(true).build()) - .build()) - )) - .build()) - )) - .build(); + )) + .addAssistantMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Let me check the pricing information.") + .build()), + ContentBlockParam.ofToolUse(ToolUseBlockParam.builder() + .id("toolu_01A09q90qw90lq917835lq9") + .name("search_knowledge_base") + .input(JsonValue.from(Map.of("query", "Acme Dashboard pricing plans"))) + .build()) + )) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofToolResult(ToolResultBlockParam.builder() + .toolUseId("toolu_01A09q90qw90lq917835lq9") + .contentOfBlocks(List.of( + ToolResultBlockParam.Content.Block.ofSearchResult(SearchResultBlockParam.builder() + .source("https://docs.company.com/pricing") + .title("Pricing Plans") + .content(List.of(TextBlockParam.builder() + .text("Acme Dashboard is available on the Starter plan at $10 per user per month and the Enterprise plan with custom pricing.") + .build())) + .citations(CitationsConfigParam.builder().enabled(true).build()) + .build()) + )) + .build()) + )) + .build(); - Message response = client.messages().create(params); - System.out.println(response); - } + Message response = client.messages().create(params); + System.out.println(response); } ``` diff --git a/content/en/build-with-claude/streaming.md b/content/en/build-with-claude/streaming.md index 05d4ffd4a..bb2b6d299 100644 --- a/content/en/build-with-claude/streaming.md +++ b/content/en/build-with-claude/streaming.md @@ -343,11 +343,11 @@ Note: Current models only support emitting one complete key and value property f ### Thinking delta -When using [extended thinking](/docs/en/build-with-claude/extended-thinking#streaming-thinking) with streaming enabled, you'll receive thinking content through `thinking_delta` events. These deltas correspond to the `thinking` field of the `thinking` content blocks. +When using [thinking](/docs/en/build-with-claude/thinking#streaming-thinking) with streaming enabled, you'll receive thinking content through `thinking_delta` events. These deltas correspond to the `thinking` field of the `thinking` content blocks. For thinking content, a special `signature_delta` event is sent just before the `content_block_stop` event. This signature is used to verify the integrity of the thinking block. -When `display: "omitted"` is set on the thinking configuration, no `thinking_delta` events are sent. The thinking block opens, receives a single `signature_delta`, and closes. See [Controlling thinking display](/docs/en/build-with-claude/extended-thinking#controlling-thinking-display). +When `display: "omitted"` is set on the thinking configuration, no `thinking_delta` events are sent. The thinking block opens, receives a single `signature_delta`, and closes. See [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display). A typical thinking delta looks like: @@ -1507,8 +1507,8 @@ For Claude 4.6 and later models, the same capture-and-resume strategy applies, b Stream tool input JSON without server-side buffering for lower latency. - - Stream extended thinking output with `thinking_delta` and `signature_delta` events. + + Stream thinking output with `thinking_delta` and `signature_delta` events. diff --git a/content/en/build-with-claude/structured-outputs.md b/content/en/build-with-claude/structured-outputs.md index 1094c6b63..da7667ff8 100644 --- a/content/en/build-with-claude/structured-outputs.md +++ b/content/en/build-with-claude/structured-outputs.md @@ -2842,7 +2842,7 @@ For ZDR and HIPAA eligibility across all features, see [API and data retention]( * **Message Prefilling:** Incompatible with JSON outputs - **Grammar scope:** Grammars apply only to Claude's direct output, not to tool use calls, tool results, or thinking tags (when using [Extended Thinking](/docs/en/build-with-claude/extended-thinking)). Grammar state resets between sections, allowing Claude to think freely while still producing structured output in the final response. + **Grammar scope:** Grammars apply only to Claude's direct output, not to tool use calls, tool results, or thinking tags (when using [thinking](/docs/en/build-with-claude/thinking)). Grammar state resets between sections, allowing Claude to think freely while still producing structured output in the final response. ## Next steps diff --git a/content/en/build-with-claude/task-budgets.md b/content/en/build-with-claude/task-budgets.md index 47de70d96..a9e51486c 100644 --- a/content/en/build-with-claude/task-budgets.md +++ b/content/en/build-with-claude/task-budgets.md @@ -567,7 +567,7 @@ The minimum accepted `task_budget.total` is **20,000 tokens**; values below the * **`max_tokens`:** Orthogonal to task budgets. `max_tokens` is a hard per-request cap on generated tokens, while `task_budget` is an advisory cap across the full agentic loop (potentially spanning many requests). At `xhigh` or `max` effort, set `max_tokens` to at least 64k to give Claude room to think and act on each request. * **[Effort](/docs/en/build-with-claude/effort):** Effort controls how deeply Claude reasons per step. Task budgets control how much total work Claude does across an agentic loop. The two are complementary: effort tunes depth, task budgets tune breadth. -* **[Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking):** Task budgets include thinking tokens in the count, so adaptive thinking naturally scales down as the budget depletes. +* **[Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost):** Task budgets include thinking tokens in the count, so adaptive thinking naturally scales down as the budget depletes. * **[Prompt caching](/docs/en/build-with-claude/prompt-caching):** The budget-countdown marker is injected server-side per turn, so it does not match across requests. If your client decrements `task_budget.remaining` on each follow-up request, the changed value invalidates any cache prefix that contains it. To preserve caching, set the budget once on the initial request and let the model self-regulate against the server-side countdown rather than mutating the budget client-side. ## Feature support @@ -592,7 +592,7 @@ Task budgets are not supported on [Claude Code](https://code.claude.com/docs/en/ Control how thoroughly Claude reasons about each step of an agentic loop. - + Let Claude decide when and how much to use extended thinking. diff --git a/content/en/build-with-claude/thinking-steering-and-cost.md b/content/en/build-with-claude/thinking-steering-and-cost.md new file mode 100644 index 000000000..6f5679140 --- /dev/null +++ b/content/en/build-with-claude/thinking-steering-and-cost.md @@ -0,0 +1,947 @@ +# Steering thinking + +Steer how often and how deeply Claude thinks with effort levels, system prompt guidance, and per-message steering, and understand thinking's cost and pricing. + +--- + + + For how zero data retention (ZDR) applies to this feature, see [API and data retention](/docs/en/manage-claude/api-and-data-retention). + + +Claude's thinking is adaptive: the model evaluates each request and decides for itself whether to think and how much. You set an intent, optionally specify the effort, and the model allocates reasoning where it judges reasoning will help. + +This makes thinking a strong fit for workloads that mix trivial and complex requests, and for long-horizon agentic workflows where the right amount of reasoning varies from step to step. + +For how to turn thinking on, how to read thinking output, and [thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5), see the [Thinking](/docs/en/build-with-claude/thinking) overview. This page covers how Claude decides when to think, how to steer that decision, and the caching, cost, and pricing mechanics that follow from it. + +## How Claude decides when to think + +Thinking is optional for the model. On each request, Claude weighs the complexity of the input and decides whether deeper reasoning would improve the answer. A simple factual question may get a direct response with no thinking block at all; a multistep math problem or a tricky debugging task triggers deeper reasoning. + +The decision happens per request. The same conversation can contain turns with and without thinking, and a turn where Claude chose not to think contains no thinking block. Don't build application logic that assumes every assistant turn starts with one. + +The primary control over this decision is the [effort](/docs/en/build-with-claude/effort) parameter, which acts as soft guidance for how willing Claude should be to think and how deeply; see [Effort levels](#effort-levels) on this page for what each level does. + +If you want Claude to think less often, lower the effort level before reaching for prompt-based steering. + +Thinking also interleaves with tool use automatically: Claude can think between tool calls, reflecting on each tool result before deciding what to do next ([interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking)). You don't need a beta header or any additional configuration for this. + +For the full picture of how the thinking configuration and the effort parameter interact, see [Thinking and effort](/docs/en/build-with-claude/thinking#thinking-and-effort). + +## Steering how often Claude thinks + +Whether Claude thinks on a given turn is promptable. Effort sets the overall posture, but you can also shape the decision directly with natural-language guidance, either globally in the system prompt or per message from the user turn. + +Use the two levers together in this order: + +1. Set the effort level that matches your workload's default balance of quality and latency. +2. Add prompt guidance only if Claude's triggering still doesn't match your needs at that level. + +For broader prompting guidance with thinking, see [leverage thinking and interleaved thinking capabilities](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#leverage-thinking-and-interleaved-thinking-capabilities). + +### Effort levels + +Effort is the primary steering lever for thinking. Each level sets a different default for how often Claude thinks and how deeply: + +| Effort level | Thinking behavior | +| ---------------- | ------------------------------------------------------------------------------------ | +| `max` | Claude always thinks with no constraints on thinking depth. | +| `xhigh` | Claude always thinks deeply with extended exploration. | +| `high` (default) | Claude almost always thinks. Provides deep reasoning on complex tasks. | +| `medium` | Claude uses moderate thinking. May skip thinking for simple queries. | +| `low` | Claude minimizes thinking. Skips thinking for simple tasks where speed matters most. | + +This table describes how each level changes thinking behavior. For guidance on which level to choose for a given workload, including per-model recommendations, see [When to adjust the effort parameter](/docs/en/build-with-claude/effort#when-to-adjust-the-effort-parameter) on the effort page. + +Effort is set at `output_config.effort`, not inside the `thinking` object; for full per-language examples, see [Effort](/docs/en/build-with-claude/effort#basic-usage). + +```json +{ + "model": "claude-opus-4-8", + "max_tokens": 4096, + "output_config": { "effort": "medium" }, + "messages": [{ "role": "user", "content": "..." }] +} +``` + +Level availability varies by model; the [effort availability table](/docs/en/build-with-claude/effort#effort-levels) on the effort page is the authority for which levels each model supports. + +### System prompt guidance + +System prompt guidance shifts Claude's thinking threshold for every request in the conversation. If Claude is thinking more often than your workload needs, add guidance like this to your system prompt: + +```text wrap +Extended thinking adds latency and should only be used when it +will meaningfully improve answer quality, typically for problems +that require multistep reasoning. When in doubt, respond directly. +``` + +To encourage thinking instead, use a phrase like: + +```text wrap +This task involves multistep reasoning. Think carefully before responding. +``` + +Steering effectiveness can be sensitive to exact wording. If one phrasing doesn't produce the behavior you want, try a more direct variant. + +### Per-message steering + +You can also steer thinking on a per-message basis from the user turn, independently of the system prompt. Appending `"Please think hard before responding."` to a user message encourages Claude to think on that turn; `"Answer directly without deliberating."` suppresses it. + +Per-message steering is useful when only some requests in a conversation warrant extended reasoning. An agent harness, for example, can append the encouraging phrase on planning steps and the suppressing phrase on routine confirmations, without touching the system prompt or changing any request parameters between turns. + +### Verify steering on your workload + +Prompt-based steering changes model behavior, so treat it like any other prompt change: measure before you ship. Run a representative sample of your traffic with and without the guidance, and compare how often thinking triggers (the presence of thinking blocks in responses), output token usage, latency, and answer quality on the cases that matter to you. + + + Steering Claude to think less often may reduce quality on tasks that benefit from reasoning. Lowering the [effort](/docs/en/build-with-claude/effort) level is usually the better first lever, since it is a calibrated control rather than a wording-sensitive instruction. Measure the impact on your specific workloads before deploying prompt-based tuning to production. + + +## Mechanics + +Three mechanics follow from Claude managing its own thinking: turn validation, prompt caching, and how you bound cost. + +### Turn validation + +Assistant turns don't need to start with a thinking block. (Models using a legacy manual thinking budget enforce that the final assistant turn of a thinking-enabled request begins with one; see [Turn structure in manual mode](/docs/en/build-with-claude/extended-thinking#turn-structure-in-manual-mode).) + +For multi-turn applications, this means you can pass back conversation history in whatever shape you have it: + +* Assistant turns where Claude chose not to think are valid history as-is. +* You can resume a conversation that began without thinking, or that used a different thinking configuration, without rewriting its history. +* History assembled from mixed sources doesn't need thinking blocks reinserted at the start of each assistant turn to pass validation. + +The relaxation is about validation, not about what you should send. When you have thinking blocks, pass them back unmodified, particularly during tool use, where they carry the reasoning behind Claude's tool calls. See the [Thinking](/docs/en/build-with-claude/thinking) overview for the full rules. + +### Prompt caching + +Consecutive requests that keep the same thinking configuration and effort level preserve prompt caching; see [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching) for the full rules. The resolved effort value is rendered into the prompt, so changing it between requests invalidates cache breakpoints, just as changing the legacy [`budget_tokens`](/docs/en/build-with-claude/extended-thinking#extended-thinking-with-prompt-caching) parameter does on models that use it. Setting `effort` explicitly to the model's default is equivalent to omitting it and does not break the cache. + +The practical consequence: pick a thinking configuration and an effort level per conversation and keep them. If some turns need more or less thinking, steer with [per-message prompting](#tuning-thinking-behavior): guidance appended to the newest user message leaves earlier cache breakpoints intact, where a configuration or effort change does not. + +The following example demonstrates the invalidation with a multi-turn script you can run yourself: + + + + + + This workflow doesn't translate well to a one-off shell command. See the SDK tabs for the multi-turn pattern; per-turn HTTP requests follow the examples on the [Prompt caching](/docs/en/build-with-claude/prompt-caching) page. + + + + + + This workflow doesn't translate well to a one-off shell command. See the SDK tabs for the multi-turn pattern; per-turn CLI invocations follow the examples on the [Prompt caching](/docs/en/build-with-claude/prompt-caching) page. + + + + + ```python + import requests + + client = Anthropic() + + + def fetch_article_content(url): + text = requests.get(url).text + lines = (line.strip() for line in text.splitlines()) + return "\n".join(line for line in lines if line) + + + # Fetch the content of the article + book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" + book_content = fetch_article_content(book_url) + # Use just enough text for caching (first few chapters) + LARGE_TEXT = book_content[:10000] + + # No system prompt - caching in messages instead + MESSAGES = [ + { + "role": "user", + "content": [ + { + "type": "text", + "text": LARGE_TEXT, + "cache_control": {"type": "ephemeral"}, + }, + {"type": "text", "text": "Analyze the tone of this passage."}, + ], + } + ] + + # First request - establish cache + print("First request - establishing cache") + response1 = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive"}, + messages=MESSAGES, + ) + + print(f"First response usage: {response1.usage}") + + MESSAGES.append({"role": "assistant", "content": response1.content}) + MESSAGES.append({"role": "user", "content": "Analyze the characters in this passage."}) + + # Second request - same configuration (cache hit expected) + print("\nSecond request - same configuration (cache hit expected)") + response2 = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive"}, + messages=MESSAGES, + ) + + print(f"Second response usage: {response2.usage}") + + MESSAGES.append({"role": "assistant", "content": response2.content}) + MESSAGES.append({"role": "user", "content": "Analyze the setting in this passage."}) + + # Third request - different effort level (cache miss expected) + print("\nThird request - different effort level (cache miss expected)") + response3 = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive"}, + output_config={"effort": "medium"}, + messages=MESSAGES, + ) + + print(f"Third response usage: {response3.usage}") + ``` + + + + ```typescript + + const client = new Anthropic(); + + async function fetchArticleContent(url: string): Promise { + const response = await fetch(url); + const text = await response.text(); + const lines = text.split("\n").map((line) => line.trim()); + return lines.filter((line) => line).join("\n"); + } + + const bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + const bookContent = await fetchArticleContent(bookUrl); + const LARGE_TEXT = bookContent.substring(0, 10000); + + // No system prompt - caching in messages instead + const messages: Anthropic.MessageParam[] = [ + { + role: "user", + content: [ + { + type: "text", + text: LARGE_TEXT, + cache_control: { type: "ephemeral" } + }, + { + type: "text", + text: "Analyze the tone of this passage." + } + ] + } + ]; + + // First request - establish cache + console.log("First request - establishing cache"); + const response1 = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { type: "adaptive" }, + messages + }); + + console.log("First response usage: ", response1.usage); + + messages.push( + { role: "assistant", content: response1.content }, + { role: "user", content: "Analyze the characters in this passage." } + ); + + // Second request - same configuration (cache hit expected) + console.log("\nSecond request - same configuration (cache hit expected)"); + const response2 = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { type: "adaptive" }, + messages + }); + + console.log("Second response usage: ", response2.usage); + + messages.push( + { role: "assistant", content: response2.content }, + { role: "user", content: "Analyze the setting in this passage." } + ); + + // Third request - different effort level (cache miss expected) + console.log("\nThird request - different effort level (cache miss expected)"); + const response3 = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { type: "adaptive" }, + output_config: { effort: "medium" }, + messages + }); + + console.log("Third response usage: ", response3.usage); + ``` + + + + ```csharp + AnthropicClient client = new(); + + string bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + string bookContent = await FetchArticleContent(bookUrl); + string largeText = bookContent.Substring(0, Math.Min(10000, bookContent.Length)); + + Console.WriteLine("First request - establishing cache"); + var parameters1 = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Messages = + [ + new() + { + Role = Role.User, + Content = new MessageParamContent(new List + { + new ContentBlockParam(new TextBlockParam() + { + Text = largeText, + CacheControl = new CacheControlEphemeral(), + }), + new ContentBlockParam(new TextBlockParam() + { + Text = "Analyze the tone of this passage." + }), + }) + } + ] + }; + + var response1 = await client.Messages.Create(parameters1); + Console.WriteLine($"First response usage: {response1.Usage}"); + + Console.WriteLine("\nSecond request - same configuration (cache hit expected)"); + var parameters2 = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Messages = + [ + new() + { + Role = Role.User, + Content = new MessageParamContent(new List + { + new ContentBlockParam(new TextBlockParam() + { + Text = largeText, + CacheControl = new CacheControlEphemeral(), + }), + new ContentBlockParam(new TextBlockParam() + { + Text = "Analyze the tone of this passage." + }), + }) + }, + new() + { + Role = Role.Assistant, + Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() + }, + new() + { + Role = Role.User, + Content = "Analyze the characters in this passage." + } + ] + }; + + var response2 = await client.Messages.Create(parameters2); + Console.WriteLine($"Second response usage: {response2.Usage}"); + + Console.WriteLine("\nThird request - different effort level (cache miss expected)"); + var parameters3 = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + OutputConfig = new OutputConfig + { + Effort = Effort.Medium + }, + Messages = + [ + new() + { + Role = Role.User, + Content = new MessageParamContent(new List + { + new ContentBlockParam(new TextBlockParam() + { + Text = largeText, + CacheControl = new CacheControlEphemeral(), + }), + new ContentBlockParam(new TextBlockParam() + { + Text = "Analyze the tone of this passage." + }), + }) + }, + new() + { + Role = Role.Assistant, + Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList() + }, + new() + { + Role = Role.User, + Content = "Analyze the characters in this passage." + }, + new() + { + Role = Role.Assistant, + Content = response2.Content.Select(block => new ContentBlockParam(block.Json)).ToList() + }, + new() + { + Role = Role.User, + Content = "Analyze the setting in this passage." + } + ] + }; + + var response3 = await client.Messages.Create(parameters3); + Console.WriteLine($"Third response usage: {response3.Usage}"); + + static async Task FetchArticleContent(string url) + { + using HttpClient httpClient = new(); + string content = await httpClient.GetStringAsync(url); + return content; + } + ``` + + + + ```go + client := anthropic.NewClient() + + bookURL := "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" + bookContent, err := fetchArticleContent(bookURL) + if err != nil { + log.Fatal(err) + } + + largeText := bookContent + if len(largeText) > 10000 { + largeText = largeText[:10000] + } + + // No system prompt - caching in messages instead + messages := []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.ContentBlockParamUnion{OfText: &anthropic.TextBlockParam{ + Text: largeText, + CacheControl: anthropic.NewCacheControlEphemeralParam(), + }}, + anthropic.NewTextBlock("Analyze the tone of this passage."), + ), + } + + // First request - establish cache + fmt.Println("First request - establishing cache") + response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Messages: messages, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("First response usage: %s\n", response1.Usage.RawJSON()) + + messages = append(messages, response1.ToParam()) + messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the characters in this passage."))) + + // Second request - same configuration (cache hit expected) + fmt.Println("\nSecond request - same configuration (cache hit expected)") + response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Messages: messages, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Second response usage: %s\n", response2.Usage.RawJSON()) + + messages = append(messages, response2.ToParam()) + messages = append(messages, anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze the setting in this passage."))) + + // Third request - different effort level (cache miss expected) + fmt.Println("\nThird request - different effort level (cache miss expected)") + response3, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + OutputConfig: anthropic.OutputConfigParam{ + Effort: anthropic.OutputConfigEffortMedium, + }, + Messages: messages, + }) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Third response usage: %s\n", response3.Usage.RawJSON()) + ``` + + + + ```java + import com.anthropic.models.messages.CacheControlEphemeral; + // ... + void main() throws Exception { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + String bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + String bookContent = fetchArticleContent(bookUrl); + String largeText = bookContent.substring(0, Math.min(10000, bookContent.length())); + + // First request - establishing cache + IO.println("First request - establishing cache"); + MessageCreateParams params1 = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text(largeText) + .cacheControl(CacheControlEphemeral.builder().build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Analyze the tone of this passage.") + .build()) + )) + .build(); + + Message response1 = client.messages().create(params1); + IO.println("First response usage: " + response1.usage()); + + // Second request - same configuration (cache hit expected) + IO.println("\nSecond request - same configuration (cache hit expected)"); + MessageCreateParams params2 = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text(largeText) + .cacheControl(CacheControlEphemeral.builder().build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Analyze the tone of this passage.") + .build()) + )) + .addAssistantMessageOfBlockParams(response1.content().stream() + .map(block -> block.toParam()) + .collect(java.util.stream.Collectors.toList())) + .addUserMessage("Analyze the characters in this passage.") + .build(); + + Message response2 = client.messages().create(params2); + IO.println("Second response usage: " + response2.usage()); + + // Third request - different effort level (cache miss expected) + IO.println("\nThird request - different effort level (cache miss expected)"); + MessageCreateParams params3 = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .outputConfig(OutputConfig.builder() + .effort(OutputConfig.Effort.MEDIUM) + .build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() + .text(largeText) + .cacheControl(CacheControlEphemeral.builder().build()) + .build()), + ContentBlockParam.ofText(TextBlockParam.builder() + .text("Analyze the tone of this passage.") + .build()) + )) + .addAssistantMessageOfBlockParams(response1.content().stream() + .map(block -> block.toParam()) + .collect(java.util.stream.Collectors.toList())) + .addUserMessage("Analyze the characters in this passage.") + .addAssistantMessageOfBlockParams(response2.content().stream() + .map(block -> block.toParam()) + .collect(java.util.stream.Collectors.toList())) + .addUserMessage("Analyze the setting in this passage.") + .build(); + + Message response3 = client.messages().create(params3); + IO.println("Third response usage: " + response3.usage()); + } + + String fetchArticleContent(String url) throws Exception { + HttpClient client = HttpClient.newHttpClient(); + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(url)) + .build(); + HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); + return response.body(); + } + ``` + + + + ```php + function fetchArticleContent($url) { + $content = file_get_contents($url); + $lines = explode("\n", $content); + $cleanedLines = array_filter(array_map('trim', $lines)); + return implode("\n", $cleanedLines); + } + + $client = new Client(); + + $bookUrl = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt"; + $bookContent = fetchArticleContent($bookUrl); + $largeText = substr($bookContent, 0, 10000); + + echo "First request - establishing cache\n"; + $response1 = $client->messages->create( + maxTokens: 16000, + messages: [[ + 'role' => 'user', + 'content' => [ + [ + 'type' => 'text', + 'text' => $largeText, + 'cache_control' => ['type' => 'ephemeral'] + ], + [ + 'type' => 'text', + 'text' => 'Analyze the tone of this passage.' + ] + ] + ]], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive'], + ); + + echo "First response usage: " . json_encode($response1->usage) . "\n"; + + echo "\nSecond request - same configuration (cache hit expected)\n"; + $response2 = $client->messages->create( + maxTokens: 16000, + messages: [ + [ + 'role' => 'user', + 'content' => [ + [ + 'type' => 'text', + 'text' => $largeText, + 'cache_control' => ['type' => 'ephemeral'] + ], + [ + 'type' => 'text', + 'text' => 'Analyze the tone of this passage.' + ] + ] + ], + [ + 'role' => 'assistant', + 'content' => $response1->content + ], + [ + 'role' => 'user', + 'content' => 'Analyze the characters in this passage.' + ] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive'], + ); + + echo "Second response usage: " . json_encode($response2->usage) . "\n"; + + echo "\nThird request - different effort level (cache miss expected)\n"; + $response3 = $client->messages->create( + maxTokens: 16000, + messages: [ + [ + 'role' => 'user', + 'content' => [ + [ + 'type' => 'text', + 'text' => $largeText, + 'cache_control' => ['type' => 'ephemeral'] + ], + [ + 'type' => 'text', + 'text' => 'Analyze the tone of this passage.' + ] + ] + ], + [ + 'role' => 'assistant', + 'content' => $response1->content + ], + [ + 'role' => 'user', + 'content' => 'Analyze the characters in this passage.' + ], + [ + 'role' => 'assistant', + 'content' => $response2->content + ], + [ + 'role' => 'user', + 'content' => 'Analyze the setting in this passage.' + ] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive'], + outputConfig: ['effort' => 'medium'], + ); + + echo "Third response usage: " . json_encode($response3->usage) . "\n"; + ``` + + + + ```ruby + require "net/http" + require "uri" + + def fetch_article_content(url) + uri = URI.parse(url) + response = Net::HTTP.get_response(uri) + text = response.body + + lines = text.split("\n").map(&:strip) + lines.reject(&:empty?).join("\n") + end + + client = Anthropic::Client.new + + book_url = "https://www.gutenberg.org/cache/epub/1342/pg1342.txt" + book_content = fetch_article_content(book_url) + large_text = book_content[0...10000] + + puts "First request - establishing cache" + response1 = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + messages: [{ + role: "user", + content: [ + { + type: "text", + text: large_text, + cache_control: { type: "ephemeral" } + }, + { + type: "text", + text: "Analyze the tone of this passage." + } + ] + }] + ) + + puts "First response usage: #{response1.usage}" + + puts "\nSecond request - same configuration (cache hit expected)" + response2 = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + messages: [ + { + role: "user", + content: [ + { + type: "text", + text: large_text, + cache_control: { type: "ephemeral" } + }, + { + type: "text", + text: "Analyze the tone of this passage." + } + ] + }, + { + role: "assistant", + content: response1.content + }, + { + role: "user", + content: "Analyze the characters in this passage." + } + ] + ) + + puts "Second response usage: #{response2.usage}" + + puts "\nThird request - different effort level (cache miss expected)" + response3 = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + output_config: { + effort: "medium" + }, + messages: [ + { + role: "user", + content: [ + { + type: "text", + text: large_text, + cache_control: { type: "ephemeral" } + }, + { + type: "text", + text: "Analyze the tone of this passage." + } + ] + }, + { + role: "assistant", + content: response1.content + }, + { + role: "user", + content: "Analyze the characters in this passage." + }, + { + role: "assistant", + content: response2.content + }, + { + role: "user", + content: "Analyze the setting in this passage." + } + ] + ) + + puts "Third response usage: #{response3.usage}" + ``` + + + + Here is the output of the script (you may see slightly different numbers): + + ```text Output wrap + First request - establishing cache + First response usage: { cache_creation_input_tokens: 3546, cache_read_input_tokens: 0, input_tokens: 15, output_tokens: 1033 } + + Second request - same configuration (cache hit expected) + Second response usage: { cache_creation_input_tokens: 0, cache_read_input_tokens: 3546, input_tokens: 1062, output_tokens: 1630 } + + Third request - different effort level (cache miss expected) + Third response usage: { cache_creation_input_tokens: 3546, cache_read_input_tokens: 0, input_tokens: 2706, output_tokens: 1468 } + ``` + + With the cache breakpoint in the messages array, changing effort from the default `high` to `medium` invalidates it: the third request shows `cache_creation_input_tokens=3546` and `cache_read_input_tokens=0` where the second showed a full cache read. + + +### Cost control + +You don't set a thinking token budget. Two controls bound cost: + +* `max_tokens` is a hard cap on total output for the request, thinking and response text combined. Claude never generates past it. In a tool-use loop, each request in the turn has its own `max_tokens`, so it doesn't bound the whole turn's spend. +* `effort` is soft guidance on how much of that output Claude allocates to thinking. It shapes behavior but doesn't guarantee a token count. + +Because thinking counts toward `max_tokens`, set it high enough to leave room for both the reasoning and the answer. A `max_tokens` sized for a response with no thinking is often too small once Claude starts thinking on hard requests. + +At `high` effort and above, Claude may think extensively and is more likely to exhaust the budget. If you see [`stop_reason: "max_tokens"`](/docs/en/build-with-claude/thinking-troubleshooting#stopped-at-max-tokens) in responses, you have two remedies: + +* Raise `max_tokens` to give the model more room for thinking plus the answer. +* Lower the effort level so Claude thinks less and leaves more of the budget for response text. + +Which one is right depends on whether the truncated responses needed the reasoning. If quality on those requests matters, raise the cap; if they were over-thought, lower the effort. + +## Pricing + +Thinking incurs charges for: + +* Tokens Claude uses while thinking (billed as output tokens) +* Thinking blocks from prior assistant turns that remain in context, per the [preservation default](/docs/en/build-with-claude/thinking#thinking-block-preservation-by-model): all turns by default on keep-all models, only the last turn elsewhere (billed as input tokens) +* Standard text output tokens + + + When thinking is active, a specialized system prompt is automatically included to support this feature. + + +What you're billed for is the same regardless of the `display` setting; only what you see changes: + +| | `display: "summarized"` | `display: "omitted"` | +| --------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| **Input tokens** | Tokens in your original request | Same as summarized | +| **Output tokens (billed)** | The full thinking tokens Claude generated internally | Same as summarized | +| **Output tokens (visible)** | The summarized thinking text | Zero thinking tokens (the `thinking` field is empty) | +| **Summary generation** | No charge | Not applicable | + + + The billed output token count does **not** match the visible token count in the response. You are billed for the full thinking process, not the thinking content visible in the response. + + +To see how many billed output tokens were spent on internal reasoning, read `usage.output_tokens_details.thinking_tokens` in the response. This value reflects the raw reasoning the model generated (not the summarized text returned in the body) and is always less than or equal to `output_tokens`. Subtract it from `output_tokens` to approximate the non-reasoning portion of the output. When streaming, this breakdown appears only on the final `message_delta` event. + +```json +{ + "usage": { + "input_tokens": 25, + "output_tokens": 348, + "output_tokens_details": { + "thinking_tokens": 312 + } + } +} +``` + +`output_tokens` remains the inclusive, authoritative total used for billing. `output_tokens_details` is a read-only breakdown for observability. For complete pricing information including base rates, cache writes, cache hits, and output tokens, see [Pricing](/docs/en/about-claude/pricing). + +## Next steps + + + + Turn thinking on, read thinking output, and check per-model support. + + + + Preserve thinking blocks across tool calls and manage thinking in multi-turn conversations. + + + + Control how much thinking and output Claude allocates per request. + + diff --git a/content/en/build-with-claude/thinking-tool-workflows.md b/content/en/build-with-claude/thinking-tool-workflows.md new file mode 100644 index 000000000..cbbfd4fb4 --- /dev/null +++ b/content/en/build-with-claude/thinking-tool-workflows.md @@ -0,0 +1,868 @@ +# Thinking in tool and multi-turn workflows + +Walk through a complete two-turn tool-use round trip that preserves thinking blocks correctly, and see how interleaved thinking changes the flow. + +--- + + + For how zero data retention (ZDR) applies to this feature, see [API and data retention](/docs/en/manage-claude/api-and-data-retention). + + +This page walks through a complete two-turn tool-use round trip with thinking enabled: Claude thinks, requests a tool call, receives the result, and finishes its answer, with the thinking blocks handled correctly at every step. The full rules live on the [Thinking](/docs/en/build-with-claude/thinking) page, in [Thinking with tool use](/docs/en/build-with-claude/thinking#thinking-with-tool-use) and [Preserving thinking blocks](/docs/en/build-with-claude/thinking#preserving-thinking-blocks); this page shows those rules applied in runnable code. + +## The rules this walkthrough applies + +Each link leads to the full statement on the Thinking page: + +* [Limit tool choice to `auto` or `none`](/docs/en/build-with-claude/thinking#thinking-with-tool-use): `tool_choice` options that force tool use return an error while thinking is on. +* [Keep one thinking configuration per assistant turn](/docs/en/build-with-claude/thinking#thinking-with-tool-use): a tool-use loop is one assistant turn, so change the configuration only between turns. +* [Pass thinking blocks back complete and unmodified](/docs/en/build-with-claude/thinking#preserving-thinking-blocks): when you return a tool result, the thinking blocks from the assistant message must come back with it. +* [Echo the assistant message exactly as received](/docs/en/build-with-claude/thinking#preserving-thinking-blocks): rebuilding the message or filtering out `redacted_thinking` blocks triggers a 400 error. + +The samples use adaptive thinking; on models that support only extended thinking, substitute `thinking: {type: "enabled", budget_tokens: N}`. The round-trip rules are identical. + +## Walk through a two-turn tool-use round trip + +The example defines a `get_weather` tool, lets Claude think and request a tool call, then returns the tool result along with the assistant turn echoed exactly as received, thinking block included. + + + + Send a request with adaptive thinking enabled and the tool defined. Apart from the `thinking` parameter, this is a standard [tool use](/docs/en/agents-and-tools/tool-use/overview) request: + + + ```bash CLI + ant messages create --transform content <<'YAML' + model: claude-opus-4-8 + max_tokens: 16000 + thinking: + type: adaptive + tools: + - name: get_weather + description: Get current weather for a location + input_schema: + type: object + properties: + location: + type: string + description: City name + required: + - location + messages: + - role: user + content: "What's the weather in Paris?" + YAML + ``` + + ```python Python + + client = anthropic.Anthropic() + + weather_tool = { + "name": "get_weather", + "description": "Get current weather for a location", + "input_schema": { + "type": "object", + "properties": {"location": {"type": "string", "description": "City name"}}, + "required": ["location"], + }, + } + + # First request - Claude responds with thinking and tool request + response = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive"}, + tools=[weather_tool], + messages=[{"role": "user", "content": "What's the weather in Paris?"}], + ) + print(response) + ``` + + ```typescript TypeScript + const client = new Anthropic(); + + const weatherTool: Anthropic.Tool = { + name: "get_weather", + description: "Get current weather for a location", + input_schema: { + type: "object", + properties: { + location: { type: "string", description: "City name" } + }, + required: ["location"] + } + }; + + // First request - Claude responds with thinking and tool request + const response = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + tools: [weatherTool], + messages: [{ role: "user", content: "What's the weather in Paris?" }] + }); + console.log(response); + ``` + + ```csharp C# + AnthropicClient client = new(); + + var weatherTool = new ToolUnion(new Tool() + { + Name = "get_weather", + Description = "Get current weather for a location", + InputSchema = new InputSchema() + { + Properties = new Dictionary + { + ["location"] = JsonSerializer.SerializeToElement(new { type = "string", description = "City name" }), + }, + Required = ["location"], + }, + }); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Tools = [weatherTool], + Messages = [new() { Role = Role.User, Content = "What's the weather in Paris?" }] + }; + + var message = await client.Messages.Create(parameters); + Console.WriteLine(message); + ``` + + ```go Go + client := anthropic.NewClient() + + weatherTool := anthropic.ToolUnionParam{ + OfTool: &anthropic.ToolParam{ + Name: "get_weather", + Description: anthropic.String("Get current weather for a location"), + InputSchema: anthropic.ToolInputSchemaParam{ + Properties: map[string]any{ + "location": map[string]any{ + "type": "string", + "description": "City name", + }, + }, + Required: []string{"location"}, + }, + }, + } + + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Tools: []anthropic.ToolUnionParam{weatherTool}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")), + }, + }) + if err != nil { + log.Fatal(err) + } + fmt.Println(response) + ``` + + ```java Java + import com.anthropic.models.messages.ThinkingConfigAdaptive; + // ... + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addTool(Tool.builder() + .name("get_weather") + .description("Get current weather for a location") + .inputSchema(Tool.InputSchema.builder() + .properties(JsonValue.from(Map.of( + "location", Map.of("type", "string", "description", "City name") + ))) + .required(List.of("location")) + .build()) + .build()) + .addUserMessage("What's the weather in Paris?") + .build(); + + Message response = client.messages().create(params); + IO.println(response); + ``` + + ```php PHP + $client = new Client(); + + $weatherTool = [ + 'name' => 'get_weather', + 'description' => 'Get current weather for a location', + 'input_schema' => [ + 'type' => 'object', + 'properties' => [ + 'location' => ['type' => 'string', 'description' => 'City name'] + ], + 'required' => ['location'] + ] + ]; + + $message = $client->messages->create( + maxTokens: 16000, + messages: [ + ['role' => 'user', 'content' => "What's the weather in Paris?"] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive'], + tools: [$weatherTool], + ); + echo $message; + ``` + + ```ruby Ruby + client = Anthropic::Client.new + + weather_tool = { + name: "get_weather", + description: "Get current weather for a location", + input_schema: { + type: "object", + properties: { + location: { type: "string", description: "City name" } + }, + required: ["location"] + } + } + + message = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + tools: [weather_tool], + messages: [ + { role: "user", content: "What's the weather in Paris?" } + ] + ) + puts message + ``` + + + + + You should see `thinking`, `text`, and `tool_use` blocks in the response content on a run where Claude chose to think (on simpler requests, adaptive mode may skip the thinking block). Keep this content array intact: the next step sends it back verbatim. + + + To see thinking text like this output, add `display: "summarized"` to the request. On models where display defaults to omitted, including claude-opus-4-8, the `thinking` field otherwise comes back as an empty string with only the `signature` populated. Either way, echo the content array back unchanged; see [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display). + + + ```json Output + { + "content": [ + { + "type": "thinking", + "thinking": "The user wants to know the current weather in Paris. I have access to a function `get_weather`...", + "signature": "BDaL4VrbR2Oj0hO4XpJxT28J5T...." + }, + { + "type": "text", + "text": "I can help you get the current weather information for Paris. Let me check that for you" + }, + { + "type": "tool_use", + "id": "toolu_01CswdEQBMshySk6Y9DFKrfq", + "name": "get_weather", + "input": { + "location": "Paris" + } + } + ] + } + ``` + + + + Run the tool on your side, then send a second request that appends two messages to the conversation. The first is the assistant content echoed back exactly as received, so the thinking block stays unchanged alongside the `tool_use` block. The second is a user message carrying the `tool_result`. + + Each sample is a self-contained script: it repeats the first request, then immediately sends the follow-up using the response it just received. + + + ```bash CLI + # First turn: write the assistant content array (thinking and tool_use + # blocks, signatures intact) to a file. Routing model-generated text + # through a file keeps it out of shell-expansion position later. + ant messages create --transform content --format jsonl \ + > assistant_content.json <<'YAML' + model: claude-opus-4-8 + max_tokens: 16000 + thinking: + type: adaptive + tools: + - name: get_weather + description: Get current weather for a location + input_schema: + type: object + properties: + location: + type: string + description: City name + required: [location] + messages: + - role: user + content: What's the weather in Paris? + YAML + + # Second turn: jq fills the two null placeholders from the captured file, + # so the blocks return verbatim as the assistant message. The thinking + # block MUST accompany the tool_use block. The quoted delimiter keeps the + # shell from expanding anything in the body. + jq --slurpfile blocks assistant_content.json ' + .messages[1].content = $blocks[0] | + .messages[2].content[0].tool_use_id = + ($blocks[0][] | select(.type == "tool_use") | .id) + ' <<'JSON' | ant messages create + { + "model": "claude-opus-4-8", + "max_tokens": 16000, + "thinking": {"type": "adaptive"}, + "tools": [{ + "name": "get_weather", + "description": "Get current weather for a location", + "input_schema": { + "type": "object", + "properties": { + "location": {"type": "string", "description": "City name"} + }, + "required": ["location"] + } + }], + "messages": [ + {"role": "user", "content": "What's the weather in Paris?"}, + {"role": "assistant", "content": null}, + {"role": "user", "content": [{ + "type": "tool_result", + "tool_use_id": null, + "content": "Current temperature: 88°F" + }]} + ] + } + JSON + ``` + + ```python Python + + client = anthropic.Anthropic() + weather_tool = { + "name": "get_weather", + "description": "Get current weather for a location", + "input_schema": { + "type": "object", + "properties": {"location": {"type": "string", "description": "City name"}}, + "required": ["location"], + }, + } + response = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive"}, + tools=[weather_tool], + messages=[{"role": "user", "content": "What's the weather in Paris?"}], + ) + # Extract the tool use block to get its ID for the tool result + tool_use_block = next(block for block in response.content if block.type == "tool_use") + + # Call your actual weather API, here is where your actual API call would go + # Let's pretend this is what we get back + weather_data = {"temperature": 88} + + # Second request - Include the assistant turn and the tool result + continuation = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive"}, + tools=[weather_tool], + messages=[ + {"role": "user", "content": "What's the weather in Paris?"}, + # Echo the assistant content exactly as received. When a thinking + # block is present, it must accompany the tool_use block. + {"role": "assistant", "content": response.content}, + { + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": tool_use_block.id, + "content": f"Current temperature: {weather_data['temperature']}°F", + } + ], + }, + ], + ) + print(continuation) + ``` + + ```typescript TypeScript + const client = new Anthropic(); + + const weatherTool: Anthropic.Tool = { + name: "get_weather", + description: "Get current weather for a location", + input_schema: { + type: "object", + properties: { + location: { type: "string", description: "City name" } + }, + required: ["location"] + } + }; + + const response = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + tools: [weatherTool], + messages: [{ role: "user", content: "What's the weather in Paris?" }] + }); + + // Extract the tool use block to get its ID for the tool result + const toolUseBlock = response.content.find( + (block): block is Anthropic.ToolUseBlock => block.type === "tool_use" + ); + + // Call your actual weather API, here is where your actual API call would go + // Let's pretend this is what we get back + const weatherData = { temperature: 88 }; + + if (toolUseBlock) { + // Second request - Include the assistant turn and the tool result + const continuation = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + tools: [weatherTool], + messages: [ + { role: "user", content: "What's the weather in Paris?" }, + // Echo the assistant content exactly as received. When a thinking + // block is present, it must accompany the tool_use block. + { role: "assistant", content: response.content }, + { + role: "user", + content: [ + { + type: "tool_result" as const, + tool_use_id: toolUseBlock.id, + content: `Current temperature: ${weatherData.temperature}°F` + } + ] + } + ] + }); + console.log(continuation); + } + ``` + + ```csharp C# + AnthropicClient client = new(); + + var weatherTool = new ToolUnion(new Tool() + { + Name = "get_weather", + Description = "Get current weather for a location", + InputSchema = new InputSchema() + { + Properties = new Dictionary + { + ["location"] = JsonSerializer.SerializeToElement(new { type = "string", description = "City name" }), + }, + Required = ["location"], + }, + }); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Tools = [weatherTool], + Messages = [ + new() { Role = Role.User, Content = "What's the weather in Paris?" } + ] + }; + + var response = await client.Messages.Create(parameters); + + // Extract the tool_use block to get its ID for the tool result + ToolUseBlock? toolUseBlock = null; + foreach (var block in response.Content) + { + if (block.TryPickToolUse(out var toolUse)) + { + toolUseBlock = toolUse; + break; + } + } + + var weatherData = new { temperature = 88 }; + + // Build continuation with tool result + var continuationParams = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive(), + Tools = [weatherTool], + Messages = [ + new() { Role = Role.User, Content = "What's the weather in Paris?" }, + // response.Content includes the thinking blocks; passing them back is required + new() { Role = Role.Assistant, Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList() }, + new() { Role = Role.User, Content = new MessageParamContent(new List + { + new ContentBlockParam(new ToolResultBlockParam() + { + ToolUseID = toolUseBlock?.ID ?? "", + Content = $"Current temperature: {weatherData.temperature}°F" + }) + })} + ] + }; + + var continuation = await client.Messages.Create(continuationParams); + Console.WriteLine(continuation); + ``` + + ```go Go + client := anthropic.NewClient() + + weatherTool := anthropic.ToolUnionParam{ + OfTool: &anthropic.ToolParam{ + Name: "get_weather", + Description: anthropic.String("Get current weather for a location"), + InputSchema: anthropic.ToolInputSchemaParam{ + Properties: map[string]any{ + "location": map[string]any{ + "type": "string", + "description": "City name", + }, + }, + Required: []string{"location"}, + }, + }, + } + + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Tools: []anthropic.ToolUnionParam{weatherTool}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")), + }, + }) + if err != nil { + log.Fatal(err) + } + + var toolUseBlock anthropic.ToolUseBlock + for _, block := range response.Content { + if v, ok := block.AsAny().(anthropic.ToolUseBlock); ok { + toolUseBlock = v + break + } + } + + weatherData := map[string]int{"temperature": 88} + + continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{}, + }, + Tools: []anthropic.ToolUnionParam{weatherTool}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in Paris?")), + response.ToParam(), + anthropic.NewUserMessage( + anthropic.NewToolResultBlock(toolUseBlock.ID, fmt.Sprintf("Current temperature: %d°F", weatherData["temperature"]), false), + ), + }, + }) + if err != nil { + log.Fatal(err) + } + + fmt.Println(continuation) + ``` + + ```java Java + import com.anthropic.models.messages.ThinkingConfigAdaptive; + // ... + + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + Tool weatherTool = Tool.builder() + .name("get_weather") + .description("Get current weather for a location") + .inputSchema(Tool.InputSchema.builder() + .properties(JsonValue.from(Map.of( + "location", Map.of("type", "string", "description", "City name") + ))) + .required(List.of("location")) + .build()) + .build(); + + MessageCreateParams initialParams = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addTool(weatherTool) + .addUserMessage("What's the weather in Paris?") + .build(); + + Message response = client.messages().create(initialParams); + + ToolUseBlock toolUseBlock = null; + for (var block : response.content()) { + if (block.toolUse().isPresent()) { + toolUseBlock = block.toolUse().get(); + break; + } + } + + int temperature = 88; + + // Second request: echo the assistant turn as received, then the tool result + MessageCreateParams continuationParams = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder().build()) + .addTool(weatherTool) + .addUserMessage("What's the weather in Paris?") + .addMessage(response) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofToolResult( + ToolResultBlockParam.builder() + .toolUseId(toolUseBlock.id()) + .content("Current temperature: " + temperature + "°F") + .build() + ) + )) + .build(); + + Message continuation = client.messages().create(continuationParams); + IO.println(continuation); + } + ``` + + ```php PHP + $client = new Client(); + + $weatherTool = [ + 'name' => 'get_weather', + 'description' => 'Get current weather for a location', + 'input_schema' => [ + 'type' => 'object', + 'properties' => [ + 'location' => [ + 'type' => 'string', + 'description' => 'City name' + ] + ], + 'required' => ['location'] + ] + ]; + + $response = $client->messages->create( + maxTokens: 16000, + messages: [ + ['role' => 'user', 'content' => "What's the weather in Paris?"] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive'], + tools: [$weatherTool], + ); + + $toolUseBlock = null; + foreach ($response->content as $block) { + if ($block->type === 'tool_use') { + $toolUseBlock = $block; + break; + } + } + + $weatherData = ['temperature' => 88]; + + $continuation = $client->messages->create( + maxTokens: 16000, + messages: [ + ['role' => 'user', 'content' => "What's the weather in Paris?"], + ['role' => 'assistant', 'content' => $response->content], + ['role' => 'user', 'content' => [ + [ + 'type' => 'tool_result', + 'tool_use_id' => $toolUseBlock->id, + 'content' => "Current temperature: {$weatherData['temperature']}°F" + ] + ]] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive'], + tools: [$weatherTool], + ); + + echo $continuation; + ``` + + ```ruby Ruby + client = Anthropic::Client.new + + weather_tool = { + name: "get_weather", + description: "Get current weather for a location", + input_schema: { + type: "object", + properties: { + location: { type: "string", description: "City name" } + }, + required: ["location"] + } + } + + response = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + tools: [weather_tool], + messages: [ + { role: "user", content: "What's the weather in Paris?" } + ] + ) + + tool_use_block = response.content.find { |block| block.type == :tool_use } + + raise "No tool_use block found" unless tool_use_block + + weather_data = { temperature: 88 } + + continuation = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive" + }, + tools: [weather_tool], + messages: [ + { role: "user", content: "What's the weather in Paris?" }, + { role: "assistant", content: response.content }, + { role: "user", content: [ + { + type: "tool_result", + tool_use_id: tool_use_block.id, + content: "Current temperature: #{weather_data[:temperature]}°F" + } + ] } + ] + ) + + puts continuation + ``` + + + + + You should see Claude complete the turn with text. Because [interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking) is automatic in adaptive mode, the continuation can also open with a new thinking block before the final text: + + ```json Output + { + "content": [ + { + "type": "text", + "text": "Currently in Paris, the temperature is 88°F (31°C)" + } + ] + } + ``` + + + +## How interleaved thinking changes the flow + +Interleaved thinking lets Claude think between tool calls, reasoning about each tool result before acting on it. The concept and per-model availability are covered in [Interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking) on the Thinking page; interleaving changes where thinking blocks appear, not whether tool calls can chain. The following comparison shows what interleaved thinking changes in a two-tool workflow: + + + + Without interleaved thinking, Claude thinks once at the start of the assistant turn. Subsequent responses after tool results continue without new thinking blocks. + + ```text + User: "What's the total revenue if we sold 150 units at $50 each, + and how does this compare to our average monthly revenue?" + + Response 1: [thinking] "I need to calculate 150 * $50, then check the database..." + [tool_use: calculator] { "expression": "150 * 50" } + ↓ tool result: "7500" + + Response 2: [tool_use: database_query] { "query": "SELECT AVG(revenue)..." } + ↑ no thinking block + ↓ tool result: "5200" + + Response 3: [text] "The total revenue is $7,500, which is 44% above your + average monthly revenue of $5,200." + ↑ no thinking block + ``` + + + + With interleaved thinking enabled, Claude can think after receiving each tool result, allowing it to reason about intermediate results before continuing. + + ```text + User: "What's the total revenue if we sold 150 units at $50 each, + and how does this compare to our average monthly revenue?" + + Response 1: [thinking] "I need to calculate 150 * $50 first..." + [tool_use: calculator] { "expression": "150 * 50" } + ↓ tool result: "7500" + + Response 2: [thinking] "Got $7,500. Now I should query the database to compare..." + [tool_use: database_query] { "query": "SELECT AVG(revenue)..." } + ↑ thinking after receiving calculator result + ↓ tool result: "5200" + + Response 3: [thinking] "$7,500 vs $5,200 average - that's a 44% increase..." + [text] "The total revenue is $7,500, which is 44% above your + average monthly revenue of $5,200." + ↑ thinking before final answer + ``` + + + +## Next steps + + + + The overview: turn thinking on, read thinking output, and review the full rules for tool use, caching, and streaming. + + + + Steer how often and how deeply Claude thinks with effort levels and prompt-based guidance. + + + + Manual thinking budgets on older models: `budget_tokens` mechanics and migration to adaptive. + + diff --git a/content/en/build-with-claude/thinking-troubleshooting.md b/content/en/build-with-claude/thinking-troubleshooting.md new file mode 100644 index 000000000..a032b9f2e --- /dev/null +++ b/content/en/build-with-claude/thinking-troubleshooting.md @@ -0,0 +1,144 @@ +# Troubleshooting thinking + +Diagnose and fix the most common thinking failures: configuration 400 errors, empty or missing thinking blocks, max_tokens stops, and cache misses. + +--- + + + For how zero data retention (ZDR) applies to this feature, see [API and data retention](/docs/en/manage-claude/api-and-data-retention). + + +This page covers the most common failures when configuring thinking or round-tripping thinking blocks (sending returned thinking blocks back in later requests). The first section maps each model to its supported thinking configurations and the ones it rejects; the sections after it each start from a symptom you observe, so you can match an error message or unexpected response directly to its cause and fix. For how thinking works, see the [Thinking](/docs/en/build-with-claude/thinking) overview. + +## Configurations each model rejects + +Most thinking configuration errors are a mismatch between the `thinking.type` value in the request and what the model supports. On current models, thinking runs as `thinking: {type: "adaptive"}`, and on the newest it is on by default. Some earlier models instead use [extended thinking](/docs/en/build-with-claude/extended-thinking), a legacy manual mode configured as `thinking: {type: "enabled", budget_tokens: N}`. + +Extended thinking (`thinking.type: "enabled"` with `budget_tokens`) is deprecated on Claude Opus 4.6 and Claude Sonnet 4.6 (it still works there). Claude Opus 4.7, Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5 do not support it and reject requests that use it, returning a 400 error. On earlier models, including Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5, extended thinking is the only thinking mode. Claude Mythos Preview supports both modes. Where both modes are available, use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) instead. + +The table lists what each model supports, what it defaults to, and which `thinking.type` values it rejects with a 400 error; any value not listed as rejected is accepted. + +| Model | Thinking types | Default | Rejected with 400 | +| ---------------------------- | -------------------------------- | --------- | ------------------------- | +| Claude Fable 5 | Adaptive only | Always on | `"enabled"`, `"disabled"` | +| Claude Mythos 5 | Adaptive only | Always on | `"enabled"`, `"disabled"` | +| Claude Mythos Preview | Adaptive, extended | Always on | `"disabled"` | +| Claude Opus 4.8 | Adaptive only | Off | `"enabled"` | +| Claude Opus 4.7 | Adaptive only | Off | `"enabled"` | +| Claude Sonnet 5 | Adaptive only | On | `"enabled"` | +| Claude Opus 4.6 | Adaptive, extended (deprecated)1 | Off | None | +| Claude Sonnet 4.6 | Adaptive, extended (deprecated)1 | Off | None | +| Claude Opus 4.5 | Extended only | Off | `"adaptive"` | +| Claude Haiku 4.5 | Extended only | Off | `"adaptive"` | +| Claude Sonnet 4.5 | Extended only | Off | `"adaptive"` | +| Claude Opus 4.1 (deprecated) | Extended only | Off | `"adaptive"` | + +*1 `enabled` and `budget_tokens` still work on these models but are deprecated; use adaptive thinking instead.* + +Models marked `Always on` cannot turn thinking off. Models marked `On` default to thinking but accept `thinking: {type: "disabled"}`. + +Earlier Claude 4 models (Claude Sonnet 4 and Claude Opus 4) support extended thinking only; see [model deprecations](/docs/en/about-claude/model-deprecations) for their availability. Claude Fable 5 and Claude Mythos 5 are not available under [zero data retention](/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements). + +## A 400 error says `"thinking.type.enabled"` is not supported + +The request fails with a 400 error whose message reads: + +```text wrap +"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior. +``` + +This happens because the model you requested has removed extended thinking (see [Configurations each model rejects](#rejected-configurations)). + +Switch the request to `thinking: {type: "adaptive"}` and steer thinking depth with `effort` instead of `budget_tokens`. [Migrating to adaptive thinking](/docs/en/build-with-claude/extended-thinking#migrating-to-adaptive-thinking) walks through the conversion. + +## A 400 error says `"thinking.type.disabled"` is not supported + +The request fails with a 400 error whose message reads: + +```text wrap +"thinking.type.disabled" is not supported for this model. Thinking defaults to adaptive mode when not specified; use "thinking.type.enabled" with "budget_tokens" for extended thinking. +``` + +This happens on models where thinking is always on: Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview reject `"disabled"`. On Claude Fable 5 and Claude Mythos 5, the error text's suggestion of `"thinking.type.enabled"` does not apply either: those models reject it too. + +Omit the `thinking` parameter; these models think without any configuration. If your goal was to keep thinking text out of responses, use `display: "omitted"` instead of disabling thinking; see [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display). + +## A 400 error says adaptive thinking is not supported + +The request fails with a 400 error whose message reads: + +```text wrap +adaptive thinking is not supported on this model +``` + +This happens because the model supports only extended thinking (see [Configurations each model rejects](#rejected-configurations)). + +Use `thinking: {type: "enabled", budget_tokens: N}` instead; see [Extended thinking](/docs/en/build-with-claude/extended-thinking) for the configuration. + +## A 400 error says thinking blocks cannot be modified + +A request that returns tool results fails with a 400 `invalid_request_error` whose message contains: + +```text wrap +`thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified +``` + +In multi-turn and tool-use conversations you send previous assistant messages, including their `thinking` and `redacted_thinking` blocks, back to the API, and the API verifies they arrive unmodified. This error happens when the assistant message you send back differs from the one the API returned, most often because your code filters content blocks by type and drops `redacted_thinking` blocks, or rebuilds the assistant message instead of echoing it. + +Echo the assistant turn back verbatim, thinking blocks included. See [Preserving thinking blocks](/docs/en/build-with-claude/thinking#preserving-thinking-blocks) for the rules, and the worked round trip in [Thinking in tool and multi-turn workflows](/docs/en/build-with-claude/thinking-tool-workflows#two-turn-tool-use-round-trip) for correct code in every SDK. + +## The thinking field is empty in the response + +The response contains `thinking` blocks, but their `thinking` field is an empty string and only the `signature` field is populated. + +This happens because `display` defaults to `"omitted"` on newer models, which returns thinking blocks without their text. + +Set `display: "summarized"` in your thinking configuration to receive the summarized thinking text; see [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display) for the defaults per model. + +## No thinking block appears on some turns + +Some responses contain no `thinking` block at all, even though thinking is configured. + +This is normal in adaptive mode: Claude skips thinking on requests it judges simple enough to answer directly. + +If you want thinking more often or more deeply, raise `effort` or steer with prompting; see [Steering how often Claude thinks](/docs/en/build-with-claude/thinking-steering-and-cost#tuning-thinking-behavior). + +## The response stops with `stop_reason: "max_tokens"` + +The response ends with `stop_reason: "max_tokens"`, often with a truncated or missing text block. + +This happens because thinking tokens count toward `max_tokens`, so a long thinking pass can consume the budget before the text response completes. + +Raise `max_tokens` to leave room for both thinking and text, or lower `effort` so Claude spends less on thinking; see [Cost control](/docs/en/build-with-claude/thinking-steering-and-cost#cost-control) and [Thinking and the context window](/docs/en/build-with-claude/thinking#thinking-and-the-context-window). + +## Cache hits drop after changing thinking settings + +`cache_read_input_tokens` falls to zero on requests that previously hit the cache. + +This happens because the thinking configuration and the effort level (or its default) are part of the cached prompt prefix, so changing any of them starts a new prefix: switching thinking modes, changing the effort value, and changing `budget_tokens` all invalidate message cache breakpoints, and can invalidate tool and system-prompt breakpoints too, depending on where the model renders the configuration. + +Keep the thinking configuration and effort level constant across requests that share a conversation; setting a parameter explicitly to its default is equivalent to omitting it and does not invalidate. See [Thinking and prompt caching](/docs/en/build-with-claude/thinking#thinking-and-prompt-caching). + +## Setting effort does not change thinking + +You change `effort` but thinking frequency or depth stays the same. + +This happens because effort is the primary thinking lever only in adaptive mode. On extended-thinking-only models, thinking depth is set by `budget_tokens` instead. + +Adjust `budget_tokens` on those models, or check which mode your model runs in; see [Thinking and effort](/docs/en/build-with-claude/thinking#thinking-and-effort). On Claude Opus 4.5, the one extended-thinking-only model that supports effort, effort composes with the budget; see [Budget rules and tuning](/docs/en/build-with-claude/extended-thinking#budget-rules-and-tuning). + +## Next steps + + + + The overview: what thinking is, how to configure it, and how it interacts with tools, caching, and streaming. + + + + The full error reference, including the thinking configuration 400s with their exact server messages. + + + + Convert `budget_tokens` requests to adaptive thinking with effort. + + diff --git a/content/en/build-with-claude/thinking.md b/content/en/build-with-claude/thinking.md new file mode 100644 index 000000000..86b8b4a6e --- /dev/null +++ b/content/en/build-with-claude/thinking.md @@ -0,0 +1,915 @@ +# Thinking + +Understand how Claude's thinking works: turn it on, read thinking output, steer thinking depth with effort, and use thinking with tools, caching, and streaming. + +--- + + + For how zero data retention (ZDR) applies to this feature, see [API and data retention](/docs/en/manage-claude/api-and-data-retention). + + +A model that answers in a single pass has to get everything right on the first try: no scratch work, no checking, no changing course halfway through. For a proof, a tricky bug, or a long agentic task, the first approach is often not the best one. + +Thinking removes that constraint. When thinking is active, Claude works through the problem in its own words before answering: it restates what is being asked, tries approaches, checks intermediate results, and abandons paths that do not hold up. That reasoning arrives in `thinking` content blocks ahead of the response, and Claude draws on it to produce the final answer. This is why thinking improves performance on complex tasks like math, coding, analysis, and long-running agentic work, where the quality of the answer depends on intermediate work that would otherwise be compressed into the response itself or skipped. + +Thinking has a cost: the tokens Claude spends reasoning are billed as output tokens, even when the thinking text isn't returned to you, and they count toward `max_tokens` alongside the response text. This page covers how thinking behaves across the API surface: turning it on, reading its output, and managing its interactions with tools, streaming, caching, and the context window. + +## How thinking works + +![Diagram of how thinking works: Claude evaluates the request and decides whether to think; with tool use, thinking can recur between tool calls; one response returns thinking blocks, then text blocks](/docs/images/how-thinking-works.svg) + +Whether Claude thinks on a given request, and how deeply, depends on your thinking configuration and the complexity of the request. + +Here is what thinking looks like in a response: one or more `thinking` content blocks arrive before the `text` blocks. The thinking block is still generated content, like the `text` block that follows it, but it is separated from the canonical response. Each thinking block also carries a `signature` field, an encrypted copy of the full reasoning that you pass back unchanged in multi-turn and tool-use conversations (see [Thinking encryption](#thinking-encryption)): + +```json +{ + "content": [ + { + "type": "thinking", + "thinking": "Let me break this down. The question has two parts, so I'll start with the simpler one and use its result to constrain the second...", + "signature": "WaUjzkypQ2mUEVM36O2Txu...." + }, + { + "type": "text", + "text": "Based on my analysis..." + } + ] +} +``` + +You don't always see this text, and what you see is never the raw chain of thought: the text in a thinking block is a [summary of Claude's reasoning](#summarized-thinking). The `display` field on the thinking configuration controls whether that summary is returned at all: `"summarized"` returns it, while `"omitted"`, the default on the newest models, returns thinking blocks with an empty `thinking` field. Either way the block is billed the same and passed back the same in multi-turn conversations; see [Controlling thinking display](#controlling-thinking-display) for per-model defaults and details. + +If Claude uses tools, thinking can also appear between tool calls; see [Thinking with tool use](#thinking-with-tool-use). For the full response format, see the [Messages API reference](/docs/en/api/messages/create). + +## Configuring thinking + +On current models, thinking is on by default or one parameter away. Which configuration each model accepts, and what it defaults to, is listed in the [per-model configuration table](/docs/en/build-with-claude/thinking-troubleshooting#supported-models) on the Troubleshooting page. + +On Claude Sonnet 5, Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview, thinking is already on: no configuration needed. The first thing most developers need on these models is to see the thinking text, since `display` defaults to `"omitted"` there. Opt in with `thinking: {"type": "adaptive", "display": "summarized"}`, which is exactly the following request with the model string swapped. + +On Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6, thinking is off until you set `thinking: {type: "adaptive"}` in your request. The following examples do that, set `display: "summarized"` so the thinking text is visible, and use a roomy `max_tokens`: + + + ```bash cURL + curl https://api.anthropic.com/v1/messages \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "content-type: application/json" \ + -d '{ + "model": "claude-opus-4-8", + "max_tokens": 16000, + "thinking": { + "type": "adaptive", + "display": "summarized" + }, + "messages": [ + { + "role": "user", + "content": "What is the greatest common divisor of 1071 and 462?" + } + ] + }' + ``` + + ```bash CLI + ant messages create \ + --model claude-opus-4-8 \ + --max-tokens 16000 \ + --thinking '{type: adaptive, display: summarized}' \ + --message '{role: user, content: "What is the greatest common divisor of 1071 and 462?"}' \ + --transform content \ + --format yaml + ``` + + ```python Python + client = anthropic.Anthropic() + + response = client.messages.create( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive", "display": "summarized"}, + messages=[ + { + "role": "user", + "content": "What is the greatest common divisor of 1071 and 462?", + } + ], + ) + + for block in response.content: + if block.type == "thinking": + print(f"\nThinking: {block.thinking}") + elif block.type == "text": + print(f"\nResponse: {block.text}") + ``` + + ```typescript TypeScript + const client = new Anthropic(); + + const response = await client.messages.create({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive", + display: "summarized" + }, + messages: [ + { + role: "user", + content: "What is the greatest common divisor of 1071 and 462?" + } + ] + }); + + for (const block of response.content) { + if (block.type === "thinking") { + console.log(`\nThinking: ${block.thinking}`); + } else if (block.type === "text") { + console.log(`\nResponse: ${block.text}`); + } + } + ``` + + ```csharp C# + AnthropicClient client = new(); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized }, + Messages = [ + new() { + Role = Role.User, + Content = "What is the greatest common divisor of 1071 and 462?" + } + ] + }; + + var message = await client.Messages.Create(parameters); + + foreach (var block in message.Content) + { + if (block.TryPickThinking(out ThinkingBlock? thinking)) + { + Console.WriteLine($"\nThinking: {thinking.Thinking}"); + } + else if (block.TryPickText(out TextBlock? text)) + { + Console.WriteLine($"\nResponse: {text.Text}"); + } + } + ``` + + ```go Go + client := anthropic.NewClient() + + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{ + Display: anthropic.ThinkingConfigAdaptiveDisplaySummarized, + }, + }, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What is the greatest common divisor of 1071 and 462?")), + }, + }) + if err != nil { + log.Fatal(err) + } + + for _, block := range response.Content { + switch v := block.AsAny().(type) { + case anthropic.ThinkingBlock: + fmt.Printf("\nThinking: %s", v.Thinking) + case anthropic.TextBlock: + fmt.Printf("\nResponse: %s", v.Text) + } + } + ``` + + ```java Java + import com.anthropic.models.messages.ThinkingConfigAdaptive; + + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder() + .display(ThinkingConfigAdaptive.Display.SUMMARIZED) + .build()) + .addUserMessage("What is the greatest common divisor of 1071 and 462?") + .build(); + + Message response = client.messages().create(params); + + response.content().forEach(block -> { + block.thinking().ifPresent(thinkingBlock -> + IO.println("\nThinking: " + thinkingBlock.thinking()) + ); + block.text().ifPresent(textBlock -> + IO.println("\nResponse: " + textBlock.text()) + ); + }); + } + ``` + + ```php PHP + $client = new Client(); + + $message = $client->messages->create( + maxTokens: 16000, + messages: [ + [ + 'role' => 'user', + 'content' => 'What is the greatest common divisor of 1071 and 462?' + ] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive', 'display' => 'summarized'], + ); + + foreach ($message->content as $block) { + if ($block->type === 'thinking') { + echo "\nThinking: " . $block->thinking; + } elseif ($block->type === 'text') { + echo "\nResponse: " . $block->text; + } + } + ``` + + ```ruby Ruby + client = Anthropic::Client.new + + message = client.messages.create( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { + type: "adaptive", + display: "summarized" + }, + messages: [ + { + role: "user", + content: "What is the greatest common divisor of 1071 and 462?" + } + ] + ) + + message.content.each do |block| + case block.type + when :thinking + puts "\nThinking: #{block.thinking}" + when :text + puts "\nResponse: #{block.text}" + end + end + ``` + + +Running the example prints the summarized thinking, then the answer: + +```text Output wrap +Thinking: Use Euclidean algorithm. +1071 = 2*462 + 147 +462 = 3*147 + 21 +147 = 7*21 + 0 +GCD = 21 + +Response: ## Finding GCD of 1071 and 462 + +I'll use the **Euclidean algorithm**, repeatedly dividing and taking remainders... +``` + +Thinking tokens count toward `max_tokens`, so set it high enough to leave room for both the thinking and the response text. See [Cost control](/docs/en/build-with-claude/thinking-steering-and-cost#cost-control) on the steering page and [Thinking and the context window](#thinking-and-the-context-window). + +### Turning thinking off + +On Claude Sonnet 5, where thinking is on by default, you can turn it off: + +```python +client = anthropic.Anthropic() + +response = client.messages.create( + model="claude-sonnet-5", + max_tokens=4096, + thinking={"type": "disabled"}, + messages=[{"role": "user", "content": "Summarize this article in one sentence."}], +) +``` + +Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview reject `thinking: {type: "disabled"}`: thinking cannot be turned off on these models. + +If your model supports only extended thinking (see the [per-model configuration table](/docs/en/build-with-claude/thinking-troubleshooting#supported-models)), configure it with `type: "enabled"` and a `budget_tokens` value instead; the [Extended thinking](/docs/en/build-with-claude/extended-thinking) page covers that configuration. And if any thinking configuration comes back with a 400 error, [Troubleshooting thinking](/docs/en/build-with-claude/thinking-troubleshooting) matches each error message to its fix. + +## Reading thinking output + +### Controlling thinking display + +The `display` field on the thinking configuration controls how thinking content is returned in API responses. `display` works in both modes: set it alongside `type: "adaptive"` or `type: "enabled"`. It accepts two values: + +* `"summarized"`: thinking blocks contain [summarized thinking](#summarized-thinking) text, a readable summary of Claude's reasoning. This is the default on Claude Opus 4.6, Claude Sonnet 4.6, and earlier models. +* `"omitted"`: thinking blocks are returned with an empty `thinking` field. The `signature` field still carries the encrypted full thinking for multi-turn continuity (see [Thinking encryption](#thinking-encryption)). This is the default on Claude Fable 5, Claude Mythos 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, and [Claude Mythos Preview](https://anthropic.com/glasswing). + +Set `display: "omitted"` when your application doesn't surface thinking content to users. The primary benefit is **faster time-to-first-text-token when streaming**: the server skips streaming thinking tokens entirely and delivers only the signature, so the final text response begins streaming sooner. + +With `display: "omitted"`, the response contains `thinking` blocks with an empty `thinking` field: + +```json Output +{ + "content": [ + { + "type": "thinking", + "thinking": "", + "signature": "EosnCkYICxIMMb3LzNrMu..." + }, + { + "type": "text", + "text": "The answer is 12,231." + } + ] +} +``` + +Keep the following in mind when working with omitted thinking: + +* You're still charged for the full thinking tokens. Omitting reduces latency, not cost. +* If you pass thinking blocks back in multi-turn conversations, pass them unchanged. The server decrypts the `signature` to reconstruct the original thinking for prompt construction (see [Preserving thinking blocks](#preserving-thinking-blocks)). Any text you place in the `thinking` field of a round-tripped omitted block is ignored. +* `display` is invalid with `thinking.type: "disabled"` (there is nothing to display). +* When using `thinking.type: "adaptive"` and the model skips thinking for a simple request, no thinking block is produced regardless of `display`. +* When streaming with `display: "omitted"`, no `thinking_delta` events are emitted; see [Streaming thinking](#streaming-thinking) for the event sequence. + + + The `signature` field is identical whether `display` is `"summarized"` or `"omitted"`. Switching `display` values between turns in a conversation is supported. + + +In the Ruby SDK, set this field as `display_:` (with a trailing underscore) to avoid shadowing Ruby's `Kernel#display`; the wire field is still `display`. + +### Summarized thinking + +When `display` is `"summarized"`, the thinking text you receive is a summary of Claude's full thinking process rather than the raw chain of thought. Summarized thinking provides the full intelligence benefits of thinking while preventing misuse. No `display` setting returns the raw chain of thought. + +Keep the following in mind when working with summarized thinking: + +* You're charged for the full thinking tokens generated by the original request, not the summary tokens. The billed output token count does **not match** the count of tokens you see in the response. +* On Claude Opus 4.6, Claude Sonnet 4.6, and earlier models, the first few lines of thinking output are more verbose, providing detailed reasoning that's particularly helpful for prompt engineering purposes. [Claude Mythos Preview](https://anthropic.com/glasswing) summarizes from the first token, so its thinking blocks do not show this verbose preamble. +* Summarization preserves the key ideas of Claude's thinking process with minimal added latency, enabling a streamable user experience. +* Summarization is processed by a different model than the one you target in your requests. The thinking model does not see the summarized output. +* As Anthropic seeks to improve the thinking feature, summarization behavior is subject to change. + + + In rare cases where you need access to full thinking output, [contact Anthropic sales](mailto:sales@anthropic.com). + + +### Streaming thinking + +Thinking works with [streaming](/docs/en/build-with-claude/streaming). Thinking blocks stream as `thinking_delta` events inside `content_block_delta` events, followed by a single `signature_delta` event just before the block's `content_block_stop`. Text blocks stream afterward as usual. + +![Diagram of the streaming event sequence with thinking: the thinking block opens, thinking deltas stream only when display is summarized, a single signature delta closes the block, then text deltas stream](/docs/images/how-thinking-streams.svg) + +The following examples stream a response with adaptive thinking, printing thinking and text deltas as they arrive: + + + ```bash cURL + curl https://api.anthropic.com/v1/messages \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "content-type: application/json" \ + -d '{ + "model": "claude-opus-4-8", + "max_tokens": 16000, + "stream": true, + "thinking": { + "type": "adaptive", + "display": "summarized" + }, + "messages": [ + { + "role": "user", + "content": "What is the greatest common divisor of 1071 and 462?" + } + ] + }' + ``` + + ```bash CLI + ant messages create \ + --model claude-opus-4-8 \ + --max-tokens 16000 \ + --thinking '{type: adaptive, display: summarized}' \ + --message '{role: user, content: "What is the greatest common divisor of 1071 and 462?"}' \ + --stream \ + --format jsonl + ``` + + ```python Python + client = anthropic.Anthropic() + + with client.messages.stream( + model="claude-opus-4-8", + max_tokens=16000, + thinking={"type": "adaptive", "display": "summarized"}, + messages=[ + { + "role": "user", + "content": "What is the greatest common divisor of 1071 and 462?", + } + ], + ) as stream: + for event in stream: + if event.type == "content_block_start": + print(f"\nStarting {event.content_block.type} block...") + elif event.type == "content_block_delta": + if event.delta.type == "thinking_delta": + print(event.delta.thinking, end="", flush=True) + elif event.delta.type == "text_delta": + print(event.delta.text, end="", flush=True) + ``` + + ```typescript TypeScript + const client = new Anthropic(); + + const stream = client.messages.stream({ + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { type: "adaptive", display: "summarized" }, + messages: [{ role: "user", content: "What is the greatest common divisor of 1071 and 462?" }] + }); + + for await (const event of stream) { + if (event.type === "content_block_start") { + console.log(`\nStarting ${event.content_block.type} block...`); + } else if (event.type === "content_block_delta") { + if (event.delta.type === "thinking_delta") { + process.stdout.write(event.delta.thinking); + } else if (event.delta.type === "text_delta") { + process.stdout.write(event.delta.text); + } + } + } + ``` + + ```csharp C# + AnthropicClient client = new(); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus4_8, + MaxTokens = 16000, + Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized }, + Messages = [new() { Role = Role.User, Content = "What is the greatest common divisor of 1071 and 462?" }] + }; + + await foreach (var rawEvent in client.Messages.CreateStreaming(parameters)) + { + if (rawEvent.TryPickContentBlockStart(out var start)) + { + Console.WriteLine($"\nStarting {start.ContentBlock.Type} block..."); + } + else if (rawEvent.TryPickContentBlockDelta(out var delta)) + { + if (delta.Delta.TryPickThinking(out var thinkingDelta)) + { + Console.Write(thinkingDelta.Thinking); + } + else if (delta.Delta.TryPickText(out var textDelta)) + { + Console.Write(textDelta.Text); + } + } + } + ``` + + ```go Go + client := anthropic.NewClient() + + stream := client.Messages.NewStreaming(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus4_8, + MaxTokens: 16000, + Thinking: anthropic.ThinkingConfigParamUnion{ + OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{ + Display: anthropic.ThinkingConfigAdaptiveDisplaySummarized, + }, + }, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("What is the greatest common divisor of 1071 and 462?")), + }, + }) + + for stream.Next() { + event := stream.Current() + switch eventVariant := event.AsAny().(type) { + case anthropic.ContentBlockStartEvent: + fmt.Printf("\nStarting %s block...\n", eventVariant.ContentBlock.Type) + case anthropic.ContentBlockDeltaEvent: + switch deltaVariant := eventVariant.Delta.AsAny().(type) { + case anthropic.ThinkingDelta: + fmt.Print(deltaVariant.Thinking) + case anthropic.TextDelta: + fmt.Print(deltaVariant.Text) + } + } + } + if err := stream.Err(); err != nil { + log.Fatal(err) + } + ``` + + ```java Java + import com.anthropic.models.messages.ThinkingConfigAdaptive; + + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_4_8) + .maxTokens(16000L) + .thinking(ThinkingConfigAdaptive.builder() + .display(ThinkingConfigAdaptive.Display.SUMMARIZED) + .build()) + .addUserMessage("What is the greatest common divisor of 1071 and 462?") + .build(); + + try (var streamResponse = client.messages().createStreaming(params)) { + streamResponse.stream().forEach(event -> { + if (event.contentBlockStart().isPresent()) { + var startEvent = event.contentBlockStart().get(); + var block = startEvent.contentBlock(); + if (block.isThinking()) { + IO.println("\nStarting thinking block..."); + } else if (block.isText()) { + IO.println("\nStarting text block..."); + } + } else if (event.contentBlockDelta().isPresent()) { + var deltaEvent = event.contentBlockDelta().get(); + deltaEvent.delta().thinking().ifPresent(td -> + IO.print(td.thinking()) + ); + deltaEvent.delta().text().ifPresent(td -> + IO.print(td.text()) + ); + } + }); + } + } + ``` + + ```php PHP + $client = new Client(); + + $stream = $client->messages->createStream( + maxTokens: 16000, + messages: [ + ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?'] + ], + model: 'claude-opus-4-8', + thinking: ['type' => 'adaptive', 'display' => 'summarized'], + ); + + foreach ($stream as $event) { + if ($event->type === 'content_block_start') { + echo "\nStarting {$event->contentBlock->type} block...\n"; + } elseif ($event->type === 'content_block_delta') { + if ($event->delta->type === 'thinking_delta') { + echo $event->delta->thinking; + } elseif ($event->delta->type === 'text_delta') { + echo $event->delta->text; + } + } + } + ``` + + ```ruby Ruby + client = Anthropic::Client.new + + stream = client.messages.stream( + model: "claude-opus-4-8", + max_tokens: 16000, + thinking: { type: "adaptive", display: "summarized" }, + messages: [ + { role: "user", content: "What is the greatest common divisor of 1071 and 462?" } + ] + ) + + stream.each do |event| + case event + when Anthropic::Streaming::ThinkingEvent + print event.thinking + when Anthropic::Streaming::TextEvent + print event.text + end + end + ``` + + + + ```sse Output + event: message_start + data: {"type": "message_start", "message": {"id": "msg_01...", "type": "message", "role": "assistant", "content": [], "model": "claude-opus-4-8", "stop_reason": null, "stop_sequence": null}} + + event: content_block_start + data: {"type": "content_block_start", "index": 0, "content_block": {"type": "thinking", "thinking": "", "signature": ""}} + + event: content_block_delta + data: {"type": "content_block_delta", "index": 0, "delta": {"type": "thinking_delta", "thinking": "I need to find the GCD of 1071 and 462 using the Euclidean algorithm.\n\n1071 = 2 × 462 + 147"}} + + event: content_block_delta + data: {"type": "content_block_delta", "index": 0, "delta": {"type": "thinking_delta", "thinking": "\n462 = 3 × 147 + 21\n147 = 7 × 21 + 0\n\nSo GCD(1071, 462) = 21"}} + + // Additional thinking deltas... + + event: content_block_delta + data: {"type": "content_block_delta", "index": 0, "delta": {"type": "signature_delta", "signature": "EqQBCgIYAhIM1gbcDa9GJwZA2b..."}} + + event: content_block_stop + data: {"type": "content_block_stop", "index": 0} + + event: content_block_start + data: {"type": "content_block_start", "index": 1, "content_block": {"type": "text", "text": ""}} + + event: content_block_delta + data: {"type": "content_block_delta", "index": 1, "delta": {"type": "text_delta", "text": "The greatest common divisor of 1071 and 462 is **21**."}} + + // Additional text deltas... + + event: content_block_stop + data: {"type": "content_block_stop", "index": 1} + + event: message_delta + data: {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence": null}} + + event: message_stop + data: {"type": "message_stop"} + ``` + + +When `display: "omitted"` is set, the thinking block opens, a single `signature_delta` arrives, and the block closes without any `thinking_delta` events. Text streaming begins immediately after: + +```sse Output +event: content_block_start +data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":"","signature":""}} + +event: content_block_delta +data: {"type":"content_block_delta","index":0,"delta":{"type":"signature_delta","signature":"EosnCkYICxIMMb3LzNrMu..."}} + +event: content_block_stop +data: {"type":"content_block_stop","index":0} + +event: content_block_start +data: {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}} +``` + + + When using streaming with thinking enabled, you might notice that text sometimes arrives in larger chunks alternating with smaller, token-by-token delivery. This is expected behavior, especially for thinking content. + + The streaming system needs to process content in batches for optimal performance, which can result in this "chunky" delivery pattern, with possible delays between streaming events. + + +For general streaming mechanics, see [Streaming Messages](/docs/en/build-with-claude/streaming). + +## Thinking and effort + +The `thinking` parameter controls whether Claude thinks in [thinking blocks](/docs/en/build-with-claude/thinking) before answering; the `effort` parameter controls how much work Claude puts into the whole response, which in adaptive mode includes how often and how deeply it thinks. Don't pass `adaptive` as an `effort` value: `adaptive` is a thinking mode, not an effort level. + +For what each effort level does to thinking behavior, see the [per-level thinking behavior table](/docs/en/build-with-claude/thinking-steering-and-cost#effort-levels) on the [Steering thinking](/docs/en/build-with-claude/thinking-steering-and-cost) page; the [Effort](/docs/en/build-with-claude/effort) page documents the parameter itself, including which levels each model supports. On Claude Opus 4.5, the only extended-thinking-only model that supports effort, effort composes with `budget_tokens`; see [Budget rules and tuning](/docs/en/build-with-claude/extended-thinking#budget-rules-and-tuning). + +With the two controls separated this way, pick the one that matches your goal: + +* **Lower cost or latency on a thinking-enabled workload:** lower `effort` first. It scales the whole response down, thinking included. +* **Claude is thinking too rarely or too shallowly:** raise `effort`, or see [Steering how often Claude thinks](/docs/en/build-with-claude/thinking-steering-and-cost#tuning-thinking-behavior) on the steering page. +* **You need thinking fully off:** use `thinking: {type: "disabled"}` on models that allow it (see the [per-model configuration table](/docs/en/build-with-claude/thinking-troubleshooting#supported-models)). +* **You need a hard ceiling on spend:** use `max_tokens`. Effort is soft guidance; `max_tokens` is a strict limit. + +## Thinking with tool use + +Thinking works alongside [tool use](/docs/en/agents-and-tools/tool-use/overview), letting Claude reason through tool selection and process tool results. Two constraints apply in both thinking modes: + +1. **Tool choice limitation**: tool use with thinking only supports `tool_choice: {"type": "auto"}` (the default) or `tool_choice: {"type": "none"}`. Using `tool_choice: {"type": "any"}` or `tool_choice: {"type": "tool", "name": "..."}` results in an error because these options force tool use, which is incompatible with thinking. +2. **Preserving thinking blocks**: when you return tool results, you must pass the thinking blocks from the assistant message back to the API, complete and unmodified. See [Preserving thinking blocks](#preserving-thinking-blocks). + +**A tool-use loop is one assistant turn.** From the model's perspective, an assistant turn doesn't complete until Claude finishes its full response, which may include multiple tool calls and results. This whole sequence is a single assistant turn: + +```text wrap +User: "What's the weather in Paris?" +Assistant: [thinking] + [tool_use: get_weather] +User: [tool_result: "20°C, sunny"] +Assistant: [text: "The weather in Paris is 20°C and sunny"] +``` + +The entire turn runs in a single thinking mode: you can't toggle thinking in the middle of a turn, including during the tool-use loop. In extended (manual) mode, the API additionally enforces that the final assistant turn of a thinking-enabled request begins with a thinking block. Adaptive mode relaxes this: no assistant turn needs to start with one. + +**Mid-turn conflicts degrade gracefully.** If you toggle thinking mid-turn (for example, between sending a tool call and returning its result), the API doesn't error. Instead, it silently disables thinking for that request. To preserve model quality, the API may strip thinking blocks that would create an invalid turn structure, or disable thinking when the conversation history is incompatible with thinking being enabled. To confirm whether thinking was active, check for the presence of `thinking` blocks in the response. + +**Toggle between turns, not within them.** Plan your thinking strategy at the start of each turn. Complete the assistant turn, then change the thinking configuration for the next one: + +```text wrap +User: "What's the weather?" +Assistant: [tool_use] (thinking disabled) +User: [tool_result] +Assistant: [text: "It's sunny"] +User: "What about tomorrow?" +Assistant: [thinking] + [text: "..."] (thinking enabled - new turn) +``` + +Note that toggling thinking modes also invalidates prompt caching; see [Thinking and prompt caching](#thinking-and-prompt-caching). + +### Preserving thinking blocks + +When Claude invokes a tool, it pauses construction of its response to await external information. When you return the tool result, Claude continues building that same response, so its earlier reasoning must still be present. Pass every `thinking` block back to the API complete and unmodified, alongside the `tool_use` block it accompanied. This matters for two reasons: + +1. **Reasoning continuity**: the thinking blocks capture the step-by-step reasoning that led to the tool requests. Including them lets Claude continue reasoning from where it left off. +2. **Context maintenance**: tool results appear as user messages in the API structure, but they're part of one continuous reasoning flow. Preserving thinking blocks maintains that flow across API calls. + +In short: + +* **Required:** within a tool-use turn, pass thinking blocks back. +* **Recommended:** across turns, pass everything back. +* **Allowed:** outside tool use, omit prior turns' thinking. + +You don't need to prune old thinking yourself. Pass all thinking blocks back in multi-turn conversations, and the API automatically filters them, keeps the blocks needed to preserve the model's reasoning, and bills input tokens only for the blocks actually shown to Claude. Which prior-turn blocks are kept is per-model; see [Thinking block preservation by model](#thinking-block-preservation-by-model). To override the default, use the [`clear_thinking_20251015` context-editing strategy](/docs/en/build-with-claude/context-editing#thinking-block-clearing). + +Within the latest assistant message, the sequence of consecutive `thinking` blocks must match what the model generated in the original request: you can't rearrange, edit, or partially drop them. This includes [`redacted_thinking` blocks](#redacted-thinking-blocks). + + + Modified thinking blocks are rejected with a 400 error; see [A 400 error says thinking blocks cannot be modified](/docs/en/build-with-claude/thinking-troubleshooting#error-thinking-blocks-modified) for the exact message, the common causes, and the fix. The one exception: text placed in the empty `thinking` field of an [omitted](#controlling-thinking-display) block is ignored rather than rejected. + + +For a complete two-turn walkthrough with code in every SDK, see [Thinking in tool and multi-turn workflows](/docs/en/build-with-claude/thinking-tool-workflows#two-turn-tool-use-round-trip). It defines a tool, receives a thinking-plus-tool-use response, and echoes the assistant turn back with the tool result. + +### Interleaved thinking + +Interleaved thinking lets Claude think between tool calls, reasoning about each tool result before acting on it. With interleaved thinking, Claude can: + +* Reason about the results of a tool call before deciding what to do next +* Chain multiple tool calls with reasoning steps in between +* Make more nuanced decisions based on intermediate results + + + Consecutive tool calls do not require interleaved thinking. Claude can chain tool calls with or without interleaved thinking; interleaving changes where thinking blocks appear between tool calls, not whether tool calls can chain. + + +With adaptive thinking, interleaved thinking is automatic on every model that supports adaptive thinking; no beta header is needed. On Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, Claude Opus 4.8, and Claude Opus 4.7, reasoning between tool calls always appears in thinking blocks. Claude Haiku 4.5 does not support interleaved thinking. On models using manual extended thinking, interleaving requires a beta header and changes how the thinking budget is counted; [Interleaved thinking in manual mode](/docs/en/build-with-claude/extended-thinking#interleaved-thinking) covers the per-model rules and platform-specific header behavior. + +With interleaved thinking, the thinking allocation can span the entire assistant turn rather than a single response. Interleaved thinking is only supported for [tools used through the Messages API](/docs/en/agents-and-tools/tool-use/overview). + +For a worked comparison showing what interleaved thinking changes in a two-tool workflow, see [How interleaved thinking changes the flow](/docs/en/build-with-claude/thinking-tool-workflows#how-interleaved-thinking-changes-the-flow). + +### Thinking block preservation by model + +Whether thinking blocks from previous assistant turns stay in context by default depends on the model: + +* **Keep all prior turns:** Claude Opus 4.5 and later Opus models, Claude Sonnet 4.6 and later Sonnet models, Claude Fable 5, Claude Mythos 5, and Claude Mythos Preview. +* **Keep the last turn only:** earlier Opus and Sonnet models, and all Haiku models through Claude Haiku 4.5. When you pass older thinking blocks back, the API strips them automatically; you don't need to remove them yourself. + +Preservation brings two benefits: + +* **Cache optimization**: preserved thinking blocks enable cache hits during tool use, as they are passed back with tool results and cached incrementally across the assistant turn, resulting in token savings in multistep workflows. +* **No intelligence impact**: preserving thinking blocks has no negative effect on model performance. + +The tradeoff is context usage: long conversations consume more context space on keep-all models, since retained thinking blocks count as input like any other conversation history (see [Thinking and the context window](#thinking-and-the-context-window)). The behavior is automatic in both regimes; no code changes or beta headers are required, and you should keep passing complete, unmodified thinking blocks back as described in [Preserving thinking blocks](#preserving-thinking-blocks). To override the default in either direction, use [thinking block clearing](/docs/en/build-with-claude/context-editing#thinking-block-clearing). + +**Switching models mid-conversation.** When you switch between any two models, for example after a [classifier refusal fallback](/docs/en/build-with-claude/refusals-and-fallback), strip `thinking` and `redacted_thinking` blocks from prior assistant turns. Thinking blocks are tied to the model that produced them. Other models silently ignore them rather than rejecting the request, but ignored blocks still add input tokens. + +## Thinking and prompt caching + +[Prompt caching](/docs/en/build-with-claude/prompt-caching) interacts with thinking in a few specific ways. The following rules apply in both thinking modes. + +**Configuration changes invalidate caching.** The thinking configuration and the resolved [`effort`](/docs/en/build-with-claude/effort) level are rendered into the prompt itself, so changing any of them starts a new cache prefix. Switching between `adaptive`, `enabled`, and `disabled`, changing `budget_tokens`, and changing the effort value all invalidate cache breakpoints: message-level breakpoints always miss, and tool and system-prompt breakpoints can miss too, depending on where the model renders the configuration. Treat any thinking or effort change as starting the cache over. Consecutive requests that keep the same configuration preserve the cache, and setting a parameter explicitly to its default value is equivalent to omitting it. A worked demonstration with usage output is on the [Steering thinking](/docs/en/build-with-claude/thinking-steering-and-cost#prompt-caching) page. + +**Thinking blocks are cached with tool results.** During a tool-use loop, caching occurs when you make a follow-up request that includes tool results. At that point the previous conversation history, including its thinking blocks, can be cached, and those cached thinking blocks count as input tokens in your usage metrics when read from the cache. This happens automatically, even without explicit `cache_control` markers, and behaves the same for regular and interleaved thinking. The tradeoff: thinking blocks you never see again in responses still contribute to input token usage when read from cache. + +**Whether prior blocks are in context at all is per-model.** The [preservation default](#thinking-block-preservation-by-model) governs this. On keep-all models, previous turns' thinking blocks stay cached and in context. On last-turn-only models, once you send a user message that isn't a tool result, all previous thinking blocks are stripped from context. On those models, a conversation like this: + +```text wrap +User: ["What's the weather in Paris?"], +Assistant: [thinking_block_1] + [tool_use block 1], +User: [tool_result_1, cache=True], +Assistant: [thinking_block_2] + [text block 2], +User: [Text response, cache=True] +``` + +is processed as if the thinking blocks were never there: + +```text wrap +User: ["What's the weather in Paris?"], +Assistant: [tool_use block 1], +User: [tool_result_1, cache=True], +Assistant: [text block 2], +User: [Text response, cache=True] +``` + +On keep-all models, the same request keeps `thinking_block_1` and `thinking_block_2` in context and in the cache. + +**Degradation strips thinking from the cacheable history.** If thinking becomes disabled mid-turn and you pass thinking content in the current tool-use turn, the thinking content is stripped and thinking remains disabled for that request (see [graceful degradation](#thinking-with-tool-use)). [Interleaved thinking](#interleaved-thinking) amplifies cache invalidation effects, since thinking blocks can occur between multiple tool calls. + + + Thinking-heavy tasks often take longer than the default 5-minute cache lifetime to complete. Consider the [1-hour cache duration](/docs/en/build-with-claude/prompt-caching#1-hour-cache-duration) to maintain cache hits across longer thinking sessions and multistep workflows. + + +## Thinking and the context window + +`max_tokens`, which includes all thinking Claude generates in the current turn, is enforced as a strict limit. On Claude 4.5 models and newer, if input tokens plus `max_tokens` exceeds the context window size, the API accepts the request; if generation then reaches the context window limit, it stops with `stop_reason: "model_context_window_exceeded"` instead of returning an error. On earlier models, the API returns a validation error instead. See [Handling stop reasons](/docs/en/build-with-claude/handling-stop-reasons). + +How thinking counts against the window depends on when it was generated: + +* **Current-turn thinking** always counts toward `max_tokens`, is billed as output tokens, and occupies context window space for the turn that generated it. +* **Prior-turn thinking** depends on the [preservation default](#thinking-block-preservation-by-model). On [models that keep all prior turns](#thinking-block-preservation-by-model), previous thinking blocks remain in context, count toward the window, and are billed as input tokens like the rest of the conversation history. On models that keep only the last turn, the API strips older thinking blocks automatically when you pass them back, so they don't consume window space or input tokens. + +In practice: + +* On keep-all models, budget your context window as if thinking were ordinary conversation history, because it is. Long agentic sessions accumulate thinking in context; use [thinking block clearing](/docs/en/build-with-claude/context-editing#thinking-block-clearing) if you need to reclaim space. +* On last-turn-only models, thinking is a per-turn cost only: each turn's thinking counts against that turn's `max_tokens` and then drops out of the window. + +The following diagrams illustrate the last-turn-only (stripping) regime. The first shows a multi-turn conversation: each turn's thinking block is generated in the output but not carried into later turns' input. + +![Diagram of thinking on a model that strips previous thinking blocks: each turn's thinking block is generated in the output and not carried into later turns' input](/docs/images/context-window-thinking.svg) + +The second shows the same regime with tool use: thinking stays in context alongside its tool result for the duration of the assistant turn, then drops out on the next user turn. + +![Diagram of thinking with tool use on a model that strips previous thinking blocks: thinking is kept with its tool result, then dropped on the next user turn](/docs/images/context-window-thinking-tools.svg) + +Use the [token counting API](/docs/en/build-with-claude/token-counting) to get accurate counts for your specific use case, especially for multi-turn conversations that include thinking. + +## Thinking encryption + +Full thinking content is encrypted and returned in the `signature` field on each thinking block. The API uses the signature to verify that thinking blocks were generated by Claude when you pass them back. + +Keep the following in mind when working with signatures: + +* It is only strictly necessary to send back thinking blocks when [using tools with thinking](#thinking-with-tool-use). Otherwise you can omit thinking blocks from previous turns. If you do pass them back, whether the API keeps or strips them depends on the model (see [Thinking block preservation by model](#thinking-block-preservation-by-model)); use [context editing](/docs/en/build-with-claude/context-editing) to configure this. +* When sending back thinking blocks, pass everything back exactly as you received it, for consistency and to avoid potential issues. +* When [streaming responses](#streaming-thinking), the signature arrives as a `signature_delta` inside a `content_block_delta` event just before the `content_block_stop` event. +* `signature` values are significantly longer in Claude 4 and later models than in previous models. +* The `signature` field is opaque: don't interpret or parse it. +* `signature` values are compatible across platforms (Claude APIs, [Amazon Bedrock](/docs/en/build-with-claude/claude-in-amazon-bedrock), and [Google Cloud](/docs/en/build-with-claude/claude-on-vertex-ai)). Values generated on one platform work on another. + +## Redacted thinking blocks + +In addition to regular `thinking` blocks, the API may return `redacted_thinking` blocks when portions of Claude's reasoning are safety-redacted. A `redacted_thinking` block contains encrypted thinking content in a `data` field, with no readable text: + +```json +{ + "type": "redacted_thinking", + "data": "..." +} +``` + +The `data` field is opaque and encrypted. Like the `signature` field on regular thinking blocks, pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation with [tools](#thinking-with-tool-use). + + + If your code filters content blocks by type (for example, `block.type == "thinking"`) when round-tripping responses with tool use, also include `redacted_thinking` blocks. Filtering on `block.type == "thinking"` alone silently drops `redacted_thinking` blocks and breaks the multi-turn protocol described in [Preserving thinking blocks](#preserving-thinking-blocks). + + + + `redacted_thinking` blocks are a distinct content block type returned when thinking is safety-redacted. This is separate from the [`display: "omitted"`](#controlling-thinking-display) option, which returns regular `thinking` blocks with an empty `thinking` field. + + +## Thinking output on Claude Fable 5 and Claude Mythos 5 + +On Claude Fable 5 and Claude Mythos 5, the raw chain of thought is never returned; the blocks you receive are regular `thinking` blocks, not `redacted_thinking`, and the [`display` setting](#controlling-thinking-display) works the same as on other models ([summarized](#summarized-thinking) text, or an empty `thinking` field when omitted, the default here). For the response shape of thinking blocks, see the [Messages API reference](/docs/en/api/messages/create). + +When continuing a conversation on the same model, pass each thinking block back to the API exactly as received, including blocks whose `thinking` field is empty. Don't edit or reconstruct them. Reading the summary text for display is fine: the API rejects blocks whose returned content has been modified, not blocks you have read. Text placed in an empty omitted `thinking` field is [ignored rather than rejected](#controlling-thinking-display). + +For what happens to thinking blocks when you switch models mid-conversation, see [Thinking block preservation by model](#thinking-block-preservation-by-model). + +Two exceptions, covered in [Fallback credit](/docs/en/build-with-claude/fallback-credit): + +* Fallback-credit retries must echo the refused request body unchanged. +* `fallback` blocks from a mid-output fallback stay where they appeared. + +To get visibility into the model's reasoning, read the `thinking` blocks described on this page rather than prompting for reasoning in the response text. On Claude Fable 5, a request that attempts to elicit the model's internal reasoning as part of the response text can be refused with `stop_details.category: "reasoning_extraction"`. See [Refusal categories](/docs/en/build-with-claude/refusals-and-fallback#refusal-response) for the field reference and handling guidance. + +## Limits and feature compatibility + +**Sampling parameters.** On Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, Claude Opus 4.8, Claude Opus 4.7, and Claude Sonnet 5, non-default `temperature`, `top_p`, or `top_k` values return a 400 error on every request, regardless of whether thinking is used. On older models, the restriction applies only while thinking is on: `temperature` and `top_k` are incompatible with thinking, and `top_p` is allowed at values between 0.95 and 1. + +**Response prefill and forced tool use.** You can't pre-fill the assistant response while thinking is on. Forced tool use (`tool_choice: {"type": "any"}` or `{"type": "tool", ...}`) is incompatible with thinking; see [Thinking with tool use](#thinking-with-tool-use). + +**Output limits.** Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, Claude Opus 4.6, and Claude Sonnet 4.6 support up to 128k output tokens per request. Claude Haiku 4.5, Claude Sonnet 4.5, and Claude Opus 4.5 support up to 64k. On the [Message Batches API](/docs/en/build-with-claude/batch-processing#extended-output-beta), the `output-300k-2026-03-24` [beta header](/docs/en/api/beta-headers) raises the limit to 300k for Claude Opus 4.8, Claude Opus 4.7, Claude Sonnet 5, Claude Opus 4.6, and Claude Sonnet 4.6. See the [models overview](/docs/en/about-claude/models/overview) for limits on legacy models. + +**Long requests.** The SDKs require streaming when `max_tokens` is greater than 21,333, to avoid HTTP timeouts on long-running requests. This is a client-side validation, not an API restriction. If you don't need to process events incrementally, use `.stream()` with `.get_final_message()` (Python) or `.finalMessage()` (TypeScript) to get the complete `Message` object without handling individual events; see [Streaming Messages](/docs/en/build-with-claude/streaming#get-the-final-message-without-handling-events). Expect longer response times when thinking is active, since generating thinking blocks adds processing time. For workloads that push thinking above roughly 32k tokens per request, use [batch processing](/docs/en/build-with-claude/batch-processing) to avoid networking issues: such requests can run long enough to hit system timeouts and open connection limits. + +## Next steps + + + + Tune when and how deeply Claude thinks: effort levels, prompt-based steering, cost control, and pricing. + + + + Walk through a complete two-turn tool-use round trip and see what interleaved thinking changes. + + + + Match thinking configuration 400s, empty thinking fields, and cache misses to their causes and fixes. + + + + Control how many tokens Claude spends across text, tool calls, and thinking with the effort parameter. + + diff --git a/content/en/build-with-claude/token-counting.md b/content/en/build-with-claude/token-counting.md index 49bf8a747..1ea8789da 100644 --- a/content/en/build-with-claude/token-counting.md +++ b/content/en/build-with-claude/token-counting.md @@ -776,7 +776,7 @@ All [active models](/docs/en/about-claude/models/overview) support token countin ### Count tokens in messages with extended thinking - See [how the context window is calculated with extended thinking](/docs/en/build-with-claude/extended-thinking#how-context-window-is-calculated-with-extended-thinking) for more details. + See [Thinking and the context window](/docs/en/build-with-claude/thinking#thinking-and-the-context-window) for more details. * Thinking blocks from **previous** assistant turns are ignored and **do not** count toward your input tokens * **Current** assistant turn thinking **does** count toward your input tokens diff --git a/content/en/build-with-claude/vision.md b/content/en/build-with-claude/vision.md index 7b845a001..ebd2a1c56 100644 --- a/content/en/build-with-claude/vision.md +++ b/content/en/build-with-claude/vision.md @@ -13,7 +13,7 @@ This guide describes how to send images to Claude, the limits and costs that app Use Claude's vision capabilities through: * [claude.ai](https://claude.ai/). Upload an image like you would a file, or drag and drop an image directly into the chat window. -* The [Anthropic Workbench](/workbench/). A button to add images appears at the top right of every User message block. +* The [Workbench](/playground) in the Claude Console. Add images directly to any User message block. * API request. See the following examples. On the API, provide images to Claude as `image` content blocks using one of three source types: diff --git a/content/en/claude_api_primer.md b/content/en/claude_api_primer.md index 61c70eeff..92d10408e 100644 --- a/content/en/claude_api_primer.md +++ b/content/en/claude_api_primer.md @@ -248,7 +248,7 @@ Extended thinking is supported in the following models: * Claude Haiku 4.5 (`claude-haiku-4-5-20251001`) - On Claude Opus 4.8 and Claude Opus 4.7, manual extended thinking (`type: enabled` with a `budget_tokens` value) is not supported and returns a 400 error. Use [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`type: adaptive`) instead. + On Claude Opus 4.8 and Claude Opus 4.7, manual extended thinking (`type: enabled` with a `budget_tokens` value) is not supported and returns a 400 error. Use [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`type: adaptive`) instead. ### How extended thinking works @@ -531,7 +531,7 @@ Extended thinking with tool use in Claude 4 models supports interleaved thinking With interleaved thinking and ONLY with interleaved thinking (not regular extended thinking), the `budget_tokens` can exceed the `max_tokens` parameter, as `budget_tokens` in this case represents the total budget across all thinking blocks within one assistant turn. - For Claude Opus 4.8, Claude Opus 4.7, and Claude Opus 4.6, interleaved thinking is automatically enabled when using [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`). No beta header is needed. Sonnet 4.6 supports both the `interleaved-thinking-2025-05-14` beta header with manual extended thinking and adaptive thinking. + For Claude Opus 4.8, Claude Opus 4.7, and Claude Opus 4.6, interleaved thinking is automatically enabled when using [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`thinking: {type: "adaptive"}`). No beta header is needed. Sonnet 4.6 supports both the `interleaved-thinking-2025-05-14` beta header with manual extended thinking and adaptive thinking. ## Tool use diff --git a/content/en/cli-sdks-libraries/cli/quickstart.md b/content/en/cli-sdks-libraries/cli/quickstart.md index be82b179b..dcea5e9e8 100644 --- a/content/en/cli-sdks-libraries/cli/quickstart.md +++ b/content/en/cli-sdks-libraries/cli/quickstart.md @@ -29,7 +29,7 @@ Compared to `curl`, `ant` builds request bodies from typed flags or piped YAML i For Linux environments, download the release binary directly. ```bash - VERSION=1.17.0 + VERSION=1.19.0 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;; diff --git a/content/en/cli-sdks-libraries/libraries/apple-foundation-models.md b/content/en/cli-sdks-libraries/libraries/apple-foundation-models.md index 5be22de96..1deb452b1 100644 --- a/content/en/cli-sdks-libraries/libraries/apple-foundation-models.md +++ b/content/en/cli-sdks-libraries/libraries/apple-foundation-models.md @@ -50,7 +50,7 @@ import FoundationModels import ClaudeForFoundationModels let model = ClaudeLanguageModel( - name: .sonnet4_6, + name: .sonnet5, auth: .apiKey(ProcessInfo.processInfo.environment["ANTHROPIC_API_KEY"] ?? "") ) @@ -108,7 +108,7 @@ Set the credential with the `auth:` parameter. Pass an API key directly while developing: ```swift -ClaudeLanguageModel(name: .sonnet4_6, auth: .apiKey("YOUR_API_KEY")) +ClaudeLanguageModel(name: .sonnet5, auth: .apiKey("YOUR_API_KEY")) ``` @@ -121,7 +121,7 @@ For production, route requests through your own back end with `.proxied`. The re ```swift ClaudeLanguageModel( - name: .sonnet4_6, + name: .sonnet5, auth: .proxied(headers: ["X-App-Token": "..."]), baseURL: URL(string: "https://api.yourapp.com/claude")! ) @@ -173,7 +173,7 @@ let session = LanguageModelSession(model: model, tools: [FindRestaurantsTool()]) ```swift let model = ClaudeLanguageModel( - name: .sonnet4_6, + name: .sonnet5, auth: auth, serverTools: [ .webSearch(maxUses: 5), diff --git a/content/en/cli-sdks-libraries/libraries/openai-sdk.md b/content/en/cli-sdks-libraries/libraries/openai-sdk.md index 1cc511c29..9bb67dbbb 100644 --- a/content/en/cli-sdks-libraries/libraries/openai-sdk.md +++ b/content/en/cli-sdks-libraries/libraries/openai-sdk.md @@ -13,7 +13,7 @@ Anthropic provides a compatibility layer that enables you to use the OpenAI SDK - For the best experience and access to Claude API full feature set ([PDF processing](/docs/en/build-with-claude/pdf-support), [citations](/docs/en/build-with-claude/citations), [extended thinking](/docs/en/build-with-claude/extended-thinking), and [prompt caching](/docs/en/build-with-claude/prompt-caching)), use the native [Claude API](/docs/en/api/overview). + For the best experience and access to Claude API full feature set ([PDF processing](/docs/en/build-with-claude/pdf-support), [citations](/docs/en/build-with-claude/citations), [thinking](/docs/en/build-with-claude/thinking), and [prompt caching](/docs/en/build-with-claude/prompt-caching)), use the native [Claude API](/docs/en/api/overview). ## Getting started with the OpenAI SDK @@ -28,7 +28,7 @@ To use the OpenAI SDK compatibility feature, you'll need to: * Replace your API key with a [Claude API key](/settings/keys) * Update your model name to use a [Claude model](/docs/en/about-claude/models/overview) -3. Review the documentation below for what features are supported +3. Review the following sections for what features are supported ### Quick start example @@ -78,15 +78,15 @@ To use the OpenAI SDK compatibility feature, you'll need to: Here are the most substantial differences from using OpenAI: * The `strict` parameter for function calling is ignored, which means the tool use JSON is not guaranteed to follow the supplied schema. For guaranteed schema conformance, use the native [Claude API with Structured Outputs](/docs/en/build-with-claude/structured-outputs). -* Audio input is not supported; it will simply be ignored and stripped from input +* Audio input is not supported; it will be ignored and stripped from input * Prompt caching is not supported, but it is supported in the [Anthropic SDKs](/docs/en/cli-sdks-libraries/overview) * System/developer messages are hoisted and concatenated to the beginning of the conversation, as Anthropic only supports a single initial system message. -Most unsupported fields are silently ignored rather than producing errors. These are all documented below. +Most unsupported fields are silently ignored rather than producing errors. These are all documented in the following sections. ### Output quality considerations -If you’ve done lots of tweaking to your prompt, it’s likely to be well-tuned to OpenAI specifically. Consider using the [prompt improver in the Claude Console](/dashboard) as a good starting point. +If you’ve done lots of tweaking to your prompt, it’s likely to be well-tuned to OpenAI specifically. Consider reworking it for Claude using the [prompting best practices guide](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices). ### System / developer message hoisting diff --git a/content/en/cli-sdks-libraries/sdks/java.md b/content/en/cli-sdks-libraries/sdks/java.md index 506491f1e..03b19ee4a 100644 --- a/content/en/cli-sdks-libraries/sdks/java.md +++ b/content/en/cli-sdks-libraries/sdks/java.md @@ -15,7 +15,7 @@ The Anthropic Java SDK provides convenient access to the Anthropic REST API from ```kotlin - implementation("com.anthropic:anthropic-java:2.48.0") + implementation("com.anthropic:anthropic-java:2.50.0") ``` @@ -24,7 +24,7 @@ The Anthropic Java SDK provides convenient access to the Anthropic REST API from com.anthropic anthropic-java - 2.48.0 + 2.50.0 ``` diff --git a/content/en/docs/claude-code/accessibility.md b/content/en/docs/claude-code/accessibility.md index ce6e2dc59..a70fab58e 100644 --- a/content/en/docs/claude-code/accessibility.md +++ b/content/en/docs/claude-code/accessibility.md @@ -62,6 +62,14 @@ Each message in the transcript starts with a label your screen reader announces, The terminal cursor follows the input caret, so a screen reader's read-current-line command answers "where am I" with the prompt you're editing. +{/* min-version: 2.1.218 */}When you delete a word or a line in the input, Claude Code announces the deleted text. Requires Claude Code v2.1.218 or later. The announcement covers: + +* Deleting a word with `Ctrl+W`, `Option+Delete` on macOS, or `Ctrl+Backspace` on Windows +* Deleting to the start of the line with `Ctrl+U` or `Cmd+Backspace` +* Deleting to the end of the line with `Ctrl+K` + +See the [text editing shortcuts](/docs/en/interactive-mode#text-editing) for what each key does. + {/* min-version: 2.1.210 */}Cycling [permission modes](/docs/en/permission-modes) with `Shift+Tab` announces the mode you land on, such as `[plan mode on]` or `[accept edits on]`. Claude Code prints the announcement once and doesn't repeat it on later redraws. Requires Claude Code v2.1.210 or later. ### Jump between turns @@ -98,7 +106,7 @@ The bell is your terminal's standard alert. To silence it, change the bell setti These options address accessibility needs outside of screen reader mode. All of them work alongside it. -* The `CLAUDE_CODE_ACCESSIBILITY` [environment variable](/docs/en/env-vars) is for screen magnifiers. Set `CLAUDE_CODE_ACCESSIBILITY=1` to keep the native terminal cursor visible so that magnifiers, such as macOS Zoom, can track the cursor position. +* The `CLAUDE_CODE_ACCESSIBILITY` [environment variable](/docs/en/env-vars) is for screen magnifiers. Set `CLAUDE_CODE_ACCESSIBILITY=1` to keep the native terminal cursor visible so that magnifiers, such as macOS Zoom, can track the cursor position. The cursor follows keyboard focus: the input caret while you type, and the highlighted row as you move through menus and panels, such as `/config` and `/plugin`, with the arrow keys. {/* min-version: 2.1.218 */}Row tracking in menus and panels requires Claude Code v2.1.218 or later. * The `prefersReducedMotion` [setting](/docs/en/settings#available-settings) reduces or disables spinners, shimmer, and other animations without changing the rest of the interface. * The `theme` [setting](/docs/en/settings#available-settings) selects the interface colors, including the colorblind-friendly `dark-daltonized` and `light-daltonized` themes. diff --git a/content/en/docs/claude-code/agent-sdk/python.md b/content/en/docs/claude-code/agent-sdk/python.md index d9098fe73..54b6207c0 100644 --- a/content/en/docs/claude-code/agent-sdk/python.md +++ b/content/en/docs/claude-code/agent-sdk/python.md @@ -1138,7 +1138,7 @@ class AgentDefinition: | :---------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `description` | Yes | Natural language description of when to use this agent | | `prompt` | Yes | The agent's system prompt | -| `tools` | No | Array of allowed tool names. If omitted, inherits all tools | +| `tools` | No | Array of allowed tool names. If omitted, inherits every [tool available to subagents](/docs/en/sub-agents#available-tools) | | `disallowedTools` | No | Array of tool names to remove from the agent's tool set. MCP server-level patterns are also accepted: `mcp__server` or `mcp__server__*` removes every tool from that server, and `mcp__*` removes every MCP tool from any server | | `model` | No | Model override for this agent. Accepts an alias such as `"sonnet"`, `"opus"`, `"haiku"`, or `"inherit"`, or a full model ID. If omitted, uses the main model | | `skills` | No | List of skill names to preload into the agent's context at startup. Unlisted skills remain invocable through the Skill tool | diff --git a/content/en/docs/claude-code/agent-sdk/subagents.md b/content/en/docs/claude-code/agent-sdk/subagents.md index 986cc012b..6cc7ded21 100644 --- a/content/en/docs/claude-code/agent-sdk/subagents.md +++ b/content/en/docs/claude-code/agent-sdk/subagents.md @@ -167,7 +167,7 @@ This example creates two subagents: a code reviewer with read-only access and a | :---------------- | :---------------------------------------------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `description` | `string` | Yes | Natural language description of when to use this agent | | `prompt` | `string` | Yes | The agent's system prompt defining its role and behavior | -| `tools` | `string[]` | No | Array of allowed tool names. If omitted, inherits all tools | +| `tools` | `string[]` | No | Array of allowed tool names. If omitted, inherits every [tool available to subagents](/docs/en/sub-agents#available-tools) | | `disallowedTools` | `string[]` | No | Array of tool names to remove from the agent's tool set. MCP server-level patterns are also accepted: `mcp__server` or `mcp__server__*` removes every tool from that server, and `mcp__*` removes every MCP tool from any server | | `model` | `string` | No | Model override for this agent. Accepts an alias such as `'fable'`, `'opus'`, `'sonnet'`, `'haiku'`, `'inherit'`, or a full model ID. Defaults to main model if omitted | | `skills` | `string[]` | No | List of skill names to preload into the agent's context at startup. Unlisted skills remain invocable through the Skill tool | @@ -187,7 +187,7 @@ Two subagent behaviors changed in Claude Code v2.1.198: * A subagent inherits the main session's extended thinking configuration. On earlier versions, extended thinking is disabled inside subagents regardless of the main session's setting. - {/* min-version: 2.1.172 */}As of Claude Code v2.1.172, subagents can spawn their own subagents. A subagent five levels below the main agent can't spawn further subagents, regardless of whether it runs in the foreground or background. To prevent a subagent from spawning others, omit `Agent` from its `tools` array or add it to `disallowedTools`. See [nested subagents](/docs/en/sub-agents#spawn-nested-subagents) for the full depth rules. + {/* min-version: 2.1.217 */}By default, subagents can't spawn subagents of their own. To let them, set [`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`](/docs/en/env-vars) to the number of subagent layers you want below your main conversation, `2` or higher; see [nested subagents](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents). From Claude Code v2.1.172 through v2.1.216, subagents could nest by default, up to five layers. ### Filesystem-based definition (alternative) @@ -208,7 +208,7 @@ A subagent's context window starts fresh, with no parent conversation, but isn't | :------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------- | | Its own system prompt (`AgentDefinition.prompt`) and the Agent tool's prompt | The parent's conversation history or tool results | | Project CLAUDE.md (loaded via [`settingSources`](/docs/en/agent-sdk/claude-code-features#control-filesystem-settings-with-settingsources)) | Preloaded skill content, unless listed in `AgentDefinition.skills` | -| Tool definitions (inherited from parent, or the subset in `tools`) | The parent's system prompt | +| Tool definitions (inherited from parent or the subset in `tools`, [filtered for background runs](/docs/en/sub-agents#available-tools)) | The parent's system prompt | The parent receives the subagent's final message as the Agent tool result, but may summarize it in its own response. To preserve subagent output verbatim in the user-facing response, include an instruction to do so in the prompt or `systemPrompt` option you pass to the main `query()` call. @@ -559,10 +559,12 @@ Subagent transcripts persist independently of the main conversation: ## Tool restrictions -Subagents can have restricted tool access via the `tools` field: +Use the `tools` field to limit what a subagent can do: -* **Omit the field**: agent inherits all available tools (default) -* **Specify tools**: agent can only use listed tools +* **Omit `tools`**: the subagent gets every [tool available to subagents](/docs/en/sub-agents#available-tools) +* **List tools**: the subagent gets only those. A code reviewer that should never edit files, for example, gets `["Read", "Grep", "Glob"]` + +A tool you leave out isn't in the subagent's session at all: Claude works without it, with no permission prompt or error. This example creates a read-only analysis agent that can examine code but can't modify files or run commands. @@ -620,12 +622,12 @@ This example creates a read-only analysis agent that can examine code but can't ### Common tool combinations -| Use case | Tools | Description | -| :----------------- | :-------------------------------------- | :-------------------------------------------------- | -| Read-only analysis | `Read`, `Grep`, `Glob` | Can examine code but not modify or execute | -| Test execution | `Bash`, `Read`, `Grep` | Can run commands and analyze output | -| Code modification | `Read`, `Edit`, `Write`, `Grep`, `Glob` | Full read/write access without command execution | -| Full access | All tools | Inherits all tools from parent (omit `tools` field) | +| Use case | Tools | Description | +| :----------------- | :-------------------------------------- | :----------------------------------------------------------------- | +| Read-only analysis | `Read`, `Grep`, `Glob` | Can examine code but not modify or execute | +| Test execution | `Bash`, `Read`, `Grep` | Can run commands and analyze output | +| Code modification | `Read`, `Edit`, `Write`, `Grep`, `Glob` | Full read/write access without command execution | +| Full access | All tools | Inherits the tools available to subagents (omit the `tools` field) | ## Scale up with dynamic workflows diff --git a/content/en/docs/claude-code/agent-sdk/typescript.md b/content/en/docs/claude-code/agent-sdk/typescript.md index d4b0ea4f3..00a89ae1a 100644 --- a/content/en/docs/claude-code/agent-sdk/typescript.md +++ b/content/en/docs/claude-code/agent-sdk/typescript.md @@ -255,14 +255,14 @@ function getSessionMessages( #### Return type: `SessionMessage` -| Property | Type | Description | -| :------------------- | :---------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | `"user" \| "assistant"` | Message role | -| `uuid` | `string` | Unique message identifier | -| `session_id` | `string` | Session this message belongs to | -| `message` | `unknown` | Raw message payload from the transcript | -| `parent_tool_use_id` | `string \| null` | For subagent messages, the `tool_use_id` of the spawning `Agent` tool call. `null` for main-session messages and older sessions | -| `parent_agent_id` | `string \| null` | For messages from a [nested subagent](/docs/en/sub-agents#spawn-nested-subagents), the `agentId` of the subagent that spawned it. `null` for main-session messages, messages from top-level subagents, and older sessions. {/* min-version: 2.1.202 */}Requires Claude Code v2.1.202 or later | +| Property | Type | Description | +| :------------------- | :---------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | `"user" \| "assistant"` | Message role | +| `uuid` | `string` | Unique message identifier | +| `session_id` | `string` | Session this message belongs to | +| `message` | `unknown` | Raw message payload from the transcript | +| `parent_tool_use_id` | `string \| null` | For subagent messages, the `tool_use_id` of the spawning `Agent` tool call. `null` for main-session messages and older sessions | +| `parent_agent_id` | `string \| null` | For messages from a [nested subagent](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents), the `agentId` of the subagent that spawned it. `null` for main-session messages, messages from top-level subagents, and older sessions. {/* min-version: 2.1.202 */}Requires Claude Code v2.1.202 or later | #### Example @@ -663,7 +663,7 @@ type AgentDefinition = { | Field | Required | Description | | :------------------------------------ | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `description` | Yes | Natural language description of when to use this agent | -| `tools` | No | Array of allowed tool names. If omitted, inherits all tools from parent. To preload Skills into the agent's context, use the `skills` field rather than listing `'Skill'` here | +| `tools` | No | Array of allowed tool names. If omitted, inherits every [tool available to subagents](/docs/en/sub-agents#available-tools). To preload Skills into the agent's context, use the `skills` field rather than listing `'Skill'` here | | `disallowedTools` | No | Array of tool names to explicitly disallow for this agent. MCP server-level patterns are also accepted: `mcp__server` or `mcp__server__*` removes every tool from that server, and `mcp__*` removes every MCP tool from any server | | `prompt` | Yes | The agent's system prompt | | `model` | No | Model override for this agent. Accepts an alias such as `'fable'`, `'opus'`, `'sonnet'`, `'haiku'`, `'inherit'`, or a full model ID. If omitted or `'inherit'`, uses the main model | diff --git a/content/en/docs/claude-code/authentication.md b/content/en/docs/claude-code/authentication.md index 71b18ff44..5f54bda0b 100644 --- a/content/en/docs/claude-code/authentication.md +++ b/content/en/docs/claude-code/authentication.md @@ -149,7 +149,7 @@ Claude Code securely manages your authentication credentials: ### Renew an expiring login -When the login you created with `/login` is within five days of expiring, Claude Code shows a warning at startup: `Your login expires in 3 days · run /login to renew`. Requires Claude Code v2.1.203 or later. +When the login you created with `/login` is within three days of expiring, Claude Code shows a warning at startup: `Your login expires in 3 days · run /login to renew`. Requires Claude Code v2.1.203 or later. {/* min-version: 2.1.217 */}Before v2.1.217, the warning appeared five days out. Run `/login` to renew. The warning is informational and never blocks a request: authentication keeps working until the login actually expires. The login lifetime itself is unchanged; the advance warning is what v2.1.203 adds. diff --git a/content/en/docs/claude-code/changelog.md b/content/en/docs/claude-code/changelog.md index f72fdce43..f88425a8b 100644 --- a/content/en/docs/claude-code/changelog.md +++ b/content/en/docs/claude-code/changelog.md @@ -10,6 +10,46 @@ This page is generated from the [CHANGELOG.md on GitHub](https://github.com/anth Run `claude --version` to check your installed version. + + * Changed `/code-review` to run as a background subagent, so review work no longer fills your conversation and keeps stacked slash commands as its review target + * Added screen-reader announcements of deleted text for word and line deletions (`Option+Delete`, `Ctrl+W`, `Cmd+Backspace`, `Ctrl+U`, `Ctrl+K`) in `--ax-screen-reader` mode + * Fixed Windows paths with `\u`-prefixed segments (like `C:\Users\unicorn`) being corrupted into CJK characters in tool inputs, which made those files inaccessible + * Fixed the left arrow key discarding the conversation with no undo: presses right after editing now ask to confirm, and Esc in the agent view returns to the conversation it backgrounded + * Added HTTP status and error text to `claude mcp list` and `/mcp` when a server fails to connect, and a warning for MCP config values with hidden leading or trailing whitespace + * Fixed multi-line paste collapsing into one line with `j` in place of newlines in terminals that encode pasted newlines as Ctrl+J + * Fixed `/context` reporting stale pre-compact token usage after compacting from the message picker + * Fixed `/ultrareview` failing on descriptive arguments like "review my auth changes" — they now run a review of your current branch with the text applied as a note to the findings + * Fixed `/code-review ultra` silently running a local review in non-interactive sessions — it now launches the cloud review + * Fixed gateway spend metering to price Bedrock application-inference-profile ARNs and other config-mapped upstream model IDs at the configured model's rates + * Fixed mojibake when a long IDE selection was truncated mid-emoji, and a case where a tool executor error could be silently dropped + * Fixed an engine teardown race that could start and abandon a phantom turn, and made input pushed after close consistently rejected + * Fixed spurious "\[Request interrupted by user]" messages after interrupted tool calls, and an unpaired `tool_use` block left in the transcript when a tool aborted mid-response + * Fixed VoiceOver reading "new line" instead of echoing the typed space at the end of the input in `--ax-screen-reader` mode + * Fixed plugin and settings panels not moving the terminal cursor to the focused row, so screen readers and magnifiers can follow arrow-key navigation + * Fixed crashes (maximum call stack exceeded) when a deeply nested watched directory tree was deleted or moved, and when rendering deeply nested UI trees + * Fixed pull request events occasionally being lost when a session exited immediately after creating or linking a PR + * Fixed the Bedrock setup wizard failing profile verification for assume-role profiles in partitioned AWS regions and on proxy-only networks + * Fixed rare negative or incorrect turn duration measurements after a system clock adjustment by timing turns with a monotonic clock + * Fixed the "N MCP servers need authentication" startup notice over-counting claude.ai connectors that aren't connected in claude.ai + * Fixed prompt history entries being dropped or duplicated when history writes raced or failed + * Fixed a retry loop that re-sent identical doomed requests after a context-overflow error with a large thinking budget; `Ctrl+B` backgrounding now applies the same background-shell caps as other paths + * Fixed agent frontmatter hooks running from untrusted folders: hooks now require the agent file's own folder to have accepted workspace trust + * Fixed fork-session lineage being lost after compaction in headless and SDK sessions + * Fixed a resumed session failing every turn, or crashing on resume, when its history held a malformed delta attachment + * Improved `/ultrareview` error feedback so Claude can correct an invalid argument instead of retrying it unchanged + * Improved auto mode: the dangerous-rm, background-`&`, and suspicious-Windows-path checks no longer open permission dialogs; the auto-mode classifier adjudicates them instead + * Improved sandbox command restrictions for IDE interactions + * Improved trust dialogs to name the repository root the grant covers + * Changed `/deep-research` to start only when invoked manually; Claude no longer launches it on its own + * Changed plan mode with auto to no longer prompt for Bash commands the static analyzer can't prove read-only; the auto-mode classifier judges them instead + * Added an announcement when fast mode changes as a result of switching models via `/config model=` or Remote Control + * Changed server-managed settings so benign feature and cost toggles no longer trigger the settings-approval prompt + * Changed agent markdown files to reject agent names containing `:`, which is reserved for plugin namespacing + * Changed skills with `context: fork` to run in the background by default; opt out per skill with `background: false` + * Added `yes`/`no`/`on`/`off`/`1`/`0` (case-insensitive) as accepted values for skill and plugin frontmatter booleans, alongside `true`/`false` + * Fixed remote sessions continuing to send heartbeats after their worker was replaced, which left long-lived desktop and IDE processes retrying a rejected request every few seconds forever + + * Added emoji shortcode autocomplete in the prompt input: type `:heart:` to insert ❤️, or `:hea` for suggestions — disable with the `emojiCompletionEnabled` setting * Added warnings when transcript writes are failing (e.g. disk full) or when session saving is off due to an inherited environment variable, instead of losing transcripts silently diff --git a/content/en/docs/claude-code/claude-code-on-the-web.md b/content/en/docs/claude-code/claude-code-on-the-web.md index 18cb303e5..9e5cd8a91 100644 --- a/content/en/docs/claude-code/claude-code-on-the-web.md +++ b/content/en/docs/claude-code/claude-code-on-the-web.md @@ -640,7 +640,9 @@ This creates a new cloud session on claude.ai. The session clones your current d `--cloud` creates cloud sessions. `--remote-control` is unrelated: it exposes a local CLI session for monitoring from the web. See [Remote Control](/docs/en/remote-control). -Use `/tasks` in the Claude Code CLI to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions just like any other conversation. +Use `/tasks` in the Claude Code CLI to check progress, or open the session on claude.ai or the Claude mobile app to interact directly. From there you can steer Claude, provide feedback, or answer questions as in any other conversation. + +If Claude asks a question and the session sits idle, you can still answer when you come back, up to [environment expiry](#environment-expired), and the session continues from your answer. #### Tips for cloud tasks @@ -696,7 +698,7 @@ Pull a cloud session into your terminal using any of these: * **From `/tasks`**: run `/tasks` to see your background sessions, then press `t` to teleport into one. * **From the web interface**: select **Open in CLI** to copy a command you can paste into your terminal. -When you teleport a session, Claude verifies you're in the correct repository, fetches and checks out the branch from the cloud session, and loads the full conversation history into your terminal. +When you teleport a session, Claude verifies you're in the correct repository, fetches and checks out the branch from the cloud session, and loads the full conversation history into your terminal. The terminal gets its own copy of the session: new work there stays local and doesn't appear in the cloud session on claude.ai or the Claude mobile app. To keep steering from your phone after teleporting, start [`/remote-control`](/docs/en/remote-control) in the local session. `--teleport` is distinct from `--resume`. `--resume` reopens a conversation from this machine's local history and doesn't list cloud sessions; `--teleport` pulls a cloud session and its branch. diff --git a/content/en/docs/claude-code/claude-security.md b/content/en/docs/claude-code/claude-security.md index 60298ea7c..58b5b3bec 100644 --- a/content/en/docs/claude-code/claude-security.md +++ b/content/en/docs/claude-code/claude-security.md @@ -115,14 +115,6 @@ git apply CLAUDE-SECURITY-/patches/F1.patch When the patched code has no tests, the patch's note says so, so you know its review ran without a test pass. Apply each patch in its own pull request so it can be reviewed and tested on its own. -

- Scan repositories you don't trust -

- -The plugin is built for scanning code you control, where the question is which bugs are in the code rather than whether the code is trying something. A scan runs in your session, under your permissions, and adds no isolation of its own: the repository's committed `.claude/` settings, hooks, and `CLAUDE.md` apply exactly as they would in any other session. The scan treats everything the repository says, in code, comments, and findings text, as data under review rather than instructions, but that isn't a defense against a hostile repository. - -To scan a repository you don't fully trust, such as a third-party dependency or an unfamiliar codebase, sandbox the whole session first. [sandbox-runtime](https://github.com/anthropic-experimental/sandbox-runtime) enforces filesystem and network restrictions at the operating-system level; its README covers how to run Claude Code inside it. - ## How the plugin fits with other security tools The Claude Security plugin is the on-demand deep-scan layer in a defense-in-depth stack, alongside the [security guidance plugin](/docs/en/security-guidance), [`/security-review`](/docs/en/commands#all-commands), [Code Review](/docs/en/code-review), the managed [Claude Security](https://claude.com/product/claude-security) product, and your existing scanners: diff --git a/content/en/docs/claude-code/costs.md b/content/en/docs/claude-code/costs.md index 59110f48f..5267c6c1b 100644 --- a/content/en/docs/claude-code/costs.md +++ b/content/en/docs/claude-code/costs.md @@ -33,7 +33,7 @@ Usage by model: These totals reset when `/clear` starts a new session, so the next session's total cost starts at \$0. Before v2.1.211, they kept accumulating across `/clear` for the lifetime of the Claude Code process. -On a Pro, Max, Team, or Enterprise plan, `/usage` also shows a breakdown of what counts against your plan limits. It attributes recent usage to skills, subagents, plugins, and individual MCP servers, with each shown as a percentage of the total. Press `d` or `w` to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included. +On a Pro, Max, Team, or Enterprise plan, `/usage` also shows a breakdown of what counts against your plan limits. It attributes recent usage to skills, subagents, plugins, and individual MCP servers, with each shown as a percentage of the total. It also flags behaviors such as long context or cache misses when one accounts for 10% or more of recent usage. Press `d` or `w` to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included. When the request for your plan limits fails, most often because the usage endpoint is rate limited, `/usage` shows the last usage bars it loaded on this machine within the past 60 minutes, along with a `Showing last-known usage` note stating how long ago that data was fetched. Press `r` to retry; a successful retry replaces the last-known bars with fresh data. Without a snapshot from the past 60 minutes, `/usage` reports that the usage endpoint is rate limited and offers the same retry shortcut. Before v2.1.208, a rate-limited request in a session that hadn't loaded usage yet always showed the error with no bars. @@ -267,6 +267,18 @@ Claude Code uses tokens for some background functionality even when idle: These background processes consume a small amount of tokens (typically under \$0.04 per session) even without active interaction. +## Why usage climbs in a long session + +A session that has been open for hours can use far more of your plan limits than your activity suggests, usually for one of these reasons: + +* **Long context**: Claude Code sends your full conversation with every message, so a one-line question in a session that has been open all day uses tokens for the whole conversation, not just the one line. See [Manage context proactively](#manage-context-proactively) for ways to keep your context small +* **Cache misses**: your first message after a break longer than the [cache lifetime](/docs/en/prompt-caching#cache-lifetime) misses the cache and reprocesses your full context. The lifetime is an hour on a subscription and drops to five minutes once you're drawing on [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans); on an API key or cloud provider, it's five minutes by default +* **Scheduled tasks**: a [scheduled task](/docs/en/scheduled-tasks) fires on its interval even while the session is idle, sending your full context each time +* **Agent teammates**: each active [teammate](#agent-team-token-costs) keeps consuming tokens until it exits +* **Compaction**: `/compact` reads the conversation it summarizes, so [compacting a large context](/docs/en/prompt-caching#compacting-the-conversation) is itself a large request. When you want a fresh start instead of continuity, `/clear` costs nothing + +On a Pro, Max, Team, or Enterprise plan, the `/usage` breakdown flags behaviors that account for 10% or more of your recent usage, such as long context or cache misses, each with a tip to reduce it. + ## Understanding changes in Claude Code behavior Claude Code regularly receives updates that may change how features work, including cost reporting. Run `claude --version` to check your current version. diff --git a/content/en/docs/claude-code/desktop-quickstart.md b/content/en/docs/claude-code/desktop-quickstart.md index 7a6a7904a..f5ced4591 100644 --- a/content/en/docs/claude-code/desktop-quickstart.md +++ b/content/en/docs/claude-code/desktop-quickstart.md @@ -66,7 +66,7 @@ With the Code tab open, choose a project and give Claude something to do. You can also select: - * **Remote**: Run sessions on Anthropic's cloud infrastructure that continue even if you close the app. Cloud sessions use the same infrastructure as [Claude Code on the web](/docs/en/claude-code-on-the-web). + * **Cloud**: Run sessions on Anthropic's cloud infrastructure that continue even if you close the app. Cloud sessions use the same infrastructure as [Claude Code on the web](/docs/en/claude-code-on-the-web). * **SSH**: Connect to a remote machine over SSH, such as your own servers, cloud VMs, or dev containers. Desktop installs Claude Code on the remote machine automatically the first time you connect. * **WSL** (Windows): Run the session inside a [WSL 2 distribution](/docs/en/desktop-wsl); Claude Code, tools, and git execute on the Linux side with native paths. diff --git a/content/en/docs/claude-code/desktop.md b/content/en/docs/claude-code/desktop.md index 4b1b1aafa..fc1fe5c1c 100644 --- a/content/en/docs/claude-code/desktop.md +++ b/content/en/docs/claude-code/desktop.md @@ -43,7 +43,7 @@ For [scheduled recurring work](/docs/en/desktop-scheduled-tasks), [keyboard shor Before you send your first message, configure four things in the prompt area: -* **Environment**: choose where Claude runs. Select **Local** for your machine, **Remote** for Anthropic-hosted cloud sessions, an [**SSH connection**](#ssh-sessions) for a remote machine you manage, or on Windows a [**WSL distribution**](/docs/en/desktop-wsl). See [environment configuration](#environment-configuration). +* **Environment**: choose where Claude runs. Select **Local** for your machine, **Cloud** for Anthropic-hosted cloud sessions, an [**SSH connection**](#ssh-sessions) for a remote machine you manage, or on Windows a [**WSL distribution**](/docs/en/desktop-wsl). See [environment configuration](#environment-configuration). * **Project folder**: select the folder or repository Claude works in. For cloud sessions, you can add [multiple repositories](#run-long-running-tasks-remotely). * **Model**: pick a [model](/docs/en/model-config#available-models) from the dropdown next to the send button. You can change this during the session. * **Permission mode**: choose how much autonomy Claude has from the [mode selector](#choose-a-permission-mode). You can change this during the session. @@ -349,7 +349,7 @@ Click any entry to see its output in the subagent pane or stop it. To see what o ### Run long-running tasks remotely -For large refactors, test suites, migrations, or other long-running tasks, select **Remote** instead of **Local** when starting a session. Cloud sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](https://claude.ai/code) or the [Claude mobile app](/docs/en/mobile). +For large refactors, test suites, migrations, or other long-running tasks, select **Cloud** instead of **Local** when starting a session. Cloud sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](https://claude.ai/code) or the [Claude mobile app](/docs/en/mobile). Cloud sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the repo pill to add additional repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers. @@ -596,7 +596,7 @@ These configurations show common setups for different project types: The environment you pick when [starting a session](#start-a-session) determines where Claude executes and how you connect: * **Local**: runs on your machine with direct access to your files -* **Remote**: runs on Anthropic's cloud infrastructure. Sessions continue even if you close the app. +* **Cloud**: runs on Anthropic's cloud infrastructure. Sessions continue even if you close the app. * **SSH**: runs on a remote machine you connect to over SSH, such as your own servers, cloud VMs, or dev containers * **WSL** (Windows): runs inside a [WSL 2 distribution](/docs/en/desktop-wsl) on your machine, using its Linux toolchain and native paths diff --git a/content/en/docs/claude-code/env-vars.md b/content/en/docs/claude-code/env-vars.md index 12e863fbb..3178ade44 100644 --- a/content/en/docs/claude-code/env-vars.md +++ b/content/en/docs/claude-code/env-vars.md @@ -255,10 +255,12 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_IDE_HOST_OVERRIDE` | Override the host address used to connect to the IDE extension. By default Claude Code auto-detects the correct address, including WSL-to-Windows routing | | `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL` | Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](/docs/en/settings#global-config-settings) to `false` | | `CLAUDE_CODE_IDE_SKIP_VALID_CHECK` | Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running | +| `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` | {/* min-version: 2.1.217 */}How many [subagents](/docs/en/sub-agents#concurrent-subagent-limit) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can't disable it. Requires Claude Code v2.1.217 or later | | `CLAUDE_CODE_MAX_CONTEXT_TOKENS` | Override the context window size Claude Code assumes for the active model. {/* min-version: 2.1.193 */}As of v2.1.193, applied directly for model names Claude Code does not recognize as a Claude model; for recognized Claude models it only takes effect when `DISABLE_COMPACT` is also set. Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name | | `CLAUDE_CODE_MAX_OUTPUT_TOKENS` | Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison). Increasing this value reduces the effective context window available before [auto-compaction](/docs/en/costs#reduce-token-usage) triggers | | `CLAUDE_CODE_MAX_RETRIES` | Override the number of times to retry failed API requests (default: 10). {/* min-version: 2.1.186 */}Capped at 15 as of v2.1.186; {/* min-version: 2.1.199 */}as of v2.1.199, `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. For unattended sessions that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG` instead | | `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION` | {/* min-version: 2.1.212 */}Cap on the number of [subagents](/docs/en/sub-agents#session-subagent-limit) one session can spawn with the Agent tool (default: 200). When Claude reaches the cap, spawning another subagent fails with an error telling Claude to finish the remaining work directly. Accepts a positive whole number in plain digits with no upper bound; this variable doesn't take the scientific notation or digit-separator spellings. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later | +| `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` | {/* min-version: 2.1.217 */}Number of [subagent layers](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents) allowed below the main conversation (default: 1). At the default, subagents can't spawn their own subagents; set `2` or higher to allow it. Accepts a positive whole number in plain digits; anything else is ignored, so the limit can be raised but not turned off. Requires Claude Code v2.1.217 or later | | `CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY` | Maximum number of read-only tools and subagents that can execute in parallel (default: 10). Higher values increase parallelism but consume more resources | | `CLAUDE_CODE_MAX_TURNS` | Cap the number of agentic turns when no explicit limit is passed. Equivalent to passing [`--max-turns`](/docs/en/cli-reference#cli-flags), which takes precedence when both are set. A value that is not a positive integer is rejected at startup with an error rather than treated as no cap | | `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION` | {/* min-version: 2.1.212 */}Cap on the total number of [WebSearch](/docs/en/tools-reference#websearch-tool-behavior) calls one session can make (default: 200). When Claude reaches the cap, further WebSearch calls return a notice telling it to continue with the information it already gathered. Accepts a positive whole number with no upper bound. Anything else is ignored and the default applies, so the cap can be raised but not turned off. Requires Claude Code v2.1.212 or later | diff --git a/content/en/docs/claude-code/errors.md b/content/en/docs/claude-code/errors.md index d33a4acc4..cfe85d474 100644 --- a/content/en/docs/claude-code/errors.md +++ b/content/en/docs/claude-code/errors.md @@ -1314,7 +1314,15 @@ These errors come from Claude's built-in tools. Claude corrects most tool errors ### Agent would be spawned with zero tools -Nothing in a [subagent's `tools` list](/docs/en/sub-agents#supported-frontmatter-fields) resolved to a tool, so Claude Code refuses to launch the subagent rather than start one that can't act. The message groups the entries by why they didn't resolve: not a recognized tool, a tool that isn't available to subagents, or recognized but matching no tool in the current session. Omitting the `tools` field never triggers this refusal. An MCP server pattern such as `mcp__github__*` isn't exempt: when no connected tool comes from that server, the launch is refused with the pattern in the matched-nothing group. Before v2.1.208, the subagent launched with no tools and returned an empty or confusing result. +Every entry in the subagent's [`tools` list](/docs/en/sub-agents#supported-frontmatter-fields) failed to match a usable tool, so Claude Code refused to launch the subagent: with no tools, it couldn't act. The message groups your entries by what went wrong: + +* **Unrecognized**: the entry matches no tool name, usually a typo such as `Grpe` for `Grep`. +* **Not available to subagents**: the entry names a real tool that [subagents can't use](/docs/en/sub-agents#available-tools). Background subagents keep a smaller built-in tool set, so an entry that only a foreground subagent can use lands here when the subagent would run in the background, which is the default. If you list `Agent`, the message reports it under the next group instead. +* **Matched no tools in this session**: the entry is valid but no tool in the current session matches it right now, such as `mcp__github__*` with no GitHub MCP server connected, or `Agent` while [nested spawning](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents) is off. + +Omitting the `tools` field never triggers this refusal. If you leave the `tools` list empty, or `disallowedTools` removes every entry in it, Claude Code also skips the refusal and launches the subagent without tools. + +Before v2.1.208, the subagent launched with no tools and could return an empty or confusing result. ```text theme={null} Agent 'code-reviewer' would be spawned with zero tools — refusing. Its tools list resolved to nothing: unrecognized [Grpe]. Fix the agent's tools frontmatter or pass a different subagent_type. @@ -1324,7 +1332,9 @@ Agent 'code-reviewer' would be spawned with zero tools — refusing. Its tools l * Correct each entry the error names against the [tools available to subagents](/docs/en/sub-agents#available-tools) * Remove entries for tools the session doesn't have, such as MCP tools from a server that isn't connected -* To give the subagent every [subagent-available](/docs/en/sub-agents#available-tools) tool the parent has, delete the `tools` field instead of listing tools +* For a tool that [background subagents drop](/docs/en/sub-agents#available-tools), such as `LSP` or `TaskCreate`, remove the entry or ask Claude to run the subagent in the foreground +* Delete the `tools` field instead of listing tools to give the subagent every [tool available to subagents](/docs/en/sub-agents#available-tools) +* For a `tools` list that contains only `Agent`, allow [nested spawning](/docs/en/sub-agents#let-subagents-spawn-their-own-subagents) or give the agent at least one other tool: `Agent` isn't available inside a subagent by default, so a list with nothing else in it resolves to no tools ### File is covered by a Read deny rule diff --git a/content/en/docs/claude-code/hooks.md b/content/en/docs/claude-code/hooks.md index fd7ae95f0..4b403f252 100644 --- a/content/en/docs/claude-code/hooks.md +++ b/content/en/docs/claude-code/hooks.md @@ -571,7 +571,9 @@ hooks: --- ``` -Agents use the same format in their YAML frontmatter. +Subagents use the same format in their YAML frontmatter. + +{/* min-version: 2.1.218 */}Frontmatter hooks in a project subagent run only after you accept the [workspace trust dialog](/docs/en/permissions#project-allow-rules-and-workspace-trust) for the folder the agent file came from; see [which scopes are exempt](/docs/en/sub-agents#hooks-in-subagent-frontmatter). Before v2.1.218, these hooks could run from folders you hadn't trusted. ### The `/hooks` menu diff --git a/content/en/docs/claude-code/interactive-mode.md b/content/en/docs/claude-code/interactive-mode.md index 35d3503f2..1c855712e 100644 --- a/content/en/docs/claude-code/interactive-mode.md +++ b/content/en/docs/claude-code/interactive-mode.md @@ -53,7 +53,7 @@ | `Ctrl+E` | Move cursor to end of current line | In multiline input, moves to the end of the current logical line | | `Ctrl+K` | Delete to end of line | Stores deleted text for pasting | | `Ctrl+U` | Delete from cursor to line start | Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut | -| `Ctrl+W` | Delete previous word | Stores deleted text for pasting. On Windows, `Ctrl+Backspace` also deletes the previous word | +| `Ctrl+W` | Delete previous word | Stores deleted text for pasting. On macOS, `Option+Delete` also deletes the previous word, and on Windows, `Ctrl+Backspace` does | | `Ctrl+Y` | Paste deleted text | Paste text deleted with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W` | | `Alt+Y` (after `Ctrl+Y`) | Cycle paste history | After pasting, cycle through previously deleted text. Requires [Option as Meta](#keyboard-shortcuts) on macOS | | `Alt+B` | Move cursor back one word | Word navigation. Requires [Option as Meta](#keyboard-shortcuts) on macOS | @@ -87,6 +87,7 @@ | `/` at start | Command or skill | See [commands](#commands) and [skills](/docs/en/skills) | | `!` at start | Shell mode | Run a command directly, add its output to the session, and have Claude respond to it | | `@` | File path mention | Trigger file path autocomplete | +| `:` | Emoji shortcode | Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See [Emoji shortcodes](#emoji-shortcodes). {/* min-version: 2.1.217 */}Requires Claude Code v2.1.217 or later | | `?` on empty input | Toggle the shortcut help panel | Typing `?` when the input already contains text inserts the character. {/* min-version: 2.1.211 */}Before v2.1.211, an edit that left a lone `?` in the input, such as backspacing from `?x`, also toggled the panel and discarded the edit | ### Transcript viewer @@ -284,7 +285,7 @@ To run commands in the background, you can either: * Background tasks have unique IDs for tracking and output retrieval * Background tasks are automatically cleaned up when Claude Code exits. Backgrounding the session instead of exiting it hands them to the background session, where they keep running. See [background a running session](/docs/en/agent-view#from-inside-a-session) * Background tasks are automatically terminated if output exceeds 5GB, with a note in stderr explaining why -* {/* min-version: 2.1.193 */}As of v2.1.193, on macOS and Linux, running background tasks are terminated when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes with no turn or subagent running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](/docs/en/env-vars) to `1` to turn this off +* {/* min-version: 2.1.193 */}On macOS and Linux, Claude Code terminates running background tasks when the operating system signals memory pressure, provided the session has been idle for at least 30 minutes and no turn or subagent is running. Set [`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`](/docs/en/env-vars) to `1` to turn this off. Requires Claude Code v2.1.193 or later. Background commands owned by a [subagent](/docs/en/sub-agents) are instead terminated after 60 minutes, configurable in milliseconds with [`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`](/docs/en/env-vars). {/* min-version: 2.1.218 */}Before v2.1.218, neither limit covered commands moved to the background with `Ctrl+B` To disable all background task functionality, set the `CLAUDE_CODE_DISABLE_BACKGROUND_TASKS` environment variable to `1`. See [Environment variables](/docs/en/env-vars) for details. @@ -342,6 +343,17 @@ To disable prompt suggestions entirely, set the environment variable or toggle t export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false ``` +## Emoji shortcodes + +Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. {/* min-version: 2.1.217 */}Requires Claude Code v2.1.217 or later. + +* Type a complete shortcode such as `:heart:` and Claude Code replaces it with ❤️ as soon as you type the closing `:` +* Type `:` plus at least two characters of a name, such as `:hea`, to open a suggestion popup, then press `Tab` or `Enter` to insert the highlighted emoji + +The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn't open suggestions. + +To turn the feature off, set [`emojiCompletionEnabled`](/docs/en/settings#available-settings) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement. + ## Side questions with /btw Use `/btw` to ask a quick question about your current work without adding to the conversation history. This is useful when you want a fast answer but don't want to clutter the main context or derail Claude from a long-running task. @@ -402,6 +414,8 @@ When working on a branch with an open pull request, Claude Code displays a click The badge disappears once the pull request merges or closes. `Cmd+click` (macOS) or `Ctrl+click` (Windows/Linux) the link to open the pull request in your browser. The status refreshes every 60 seconds, and immediately after a `gh pr` or `git push` command runs in the session. +Claude Code renders the badge as a hyperlink even when it can't detect hyperlink support in your terminal, which commonly happens over SSH or in tmux. Set [`FORCE_HYPERLINK=0`](/docs/en/env-vars) to render the badge as plain text. Before v2.1.217, the badge was a hyperlink only when detection succeeded. + PR status requires the `gh` CLI to be installed and authenticated (`gh auth login`). diff --git a/content/en/docs/claude-code/keybindings.md b/content/en/docs/claude-code/keybindings.md index 37a6a0758..e10264709 100644 --- a/content/en/docs/claude-code/keybindings.md +++ b/content/en/docs/claude-code/keybindings.md @@ -56,7 +56,7 @@ Each binding block specifies a **context** where the bindings apply: | `Task` | Background task is running | | `ThemePicker` | Theme picker dialog | | `Attachments` | Image attachment navigation in select dialogs | -| `Footer` | Footer indicator navigation (tasks, teams, diff) | +| `Footer` | Footer indicator navigation (tasks, teams, diff, artifacts) | | `MessageSelector` | Rewind and summarize dialog message selection | | `DiffDialog` | Diff viewer navigation | | `ModelPicker` | Model picker effort level | @@ -223,14 +223,15 @@ Actions available in the `Attachments` context: Actions available in the `Footer` context: -| Action | Default | Description | -| :---------------------- | :------ | :--------------------------------------- | -| `footer:next` | Right | Next footer item | -| `footer:previous` | Left | Previous footer item | -| `footer:up` | Up | Navigate up in footer (deselects at top) | -| `footer:down` | Down | Navigate down in footer | -| `footer:openSelected` | Enter | Open selected footer item | -| `footer:clearSelection` | Escape | Clear footer selection | +| Action | Default | Description | +| :---------------------- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `footer:next` | Right | Next footer item | +| `footer:previous` | Left | Previous footer item | +| `footer:up` | Up | Navigate up in footer (deselects at top) | +| `footer:down` | Down | Navigate down in footer | +| `footer:openSelected` | Enter | Open selected footer item | +| `footer:clearSelection` | Escape | Clear footer selection | +| `footer:dismiss` | Backspace, Delete | Dismiss the selected [artifact](/docs/en/artifacts) link from the footer; the published artifact itself is unaffected. On other footer rows, these keys have no effect. {/* min-version: 2.1.217 */}Requires v2.1.217 or later | ### Message selector actions diff --git a/content/en/docs/claude-code/mcp.md b/content/en/docs/claude-code/mcp.md index e9900a1a1..3ea2f5503 100644 --- a/content/en/docs/claude-code/mcp.md +++ b/content/en/docs/claude-code/mcp.md @@ -542,7 +542,7 @@ As of v2.1.195, when a token refresh fails because the server rejects the stored A custom server that returns a `WWW-Authenticate` header pointing to its authorization server gets the same automatic discovery as any other remote server. -As of v2.1.193, Claude Code also shows a startup notice when one or more configured servers need authentication, so you don't have to open `/mcp` to discover which servers need sign-in. +Claude Code also shows a startup notice when one or more configured servers need authentication, so you don't have to open `/mcp` to discover which servers need sign-in. The notice requires Claude Code v2.1.193 or later. {/* min-version: 2.1.218 */}It counts only servers you can sign in to from Claude Code. Before v2.1.218, it also counted [claude.ai connectors](#use-mcp-servers-from-claude-ai) that weren't connected in claude.ai, which you can connect only from claude.ai settings. In non-interactive mode there's no `/mcp` panel, so Claude Code can't run the OAuth flow for you. As of v2.1.196, when a configured server needs authentication during a `claude -p` or Agent SDK run with [tool search](#scale-with-mcp-tool-search) enabled, which is the default, Claude Code tells Claude that the server's tools are unavailable until you authorize it. Claude can then name the server that needs sign-in instead of responding as if the server weren't configured. Complete the sign-in from an interactive session with `/mcp` or `claude mcp login `. diff --git a/content/en/docs/claude-code/memory.md b/content/en/docs/claude-code/memory.md index 6e9522911..06c88bd1e 100644 --- a/content/en/docs/claude-code/memory.md +++ b/content/en/docs/claude-code/memory.md @@ -237,6 +237,10 @@ paths: --- ``` +Each brace group multiplies the number of expanded patterns: `src/*.{ts,tsx}` expands to two patterns, and `{a,b}/{c,d}/*.{ts,tsx}` to eight. To keep expansion bounded, a rule's whole `paths` list shares one budget of 1,000 expanded patterns and 4 MiB, and patterns without braces don't count against it. + +Claude Code uses any pattern that would exceed the budget unexpanded, and its literal braces match no files. {/* min-version: 2.1.217 */}Before v2.1.217, a `paths` value with many brace groups stalled or crashed the CLI at startup. + Glob syntax treats `[` as the start of a bracket expression such as `[abc]`. A pattern with a `[` that can't be read as a bracket expression, such as `photos [2024/**`, is invalid: it matches nothing, and the rule's other patterns keep working. To match a literal `[` in a file name, escape it as `photos \[2024/**`. {/* min-version: 2.1.207 */}Before v2.1.207, one invalid pattern made the Read tool fail for every file the rule was evaluated against, instead of matching nothing. #### Share rules across projects with symlinks diff --git a/content/en/docs/claude-code/monitoring-usage.md b/content/en/docs/claude-code/monitoring-usage.md index 57dd2e4d0..684a64bf6 100644 --- a/content/en/docs/claude-code/monitoring-usage.md +++ b/content/en/docs/claude-code/monitoring-usage.md @@ -68,10 +68,27 @@ Example managed settings configuration: Claude Code doesn't pass `OTEL_*` environment variables to the subprocesses it spawns, including the Bash tool, hooks, MCP servers, and language servers. An OpenTelemetry-instrumented application that you run through the Bash tool doesn't inherit Claude Code's exporter endpoint or headers, so set those variables directly in the command if that application needs to export its own telemetry. +### Managed endpoints govern signal-specific endpoints + +A generic `OTEL_EXPORTER_OTLP_ENDPOINT` set in managed settings governs every signal's endpoint. If a lower-precedence source, such as user settings or a shell export, sets a signal-specific endpoint like `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`, Claude Code removes that variable at startup and logs a warning, visible with `claude --debug`. Users can't point one signal's OTLP traffic at a different endpoint, so you don't need to set the signal-specific endpoint variables in managed settings to prevent it. + +This applies only on machines where an administrator deploys managed settings with telemetry configured, and it changes where telemetry is delivered, not what Claude Code collects. + +A managed `OTEL_EXPORTER_OTLP_HEADERS`, `OTEL_EXPORTER_OTLP_CLIENT_KEY`, or `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE` variable also governs the endpoint variables, since those credentials would otherwise accompany telemetry to a collector the managed settings didn't choose. + +Two cases keep the normal per-key precedence: + +* Signal-specific variables set in the managed settings file itself still apply, so you can route one signal to a different collector by setting them there, as the [SIEM example](#send-events-to-a-siem) does. +* The exporter selectors (`OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, and the beta `OTEL_TRACES_EXPORTER`) and the protocol variables follow per-key precedence, so a lower-precedence source can still change how a signal is exported. To make those authoritative too, set the signal-specific keys in managed settings directly. + +{/* min-version: 2.1.217 */}Before v2.1.217, every variable followed per-key settings precedence independently, so a signal-specific endpoint set in user settings or the shell redirected that signal away from the managed collector. + ## Configuration details ### Common configuration variables +These variables configure exporters, endpoints, and export behavior for all deployments. A signal-specific variable overrides its generic counterpart, except that a generic endpoint or credential variable set in [managed settings](#administrator-configuration) governs all signals' endpoints and can't be overridden from lower-precedence sources. + | Environment Variable | Description | Example Values | | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `CLAUDE_CODE_ENABLE_TELEMETRY` | Enables telemetry collection (required) | `1` | @@ -126,7 +143,7 @@ These variables help control the cardinality of metrics, which affects storage r Distributed tracing exports spans that link each user prompt to the API requests and tool executions it triggers, so you can view a full request as a single trace in your tracing backend. -Tracing is off by default. To enable it, set both `CLAUDE_CODE_ENABLE_TELEMETRY=1` and `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1`, then set `OTEL_TRACES_EXPORTER` to choose where spans are sent. Traces reuse the [common OTLP configuration](#common-configuration-variables) for endpoint, protocol, headers, and [mTLS](#mtls-authentication). +Tracing is off by default. To enable it, set both `CLAUDE_CODE_ENABLE_TELEMETRY=1` and `CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1`, then set `OTEL_TRACES_EXPORTER` to choose where spans are sent. Traces reuse the [common OTLP configuration](#common-configuration-variables) for endpoint, protocol, headers, and [mTLS](#mtls-authentication). A generic endpoint or credential variable set in [managed settings](#managed-endpoints-govern-signal-specific-endpoints) governs the traces endpoint too, so the `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` override in the table below applies only when managed settings don't set one. | Environment Variable | Description | Example Values | | ------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------ | diff --git a/content/en/docs/claude-code/routines.md b/content/en/docs/claude-code/routines.md index f8c612e70..b54df973c 100644 --- a/content/en/docs/claude-code/routines.md +++ b/content/en/docs/claude-code/routines.md @@ -46,7 +46,7 @@ The sections below walk through creating a routine and configuring each of these ## Create a routine -Create a routine from the web at [claude.ai/code/routines](https://claude.ai/code/routines), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app, click **Routines** in the sidebar, then **New routine**, and choose **Remote**; choosing **Local** instead creates a [Desktop scheduled task](/docs/en/desktop-scheduled-tasks), which runs on your machine rather than in the cloud. +Create a routine from the web at [claude.ai/code/routines](https://claude.ai/code/routines), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app, click **Routines** in the sidebar, then **New routine**, and choose **Cloud**; choosing **Local** instead creates a [Desktop scheduled task](/docs/en/desktop-scheduled-tasks), which runs on your machine rather than in the cloud. The creation form sets up the routine's prompt, repositories, environment, connectors, and triggers. diff --git a/content/en/docs/claude-code/sessions.md b/content/en/docs/claude-code/sessions.md index d6ca13551..4ad0bb009 100644 --- a/content/en/docs/claude-code/sessions.md +++ b/content/en/docs/claude-code/sessions.md @@ -123,11 +123,11 @@ The `/branch` confirmation prints two session IDs: the new branch you are now in `/branch` copies the transcript and switches the running Claude Code process to write to it. That distinction determines what the branch inherits: -| State | After `/branch` | -| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | -| Conversation history | Copied into the branch up to the point you ran `/branch` | -| "Allow for this session" permission grants | Not carried over; you re-approve in the branch | -| In-flight [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) and [background Bash commands](/docs/en/interactive-mode#background-bash-commands) | Keep running. Their output appears in the new branch you switched into, not in the original session | +| State | After `/branch` | +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Conversation history | Copied into the branch up to the point you ran `/branch` | +| "Allow for this session" permission grants | Carried over; the branch runs in the same process, so your existing grants still apply. If you fork into a separate process with `--fork-session`, the new process starts without them and you re-approve there | +| In-flight [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) and [background Bash commands](/docs/en/interactive-mode#background-bash-commands) | Keep running. Their output appears in the new branch you switched into, not in the original session | If you resume the same session in two terminals without forking, messages from both interleave into one transcript. For checkpoint-based rewind within a single session, see [Checkpointing](/docs/en/checkpointing). diff --git a/content/en/docs/claude-code/settings.md b/content/en/docs/claude-code/settings.md index 7b170d7c5..b99316fea 100644 --- a/content/en/docs/claude-code/settings.md +++ b/content/en/docs/claude-code/settings.md @@ -266,6 +266,7 @@ This tolerance applies only to managed settings. User, project, and local settin | `disableWorkflows` | **Default**: `false`. Disable [dynamic workflows](/docs/en/workflows#turn-workflows-off) and the bundled workflow commands. Equivalent to setting `CLAUDE_CODE_DISABLE_WORKFLOWS` to `1` | `true` | | `editorMode` | **Default**: `"normal"`. Key binding mode for the input prompt: `"normal"` or `"vim"`. Appears in `/config` as **Editor mode** | `"vim"` | | `effortLevel` | Persist the [effort level](/docs/en/model-config#adjust-effort-level) across sessions. Accepts `"low"`, `"medium"`, `"high"`, or `"xhigh"`. Written automatically when you run `/effort` with one of those values. `--effort` and [`CLAUDE_CODE_EFFORT_LEVEL`](/docs/en/env-vars) override this for one session. See [Adjust effort level](/docs/en/model-config#adjust-effort-level) for supported models | `"xhigh"` | +| `emojiCompletionEnabled` | {/* min-version: 2.1.217 */}**Default**: `true`. Show emoji suggestions when you type `:` plus a shortcode in the prompt input, and replace a completed shortcode such as `:heart:` with its emoji. Set to `false` to disable both. See [Emoji shortcodes](/docs/en/interactive-mode#emoji-shortcodes). Requires Claude Code v2.1.217 or later | `false` | | `enableAllProjectMcpServers` | Automatically approve all MCP servers defined in project `.mcp.json` files. {/* min-version: 2.1.196 */}As of v2.1.196, `claude mcp list` and `claude mcp get` honor this key in an untrusted folder only from [settings files that aren't checked into the repository](/docs/en/mcp#managing-your-servers) | `true` | | `enableArtifact` | {/* min-version: 2.1.196 */}Enable or disable the [Artifact](/docs/en/artifacts) tool for this user. When unset, the default follows the feature's [availability](/docs/en/artifacts#availability) for your account. The **Artifacts** row in `/config` writes this key. A managed `disableArtifact` and your organization's [admin setting](/docs/en/artifacts#manage-artifacts-for-your-organization) take precedence, and the key is ignored in project and local settings (`.claude/settings.json`, `.claude/settings.local.json`), which a repository could otherwise commit. Requires Claude Code v2.1.196 or later | `true` | | `enabledMcpjsonServers` | List of specific MCP servers from `.mcp.json` files to approve. {/* min-version: 2.1.196 */}As of v2.1.196, `claude mcp list` and `claude mcp get` honor this key in an untrusted folder only from [settings files that aren't checked into the repository](/docs/en/mcp#managing-your-servers) | `["memory", "github"]` | @@ -412,6 +413,7 @@ Configure advanced sandboxing behavior. Sandboxing isolates bash commands from y | `filesystem.denyRead` | Paths where sandboxed commands cannot read. Arrays are merged across all settings scopes. Also merged with paths from `Read(...)` deny permission rules. | `["~/.aws/credentials"]` | | `filesystem.allowRead` | Paths to re-allow reading within `denyRead` regions. An `allowRead` path re-opens reading inside a broader `denyRead` region, and an exact path in `denyRead` stays blocked inside a broader `allowRead`; see the [overlap table](/docs/en/sandboxing#configure-sandboxing) for examples. Arrays are merged across all settings scopes. Use this to create workspace-only read access patterns. | `["."]` | | `filesystem.allowManagedReadPathsOnly` | (Managed settings only) Only `filesystem.allowRead` paths from managed settings are respected. `denyRead` still merges from all sources. Default: false | `true` | +| `filesystem.disabled` | {/* min-version: 2.1.216 */}Skip filesystem isolation while keeping network isolation: sandboxed commands get unrestricted read and write access to the host filesystem, and network egress stays confined to `network.allowedDomains`. Only honored from user, managed, or CLI `--settings` settings. Default: false. Requires Claude Code v2.1.216 or later. See [Disable filesystem isolation](/docs/en/sandboxing#disable-filesystem-isolation) for which sources can set it and what changes when isolation is off | `true` | | `credentials.files` | {/* min-version: 2.1.187 */}Credential files or directories that sandboxed commands cannot read. Applies the same read block as `filesystem.denyRead`; the separate key keeps credential paths grouped with `credentials.envVars` and apart from general filesystem rules. Each entry is `{ "path": "...", "mode": "deny" }`, and `deny` is the only supported mode for files. Paths use the same [prefixes](#sandbox-path-prefixes) as `filesystem.*` settings. Arrays are merged across all settings scopes. Requires Claude Code v2.1.187 or later. | `[{ "path": "~/.aws/credentials", "mode": "deny" }]` | | `credentials.envVars` | {/* min-version: 2.1.187 */}Environment variables to [protect from sandboxed commands](/docs/en/sandboxing#protect-credentials). Each entry has a `name` and a `mode`; the name must start with a letter or underscore and contain only letters, digits, and underscores. `deny` removes the variable from the environment of sandboxed commands. Requires Claude Code v2.1.187 or later. {/* min-version: 2.1.199 */}`mask` replaces the variable with a per-session sentinel value inside the sandbox while the sandbox proxy substitutes the real value on outbound requests to that entry's `injectHosts`; it requires `network.tlsTerminate` and Claude Code v2.1.199 or later. `mask` entries are only honored from user, managed, or CLI `--settings` settings, not from `.claude/settings.json` or `.claude/settings.local.json`. Arrays are merged across all settings scopes, and `deny` takes precedence when the same variable appears with both modes. | `[{ "name": "GITHUB_TOKEN", "mode": "deny" }]` | | `credentials.envVars[].injectHosts` | Hosts where the sandbox proxy substitutes the real value of a `mask` entry. Each host must also be covered by `network.allowedDomains`, either exactly or by a wildcard. When unset, the proxy substitutes the value on requests to every host in `network.allowedDomains`. Accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.199 or later. {/* min-version: 2.1.199 */} | `["api.github.com"]` | @@ -472,7 +474,7 @@ This syntax differs from [Read and Edit permission rules](/docs/en/permissions#r **Filesystem and network restrictions** can be configured in two ways that are merged together: -* **`sandbox.filesystem` settings** (shown above): Control paths at the OS-level sandbox boundary. These restrictions apply to all subprocess commands (e.g., `kubectl`, `terraform`, `npm`), not just Claude's file tools. +* **`sandbox.filesystem` settings** (shown above): Control paths at the OS-level sandbox boundary, or set `filesystem.disabled` to `true` to turn that layer off entirely. These restrictions apply to all subprocess commands (e.g., `kubectl`, `terraform`, `npm`), not just Claude's file tools. * **Permission rules**: Use `Edit` allow/deny rules to control Claude's file tool access, `Read` deny rules to block reads (a `Read` deny rule also blocks the Edit tool on the matching paths), and `WebFetch` allow/deny rules to control network domains. Paths from these rules are also merged into the sandbox configuration. ### Attribution settings diff --git a/content/en/docs/claude-code/sub-agents.md b/content/en/docs/claude-code/sub-agents.md index c1dd81802..54c162d7f 100644 --- a/content/en/docs/claude-code/sub-agents.md +++ b/content/en/docs/claude-code/sub-agents.md @@ -63,7 +63,7 @@ Explore and Plan skip your CLAUDE.md files and the parent session's git status t A capable agent for complex, multi-step tasks that require both exploration and action. * **Model**: inherits from the main conversation - * **Tools**: all tools + * **Tools**: every tool [available to subagents](#available-tools) * **Purpose**: complex research, multi-step operations, code modifications Claude delegates to general-purpose when the task requires both exploration and modification, complex reasoning to interpret results, or multiple dependent steps. @@ -266,28 +266,30 @@ A subagent starts in the main conversation's current working directory. Within a {/* min-version: 2.1.210 */}This working-directory check covers the whole repository containing the directory you launched Claude Code from. When your session runs in a linked [worktree](/docs/en/worktrees) of its own, the check also covers the main checkout that worktree is linked from. Before v2.1.210, the check covered only the launch directory itself. A command whose working directory resolved elsewhere in the same repository, such as the repository root when you launched Claude Code from a monorepo subdirectory, ran there instead of failing. +{/* min-version: 2.1.216 */}For Bash commands, Claude Code also checks the command itself: a command that redirects git into the main checkout fails with an error, whether it uses `git -C`, `--git-dir`, a `GIT_DIR` or `GIT_WORK_TREE` variable, or a `cd` into the main checkout first. A command too complex to check also fails, with an error telling Claude to split it into separate plain commands. This check applies to Bash only; PowerShell commands get only the working-directory check. + #### Supported frontmatter fields The following fields can be used in the YAML frontmatter. Only `name` and `description` are required. -| Field | Required | Description | -| :---------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | Yes | Unique identifier using lowercase letters and hyphens. [Hooks](/docs/en/hooks#subagentstart) receive this value as `agent_type`. The filename doesn't have to match | -| `description` | Yes | When Claude should delegate to this subagent | -| `tools` | No | [Tools](#available-tools) the subagent can use. Inherits all tools if omitted. If no entry in the list resolves to a tool, the subagent fails to launch with an error naming the entries. To preload Skills into context, use the `skills` field rather than listing `Skill` here | -| `disallowedTools` | No | Tools to deny, removed from inherited or specified list | -| `model` | No | [Model](#choose-a-model) to use: `sonnet`, `opus`, `haiku`, `fable`, a full model ID (for example, `claude-opus-4-8`), or `inherit`. Defaults to `inherit` | -| `permissionMode` | No | [Permission mode](#permission-modes): `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, `plan`, or {/* min-version: 2.1.200 */}`manual` as an alias for `default`. The `manual` alias requires Claude Code v2.1.200 or later. Ignored for [plugin subagents](#choose-the-subagent-scope) | -| `maxTurns` | No | Maximum number of agentic turns before the subagent stops | -| `skills` | No | [Skills](/docs/en/skills) to preload into the subagent's context at startup. The full skill content is injected, not only the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool | -| `mcpServers` | No | [MCP servers](/docs/en/mcp) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](/docs/en/mcp#installing-mcp-servers) as value. Ignored for [plugin subagents](#choose-the-subagent-scope) | -| `hooks` | No | [Lifecycle hooks](#define-hooks-for-subagents) scoped to this subagent. Ignored for [plugin subagents](#choose-the-subagent-scope) | -| `memory` | No | [Persistent memory scope](#enable-persistent-memory): `user`, `project`, or `local`. Enables cross-session learning | -| `background` | No | Set to `true` to always run this subagent as a [background task](#run-subagents-in-foreground-or-background), even when Claude needs its result right away. When unset, Claude chooses, and {/* min-version: 2.1.198 */}as of v2.1.198 it runs subagents in the background by default | -| `effort` | No | Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model | -| `isolation` | No | Set to `worktree` to run the subagent in a temporary [git worktree](/docs/en/worktrees), giving it an isolated copy of the repository branched by default from your [default branch](/docs/en/worktrees#choose-the-base-branch) rather than the parent session's `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes | -| `color` | No | Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` | -| `initialPrompt` | No | Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](/docs/en/commands) and [skills](/docs/en/skills) are processed. Prepended to any user-provided prompt | +| Field | Required | Description | +| :---------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | Yes | Unique identifier using lowercase letters and hyphens. [Hooks](/docs/en/hooks#subagentstart) receive this value as `agent_type`. The filename doesn't have to match | +| `description` | Yes | When Claude should delegate to this subagent | +| `tools` | No | [Tools](#available-tools) the subagent can use. Inherits every tool available to subagents if omitted. If no entry in the list resolves to a tool, the subagent usually [fails to launch](/docs/en/errors#agent-would-be-spawned-with-zero-tools) with an error naming the entries. To preload Skills into context, use the `skills` field rather than listing `Skill` here | +| `disallowedTools` | No | Tools to deny, removed from inherited or specified list | +| `model` | No | [Model](#choose-a-model) to use: `sonnet`, `opus`, `haiku`, `fable`, a full model ID (for example, `claude-opus-4-8`), or `inherit`. Defaults to `inherit` | +| `permissionMode` | No | [Permission mode](#permission-modes): `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, `plan`, or {/* min-version: 2.1.200 */}`manual` as an alias for `default`. The `manual` alias requires Claude Code v2.1.200 or later. Ignored for [plugin subagents](#choose-the-subagent-scope) | +| `maxTurns` | No | Maximum number of agentic turns before the subagent stops | +| `skills` | No | [Skills](/docs/en/skills) to preload into the subagent's context at startup. The full skill content is injected, not only the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool | +| `mcpServers` | No | [MCP servers](/docs/en/mcp) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](/docs/en/mcp#installing-mcp-servers) as value. Ignored for [plugin subagents](#choose-the-subagent-scope) | +| `hooks` | No | [Lifecycle hooks](#define-hooks-for-subagents) scoped to this subagent. Ignored for [plugin subagents](#choose-the-subagent-scope) | +| `memory` | No | [Persistent memory scope](#enable-persistent-memory): `user`, `project`, or `local`. Enables cross-session learning | +| `background` | No | Set to `true` to always run this subagent as a [background task](#run-subagents-in-foreground-or-background), even when Claude needs its result right away. When unset, Claude chooses, and {/* min-version: 2.1.198 */}as of v2.1.198 it runs subagents in the background by default | +| `effort` | No | Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model | +| `isolation` | No | Set to `worktree` to run the subagent in a temporary [git worktree](/docs/en/worktrees), giving it an isolated copy of the repository branched by default from your [default branch](/docs/en/worktrees#choose-the-base-branch) rather than the parent session's `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes | +| `color` | No | Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` | +| `initialPrompt` | No | Auto-submitted as the first user turn when this agent runs as the main session agent (via `--agent` or the `agent` setting). [Commands](/docs/en/commands) and [skills](/docs/en/skills) are processed. Prepended to any user-provided prompt | ### Choose a model @@ -319,16 +321,21 @@ You can control what subagents can do through tool access, permission modes, and #### Available tools -Subagents inherit the [internal tools](/docs/en/tools-reference) and MCP tools available in the main conversation by default. The following tools depend on the main conversation's UI or session state and aren't available to subagents, even when listed in the `tools` field: +Subagents inherit the [built-in tools](/docs/en/tools-reference) and MCP tools available in the main conversation, narrowed by two filters: the first removes a short list of tools from every subagent, and the second reduces the built-in tool set for subagents that run in the [background](#run-subagents-in-foreground-or-background), which is the default. [Forks](#fork-the-current-conversation) skip both filters and receive the main conversation's exact tool pool. The first filter removes these tools, even when listed in the `tools` field: +* `Agent`, until you turn on [nested spawning](#let-subagents-spawn-their-own-subagents); in a [fork](#fork-the-current-conversation) the tool stays listed but returns an error instead of spawning * `AskUserQuestion` * `EndConversation`, which can end only the main conversation; see [EndConversation tool behavior](/docs/en/tools-reference#endconversation-tool-behavior) * `EnterPlanMode` * `ExitPlanMode`, unless the subagent's [`permissionMode`](#permission-modes) is `plan` * `ScheduleWakeup` +* `TaskOutput` * `WaitForMcpServers` +* `Workflow` + +The second filter applies to subagents running in the background. Apart from `Agent` and `ExitPlanMode`, which follow the first filter's conditions wherever the subagent runs, a background subagent keeps every MCP tool but only these built-in tools: `Read`, `Grep`, `Glob`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, and `Artifact`. Claude Code removes every other built-in tool from a background subagent, whether inherited or listed in the `tools` field, so the same definition can resolve to different tools in the foreground and the background. The removal reports no error unless it leaves the `tools` list [resolving to nothing](/docs/en/errors#agent-would-be-spawned-with-zero-tools). -The `Agent` tool itself is inherited, so a subagent can [spawn nested subagents](#spawn-nested-subagents). +Teammates in [agent teams](/docs/en/agent-teams) additionally keep the task tools and cron tools: `TaskCreate`, `TaskGet`, `TaskList`, `TaskUpdate`, `CronCreate`, `CronDelete`, and `CronList`. To restrict tools, use the `tools` field as an allowlist or the `disallowedTools` field as a denylist. This example uses `tools` to allow only Read, Grep, Glob, and Bash. The subagent can't edit files, write files, or use any MCP tools: @@ -340,21 +347,21 @@ tools: Read, Grep, Glob, Bash --- ``` -This example uses `disallowedTools` to inherit every tool from the main conversation except Write and Edit. The subagent keeps Bash, MCP tools, and everything else: +This example uses `disallowedTools` to inherit the subagent's tool pool except Write and Edit. The subagent keeps Bash, MCP tools, and the rest of its pool: ```yaml theme={null} --- name: no-writes -description: Inherits every tool except file writes +description: Inherits the available tools except file writes disallowedTools: Write, Edit --- ``` If both are set, `disallowedTools` is applied first, then `tools` is resolved against the remaining pool. A tool listed in both is removed. -When nothing in the `tools` list resolves to a tool, for example because every entry is misspelled or names a tool that isn't available to subagents, Claude Code refuses to launch the subagent and the Agent tool returns an error naming the unresolved entries. {/* min-version: 2.1.208 */}Before v2.1.208, that subagent launched with no tools and could return an empty or confusing result. +When nothing in the `tools` list resolves to a tool, for example because every entry is misspelled or names a tool that isn't available to subagents, Claude Code usually refuses to launch the subagent and the Agent tool returns an error naming the unresolved entries; see [Agent would be spawned with zero tools](/docs/en/errors#agent-would-be-spawned-with-zero-tools) for the message and how to fix each entry. {/* min-version: 2.1.208 */}Before v2.1.208, that subagent launched with no tools and could return an empty or confusing result. -Both fields accept MCP server-level patterns in addition to exact tool names: `mcp__` or `mcp____*` grants or removes every tool from the named server. In `disallowedTools`, `mcp__*` also removes every MCP tool from any server. This example removes every tool from the `github` MCP server while keeping tools from other servers and every built-in tool: +Both fields accept MCP server-level patterns in addition to exact tool names: `mcp__` or `mcp____*` grants or removes every tool from the named server. In `disallowedTools`, `mcp__*` also removes every MCP tool from any server. This example removes every tool from the `github` MCP server while keeping tools from other servers and the built-in tools in its pool: ```yaml theme={null} --- @@ -386,9 +393,9 @@ To allow spawning any subagent without restrictions, use `Agent` without parenth tools: Agent, Read, Bash ``` -If `Agent` is omitted from the `tools` list entirely, the agent can't spawn any subagents. +If you omit `Agent` from the `tools` list entirely, the agent can't spawn any subagents with the Agent tool. -The `Agent(agent_type)` allowlist syntax applies only to an agent running as the main thread with `claude --agent`. In a subagent definition, listing `Agent` in `tools` lets that subagent [spawn nested subagents](#spawn-nested-subagents), but any type list inside the parentheses is ignored. +The `Agent(agent_type)` allowlist syntax applies only to an agent running as the main thread with `claude --agent`. In a subagent definition, listing `Agent` in `tools` lets that subagent spawn subagents of its own once you allow [nested spawning](#let-subagents-spawn-their-own-subagents), but any type list inside the parentheses is ignored. #### Scope MCP servers to a subagent @@ -475,7 +482,9 @@ Implement API endpoints. Follow the conventions and patterns from the preloaded The full content of each listed skill is injected into the subagent's context at startup. This field controls which skills are preloaded, not which skills the subagent can access: without it, the subagent can still discover and invoke project, user, and plugin skills through the Skill tool during execution. To prevent a subagent from invoking skills entirely, omit `Skill` from the [`tools`](#available-tools) list or add it to `disallowedTools`. -You can't preload skills that set [`disable-model-invocation: true`](/docs/en/skills#control-who-invokes-a-skill), since preloading draws from the same set of skills Claude can invoke. If a listed skill is missing or disabled, Claude Code skips it and logs a warning to the debug log. +You can't preload skills that set [`disable-model-invocation: true`](/docs/en/skills#control-who-invokes-a-skill), since preloading draws from the same set of skills Claude can invoke. {/* min-version: 2.1.215 */}This includes the bundled `/verify` and `/code-review` skills: only you can run them, so they can't be preloaded either. + +If a listed skill is missing or disabled, Claude Code skips it and logs a warning to the debug log. This is the inverse of [running a skill in a subagent](/docs/en/skills#run-skills-in-a-subagent). With `skills` in a subagent, the subagent controls the system prompt and loads skill content. With `context: fork` in a skill, the skill content is injected into the agent you specify. Both use the same underlying system. @@ -504,6 +513,8 @@ Choose a scope based on how broadly the memory should apply: | `project` | `.claude/agent-memory//` | the subagent's knowledge is project-specific and shareable via version control | | `local` | `.claude/agent-memory-local//` | the subagent's knowledge is project-specific but shouldn't be checked into version control | +Subagent memory is part of [auto memory](/docs/en/memory#auto-memory): if you turn auto memory off, with the `autoMemoryEnabled` setting or `CLAUDE_CODE_DISABLE_AUTO_MEMORY`, the `memory` field has no effect and the subagent launches without the memory instructions or the memory tool access described below. + When memory is enabled: * The subagent's system prompt includes instructions for reading and writing to the memory directory. @@ -709,7 +720,7 @@ claude --agent code-reviewer The subagent's system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](/docs/en/cli-reference) does. `CLAUDE.md` files and project memory still load through the normal message flow. The agent name appears as `@` in the startup header so you can confirm it's active. -This works with built-in and custom subagents, and the choice persists when you resume the session. +This works with built-in and custom subagents, and the choice persists when you resume the session: Claude Code restores the agent's system prompt, tool restrictions, and model along with the conversation. {/* min-version: 2.1.216 */}If the agent no longer exists when you resume, the session continues with the default tools and system prompt and shows a [warning naming the agent](/docs/en/errors#session-agent-no-longer-available). For a plugin-provided subagent, you can pass only the agent name and Claude Code finds it: @@ -742,7 +753,7 @@ Subagents can run in the foreground or the background: * **Foreground subagents** block the main conversation until complete. Permission prompts are passed through to you as they come up. * **Background subagents** run concurrently while you continue working. {/* min-version: 2.1.186 */}As of v2.1.186, when a background subagent reaches a tool call that needs permission, the prompt surfaces in your main session and names the subagent that is asking. Approve to let the subagent continue, or press Esc to deny that one tool call without stopping the subagent. Before v2.1.186, background subagents auto-denied any tool call that would have prompted. -{/* min-version: 2.1.198 */}As of v2.1.198, subagents run in the background by default. Claude runs a subagent in the foreground when it needs the result before continuing. The default changes where a subagent runs, not what it's allowed to do: background subagents still surface every permission prompt in your main session. Before v2.1.198, Claude chose between foreground and background based on the task. +{/* min-version: 2.1.198 */}As of v2.1.198, subagents run in the background by default. Claude runs a subagent in the foreground when it needs the result before continuing. Background subagents run with a [smaller built-in tool set](#available-tools) than foreground subagents, and they surface every permission prompt in your main session. {/* min-version: 2.1.211 */}A background subagent's results reach Claude as a completion notification in a later turn. Claude waits for that notification before reporting the subagent's results, and if you ask about progress first, it reports that the subagent is still running. Before v2.1.211, Claude sometimes reported results for a background subagent that hadn't finished. @@ -832,24 +843,36 @@ Consider [Skills](/docs/en/skills) instead when you want reusable prompts or wor For a quick question about something already in your conversation, use [`/btw`](/docs/en/interactive-mode#side-questions-with-%2Fbtw) instead of a subagent. It sees your full context but has no tool access, and the answer is discarded rather than added to history. -### Spawn nested subagents +### Let subagents spawn their own subagents -{/* min-version: 2.1.172 */}As of Claude Code v2.1.172, a subagent can spawn its own subagents. Use this when a delegated task itself splits into parallel subtasks, such as a reviewer subagent that dispatches a verifier per finding, so the intermediate output never reaches your main conversation. Only the top-level subagent's summary returns to you. +By default, a subagent can't spawn subagents of its own, so a subagent you ask to delegate does the work itself and returns one summary. While nesting is off, Claude Code withholds the `Agent` tool from every subagent except a [fork](#fork-the-current-conversation), which inherits the parent's full tool list. `Agent` stays in that list, but returns an error instead of spawning. -A nested subagent is configured the same way as a top-level one and resolves from the same [scopes](#choose-the-subagent-scope). +Nested subagents suit a delegated task that itself splits into parallel subtasks, such as a reviewer subagent that dispatches a verifier per finding, so the intermediate output never reaches your main conversation. Only the top-level subagent's summary returns to you. -The subagent panel below the prompt input shows the full tree: each row displays a `(+N)` count of descendants, and {/* min-version: 2.1.193 */}as of v2.1.193, opening a row shows that subagent's siblings and direct children with a path back to `main`. +To allow nesting, set [`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`](/docs/en/env-vars) to the number of subagent layers you want below your main conversation. For example, this entry in [`settings.json`](/docs/en/settings) allows two layers: -Depth is counted as the number of subagent levels below the main conversation, regardless of whether each level runs in the [foreground or background](#run-subagents-in-foreground-or-background). A subagent at depth five doesn't receive the Agent tool and can't spawn further. The limit is fixed and not configurable. +```json theme={null} +{ + "env": { + "CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH": "2" + } +} +``` -As of Claude Code v2.1.187, a background subagent's depth is fixed when it is first spawned, and [resuming](#resume-subagents) it later doesn't change that depth. For example, if your main conversation spawns subagent A, and A spawns a background subagent B at depth two, B is still at depth two when you resume it directly from the main conversation. Resuming a subagent from a shallower context doesn't let it spawn additional levels that the depth limit already prevented. +With this value, your subagents can delegate to a second layer of their own, and that second layer can't delegate further. -To prevent a specific subagent from spawning others, omit `Agent` from its [`tools`](#available-tools) list or add it to `disallowedTools`. +A nested subagent is configured the same way as a top-level one and resolves from the same [scopes](#choose-the-subagent-scope). To keep one subagent from spawning while nesting is on, such as a reviewer that should stay read-only, omit `Agent` from its [`tools`](#available-tools) list or add it to `disallowedTools`. -A [fork](#fork-the-current-conversation) still can't spawn another fork. It can spawn other subagent types, and those count toward the depth limit. +The subagent panel below the prompt input shows the full tree: each row displays a `(+N)` count of descendants, and {/* min-version: 2.1.193 */}as of v2.1.193, opening a row shows that subagent's siblings and direct children with a path back to `main`. + + + From Claude Code v2.1.172 through v2.1.216, subagents could nest by default, up to five layers deep, and the limit couldn't be changed. + ### Session subagent limit +Three separate limits control subagent use, each with its own variable: this one caps the total spawned over a session, the [concurrent subagent limit](#concurrent-subagent-limit) stops Claude from spawning more while too many are running, and the [depth limit](#let-subagents-spawn-their-own-subagents) caps how deeply subagents nest. + By default, Claude can spawn at most 200 subagents per session. To raise the limit, set [`CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`](/docs/en/env-vars) to any positive whole number; there is no upper bound, but the limit can't be turned off. Requires Claude Code v2.1.212 or later. Every subagent Claude spawns with the Agent tool counts toward the limit: nested subagents, [forks](#fork-the-current-conversation), and background subagents, including subagents that a [workflow](/docs/en/workflows)'s agents spawn with the Agent tool. An in-session fork you start yourself with `/subtask` counts too: it spends the same budget, though the limit blocks only subagents Claude spawns with the Agent tool, so your own `/subtask` still starts after Claude reaches the limit. A session you create with `/fork` doesn't count; it runs as a separate background session with its own budget. Before v2.1.212, the in-session fork was named `/fork`. Agents a workflow script spawns with `agent()` don't count; workflows have their own per-run limit. A finished subagent still counts. @@ -858,7 +881,16 @@ When Claude reaches the limit, the Agent tool fails with `Subagent spawn limit r Run [`/clear`](/docs/en/commands#all-commands) to reset the count and start a new conversation with the full budget. If work that can still spawn subagents survives the clear, such as a running workflow, the count carries over instead. -This limit is separate from the [depth limit](#spawn-nested-subagents), which caps how deeply subagents nest. +### Concurrent subagent limit + +By default, when 20 subagents are running in a session, spawning another with the Agent tool fails with `Concurrent subagent limit reached`, and the error tells Claude not to retry. Spawning succeeds again when the running count drops below the limit. To change the limit, set [`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`](/docs/en/env-vars) to any positive whole number. Sessions with [ultracode](/docs/en/model-config#adjust-effort-level) active are exempt: the limit isn't enforced there. Requires Claude Code v2.1.217 or later. + +The limit blocks only subagents Claude spawns with the Agent tool, but other runs occupy the same slots: + +* An in-session fork you start with [`/subtask`](#fork-the-current-conversation) takes a slot while it runs and is never blocked by the limit. +* [Resuming a subagent](#resume-subagents) that already finished takes a fresh slot without checking the limit, so resumes can push the running count past it. + +Agents that other features run, such as [workflow](/docs/en/workflows) agents and [agent team](/docs/en/agent-teams) teammates, follow their own limits instead. The [session subagent limit](#session-subagent-limit) separately caps the total Claude spawns over the whole session. ### Manage subagent context @@ -989,7 +1021,7 @@ A fork inherits everything the main session has at the moment it spawns. A named | | Fork | Named subagent | | :---------------------- | :------------------------------- | :---------------------------------------------------------------------------------------------------------------- | | Context | Full conversation history | Fresh context with the prompt you pass | -| System prompt and tools | Same as main session | From the subagent's [definition file](#write-subagent-files) | +| System prompt and tools | Same as main session | From the subagent's [definition file](#write-subagent-files), [filtered for background runs](#available-tools) | | Model | Same as main session | From the subagent's `model` field | | Permissions | Prompts surface in your terminal | [Prompts surface in your main session](#run-subagents-in-foreground-or-background) when running in the background | | Prompt cache | Shared with main session | Separate cache | diff --git a/content/en/docs/claude-code/tools-reference.md b/content/en/docs/claude-code/tools-reference.md index 978e86c30..216d29e77 100644 --- a/content/en/docs/claude-code/tools-reference.md +++ b/content/en/docs/claude-code/tools-reference.md @@ -16,51 +16,51 @@ To add custom tools, connect an [MCP server](/docs/en/mcp). To extend Claude wit The `Permission required` column shows whether the tool prompts in the default permission mode for paths inside the working directory. File-access tools marked No, including `Read`, `Grep`, and `Glob`, still prompt for paths outside the [working directory and additional directories](/docs/en/permissions#working-directories). `Bash` is marked Yes but runs a built-in set of [read-only commands](/docs/en/permissions#read-only-commands) without prompting. -| Tool | Description | Permission required | -| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ | -| `Agent` | Spawns a [subagent](/docs/en/sub-agents) with its own context window to handle a task. See [Agent tool behavior](#agent-tool-behavior) | No | -| `Artifact` | Publishes an HTML or Markdown file as an [artifact](/docs/en/artifacts): a private, interactive page on claude.ai. You can share it with a public link, or inside your organization on Team and Enterprise plans, where public sharing requires an Owner to [enable it](/docs/en/artifacts#control-public-sharing). {/* plan-availability: feature=artifacts plans=pro,max,team,enterprise providers=anthropic */}Requires a Pro, Max, Team, or Enterprise plan and `/login` authentication; see [Availability](/docs/en/artifacts#availability) | Yes | -| `AskUserQuestion` | Asks multiple-choice questions to gather requirements or clarify ambiguity. {/* min-version: 2.1.200 */}Questions stay open until you answer them: there's no idle timeout by default. To have an idle dialog auto-continue instead, set the [`askUserQuestionTimeout`](/docs/en/settings#available-settings) setting to `60s`, `5m`, or `10m`, either in your user `settings.json` or from the **Question auto-continue timeout** row in `/config`. Once the chosen idle time passes with no input, the dialog closes on its own: it submits any options you'd already selected and tells Claude you may be away from your keyboard, so Claude proceeds on its own judgment and can re-ask later. A countdown appears for the last 20 seconds. Any keypress restarts the timer, and so does a focused window on terminals that report focus. The timeout applies only to `AskUserQuestion`'s multiple-choice questions; permission prompts, including plan approval, never auto-resolve on idle. In v2.1.198 and v2.1.199, the dialog auto-continued after 60 seconds of idle by default, and [`CLAUDE_AFK_TIMEOUT_MS`](/docs/en/env-vars#variables) was the only way to change that | No | -| `Bash` | Executes shell commands in your environment. See [Bash tool behavior](#bash-tool-behavior) | Yes | -| `CronCreate` | Schedules a recurring or one-shot prompt within the current session. Tasks are session-scoped and restored on `--resume` or `--continue` if unexpired. See [scheduled tasks](/docs/en/scheduled-tasks) | No | -| `CronDelete` | Cancels a scheduled task by ID | No | -| `CronList` | Lists all scheduled tasks in the session | No | -| `Edit` | Makes targeted edits to specific files. See [Edit tool behavior](#edit-tool-behavior) | Yes | -| `EndConversation` | Ends the session, in rare cases of sustained abusive input or when you ask Claude to demonstrate the tool. {/* min-version: 2.1.213 */}Requires Claude Code v2.1.213 or later. See [EndConversation tool behavior](#endconversation-tool-behavior) | No | -| `EnterPlanMode` | Switches to plan mode to design an approach before coding | No | -| `EnterWorktree` | Creates an isolated [git worktree](/docs/en/worktrees) and switches into it. Pass a `path` to switch into an existing worktree instead of creating a new one. {/* min-version: 2.1.203 */}On first entry the target may be a worktree of the current repository or, in a multi-repo workspace, of a repository nested inside it. Before v2.1.203, a nested repository's worktree was rejected. {/* min-version: 2.1.206 */}A `path` outside `.claude/worktrees/` prompts for your approval before entering, since it moves the session's working directory and write access to that location. New-worktree creation and paths under `.claude/worktrees/` don't prompt. Before v2.1.206, Claude entered paths outside `.claude/worktrees/` without a prompt. From within a worktree session, or from a subagent with a pinned working directory such as [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields), only the `path` form is available and the target must be under `.claude/worktrees/` of the session's repository | Yes | -| `ExitPlanMode` | Presents a plan for approval and exits plan mode | Yes | -| `ExitWorktree` | Exits a worktree session and returns to the original directory. Not available to subagents that already run in their own working directory, such as with [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields) | No | -| `Glob` | Finds files based on pattern matching. See [Glob tool behavior](#glob-tool-behavior) | No | -| `Grep` | Searches for patterns in file contents. See [Grep tool behavior](#grep-tool-behavior) | No | -| `ListMcpResourcesTool` | Lists resources exposed by connected [MCP servers](/docs/en/mcp) | No | -| `LSP` | Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See [LSP tool behavior](#lsp-tool-behavior) | No | -| `Monitor` | Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. Can also open a WebSocket and treat each incoming message as an event. See [Monitor tool](#monitor-tool) | Yes | -| `NotebookEdit` | Modifies Jupyter notebook cells. See [NotebookEdit tool behavior](#notebookedit-tool-behavior) | Yes | -| `PowerShell` | Executes PowerShell commands natively. See [PowerShell tool](#powershell-tool) for availability | Yes | -| `PushNotification` | Sends a desktop notification, and a phone push when [Remote Control](/docs/en/remote-control) is connected, so a long-running task or [scheduled task](/docs/en/scheduled-tasks) can reach you when you step away. {/* plan-availability: feature=push-notifications providers=anthropic */}Push delivery runs through Anthropic-hosted infrastructure, which is not accessible from Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | -| `Read` | Reads the contents of files. See [Read tool behavior](#read-tool-behavior) | No | -| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No | -| `RemoteTrigger` | Creates, updates, runs, and lists [Routines](/docs/en/routines) on claude.ai. Backs the `/schedule` command. {/* plan-availability: feature=routines plans=pro,max,team,enterprise providers=anthropic */}Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | -| `ReportFindings` | Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. {/* min-version: 2.1.196 */}Requires Claude Code v2.1.196 or later. {/* min-version: 2.1.199 */}As of v2.1.199, a finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list | No | -| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](/docs/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. {/* min-version: 2.1.202 */}The `stop` field requires Claude Code v2.1.202 or later. The pending wakeup appears in `session_crons` in [Stop hook input](/docs/en/hooks#stop-input). {/* plan-availability: feature=loop-dynamic providers=anthropic */}Not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, where a `/loop` prompt with no interval runs on a fixed schedule instead | No | -| `SendMessage` | Sends a message to an [agent team](/docs/en/agent-teams) teammate, or [resumes a subagent](/docs/en/sub-agents#resume-subagents) by its agent ID or name. A completed subagent auto-resumes in the background; a subagent you stopped from `/tasks` doesn't and the call returns a refusal. Structured team-protocol messages require agent teams. A receiver never treats a message from another agent as your consent or approval. {/* min-version: 2.1.198 */}As of v2.1.198, a subagent treats a message from the agent that launched it as normal task direction rather than as a peer request. {/* min-version: 2.1.199 */}As of v2.1.199, a send to a name that now resolves to a different agent than it did earlier in the conversation is refused instead of delivered; see [Resume subagents](/docs/en/sub-agents#resume-subagents) | No | -| `SendUserFile` | Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. {/* min-version: 2.1.196 */}As of v2.1.196, the optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](/docs/en/remote-control) client is connected or the session runs in a managed cloud environment such as [Claude Code on the web](/docs/en/claude-code-on-the-web). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | -| `ShareOnboardingGuide` | {/* plan-availability: feature=onboarding-guide-share plans=pro,max,team,enterprise providers=anthropic */}Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans | Yes | -| `Skill` | Executes a [skill](/docs/en/skills#control-who-invokes-a-skill) within the main conversation | Yes | -| `TaskCreate` | Creates a new task in the task list | No | -| `TaskGet` | Retrieves full details for a specific task | No | -| `TaskList` | Lists all tasks with their current status | No | -| `TaskOutput` | Retrieves output from a background task. Deprecated in favor of `Read` on the task's output file path. {/* min-version: 2.1.203 */}When no task matches the ID, the error lists the running background agents by ID and description. Before v2.1.203, the error named only the missing ID | No | -| `TaskStop` | Stops a running background task by ID. {/* min-version: 2.1.198 */}It also accepts an [agent-team teammate](/docs/en/agent-teams) or a named background agent by agent ID or name. Before v2.1.198, it accepted only a background task ID. {/* min-version: 2.1.203 */}When no task matches the ID, the error lists the running background agents by ID and description, including agents that another agent spawned. Before v2.1.203, the error listed running teammates and named agents but not background agents another agent spawned, so those couldn't be identified or stopped from the main conversation | No | -| `TaskUpdate` | Updates task status, dependencies, details, or deletes tasks | No | -| `TodoWrite` | {/* min-version: 2.1.142 */}Manages the session task checklist. Disabled by default as of v2.1.142 in favor of `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`. Set `CLAUDE_CODE_ENABLE_TASKS=0` to re-enable | No | -| `ToolSearch` | Searches for and loads deferred tools when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is enabled | No | -| `WaitForMcpServers` | Waits for one or more [MCP servers](/docs/en/mcp) that are still connecting in the background, so a request can use their tools without restarting the session. Claude calls it when a needed server isn't connected yet. Only appears when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled, since `ToolSearch` handles the wait when it's enabled | No | -| `WebFetch` | Fetches content from a specified URL. See [WebFetch tool behavior](#webfetch-tool-behavior) | Yes | -| `WebSearch` | Performs web searches. See [WebSearch tool behavior](#websearch-tool-behavior) | Yes | -| `Workflow` | Runs a [dynamic workflow](/docs/en/workflows): a script that orchestrates many subagents in the background and returns one consolidated result | Yes | -| `Write` | Creates or overwrites files. See [Write tool behavior](#write-tool-behavior) | Yes | +| Tool | Description | Permission required | +| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ | +| `Agent` | Spawns a [subagent](/docs/en/sub-agents) with its own context window to handle a task. See [Agent tool behavior](#agent-tool-behavior) | No | +| `Artifact` | Publishes an HTML or Markdown file as an [artifact](/docs/en/artifacts): a private, interactive page on claude.ai. You can share it with a public link, or inside your organization on Team and Enterprise plans, where public sharing requires an Owner to [enable it](/docs/en/artifacts#control-public-sharing). {/* plan-availability: feature=artifacts plans=pro,max,team,enterprise providers=anthropic */}Requires a Pro, Max, Team, or Enterprise plan and `/login` authentication; see [Availability](/docs/en/artifacts#availability) | Yes | +| `AskUserQuestion` | Asks multiple-choice questions to gather requirements or clarify ambiguity. Questions stay open until you answer them by default. See [AskUserQuestion tool behavior](#askuserquestion-tool-behavior) | No | +| `Bash` | Executes shell commands in your environment. See [Bash tool behavior](#bash-tool-behavior) | Yes | +| `CronCreate` | Schedules a recurring or one-shot prompt within the current session. Tasks are session-scoped and restored on `--resume` or `--continue` if unexpired. See [scheduled tasks](/docs/en/scheduled-tasks) | No | +| `CronDelete` | Cancels a scheduled task by ID | No | +| `CronList` | Lists all scheduled tasks in the session | No | +| `Edit` | Makes targeted edits to specific files. See [Edit tool behavior](#edit-tool-behavior) | Yes | +| `EndConversation` | Ends the session, in rare cases of sustained abusive input or when you ask Claude to demonstrate the tool. {/* min-version: 2.1.213 */}Requires Claude Code v2.1.213 or later. See [EndConversation tool behavior](#endconversation-tool-behavior) | No | +| `EnterPlanMode` | Switches to plan mode to design an approach before coding | No | +| `EnterWorktree` | Creates an isolated [git worktree](/docs/en/worktrees) and switches into it. Pass a `path` to switch into an existing worktree instead of creating a new one. {/* min-version: 2.1.203 */}On first entry the target may be a worktree of the current repository or, in a multi-repo workspace, of a repository nested inside it. Before v2.1.203, a nested repository's worktree was rejected. {/* min-version: 2.1.206 */}A `path` outside `.claude/worktrees/` prompts for your approval before entering, since it moves the session's working directory and write access to that location. New-worktree creation and paths under `.claude/worktrees/` don't prompt. Before v2.1.206, Claude entered paths outside `.claude/worktrees/` without a prompt. From within a worktree session, or from a subagent with a pinned working directory such as [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields), only the `path` form is available and the target must be under `.claude/worktrees/` of the session's repository | Yes | +| `ExitPlanMode` | Presents a plan for approval and exits plan mode | Yes | +| `ExitWorktree` | Exits a worktree session and returns to the original directory. Not available to subagents that already run in their own working directory, such as with [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields) | No | +| `Glob` | Finds files based on pattern matching. See [Glob tool behavior](#glob-tool-behavior) | No | +| `Grep` | Searches for patterns in file contents. See [Grep tool behavior](#grep-tool-behavior) | No | +| `ListMcpResourcesTool` | Lists resources exposed by connected [MCP servers](/docs/en/mcp) | No | +| `LSP` | Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See [LSP tool behavior](#lsp-tool-behavior) | No | +| `Monitor` | Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. Can also open a WebSocket and treat each incoming message as an event. See [Monitor tool](#monitor-tool) | Yes | +| `NotebookEdit` | Modifies Jupyter notebook cells. See [NotebookEdit tool behavior](#notebookedit-tool-behavior) | Yes | +| `PowerShell` | Executes PowerShell commands natively. See [PowerShell tool](#powershell-tool) for availability | Yes | +| `PushNotification` | Sends a desktop notification, and a phone push when [Remote Control](/docs/en/remote-control) is connected, so a long-running task or [scheduled task](/docs/en/scheduled-tasks) can reach you when you step away. {/* plan-availability: feature=push-notifications providers=anthropic */}Push delivery runs through Anthropic-hosted infrastructure, which is not accessible from Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | +| `Read` | Reads the contents of files. See [Read tool behavior](#read-tool-behavior) | No | +| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No | +| `RemoteTrigger` | Creates, updates, runs, and lists [Routines](/docs/en/routines) on claude.ai. Backs the `/schedule` command. {/* plan-availability: feature=routines plans=pro,max,team,enterprise providers=anthropic */}Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | +| `ReportFindings` | Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. {/* min-version: 2.1.196 */}Requires Claude Code v2.1.196 or later. {/* min-version: 2.1.199 */}As of v2.1.199, a finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list | No | +| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](/docs/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. {/* min-version: 2.1.202 */}The `stop` field requires Claude Code v2.1.202 or later. The pending wakeup appears in `session_crons` in [Stop hook input](/docs/en/hooks#stop-input). {/* plan-availability: feature=loop-dynamic providers=anthropic */}Not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, where a `/loop` prompt with no interval runs on a fixed schedule instead | No | +| `SendMessage` | Sends a message to an [agent team](/docs/en/agent-teams) teammate, or [resumes a subagent](/docs/en/sub-agents#resume-subagents) by its agent ID or name. A completed subagent auto-resumes in the background; a subagent you stopped from `/tasks` doesn't and the call returns a refusal. Structured team-protocol messages require agent teams. A receiver never treats a message from another agent as your consent or approval. {/* min-version: 2.1.198 */}As of v2.1.198, a subagent treats a message from the agent that launched it as normal task direction rather than as a peer request. {/* min-version: 2.1.199 */}As of v2.1.199, a send to a name that now resolves to a different agent than it did earlier in the conversation is refused instead of delivered; see [Resume subagents](/docs/en/sub-agents#resume-subagents) | No | +| `SendUserFile` | Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. {/* min-version: 2.1.196 */}As of v2.1.196, the optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](/docs/en/remote-control) client is connected or the session runs in a managed cloud environment such as [Claude Code on the web](/docs/en/claude-code-on-the-web). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | +| `ShareOnboardingGuide` | {/* plan-availability: feature=onboarding-guide-share plans=pro,max,team,enterprise providers=anthropic */}Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans | Yes | +| `Skill` | Executes a [skill](/docs/en/skills#control-who-invokes-a-skill) within the main conversation | Yes | +| `TaskCreate` | Creates a new task in the task list | No | +| `TaskGet` | Retrieves full details for a specific task | No | +| `TaskList` | Lists all tasks with their current status | No | +| `TaskOutput` | Retrieves output from a background task. Deprecated in favor of `Read` on the task's output file path. {/* min-version: 2.1.203 */}When no task matches the ID, the error lists the running background agents by ID and description. Before v2.1.203, the error named only the missing ID | No | +| `TaskStop` | Stops a running background task by ID. {/* min-version: 2.1.198 */}It also accepts an [agent-team teammate](/docs/en/agent-teams) or a named background agent by agent ID or name. Before v2.1.198, it accepted only a background task ID. {/* min-version: 2.1.203 */}When no task matches the ID, the error lists the running background agents by ID and description, including agents that another agent spawned. Before v2.1.203, the error listed running teammates and named agents but not background agents another agent spawned, so those couldn't be identified or stopped from the main conversation | No | +| `TaskUpdate` | Updates task status, dependencies, details, or deletes tasks | No | +| `TodoWrite` | {/* min-version: 2.1.142 */}Manages the session task checklist. Disabled by default as of v2.1.142 in favor of `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`. Set `CLAUDE_CODE_ENABLE_TASKS=0` to re-enable | No | +| `ToolSearch` | Searches for and loads deferred tools when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is enabled | No | +| `WaitForMcpServers` | Waits for one or more [MCP servers](/docs/en/mcp) that are still connecting in the background, so a request can use their tools without restarting the session. Claude calls it when a needed server isn't connected yet. Only appears when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled, since `ToolSearch` handles the wait when it's enabled | No | +| `WebFetch` | Fetches content from a specified URL. See [WebFetch tool behavior](#webfetch-tool-behavior) | Yes | +| `WebSearch` | Performs web searches. See [WebSearch tool behavior](#websearch-tool-behavior) | Yes | +| `Workflow` | Runs a [dynamic workflow](/docs/en/workflows): a script that orchestrates many subagents in the background and returns one consolidated result | Yes | +| `Write` | Creates or overwrites files. See [Write tool behavior](#write-tool-behavior) | Yes | ## Configure tools with permission rules and hooks @@ -102,12 +102,14 @@ The same Agent tool also launches [forked subagents](/docs/en/sub-agents#fork-th Which tools a named subagent can use depends on the `tools` and `disallowedTools` fields in the [subagent definition](/docs/en/sub-agents): -* **Neither field set**: the subagent inherits every tool available to the parent. +* **Neither field set**: the subagent inherits every [tool available to subagents](/docs/en/sub-agents#available-tools). * **`tools` only**: the subagent gets only the listed tools. * **`disallowedTools` only**: the subagent gets every parent tool except the listed ones. * **Both set**: `disallowedTools` takes precedence. A tool listed in both is removed. -When a subagent's `tools` list resolves to no tools at all, for example because every entry is misspelled or names a tool that isn't available to subagents, the Agent tool returns an error listing those entries instead of launching the subagent. {/* min-version: 2.1.208 */}Before v2.1.208, the subagent launched with no tools and could return an empty or confusing result. +In every case, the resolved set is limited to the [tools available to subagents](/docs/en/sub-agents#available-tools): a tool that isn't available to subagents is never granted, even when listed in `tools`. + +If every entry in a subagent's `tools` list fails to match a usable tool, the Agent tool usually returns an error naming the entries instead of launching the subagent; see [Agent would be spawned with zero tools](/docs/en/errors#agent-would-be-spawned-with-zero-tools) for the message and how to fix each entry. Launching the subagent doesn't itself prompt for permission. Claude Code checks the subagent's own tool calls against your permission rules as it runs. @@ -118,6 +120,20 @@ Launching the subagent doesn't itself prompt for permission. Claude Code checks To limit what a subagent can reach in the first place, narrow its `tools` field, leave Bash off the list, or set deny rules in your settings, as described in [Control subagent capabilities](/docs/en/sub-agents#control-subagent-capabilities). For more on choosing between foreground and background, see [Run subagents in foreground or background](/docs/en/sub-agents#run-subagents-in-foreground-or-background). +## AskUserQuestion tool behavior + +Claude uses `AskUserQuestion` to ask you multiple-choice questions when it needs a decision or a clarification. Answer by picking an option, or type your own text through the `Other` row or the notes field. + +When you answer by typing your own text, Claude Code relays the answer with neutral wording so Claude follows what you wrote, including a request to wait or explain first. + +### Question auto-continue timeout + +Questions stay open until you answer them. If you want a question you leave unanswered to eventually close and let Claude continue without you, set the [`askUserQuestionTimeout`](/docs/en/settings#available-settings) setting to `60s`, `5m`, or `10m`, either in your user `settings.json` or from the **Question auto-continue timeout** row in `/config`. + +After a question sits that long with no input, the dialog closes on its own: it submits any options you'd already selected and tells Claude you may be away from your keyboard, so Claude proceeds on its own judgment and can re-ask later. You see a countdown for the last 20 seconds. Press any key to restart the timer; on terminals that report focus, switching to the window restarts it too. + +The timeout applies only to `AskUserQuestion`'s multiple-choice questions; permission prompts, including plan approval, never auto-resolve on idle. + ## Bash tool behavior The Bash tool runs each command in a separate process. @@ -336,6 +352,18 @@ The same main-session working-directory reset behavior described under the Bash {/* min-version: 2.1.196 */}As of v2.1.196, the PowerShell tool matches the Bash tool's handling of search and diff exit codes. Exit code 1 from `grep`, `egrep`, `fgrep`, and `git grep` means no matches, and exit code 1 from `git diff` means differences exist, so these results aren't reported to Claude as command failures. +### Windows encoding and exit codes + +On Windows, the following PowerShell encoding and exit-code behaviors require Claude Code v2.1.214 or later: + +* Redirection with `>` and `>>` writes UTF-8 files on PowerShell 5.1 +* Claude Code encodes text piped to a native command's standard input as UTF-8 +* Claude Code captures error output without ANSI escape sequences +* A command whose child process waits on standard input receives end-of-file instead of hanging +* Exit code 1 from `where.exe` means no match, and from `fc.exe` and `diff.exe` it means the files differ, so when the command produces output, Claude Code treats that exit code as a valid negative answer rather than a command error. Claude Code still reports a silenced form, such as `where.exe /Q` or a redirect to `$null`, as a failure on exit code 1 + +Before v2.1.214, `>` on PowerShell 5.1 wrote UTF-16LE files, non-ASCII piped input arrived as `?`, and Python scripts could crash with a `UnicodeEncodeError` when printing non-ASCII characters. + ### Preview limitations The PowerShell tool has the following known limitations during the preview: @@ -349,7 +377,7 @@ The Read tool takes a file path and returns the contents with line numbers. Clau By default, Read returns the file from the start. When a whole-file read exceeds the token limit, Read returns the first page with a `PARTIAL view` notice that tells Claude how much of the file it received and how to read more with `offset` and `limit`. A read that passes an explicit `offset` or `limit` and still exceeds the token limit returns an error. -A read with an explicit `limit` stops as soon as the selected lines exceed what the token limit could ever fit and returns an error without loading the rest of the range. The error tells Claude to use a smaller `limit`, or to search for specific content with [Grep](#grep-tool-behavior) instead when a single line is that large. {/* min-version: 2.1.208 */}Before v2.1.208, Claude Code loaded the whole range into memory before rejecting it, so a file with an extremely long single line could exhaust memory. +A read with an explicit `limit` stops as soon as the selected lines exceed what the token limit could ever fit and returns an error without loading the rest of the range. The error tells Claude to use a smaller `limit`, or to search for specific content with [Grep](#grep-tool-behavior) instead when a single line is that large. {/* min-version: 2.1.208 */}Before v2.1.208, Claude Code loaded the whole range into memory before rejecting it, so reading a file with an extremely long single line could run it out of memory. Reading an empty file returns a notice that the file exists but its contents are empty, and an `offset` past the last line returns a notice giving the file's line count. {/* min-version: 2.1.208 */}Before v2.1.208, reading an empty file returned the past-the-end notice instead. diff --git a/content/en/docs/claude-code/vs-code.md b/content/en/docs/claude-code/vs-code.md index 72a4515f3..a07ca3086 100644 --- a/content/en/docs/claude-code/vs-code.md +++ b/content/en/docs/claude-code/vs-code.md @@ -132,8 +132,8 @@ If you use [Claude Code on the web](/docs/en/claude-code-on-the-web), you can re Click the **Session history** button at the top of the Claude Code panel. - - The dialog shows two tabs: Local and Remote. Click **Remote** to see sessions from claude.ai. + + The dialog shows two tabs: Local and Web. Click **Web** to see sessions from claude.ai. @@ -142,7 +142,7 @@ If you use [Claude Code on the web](/docs/en/claude-code-on-the-web), you can re - Only web sessions started with a GitHub repository appear in the Remote tab. Resuming loads the conversation history locally; changes are not synced back to claude.ai. + Only web sessions started with a GitHub repository appear in the Web tab. Resuming loads the conversation history locally; changes are not synced back to claude.ai. ### Check account and usage diff --git a/content/en/docs/claude-code/whats-new/2026-w24.md b/content/en/docs/claude-code/whats-new/2026-w24.md index e0f666bd2..9d674e681 100644 --- a/content/en/docs/claude-code/whats-new/2026-w24.md +++ b/content/en/docs/claude-code/whats-new/2026-w24.md @@ -42,7 +42,7 @@ > /agents ``` - Spawn nested subagents + Spawn nested subagents
diff --git a/content/en/get-started.md b/content/en/get-started.md index 80eaaef01..08a395ea6 100644 --- a/content/en/get-started.md +++ b/content/en/get-started.md @@ -6,7 +6,7 @@ Make your first API call to Claude and build a simple web search assistant. ## Prerequisites -* An Anthropic [Console account](/) +* A [Claude Console account](https://platform.claude.com) * An [API key](/settings/keys) ## Call the API @@ -436,7 +436,7 @@ Make your first API call to Claude and build a simple web search assistant. } dependencies { - implementation("com.anthropic:anthropic-java:2.48.0") + implementation("com.anthropic:anthropic-java:2.50.0") } application { @@ -462,7 +462,7 @@ Make your first API call to Claude and build a simple web search assistant. com.anthropic anthropic-java - 2.48.0 + 2.50.0 diff --git a/content/en/intro.md b/content/en/intro.md index 0feaa69ff..4fbd12804 100644 --- a/content/en/intro.md +++ b/content/en/intro.md @@ -68,7 +68,7 @@ Anthropic provides developer tools to help you build and scale applications with - Prototype and test prompts in your browser with the Workbench and prompt generator. + Prototype and test prompts in your browser with the Workbench. diff --git a/content/en/manage-claude/api-and-data-retention.md b/content/en/manage-claude/api-and-data-retention.md index 5456f0f18..971d27f9b 100644 --- a/content/en/manage-claude/api-and-data-retention.md +++ b/content/en/manage-claude/api-and-data-retention.md @@ -168,7 +168,7 @@ Each eligibility column uses three values: | Feature | Endpoint | ZDR eligible | HIPAA eligible | Details | | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [1M token context window](/docs/en/build-with-claude/context-windows) | `/v1/messages` | Yes | Yes | | -| [Adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) | `/v1/messages` | Yes | Yes | | +| [Adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) | `/v1/messages` | Yes | Yes | | | [Advisor tool](/docs/en/agents-and-tools/tool-use/advisor-tool) | `/v1/messages` (with `advisor` tool) | Yes | No | Advisor model output is returned in the API response; nothing is stored server-side after the response. | | [Agent skills](/docs/en/agents-and-tools/agent-skills/overview) | `/v1/messages` (with `skills`) / `/v1/skills` | No | No | Skill data retained per standard policy. See [Agent skills](/docs/en/agents-and-tools/agent-skills/overview#data-retention). | | [Bash tool](/docs/en/agents-and-tools/tool-use/bash-tool) | `/v1/messages` (with `bash` tool) | Yes | Yes | Client-side tool executed in your environment. | @@ -182,7 +182,6 @@ Each eligibility column uses three values: | [Context management (compaction)](/docs/en/build-with-claude/compaction) | `/v1/messages` (with `context_management`) | Yes | No | Server-side compaction results are returned and round-tripped statelessly through the API response. | | [Data residency](/docs/en/manage-claude/data-residency) | `/v1/messages` (with `inference_geo`) | Yes | Yes | | | [Effort](/docs/en/build-with-claude/effort) | `/v1/messages` (with `effort`) | Yes | Yes | | -| [Extended thinking](/docs/en/build-with-claude/extended-thinking) | `/v1/messages` (with `thinking`) | Yes | Yes | | | [Fast mode](/docs/en/build-with-claude/fast-mode) | `/v1/messages` (with `speed: "fast"`) | Yes | Yes | Same Messages API endpoint with faster inference. ZDR applies regardless of speed setting. | | [Files API](/docs/en/build-with-claude/files) | `/v1/files` | No | No | Files retained until explicitly deleted. See [Files API](/docs/en/build-with-claude/files#data-retention). | | [Fine-grained tool streaming](/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming) | `/v1/messages` | Yes | Yes | | @@ -197,6 +196,7 @@ Each eligibility column uses three values: | [Search results](/docs/en/build-with-claude/search-results) | `/v1/messages` (with `search_results` source) | Yes | Yes | | | [Structured outputs](/docs/en/build-with-claude/structured-outputs) | `/v1/messages` | Yes (qualified) | Yes | Your prompts and Claude's outputs are not stored. Only the JSON schema is cached, for up to 24 hours since last use. This also covers [strict tool use](/docs/en/agents-and-tools/tool-use/strict-tool-use) (`strict: true` on tools), which uses the same grammar pipeline. PHI must not be included in JSON schema definitions; see [PHI handling guidelines](#phi-handling-guidelines). See [Structured outputs](/docs/en/build-with-claude/structured-outputs#data-retention). | | [Text editor tool](/docs/en/agents-and-tools/tool-use/text-editor-tool) | `/v1/messages` (with `text_editor` tool) | Yes | Yes | Client-side tool executed in your environment. | +| [Thinking](/docs/en/build-with-claude/thinking) | `/v1/messages` (with `thinking`) | Yes | Yes | | | [Token counting](/docs/en/build-with-claude/token-counting) | `/v1/messages/count_tokens` | Yes | Yes | Count tokens before sending requests. | | [Tool search](/docs/en/agents-and-tools/tool-use/tool-search-tool) | `/v1/messages` (with `tool_search` tool) | Yes | No | Server-side tool executed by Anthropic; the tool definitions in the request are searched in memory per call and nothing is stored after the response. | | [Web fetch](/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `/v1/messages` (with `web_fetch` tool) | Yes | No | Fetched web content returned in the API response. [Dynamic filtering](/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. Website publishers may retain request data (such as fetched URLs and request metadata) according to their own policies. | diff --git a/content/en/manage-claude/cmek.md b/content/en/manage-claude/cmek.md index 260988df8..7e024c662 100644 --- a/content/en/manage-claude/cmek.md +++ b/content/en/manage-claude/cmek.md @@ -12,12 +12,14 @@ A customer-managed encryption key (CMEK) lets you provision an encryption key in The use of CMEK is optional. Eligible organizations can **opt in** to use customer-managed encryption keys instead of the default encryption that Anthropic provides. To activate CMEK, contact your Anthropic account team. - + + **Enabling CMEK is permanent and can cause irreversible data loss** + Enabling CMEK is permanent. Anthropic keeps no copy of your key, so misconfiguration or key loss can permanently destroy your CMEK-protected data. If you are uncertain about any step, contact your Anthropic representative before applying changes. * **Permanent data loss:** If your encryption key is deleted, scheduled for deletion, or has its key material destroyed, Anthropic cannot recover your data. * **Identifier verification is mandatory:** Granting key access to an incorrect or spoofed principal can expose your data to an unauthorized party. Always verify the Anthropic identifier against the published production identities in each configuration guide. Never trust an identifier provided over email, chat, or any onboarding channel. - + ## How it works diff --git a/content/en/manage-claude/compliance-activity-feed.md b/content/en/manage-claude/compliance-activity-feed.md index 50f8e017a..759e32ac8 100644 --- a/content/en/manage-claude/compliance-activity-feed.md +++ b/content/en/manage-claude/compliance-activity-feed.md @@ -16,13 +16,11 @@ Retrieve, filter, and paginate your organization's Compliance API Activity Feed. The Activity Feed records every authentication, chat, file, project, administrative, and platform action that occurs in your organization, in reverse chronological order. Activities are queryable within 1 minute of occurring and are retained for 6 years. - - ```bash cURL - curl --fail-with-body -sS \ - "https://api.anthropic.com/v1/compliance/activities?limit=1" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +```bash cURL +curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/compliance/activities?limit=1" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { @@ -56,16 +54,14 @@ Filter by organization, actor, activity type, or a `created_at` time window usin Repeatable parameters use array-bracket query syntax: pass `activity_types[]=...`, `actor_ids[]=...`, or `organization_ids[]=...` once for each value. - - ```bash cURL - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/activities" \ - --data-urlencode "activity_types[]=claude_file_uploaded" \ - --data-urlencode "activity_types[]=claude_chat_created" \ - --data-urlencode "created_at.gte=2026-04-01T00:00:00Z" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +```bash cURL +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/activities" \ + --data-urlencode "activity_types[]=claude_file_uploaded" \ + --data-urlencode "activity_types[]=claude_chat_created" \ + --data-urlencode "created_at.gte=2026-04-01T00:00:00Z" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` The Activity Feed produces hundreds of distinct activity types. See [Query compliance activities](/docs/en/api/compliance/activities/list) in the API reference for the full list of values that `activity_types[]` accepts. @@ -97,21 +93,19 @@ The cursor parameter sets the page direction; the endpoint's sort order sets the **Cursors are safe to reuse on retry.** A cursor or page token from a successfully returned page remains valid; a request that fails (5xx, timeout, network error) does not advance your position. Retry the same request with the same cursor. Only move to the next cursor after you have stored the page it points past. - - ```bash cURL - # Fetch the first page (newest activities first) and capture its trailing cursor. - last_id=$(curl --fail-with-body -sS \ - "https://api.anthropic.com/v1/compliance/activities?limit=2" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" | jq -er '.last_id') - - # Pass the cursor back unchanged to fetch the next (older) page. - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/activities" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - --data-urlencode "limit=2" \ - --data-urlencode "after_id=${last_id}" - ``` - +```bash cURL +# Fetch the first page (newest activities first) and capture its trailing cursor. +last_id=$(curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/compliance/activities?limit=2" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" | jq -er '.last_id') + +# Pass the cursor back unchanged to fetch the next (older) page. +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/activities" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + --data-urlencode "limit=2" \ + --data-urlencode "after_id=${last_id}" +``` A production **backfill** loop pages through older activities by driving iteration off `has_more` and `last_id`: @@ -149,14 +143,14 @@ Every entry in `data` is an Activity with this top-level shape: The `actor` field is a discriminated union. The `type` discriminator tells you which other fields are present: -| `actor.type` | When it appears | Key fields | -| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| `user_actor` | A signed-in claude.ai or Claude Console user took the action. | `email_address`, `user_id`, `ip_address`, `user_agent` | -| `api_actor` | A request called the Claude API or the Compliance API with a customer-issued API key. Compliance API calls produce this actor type for both Compliance Access Keys and Admin API keys. | `api_key_id`, `ip_address`, `user_agent` | -| `admin_api_key_actor` | An organization admin used an Admin API key to manage users, invites, workspaces, or API keys. | `admin_api_key_id` | -| `unauthenticated_user_actor` | An action occurred before sign-in completed, for example `sso_login_initiated`. | `unauthenticated_email_address`, `ip_address`, `user_agent` | -| `anthropic_actor` | Anthropic acted on the organization, for example through internal tooling. | `email_address` (always `null`; present for shape consistency with `user_actor`, since Anthropic operators are not represented by individual email) | -| `scim_directory_sync_actor` | An identity provider (such as Okta, Microsoft Entra ID, or JumpCloud) pushed a change through SCIM directory sync. | `workos_event_id`, `directory_id`, `idp_connection_type` (nullable; for example `OktaSCIMV2`, `AzureSCIMV2`) | +| `actor.type` | When it appears | Key fields | +| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `user_actor` | A signed-in claude.ai or Claude Console user took the action. | `email_address`, `user_id`, `ip_address`, `user_agent` | +| `api_actor` | A request called the Claude API or the Compliance API with a customer-issued API key. Compliance API calls produce this actor type for both Compliance Access Keys and Admin API keys. | `api_key_id`, `ip_address`, `user_agent` | +| `admin_api_key_actor` | An organization admin used an Admin API key to manage users, invites, workspaces, or API keys. | `admin_api_key_id` | +| `unauthenticated_user_actor` | An action occurred before sign-in completed, for example `sso_login_initiated`. | `unauthenticated_email_address`, `ip_address`, `user_agent` | +| `anthropic_actor` | Anthropic acted on the organization, for example through internal tooling. | `email_address` (always `null`; present for shape consistency with `user_actor`, because Anthropic operators are not represented by individual email) | +| `scim_directory_sync_actor` | An identity provider (such as Okta, Microsoft Entra ID, or JumpCloud) pushed a change through SCIM directory sync. | `workos_event_id`, `directory_id`, `idp_connection_type` (nullable; for example `OktaSCIMV2`, `AzureSCIMV2`) | **Build forward-compatible handlers.** Pass through unrecognized `type` and `actor.type` values, and ignore fields your handler does not expect, so your integration keeps working when new activity types ship. diff --git a/content/en/manage-claude/compliance-api.md b/content/en/manage-claude/compliance-api.md index 4844cb41c..75ec93277 100644 --- a/content/en/manage-claude/compliance-api.md +++ b/content/en/manage-claude/compliance-api.md @@ -12,13 +12,11 @@ The Compliance API gives Claude Enterprise customers programmatic access to thei The following call returns the most recent activity event in your organization. Any key with the `read:compliance_activities` scope can make it. To create a key and grant it that scope, see [Set up the Compliance API](/docs/en/manage-claude/compliance-api-access). - - ```bash cURL - curl --fail-with-body -sS \ - "https://api.anthropic.com/v1/compliance/activities?limit=1" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +```bash cURL +curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/compliance/activities?limit=1" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` A successful response returns a JSON object containing `data` (an array of `Activity` records), `has_more`, `first_id`, and `last_id`: diff --git a/content/en/manage-claude/compliance-content-data.md b/content/en/manage-claude/compliance-content-data.md index 9160ab807..f4a1d2e4d 100644 --- a/content/en/manage-claude/compliance-content-data.md +++ b/content/en/manage-claude/compliance-content-data.md @@ -26,16 +26,14 @@ Use [List chats](/docs/en/api/compliance/apps/chats/list) to page through chat m The chat list endpoint defaults to organization-wide scope: leave off `user_ids[]` to include every chat under your parent organization. Add `order_by=updated_at` to sort by last update time. This combination is the recommended way to export chats and keep an export current, because one paginated loop picks up both new and modified chats for every user without enumerating users first. The following request lists chats updated since a given date. - - ```bash cURL - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/apps/chats" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - --data-urlencode "order_by=updated_at" \ - --data-urlencode "updated_at.gte=2025-06-01T00:00:00Z" \ - --data-urlencode "limit=100" - ``` - +```bash cURL +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/apps/chats" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + --data-urlencode "order_by=updated_at" \ + --data-urlencode "updated_at.gte=2025-06-01T00:00:00Z" \ + --data-urlencode "limit=100" +``` ```json Response { @@ -70,28 +68,24 @@ A few constraints apply to these organization-wide queries. Cursors are opaque a To scope the list to specific users instead (for example, a legal hold on named custodians), pass 1–10 `user_ids[]` values. Obtain the IDs from [List organization users](/docs/en/manage-claude/compliance-org-data#list-organization-users). User-filtered queries always sort by `created_at` (passing `order_by=updated_at` returns a 400 error) and support both `after_id` and `before_id`. Filtering by `project_ids[]` is only available in this user-filtered form. - - ```bash cURL - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/apps/chats" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - --data-urlencode "user_ids[]=user_01XyDMpzjS89pFZXqSFUBDr6" \ - --data-urlencode "created_at.gte=2025-06-01T00:00:00Z" \ - --data-urlencode "limit=100" - ``` - +```bash cURL +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/apps/chats" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + --data-urlencode "user_ids[]=user_01XyDMpzjS89pFZXqSFUBDr6" \ + --data-urlencode "created_at.gte=2025-06-01T00:00:00Z" \ + --data-urlencode "limit=100" +``` The list response carries chat metadata only. To pull the actual chat content, attached files, and inline artifacts (structured documents Claude generates inside a chat), follow up with the messages endpoint for each chat ID: - - ```bash cURL - chat_id="claude_chat_01H5CWunD7RpVJ5bHa8RCkja" +```bash cURL +chat_id="claude_chat_01H5CWunD7RpVJ5bHa8RCkja" - curl --fail-with-body -sS \ - "https://api.anthropic.com/v1/compliance/apps/chats/$chat_id/messages" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/compliance/apps/chats/$chat_id/messages" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` The messages endpoint returns the chat's metadata plus a `chat_messages` array sorted by `created_at`. When `limit` is omitted, the full message set is returned in one response; pass `limit`, `after_id`, or `before_id` to page through very long chats. The endpoint also accepts `created_at.*` and `updated_at.*` range bounds (`gt`, `gte`, `lt`, `lte`) and an `order` parameter (`asc` or `desc`). See [Get chat messages](/docs/en/api/compliance/apps/chats/messages/list) for the full parameter list. For user messages, `created_at` is when the message was sent; for assistant messages, it is when Claude finished generating the message. Each message carries its text content and, when present, any uploaded files (typically on user messages), any tool-generated files, and any artifacts the assistant produced or updated (typically on assistant messages): @@ -188,15 +182,13 @@ The file content endpoint streams the original upload as a chunked binary respon * `Content-MD5` carries the file's MD5 digest, base64-encoded as specified in RFC 1864. * `Transfer-Encoding: chunked` is always set. - - ```bash cURL - file_id="claude_file_01UaT9wBcDfGhJkLmNpQrSv7" +```bash cURL +file_id="claude_file_01UaT9wBcDfGhJkLmNpQrSv7" - curl --fail-with-body -sS -OJ \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - "https://api.anthropic.com/v1/compliance/apps/chats/files/$file_id/content" - ``` - +curl --fail-with-body -sS -OJ \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + "https://api.anthropic.com/v1/compliance/apps/chats/files/$file_id/content" +``` The `-OJ` flags tell curl to save the response under the file name from `Content-Disposition`, which is the original file name the user uploaded. @@ -221,15 +213,13 @@ Entries with `type` of `project_file` are binary uploads (PDFs, images, spreadsh A consumer that walks the attachment list must branch on `type` and call the matching content endpoint for each entry. The following request lists one page of attachments; paginate by passing `next_page` back as the `page` parameter until `has_more` is `false`. - - ```bash cURL - project_id="claude_proj_01KGp4eZNug9ri4kE35RSppq" +```bash cURL +project_id="claude_proj_01KGp4eZNug9ri4kE35RSppq" - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/apps/projects/$project_id/attachments" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/apps/projects/$project_id/attachments" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { @@ -271,21 +261,19 @@ All four endpoints require the `delete:compliance_user_data` scope, which is gra The following request deletes one chat. The same pattern applies to the other delete endpoints; only the URL changes. - - ```bash cURL - # WARNING: This operation PERMANENTLY deletes the chat, all of its messages, - # and any attached files. Deletion is immediate and cannot be undone. It - # requires the `delete:compliance_user_data` scope, which is granted separately - # from `read:compliance_user_data` when the Compliance Access Key is created. - # Ensure you have explicit authorization before running this. - - chat_id="claude_chat_01H5CWunD7RpVJ5bHa8RCkja" - - curl --fail-with-body -sS -X DELETE \ - "https://api.anthropic.com/v1/compliance/apps/chats/$chat_id" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +```bash cURL +# WARNING: This operation PERMANENTLY deletes the chat, all of its messages, +# and any attached files. Deletion is immediate and cannot be undone. It +# requires the `delete:compliance_user_data` scope, which is granted separately +# from `read:compliance_user_data` when the Compliance Access Key is created. +# Ensure you have explicit authorization before running this. + +chat_id="claude_chat_01H5CWunD7RpVJ5bHa8RCkja" + +curl --fail-with-body -sS -X DELETE \ + "https://api.anthropic.com/v1/compliance/apps/chats/$chat_id" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { diff --git a/content/en/manage-claude/compliance-errors.md b/content/en/manage-claude/compliance-errors.md index 6574950bc..70ec82a24 100644 --- a/content/en/manage-claude/compliance-errors.md +++ b/content/en/manage-claude/compliance-errors.md @@ -10,7 +10,7 @@ Every Compliance API error message with cause and fix, organized by HTTP status This page lists the response messages each documented Compliance API endpoint returns, the cause, and the fix. -The Compliance API returns errors in an error format consistent with the rest of the [Anthropic error format](/docs/en/api/errors): a non-2xx status code, a `request-id` response header, and a JSON body with an `error` object containing `type` and `message`. Include the `request-id` header value when you escalate to support. +The Compliance API returns errors in the standard [Anthropic error format](/docs/en/api/errors): a non-2xx status code, a `request-id` response header, and a JSON body with an `error` object containing `type` and `message`. Include the `request-id` header value when you escalate to support. ```json { diff --git a/content/en/manage-claude/compliance-integration-patterns.md b/content/en/manage-claude/compliance-integration-patterns.md index 8b381cf6d..c7d27b0bf 100644 --- a/content/en/manage-claude/compliance-integration-patterns.md +++ b/content/en/manage-claude/compliance-integration-patterns.md @@ -36,16 +36,14 @@ Both patterns share these constraints: Set `created_at.lt` at least 1 minute in the past so that every activity in the window is already queryable. Use `created_at.gte` for the lower bound and `created_at.lt` for the upper bound so that consecutive windows tile without gaps or overlap; reuse the previous window's `lt` value as the next window's `gte`. - - ```bash cURL - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/activities" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - --data-urlencode "created_at.gte=2026-04-20T07:00:00Z" \ - --data-urlencode "created_at.lt=2026-04-20T08:00:00Z" \ - --data-urlencode "limit=5000" - ``` - +```bash cURL +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/activities" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + --data-urlencode "created_at.gte=2026-04-20T07:00:00Z" \ + --data-urlencode "created_at.lt=2026-04-20T08:00:00Z" \ + --data-urlencode "limit=5000" +``` When the response has `has_more: true`, the window contains more than one page of activities. Either page within the window by passing the response's `last_id` as `after_id` on the next request (stopping when `has_more` is `false`), or choose a smaller time window. See [Paginate results](/docs/en/manage-claude/compliance-activity-feed#paginate-results) for the full contract. @@ -57,17 +55,15 @@ Even with clean tiling, an activity that indexes after its window has closed nev ### Cursor-driven incremental reads - - ```bash cURL - first_id="activity_01XyDMpzjS89pFZXqSFUBDr6" # first_id from a previous response - - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/activities" \ - --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - --data-urlencode "limit=5000" \ - --data-urlencode "before_id=$first_id" - ``` - +```bash cURL +first_id="activity_01XyDMpzjS89pFZXqSFUBDr6" # first_id from a previous response + +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/activities" \ + --header "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + --data-urlencode "limit=5000" \ + --data-urlencode "before_id=$first_id" +``` Page through until `has_more` is `false`, then persist `first_id` from the final response and pass it unchanged as `before_id` on the next run to retrieve activities newer than the saved cursor. To walk in the opposite direction for a backfill, persist `last_id` and pass it as `after_id` instead. For the full cursor-vs-page-token reference and retry semantics, see [Paginate results](/docs/en/manage-claude/compliance-activity-feed#paginate-results). diff --git a/content/en/manage-claude/compliance-org-data.md b/content/en/manage-claude/compliance-org-data.md index 0f20e8c2e..59d2bfd08 100644 --- a/content/en/manage-claude/compliance-org-data.md +++ b/content/en/manage-claude/compliance-org-data.md @@ -22,13 +22,11 @@ The [List organizations](/docs/en/api/compliance/organizations/list) endpoint re The following call lists every organization under your parent. The response is a `data` array of organization records sorted by `created_at` ascending, plus `has_more` and `next_page` for pagination. When `has_more` is `true`, pass the returned `next_page` token back unchanged as the `page` query parameter on your next request. See [List organizations](/docs/en/api/compliance/organizations/list) in the API reference for the `limit` and `page` parameter defaults and ranges. - - ```bash cURL - curl --fail-with-body -sS \ - "https://api.anthropic.com/v1/compliance/organizations" \ - -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +```bash cURL +curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/compliance/organizations" \ + -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { @@ -73,16 +71,14 @@ See [List organization users](/docs/en/api/compliance/organizations/users/list) Results are sorted by organization join date ascending. Unlike the Activity Feed's `before_id`/`after_id` cursors (see [Paginate results](/docs/en/manage-claude/compliance-activity-feed#paginate-results)), the directory endpoints paginate with a `next_page` token: when `has_more` is `true`, pass `next_page` back unchanged as the `page` query parameter on the next request. - - ```bash cURL - org_uuid="91012d09-e48b-438e-a489-1bebfd8fa6f9" +```bash cURL +org_uuid="91012d09-e48b-438e-a489-1bebfd8fa6f9" - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/organizations/$org_uuid/users" \ - -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ - --data-urlencode "limit=500" - ``` - +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/organizations/$org_uuid/users" \ + -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" \ + --data-urlencode "limit=500" +``` ```json Response { @@ -110,15 +106,13 @@ The [List Compliance Roles](/docs/en/api/compliance/organizations/roles/list) en Both role endpoints require `read:compliance_org_data`. The list endpoint accepts the same `limit` and `page` parameters as the [organization users endpoint](#list-organization-users). - - ```bash cURL - org_uuid="91012d09-e48b-438e-a489-1bebfd8fa6f9" +```bash cURL +org_uuid="91012d09-e48b-438e-a489-1bebfd8fa6f9" - curl --fail-with-body -sS \ - "https://api.anthropic.com/v1/compliance/organizations/${org_uuid}/roles" \ - -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/compliance/organizations/${org_uuid}/roles" \ + -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { @@ -148,13 +142,11 @@ See the [List Compliance Groups](/docs/en/api/compliance/groups/list) response s List groups, then for each group list its members: - - ```bash cURL - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/groups" \ - -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +```bash cURL +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/groups" \ + -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { @@ -176,15 +168,13 @@ List groups, then for each group list its members: For each group ID, list its members: - - ```bash cURL - group_id="rbac_group_01P9qRsTuVwXyZa2BcDeFgHjK" +```bash cURL +group_id="rbac_group_01P9qRsTuVwXyZa2BcDeFgHjK" - curl --fail-with-body -sS -G \ - "https://api.anthropic.com/v1/compliance/groups/$group_id/members" \ - -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" - ``` - +curl --fail-with-body -sS -G \ + "https://api.anthropic.com/v1/compliance/groups/$group_id/members" \ + -H "x-api-key: $ANTHROPIC_COMPLIANCE_ACCESS_KEY" +``` ```json Response { diff --git a/content/en/managed-agents/agent-setup.md b/content/en/managed-agents/agent-setup.md index 82360131c..d7228d5be 100644 --- a/content/en/managed-agents/agent-setup.md +++ b/content/en/managed-agents/agent-setup.md @@ -14,19 +14,19 @@ Create the agent once as a reusable resource and reference it by ID each time yo ## Agent configuration fields -| Field | Description | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | Required. A human-readable name for the agent. | -| `model` | Required. The Claude [model](/docs/en/about-claude/models/overview) that powers the agent. Accepts a model ID string or an object, for example `{"id": "claude-opus-4-8"}`. All Claude 4.5-family and later models are supported. | -| `system` | A [system prompt](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role) that defines the agent's behavior and persona. The system prompt is distinct from [user messages](/docs/en/managed-agents/reference#event-types), which should describe the work to be done. | -| `tools` | The tools available to the agent. Combines [pre-built agent tools](/docs/en/managed-agents/tools), [MCP tools](/docs/en/managed-agents/mcp-connector), and [custom tools](/docs/en/managed-agents/tools#custom-tools). | -| `mcp_servers` | [MCP servers](/docs/en/managed-agents/mcp-connector) that provide standardized third-party capabilities. | -| `skills` | [Skills](/docs/en/managed-agents/skills) that supply domain-specific context with progressive disclosure. | -| `multiagent` | A coordinator declaration listing the agents this agent can delegate to. See [Multiagent orchestration](/docs/en/managed-agents/multiagent-orchestration). | -| `description` | A description of what the agent does. | -| `metadata` | Arbitrary key-value pairs for your own tracking. | - -You can also override `model`, `system`, `tools`, `mcp_servers`, and `skills` for a single session without changing the agent. See [Override agent configuration for a session](/docs/en/managed-agents/sessions#override-agent-configuration-for-a-session). +| Field | Description | +| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | Required. A human-readable name for the agent. | +| `model` | Required. The Claude [model](/docs/en/about-claude/models/overview) that powers the agent. Accepts a model ID string or an object, for example `{"id": "claude-opus-4-8"}`. All Claude 4.5-family and later models are supported. The object form also accepts a `speed` and an `effort` level; see the tips under [Create an agent](#create-an-agent) and [Effort levels](/docs/en/build-with-claude/effort#effort-levels). | +| `system` | A [system prompt](/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role) that defines the agent's behavior and persona. The system prompt is distinct from [user messages](/docs/en/managed-agents/reference#event-types), which should describe the work to be done. | +| `tools` | The tools available to the agent. Combines [pre-built agent tools](/docs/en/managed-agents/tools), [MCP tools](/docs/en/managed-agents/mcp-connector), and [custom tools](/docs/en/managed-agents/tools#custom-tools). | +| `mcp_servers` | [MCP servers](/docs/en/managed-agents/mcp-connector) that provide standardized third-party capabilities. | +| `skills` | [Skills](/docs/en/managed-agents/skills) that supply domain-specific context with progressive disclosure. | +| `multiagent` | A coordinator declaration listing the agents this agent can delegate to. See [Multiagent orchestration](/docs/en/managed-agents/multiagent-orchestration). | +| `description` | A description of what the agent does. | +| `metadata` | Arbitrary key-value pairs for your own tracking. | + +You can also override `model`, `system`, `tools`, `mcp_servers`, and `skills` for a single session without changing the agent. An `effort` level set inside a per-session `model` override isn't applied; set it on the agent instead. See [Override agent configuration for a session](/docs/en/managed-agents/sessions#override-agent-configuration-for-a-session). ## Create an agent @@ -160,7 +160,11 @@ The examples use curl, the `ant` CLI, or one of the SDKs. If you haven't set one To use Claude Opus 4.8 or Claude Opus 4.7 with [fast mode](/docs/en/build-with-claude/fast-mode), pass `model` as an object, for example: `{"id": "claude-opus-4-8", "speed": "fast"}`. Fast mode for Claude Opus 4.7 is deprecated; see [Fast mode](/docs/en/build-with-claude/fast-mode#supported-models) for the removal date and behavior. -The response echoes your configuration and adds `id`, `type`, `version`, `created_at`, `updated_at`, and `archived_at` fields. The `version` starts at 1 and increments each time an update changes the agent. + + To set the model's effort level, pass `model` as an object, for example: `{"id": "claude-opus-4-8", "effort": "high"}`. The `effort` field accepts a level string (`low`, `medium`, `high`, `xhigh`, or `max`) or an object such as `{"type": "high"}`. See [Effort levels](/docs/en/build-with-claude/effort#effort-levels) for what each level does. + + +The response echoes your configuration and adds `id`, `type`, `version`, `created_at`, `updated_at`, and `archived_at` fields, and fills in `model` fields you omit, such as `effort`, with their defaults. The `version` starts at 1 and increments each time an update changes the agent. ```json { @@ -169,6 +173,7 @@ The response echoes your configuration and adds `id`, `type`, `version`, `create "name": "Coding Assistant", "model": { "id": "claude-opus-4-8", + "effort": { "type": "high" }, "speed": "standard" }, "system": "You are a helpful coding agent.", @@ -195,7 +200,7 @@ The `default_config` on the toolset shows its default [permission policy](/docs/ ## Update an agent -Updating an agent generates a new version when the configuration changes. The `version` field is required and must match the agent's current version, so you always update from a known state. A version mismatch returns a 409, and updates to archived agents are rejected. +Updating an agent generates a new version when the configuration changes. The `version` field is optional: supply it for optimistic concurrency (a mismatch returns a 409), or omit it to apply the update unconditionally (last write wins). Updates to archived agents are rejected. ```bash curl @@ -296,11 +301,30 @@ Updating an agent generates a new version when the configuration changes. The `v ``` +The preceding example supplies `version` from the create response, so the update only applies if nothing else has changed the agent since you read it. To apply an update unconditionally, omit `version` from the request: + + + ```bash curl + updated_agent=$(curl -fsSL "https://api.anthropic.com/v1/agents/$AGENT_ID" \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "anthropic-beta: managed-agents-2026-04-01" \ + -H "content-type: application/json" \ + -d '{ + "description": "Writes and reviews code." + }') + + echo "New version: $(jq -r '.version' <<< "$updated_agent")" + ``` + + ### Update semantics +* **`version`** is optional and must be at least 1 when supplied. When supplied, the request returns a 409 if it doesn't match the agent's current version, even when the fields you send already match the stored values; re-read the agent and retry. When omitted, the update applies unconditionally and the most recent update silently replaces any concurrent one, with no error to either caller. Supplying `version` is the recommended default for interactive callers, and omitting it fits declarative apply loops, such as a CI job that syncs checked-in agent definitions, where the loop owns the agent. + * **Omitted fields are preserved.** You only need to include the fields you want to change. -* **Scalar fields** (`model`, `system`, `name`, `description`) are replaced with the new value. `system` and `description` can be cleared by passing `null`. `model` and `name` are mandatory and cannot be cleared. +* **Scalar fields** (`model`, `system`, `name`, `description`) are replaced with the new value. `system` and `description` can be cleared by passing `null`. `model` and `name` are mandatory and cannot be cleared. Within a `model` object you supply, `effort` is the exception: if the model `id` is unchanged, omitting `effort` leaves the stored effort level unchanged. If you change the model `id`, an omitted `effort` resets to the new model's default. * **Array fields** (`tools`, `mcp_servers`, `skills`) are fully replaced by the new array. To clear an array field entirely, pass `null` or an empty array. diff --git a/content/en/managed-agents/cloud-sandboxes-reference.md b/content/en/managed-agents/cloud-sandboxes-reference.md index 935081161..678becf70 100644 --- a/content/en/managed-agents/cloud-sandboxes-reference.md +++ b/content/en/managed-agents/cloud-sandboxes-reference.md @@ -45,7 +45,7 @@ These specifications apply to `cloud` environments. Self-hosted sandboxes run on * `curl`, `wget` - HTTP clients * `jq` - JSON processing * `tar`, `zip`, `unzip` - Archive tools -* `ssh`, `scp` - Remote access (requires network enabled) +* `ssh`, `scp` - Remote access (requires a networking mode that allows the destination host) * `tmux`, `screen` - Terminal multiplexers ### Development tools @@ -64,10 +64,10 @@ These specifications apply to `cloud` environments. Self-hosted sandboxes run on ## Sandbox specifications -| Property | Value | -| ---------------- | -------------------------------------------------- | -| Operating system | Ubuntu 22.04 LTS | -| Architecture | x86\_64 (amd64) | -| Memory | Up to 8 GB | -| Disk space | Up to 10 GB | -| Network | Disabled by default (enable in environment config) | +| Property | Value | +| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Operating system | Ubuntu 22.04 LTS | +| Architecture | x86\_64 (amd64) | +| Memory | Up to 8 GB | +| Disk space | Up to 10 GB | +| Network | API-created environments default to [`unrestricted` networking](/docs/en/managed-agents/environments#networking); sandboxes provisioned through Claude Studio default to `limited` | diff --git a/content/en/managed-agents/define-outcomes.md b/content/en/managed-agents/define-outcomes.md index dba4e1017..c3272323f 100644 --- a/content/en/managed-agents/define-outcomes.md +++ b/content/en/managed-agents/define-outcomes.md @@ -55,7 +55,7 @@ Example rubric: Pass the rubric as inline text on `user.define_outcome` (see [Create a session with an outcome](#create-a-session-with-an-outcome)), or upload it through the Files API for reuse across sessions. - Uploading through the Files API requires the `files-api-2025-04-14` beta header, which the SDKs send automatically. The curl example passes its headers explicitly. + Uploading through the Files API requires a beta header that grants Files API access. Your Managed Agents beta header grants this on its own, so you don't need to send `files-api-2025-04-14` alongside it. The curl example passes its headers explicitly. @@ -63,7 +63,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w rubric=$(curl -fsSL https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: managed-agents-2026-04-01,files-api-2025-04-14" \ + -H "anthropic-beta: managed-agents-2026-04-01" \ -F file=@/tmp/rubric.md) rubric_id=$(jq -r '.id' <<<"$rubric") printf 'Uploaded rubric: %s\n' "$rubric_id" @@ -536,6 +536,10 @@ The following examples create a [session](/docs/en/managed-agents/sessions) for ``` + + You can also define the outcome in the create request itself: pass a single `user.define_outcome` event in [`initial_events`](/docs/en/managed-agents/sessions#seed-the-session-with-initial-events) to create the session and start work toward the outcome in one call. + + ## Outcome events Progress on an outcome-oriented session is surfaced on the events [stream](/docs/en/managed-agents/events-and-streaming). @@ -593,15 +597,15 @@ Heartbeat emitted while the grader runs. The grader's internal reasoning is opaq ### Outcome evaluation end -Emitted after the grader finishes evaluating one iteration. The `result` field indicates what happens next. +Emitted when an outcome evaluation cycle ends: after the grader finishes evaluating one iteration, or when the session is interrupted while an outcome is active. The `result` field indicates what happens next. -| Result | Next | -| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `satisfied` | Session transitions to `idle`. | -| `needs_revision` | Agent starts a new iteration cycle. | -| `max_iterations_reached` | One final acknowledgment turn follows before the session transitions to `idle`. No further evaluation runs. | -| `failed` | Session transitions to `idle`. Returned when the rubric does not apply to the deliverables, for example if the description and rubric contradict each other. | -| `interrupted` | Only emitted if `outcome_evaluation_start` already fired before the interrupt. | +| Result | Next | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `satisfied` | Session transitions to `idle`. | +| `needs_revision` | Agent starts a new iteration cycle. | +| `max_iterations_reached` | One final acknowledgment turn follows before the session transitions to `idle`. No further evaluation runs. | +| `failed` | Session transitions to `idle`. Returned when the rubric does not apply to the deliverables, for example if the description and rubric contradict each other. | +| `interrupted` | Emitted when the session is interrupted while an outcome is active, even if evaluation hadn't started yet. If no `outcome_evaluation_start` fired before the interrupt, `outcome_evaluation_start_id` is an empty string. | ```json { @@ -624,7 +628,7 @@ Emitted after the grader finishes evaluating one iteration. The `result` field i ## Check outcome status -You can either listen on the [event stream](/docs/en/managed-agents/events-and-streaming) for `span.outcome_evaluation_end`, or poll `GET /v1/sessions/:id` and read `outcome_evaluations[].result`. Until an evaluation completes, `result` reports `pending`, `running`, or `evaluating`: +You can either listen on the [event stream](/docs/en/managed-agents/events-and-streaming) for `span.outcome_evaluation_end`, or poll `GET /v1/sessions/{session_id}` and read `outcome_evaluations[].result`. Until an evaluation completes, `result` reports `pending`, `running`, or `evaluating`: ```bash curl @@ -720,11 +724,11 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc ```bash curl # List files produced by this session - # scope_id filtering requires the managed-agents beta alongside the files beta + # scope_id filtering requires the managed-agents beta files=$(curl -fsSL "https://api.anthropic.com/v1/files?scope_id=$session_id" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: managed-agents-2026-04-01,files-api-2025-04-14") + -H "anthropic-beta: managed-agents-2026-04-01") jq -r '.data[] | "\(.id) \(.filename)"' <<<"$files" # Download a file @@ -733,7 +737,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc curl -fsSL "https://api.anthropic.com/v1/files/$file_id/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: managed-agents-2026-04-01,files-api-2025-04-14" \ + -H "anthropic-beta: managed-agents-2026-04-01" \ -o /tmp/output.txt fi ``` diff --git a/content/en/managed-agents/dreams.md b/content/en/managed-agents/dreams.md index 475e2e661..9026ecb9f 100644 --- a/content/en/managed-agents/dreams.md +++ b/content/en/managed-agents/dreams.md @@ -15,7 +15,7 @@ Agents write to their [memory stores](/docs/en/managed-agents/memory) as they wo The input store is never modified, so you can review the output and discard it if you don't like the result. - All Managed Agents API requests require the `managed-agents-2026-04-01` beta header. Dreams additionally require the `dreaming-2026-04-21` beta header. The SDK sets these automatically. + Dream endpoints are gated by the `dreaming-2026-04-21` beta header; the `managed-agents-2026-04-01` header on its own doesn't grant access to dreams. The dream-endpoint examples on this page send both headers; session and memory-store calls need only `managed-agents-2026-04-01`. The SDK sets these automatically. ## How it works @@ -25,7 +25,7 @@ A **dream** is an asynchronous job that takes: * a pre-existing **memory store:** the store Claude verifies, deduplicates, and reorganizes, and * 1 to 100 **sessions:** past transcripts Claude mines for patterns and insights to fold into the output. -The dream produces another **output memory store**, separate from the input. The output store ID appears in the dream's `outputs[]` once it starts `running`. +The dream produces another **output memory store**, separate from the input. The output store ID appears in the dream's `outputs[]` shortly after the dream starts `running`, once the workflow has cloned the input store; a `running` dream can briefly report an empty `outputs[]`. ## Create a dream @@ -187,8 +187,8 @@ The response is the full `dream` resource with `status: "pending"`: "usage": { "input_tokens": 0, "output_tokens": 0, - "cache_creation_input_tokens": 0, - "cache_read_input_tokens": 0 + "cache_read_input_tokens": 0, + "cache_creation_input_tokens": 0 }, "error": null } @@ -206,7 +206,7 @@ Use `instructions` for high-level synthesis guidance such as focus areas ("focus ## Track progress -Dreams run asynchronously and typically take minutes to tens of minutes depending on input size. Poll the dream by ID to check status: +Dreams run asynchronously and typically take minutes to a few hours, driven by the number of input transcripts. Poll the dream by ID to check status: ```bash curl @@ -465,7 +465,7 @@ When `status` reaches `completed`, the `memory_store` entry in `outputs[]` refer The dream itself never deletes or modifies its inputs. On `failed` or `canceled` the output store persists with partial contents so you can inspect what was produced before stopping; clean it up through the Memory Stores API if you don't need it. - While a dream is `pending` or `running`, archiving or deleting its output store is rejected with a 400. Archiving or deleting an *input* store or session mid-run will cause the dream to fail with `input_memory_store_unavailable` or `input_session_unavailable`. + While a dream is `pending` or `running`, the 400 guard applies to archiving the dream itself, not its stores. Archiving or deleting an *input* memory store mid-run (or deleting an input session) will cause the dream to fail with `input_memory_store_unavailable` or `input_session_unavailable`. ## Cancel a dream @@ -650,7 +650,7 @@ A non-exhaustive list of possible dreaming errors follows. | `memory_store_org_limit_exceeded` | Your organization hit its memory-store cap while the pipeline was provisioning working storage. | | `input_memory_store_too_large` | The input memory store exceeds the pipeline's size limit. | | `input_memory_store_unavailable` | The input memory store was archived or deleted after the dream was created. | -| `input_session_unavailable` | An input session was archived or deleted after the dream was created. | +| `input_session_unavailable` | An input session was deleted after the dream was created. | ## Billing diff --git a/content/en/managed-agents/events-and-streaming.md b/content/en/managed-agents/events-and-streaming.md index be2c5e909..8fdda3028 100644 --- a/content/en/managed-agents/events-and-streaming.md +++ b/content/en/managed-agents/events-and-streaming.md @@ -14,12 +14,12 @@ Communication with Claude Managed Agents is event-based. You send user events to Events flow in two directions. -* **User events** and **system events** are what you send to the agent: `user.*` events kick off a session and steer it as it progresses; `system.message` updates the agent's system prompt between turns. +* **User events** and **system events** are what you send to the agent: `user.*` events kick off a session and steer it as it progresses; `system.message` appends system-level context that applies to the accompanying turn and all subsequent turns. * **Session events**, **span events**, and **agent events** are sent to you for observability into your session state and agent progress. Stream connections that opt in also receive [event deltas](#event-deltas). Session, span, agent, user, and system event type strings follow a `{domain}.{action}` naming convention. The stream-only delta preview events (`event_start`, `event_delta`) are the exception. See [Event types](/docs/en/managed-agents/reference#event-types) in the reference for the full catalog. -Every persisted event includes a `processed_at` timestamp indicating when the event was recorded server-side. If `processed_at` is null, it means the event has been queued by the harness and is handled after preceding events finish processing. +Every persisted event includes a `processed_at` timestamp set when the event finishes processing. On events you send, `processed_at` is null while the event is still queued behind earlier events. The exceptions are `user.define_outcome`, `user.custom_tool_result`, and `user.tool_result`, which are processed on receipt and echoed back with `processed_at` already populated. ## Integrating events @@ -362,7 +362,7 @@ Every persisted event includes a `processed_at` timestamp indicating when the ev ``` - The agent acknowledges the interruption and switches to the new task. + The agent acknowledges the interruption and switches to the new task. The interrupted turn ends with a `session.status_idle` event whose `stop_reason` is `end_turn`, the same value as a turn that finishes on its own; there is no stop reason specific to interruption. @@ -1044,14 +1044,7 @@ Every persisted event includes a `processed_at` timestamp indicating when the ev ``` ```php PHP - $events = $client->beta->sessions->events->list( - $session->id, - types: ['agent.tool_use', 'agent.tool_result'], - ); - foreach ($events->data as $event) { - $processedAt = ($event->processedAt ?? null)?->format(DATE_RFC3339) ?? 'null'; - echo "[{$event->type}] {$processedAt}\n"; - } + // Filtering events by type is not currently available in the PHP SDK. ``` ```ruby Ruby @@ -1071,7 +1064,7 @@ By default, the agent's response text reaches the stream as buffered `agent.mess ### Opt in to previews -Previews are opt-in per stream connection. Add the `event_deltas[]` query parameter to `GET /v1/sessions/{session_id}/events/stream`, repeating it once for each event type you want previewed. The accepted values are `agent.message` and `agent.thinking`; any other value returns a 400 error. Only the session-level event stream supports the parameter. [Session thread](/docs/en/managed-agents/multiagent-orchestration) event streams reject it. +Previews are opt-in per stream connection. Add the `event_deltas[]` query parameter to the stream you're reading, repeating it once for each event type you want previewed. Because `[]` is a shell glob pattern, quote the URL whenever you build the request in a shell; the examples percent-encode the brackets as `%5B%5D`, which also works. Both stream endpoints accept the parameter: the session-level stream at `GET /v1/sessions/{session_id}/events/stream`, and each [session thread](/docs/en/managed-agents/multiagent-orchestration)'s own stream at `GET /v1/sessions/{session_id}/threads/{thread_id}/stream`. The accepted values are `agent.message` and `agent.thinking`; any other value returns a 400 error, as does a request with more than 100 values. A subagent's previews appear on [that subagent's own thread stream](#preview-session-thread-events). When a previewed event begins, the stream emits an `event_start` carrying the upcoming event's type and `id`: @@ -1102,7 +1095,7 @@ For `agent.message`, the start is followed by `event_delta` events carrying incr } ``` -When an `agent.thinking` event is previewed, only the `event_start` is emitted. No `event_delta` events follow, and the content arrives in the buffered `agent.thinking` event as usual. +When an `agent.thinking` event is previewed, only the `event_start` is emitted. No `event_delta` events follow, and the buffered `agent.thinking` event that concludes the preview carries no thinking content; it is a progress signal, not a content carrier. Unlike persisted events, `event_start` and `event_delta` have no `id` or `processed_at` of their own. The only identifier they carry is the `id` of the event they preview. @@ -1112,15 +1105,29 @@ Unlike persisted events, `event_start` and `event_delta` have no `id` or `proces ### Accumulate and reconcile -The Python, TypeScript, and Go SDKs include an accumulator helper that keys the preview by the event's `id` and handles the `index` bookkeeping for you. The manual pattern works in every language: in the other SDKs, apply it to the generated event types. +Every SDK that supports event deltas includes an accumulator helper that keys the preview by the event's `id` and handles the `index` bookkeeping for you (event deltas are not currently available in the PHP SDK; see the PHP tabs that follow). The manual pattern also works in every language when you need custom bookkeeping: apply it to the generated event types. -In the manual pattern, treat the preview as a scratch buffer and the buffered event as the record. Key the buffer by `(event_id, index)`. Reconcile per model request: a turn opens with a single `session.status_running` event, then on a turn that completes normally each model request produces, in order, `span.model_request_start`, `event_start`, the `event_delta` events, the buffered `agent.message`, and finally [`span.model_request_end`](/docs/en/managed-agents/reference#event-types) (in the Span events tab). Process each event as it arrives: +In the manual pattern, treat the preview as a scratch buffer and the buffered event as the record. Key the buffer by `(event_id, index)`. Reconcile per model request: a turn opens with a single `session.status_running` event, then on a turn that completes normally each model request produces, in order, `span.model_request_start`, `event_start`, the `event_delta` events, the buffered `agent.message`, and finally [`span.model_request_end`](/docs/en/managed-agents/reference#event-types) (in the Span events tab). On the wire, this is the previewed portion of that sequence, interleaved with the connection's other buffered events: + +```text wrap +event_start {"event": {"type": "agent.message", "id": "sevt_01abc..."}} +event_delta {"event_id": "sevt_01abc...", "delta": {"type": "content_delta", "index": 0, "content": {"type": "text", "text": "..."}}} +... +agent.message {"id": "sevt_01abc...", "content": [...]} +``` + +The `event_delta` line repeats once per text fragment. Process each event as it arrives: 1. On `event_start`, note the announced `id`. The identifiers always line up: `event_start.event.id`, every `event_delta.event_id`, and the buffered `agent.message`'s `id` are the same value. 2. On each `event_delta`, append `delta.content.text` to the entry at `(event_id, delta.index)` and render the running text. The first delta for an `index` creates that entry. 3. When the buffered `agent.message` arrives, match it by `id`, discard the accumulated preview, and render the message's content instead. 4. On `span.model_request_end`, close any preview that has not been reconciled by its buffered event. No more deltas are coming for it. If the turn errors or is interrupted, the buffered event may never arrive; `span.model_request_end` still does. +Guarantees the pattern relies on: + +* Concatenating a preview's deltas in arrival order, keyed by `(event_id, index)`, gives a prefix of `content[index].text` in the buffered event (a prefix, not necessarily the whole text, because deltas may be shed under load). +* A connection emits at most one `event_start` per `event_id`, and the buffered event is the last thing that connection delivers for that `id`. + ```bash curl # Opt in to agent.message previews via event_deltas, then accumulate manually. @@ -1328,8 +1335,13 @@ In the manual pattern, treat the preview as a scratch buffer and the buffered ev { if (streamEvent.TryPickStartEvent(out var start)) { - // A preview opened for the event with this id - Console.WriteLine($"event_start {start.Event.Type} {start.Event.ID}"); + // A preview opened for the event with this id. This stream only opts in + // to agent.message deltas; TryPick* returns false instead of throwing, + // so other preview types (including ones added later) are skipped. + if (start.Event.TryPickAgentMessage(out var preview)) + { + Console.WriteLine($"event_start {preview.Type.Raw()} {preview.ID}"); + } } else if (streamEvent.TryPickDeltaEvent(out var delta)) { @@ -1476,57 +1488,7 @@ In the manual pattern, treat the preview as a scratch buffer and the buffered ev ``` ```php PHP - // Opt in to event deltas: agent.message previews stream as incremental fragments. - $stream = $client->beta->sessions->events->streamStream( - $session->id, - eventDeltas: [BetaManagedAgentsDeltaType::AGENT_MESSAGE], - ); - - $client->beta->sessions->events->send( - $session->id, - events: [ - [ - 'type' => 'user.message', - 'content' => [['type' => 'text', 'text' => 'Give a one-sentence project tagline.']], - ], - ], - ); - - // Accumulate preview fragments by (event id, index). The buffered agent.message - // with the same id is authoritative and replaces whatever the deltas built up. - $buffers = []; - - foreach ($stream as $event) { - if ($event->type === 'event_start') { - printf("event_start %s %s\n", $event->event->type, $event->event->id); - } elseif ($event->type === 'event_delta') { - // index is optional on the wire; a single-element preview omits it. - $index = $event->delta->index ?? 0; - $fragment = $event->delta->content->text; - $buffers[$event->eventID][$index] ??= ''; - $buffers[$event->eventID][$index] .= $fragment; - printf("event_delta preview: %s\n", json_encode($buffers[$event->eventID][$index])); - } elseif ($event->type === 'agent.message') { - // Replace: drop the accumulated preview and render the complete event. - unset($buffers[$event->id]); - $text = ''; - foreach ($event->content as $block) { - if ($block->type === 'text') { - $text .= $block->text; - } - } - printf("agent.message %s %s\n", $event->id, json_encode($text)); - } elseif ($event->type === 'span.model_request_end') { - // No more deltas are coming. Close any preview that was never reconciled. - foreach (array_keys($buffers) as $eventID) { - printf("span.model_request_end closing preview for %s\n", $eventID); - } - $buffers = []; - } elseif ($event->type === 'session.status_idle') { - break; - } - } - $stream->close(); + // Event deltas are not currently available in the PHP SDK. ``` ```ruby Ruby @@ -1577,15 +1539,330 @@ In the manual pattern, treat the preview as a scratch buffer and the buffered ev ``` +### Preview session thread events + +In a [multiagent](/docs/en/managed-agents/multiagent-orchestration) session, every session thread has its own event stream at `GET /v1/sessions/{session_id}/threads/{thread_id}/stream`, and it takes the same `event_deltas[]` parameter with the same values. Previews are thread-scoped by design: a connection previews only the thread it's reading. A child thread's previews are delivered on that child's own stream and are never cross-posted to the session-level stream, whose previews stay scoped to the primary thread. To watch a subagent's text as the model generates it, open that subagent's thread stream. + +The thread stream's path is easy to get wrong: it is `/threads/{thread_id}/stream`, not `/events/stream` (which exists only at the session level), and there is no `/threads/{thread_id}/events/stream` endpoint. + +The preview events themselves don't change. `event_start` and `event_delta` have the same shape on a thread stream as on the session-level stream, and the [accumulate and reconcile](#accumulate-and-reconcile) pattern applies as written. The one adjustment is bookkeeping: run one accumulator instance per stream connection. + + + ```bash curl + # List the session's threads and pick a child: child threads carry a non-null + # parent_thread_id, and the primary thread's parent_thread_id is null. + THREAD_ID=$( + curl --fail-with-body -sS \ + "https://api.anthropic.com/v1/sessions/$SESSION_ID/threads?beta=true" \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "anthropic-beta: managed-agents-2026-04-01" | + jq -er 'first(.data[] | select(.parent_thread_id != null)).id' + ) + + # The child thread's stream takes the same event_deltas[] parameter as the + # session stream. Percent-encode the brackets (%5B%5D) and quote the URL. + exec {stream}< <( + curl --fail-with-body -sS -N \ + "https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/stream?beta=true&event_deltas%5B%5D=agent.message" \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "anthropic-beta: managed-agents-2026-04-01" \ + -H "accept: text/event-stream" + ) + + while IFS= read -r -u "$stream" event_line; do + [[ $event_line == data:* ]] || continue + event_json=${event_line#data: } + case $(jq -r '.type' <<<"$event_json") in + event_delta) + jq -j '.delta.content.text' <<<"$event_json" + ;; + agent.message) + # The buffered event is the authoritative record; render its content. + printf '\n' + jq -j '.content[] | select(.type == "text") | .text' <<<"$event_json" + printf '\n' + ;; + session.thread_status_idle) + break + ;; + esac + done + exec {stream}<&- + ``` + + ```bash CLI + # List the session's threads and pick a child: child threads carry a non-null + # parent_thread_id, and the primary thread's parent_thread_id is null + # (--transform's #(parent_thread_id!=~null) query matches non-null values). + THREAD_ID=$(ant beta:sessions:threads list \ + --session-id "$SESSION_ID" \ + --format raw --transform 'data.#(parent_thread_id!=~null).id' --raw-output) + + # The child thread's stream takes the same event_deltas parameter as the + # session stream, one --event-delta flag per event type to preview. @tostr + # re-encodes each text field as a JSON string, so every value stays on one + # YAML line and jq's fromjson recovers the original text. + transform='{type,frag:delta.content.text|@tostr,text:content.#(type=="text").text|@tostr}' + exec {stream}< <(ant beta:sessions:threads:events stream \ + --session-id "$SESSION_ID" \ + --thread-id "$THREAD_ID" \ + --event-delta agent.message \ + --transform "$transform" \ + --format yaml) + + type= + while IFS= read -r -u "$stream" line; do + case "$line" in + type:\ session.thread_status_idle) break ;; + type:\ *) type=${line#type: } ;; + frag:*) + [[ $type == event_delta ]] || continue + jq -j fromjson <<<"${line#frag: }" ;; + text:*) + [[ $type == agent.message ]] || continue + # The buffered event is the authoritative record; render its content. + printf '\n' + jq -r fromjson <<<"${line#text: }" ;; + esac + done + exec {stream}<&- + ``` + + ```python Python + # List the session's threads and pick a child: child threads carry a non-null + # parent_thread_id, and the primary thread's parent_thread_id is null. + child_thread = next( + thread + for thread in client.beta.sessions.threads.list(session.id) + if thread.parent_thread_id is not None + ) + + # The child thread's stream takes the same event_deltas parameter as the + # session stream. + with client.beta.sessions.threads.events.stream( + child_thread.id, + session_id=session.id, + event_deltas=["agent.message"], + ) as stream: + for event in stream: + match event.type: + case "event_delta": + print(event.delta.content.text, end="") + case "agent.message": + # The buffered event is the authoritative record; render its content + print() + for block in event.content: + if block.type == "text": + print(block.text, end="") + print() + case "session.thread_status_idle": + break + ``` + + ```typescript TypeScript + // List the session's threads and pick a child: child threads carry a non-null + // parent_thread_id, and the primary thread's parent_thread_id is null. + let childThreadId: string | undefined; + for await (const thread of client.beta.sessions.threads.list(session.id)) { + if (thread.parent_thread_id !== null) { + childThreadId = thread.id; + break; + } + } + if (!childThreadId) throw new Error("No child thread found"); + + // The child thread's stream takes the same event_deltas parameter as the + // session stream. + const stream = await client.beta.sessions.threads.events.stream(childThreadId, { + session_id: session.id, + event_deltas: ["agent.message"], + }); + + for await (const event of stream) { + if (event.type === "event_delta") { + process.stdout.write(event.delta.content.text); + } else if (event.type === "agent.message") { + // The buffered event is the authoritative record; render its content. + process.stdout.write("\n"); + const text = event.content.map((block) => block.text).join(""); + console.log(text); + } else if (event.type === "session.thread_status_idle") { + break; + } + } + stream.controller.abort(); + ``` + + ```csharp C# + // List the session's threads and pick a child: child threads carry a non-null + // parent_thread_id, and the primary thread's parent_thread_id is null. + var threads = await client.Beta.Sessions.Threads.List(session.ID); + var childThread = threads.Items.First(thread => thread.ParentThreadID is not null); + + // The child thread's stream takes the same event_deltas parameter as the + // session stream. + using var stream = await client.Beta.Sessions.Threads.Events.WithRawResponse.StreamStreaming( + childThread.ID, + new() { SessionID = session.ID, EventDeltas = [BetaManagedAgentsDeltaType.AgentMessage] } + ); + + await foreach (var streamEvent in stream.Enumerate()) + { + if (streamEvent.TryPickDeltaEvent(out var delta)) + { + Console.Write(delta.Delta.Content.Text); + } + else if (streamEvent.TryPickAgentMessageEvent(out var message)) + { + // The buffered event is the authoritative record; render its content. + Console.WriteLine(); + Console.WriteLine(string.Concat(message.Content.Select(block => block.Text))); + } + else if (streamEvent.TryPickSessionThreadStatusIdleEvent(out _)) + { + break; + } + } + ``` + + ```go Go + // List the session's threads and pick a child: child threads carry a non-null + // parent_thread_id, and the primary thread's parent_thread_id is null. + var childThreadID string + threads := client.Beta.Sessions.Threads.ListAutoPaging(ctx, session.ID, anthropic.BetaSessionThreadListParams{}) + for threads.Next() { + if thread := threads.Current(); thread.ParentThreadID != "" { + childThreadID = thread.ID + break + } + } + if err := threads.Err(); err != nil { + panic(err) + } + + // The child thread's stream takes the same event_deltas parameter as the + // session stream; run one read loop per stream connection. + stream := client.Beta.Sessions.Threads.Events.StreamEvents(ctx, childThreadID, anthropic.BetaSessionThreadEventStreamParams{ + SessionID: session.ID, + EventDeltas: []anthropic.BetaManagedAgentsDeltaType{ + anthropic.BetaManagedAgentsDeltaTypeAgentMessage, + }, + }) + + threadDeltas: + for stream.Next() { + switch event := stream.Current().AsAny().(type) { + case anthropic.BetaManagedAgentsDeltaEvent: + fmt.Print(event.Delta.Content.Text) + case anthropic.BetaManagedAgentsAgentMessageEvent: + // The buffered event is the authoritative record; render its content. + fmt.Println() + // concrete-typed list: BetaManagedAgentsTextBlock + for _, block := range event.Content { + fmt.Print(block.Text) + } + fmt.Println() + case anthropic.BetaManagedAgentsSessionThreadStatusIdleEvent: + break threadDeltas + } + } + if err := stream.Err(); err != nil { + panic(err) + } + stream.Close() + ``` + + ```java Java + // List the session's threads and pick a child: child threads carry a non-null + // parent_thread_id, and the primary thread's parent_thread_id is null. + var childThread = client.beta().sessions().threads().list(session.id()).autoPager().stream() + .filter(thread -> thread.parentThreadId().isPresent()) + .findFirst() + .orElseThrow(); + + // The child thread's stream takes the same event_deltas parameter as the session + // stream. Its params class shares the session-level one's simple name, so qualify it. + try (var stream = client.beta().sessions().threads().events().streamStreaming( + childThread.id(), + com.anthropic.models.beta.sessions.threads.events.EventStreamParams.builder() + .sessionId(session.id()) + .addEventDelta(BetaManagedAgentsDeltaType.AGENT_MESSAGE) + .build() + )) { + Iterable events = stream.stream()::iterator; + for (var event : events) { + if (event.isEventDelta()) { + IO.print(event.asEventDelta().delta().content().text()); + } else if (event.isAgentMessage()) { + // The buffered event is the authoritative record; render its content. + IO.println(); + event.asAgentMessage().content().forEach(block -> IO.print(block.text())); + IO.println(); + } else if (event.isSessionThreadStatusIdle()) { + break; + } + } + } + ``` + + ```php PHP + // Previewing session thread events is not currently available in the PHP SDK. + ``` + + ```ruby Ruby + # List the session's threads and pick a child: child threads carry a non-null + # parent_thread_id, and the primary thread's parent_thread_id is null. + child_thread = client.beta.sessions.threads.list(session.id).to_enum.find { it.parent_thread_id } + + # The child thread's stream takes the same event_deltas parameter as the + # session stream. + stream = client.beta.sessions.threads.events.stream_events( + child_thread.id, + session_id: session.id, + event_deltas: [Anthropic::Beta::BetaManagedAgentsDeltaType::AGENT_MESSAGE] + ) + + stream.each do |event| + case event.type + in :event_delta + print event.delta.content.text + in :"agent.message" + # The buffered event is the authoritative record; render its content. + puts + event.content.each { print it.text } + puts + in :"session.thread_status_idle" + break + else + # ignore other event types + end + end + ``` + + +The read loop exits on [`session.thread_status_idle`](/docs/en/managed-agents/reference#event-types), the event emitted when the session thread's turn finishes and the thread goes idle. + ### Limitations Previews are tuned for responsiveness. Build against these constraints: * **Best effort:** Under load, the server may shed deltas for an event. When it does, you receive a contiguous prefix of the text and then no further deltas for that event. The buffered `agent.message` still arrives complete. Never treat an accumulated preview as final. -* **No replay on reconnect:** Deltas are delivered only to the connection that opted in, while it is open. If the stream drops, follow the [reconnect procedure](#integrating-events) in the Streaming events tab: reopen the stream and list the event history. The history includes any buffered events emitted while you were disconnected, including the `agent.message` your preview was waiting for. There is no way to re-request missed deltas. -* **Primary thread, text only:** Previews cover assistant text on the session's primary thread. Tool use, tool results, MCP results, and activity on other [session threads](/docs/en/managed-agents/multiagent-orchestration) are never previewed. +* **No replay on reconnect:** Deltas are delivered only to the connection that opted in, while it is open. This applies to the session-level stream and to each session thread stream alike, and a connection opened after a model request started receives no deltas for that in-flight event. If the stream drops, follow the [reconnect procedure](#integrating-events) in the Streaming events tab: reopen the stream and list the event history. The history includes any buffered events emitted while you were disconnected, including the `agent.message` your preview was waiting for. There is no way to re-request missed deltas. +* **One thread, text only:** Previews cover assistant text on the thread the connection is reading. Tool use, tool results, MCP results, and activity on any other [session thread](/docs/en/managed-agents/multiagent-orchestration) are never previewed on that connection. * **Start-only `agent.thinking`:** An `agent.thinking` preview emits only the `event_start` as a signal that a thinking block has started; no `event_delta` events follow it. -* **Never persisted:** `event_start` and `event_delta` exist only on the live stream. They do not appear in the session's event history (`GET /v1/sessions/{session_id}/events`). +* **Never persisted:** `event_start` and `event_delta` exist only on the live stream. They do not appear in the session's event history (`GET /v1/sessions/{session_id}/events`) or in any session thread's event history. + +### Troubleshoot previews + +If the stream doesn't behave as you expect: + +| You see | What it means | +| ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| A stream with buffered events but no `event_start` or `event_delta` | The connection you're reading didn't opt in (`event_deltas[]` applies per connection, not per session), or the turn never touched the thread you're streaming. Previews are thread-scoped, so list the session's threads (`GET /v1/sessions/{session_id}/threads`) to find which one ran. | +| A 404 on the stream URL | The path or an ID is wrong, or the request carries no managed-agents beta header at all. The thread endpoints are beta-gated, so without the header they don't exist. | +| A 400 naming `event_deltas` | Only `agent.message` and `agent.thinking` are accepted. | ## Additional scenarios @@ -2100,7 +2377,7 @@ When a [permission policy](/docs/en/managed-agents/permission-policies) requires Sessions persist between interactions. Conversation history is preserved unless the session is explicitly deleted. When a session goes idle, its sandbox is checkpointed, preserving the full sandbox state, including the filesystem, installed packages, and any files the agent created. This allows you to resume cleanly from inactivity. - While session history is persisted until deleted, checkpoints are only preserved for 30 days after the session's last activity. If your workflow requires the full sandbox state (files, installed tools, and so on) to persist beyond 30 days, send periodic `user.message` events to reset the inactivity timer before the checkpoint expires. + While session history is persisted until deleted, sandbox state is only preserved for 30 days after the sandbox is created. Activity does not extend this window: after 30 days the sandbox state (files, installed tools, and so on) is unrecoverable, and a resumed session starts from a fresh sandbox. If your workflow depends on sandbox contents, have the agent write important artifacts to [outputs](/docs/en/managed-agents/define-outcomes#retrieving-deliverables) before the window ends. To resume a session, send a `user.message` event to it as usual: @@ -2270,10 +2547,10 @@ To resume a session, send a `user.message` event to it as usual: ### Sending system messages - `system.message` is supported by Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), and Claude Opus 4.8. If any model configured on the agent does not support mid-conversation system injection, the event is rejected with a `model_does_not_support_mid_conversation_system` validation error. + `system.message` is currently supported by Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5. If the agent's primary model does not support mid-conversation system injection, the event is rejected with a `model_does_not_support_mid_conversation_system` validation error; subagent models are not checked, because `system.message` lands on the primary thread only. -Send a `system.message` event to update the agent's system prompt between turns. Unlike the `system` field on the agent definition (which is fixed at session creation), `system.message` lets you change the system prompt as the session progresses. Use it when the agent needs updated system-level guidance mid-session: a different persona, revised constraints, or context fetched at runtime that should shape the model's behavior going forward. +Send a `system.message` event to give the agent privileged system-level context that applies to the accompanying turn and all subsequent turns. Unlike the `system` field on the agent definition (which sets the top-level system prompt), `system.message` content is appended to the session's system context as a `role: "system"` turn rather than replacing that prompt. Use it when the agent needs updated system-level guidance mid-session: a different persona, revised constraints, or context fetched at runtime that should shape the model's behavior going forward. ```bash curl @@ -2419,7 +2696,7 @@ Send a `system.message` event to update the agent's system prompt between turns. ``` -`system.message` cannot be sent while the session is idle with `stop_reason: requires_action`. `content` accepts 1–1000 text items. +While the session is idle with `stop_reason: requires_action`, a `system.message` is accepted only when it trails a tool result event in the same request; sent on its own or with a `user.message`, it is rejected until the pending tool events are resolved. `content` accepts 1–1000 text items. ### Tracking usage @@ -2432,19 +2709,22 @@ The session object includes a `usage` field with cumulative token statistics. Fe "usage": { "input_tokens": 5000, "output_tokens": 3200, - "cache_creation_input_tokens": 2000, - "cache_read_input_tokens": 20000 + "cache_read_input_tokens": 20000, + "cache_creation": { + "ephemeral_5m_input_tokens": 2000, + "ephemeral_1h_input_tokens": 0 + } } } ``` -`input_tokens` reports uncached input tokens and `output_tokens` reports total output tokens across all model calls in the session. The `cache_creation_input_tokens` and `cache_read_input_tokens` fields reflect prompt caching activity. Cache entries use a 5-minute TTL, so back-to-back turns within that window benefit from cache reads, which reduce per-token cost. +`input_tokens` reports uncached input tokens and `output_tokens` reports total output tokens across all model calls in the session. The `cache_read_input_tokens` field reports tokens read from the prompt cache, and the `cache_creation` object breaks down cache-creation tokens by cache lifetime (`ephemeral_5m_input_tokens` and `ephemeral_1h_input_tokens`). Cache entries use a 5-minute TTL by default, so back-to-back turns within that window benefit from cache reads, which reduce per-token cost. ## Console observability The Console provides a visual timeline view of your agent sessions. Navigate to the Claude Managed Agents section in the Console to see: -* **Session list:** All sessions with their status, creation time, and model +* **Session list:** All sessions with their status, creation time, and agent * **Tracing view:** A chronological view of events (content, timestamps, token usage) within a session. Tracing views are only accessible to Developers and Admins. * **Tool execution:** Details of each tool call and its result @@ -2454,3 +2734,4 @@ The Console provides a visual timeline view of your agent sessions. Navigate to * **Review tool results:** Tool execution failures often explain unexpected agent behavior * **Track token usage:** Monitor token consumption to optimize prompts and reduce costs * **Use system prompts:** Add logging instructions to the system prompt to make the agent explain its reasoning +* **Troubleshoot previews:** If a stream that opts in to event deltas doesn't behave as you expect, see [Troubleshoot previews](#troubleshoot-previews) diff --git a/content/en/managed-agents/files.md b/content/en/managed-agents/files.md index b7568f701..3cae48b37 100644 --- a/content/en/managed-agents/files.md +++ b/content/en/managed-agents/files.md @@ -105,7 +105,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh { type: "file", file_id: $file_id, - mount_path: "/workspace/data.csv" + mount_path: "/data.csv" } ] }' | curl --fail-with-body -sS "${auth[@]}" "${base_url}/sessions" --json @- @@ -121,7 +121,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh resources: - type: file file_id: $FILE_ID - mount_path: /workspace/data.csv + mount_path: /data.csv EOF ) ``` @@ -134,7 +134,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh { "type": "file", "file_id": file.id, - "mount_path": "/workspace/data.csv", + "mount_path": "/data.csv", }, ], ) @@ -148,7 +148,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh { type: "file", file_id: file.id, - mount_path: "/workspace/data.csv", + mount_path: "/data.csv", }, ], }); @@ -165,7 +165,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh { Type = "file", FileID = file.ID, - MountPath = "/workspace/data.csv", + MountPath = "/data.csv", }, ], }); @@ -181,7 +181,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh OfFile: &anthropic.BetaManagedAgentsFileResourceParams{ Type: anthropic.BetaManagedAgentsFileResourceParamsTypeFile, FileID: file.ID, - MountPath: anthropic.String("/workspace/data.csv"), + MountPath: anthropic.String("/data.csv"), }, }}, }) @@ -199,7 +199,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh BetaManagedAgentsFileResourceParams.builder() .type(BetaManagedAgentsFileResourceParams.Type.FILE) .fileId(file.id()) - .mountPath("/workspace/data.csv") + .mountPath("/data.csv") .build() ) .build() @@ -214,7 +214,7 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh BetaManagedAgentsFileResourceParams::with( type: 'file', fileID: $file->id, - mountPath: '/workspace/data.csv', + mountPath: '/data.csv', ), ], ); @@ -228,13 +228,15 @@ Mount uploaded files into the sandbox by adding them to the `resources` array wh { type: "file", file_id: file.id, - mount_path: "/workspace/data.csv" + mount_path: "/data.csv" } ] ) ``` +With the preceding `mount_path`, the agent reads the file at `/mnt/session/uploads/data.csv` (see [File paths](#file-paths)). + A new `file_id` is created that references the instance of the file in the session. These copies do not count against your [storage limits](/docs/en/build-with-claude/files). ## Multiple files @@ -244,9 +246,9 @@ Mount multiple files by adding entries to the `resources` array: ```json curl "resources": [ - { "type": "file", "file_id": "file_abc123", "mount_path": "/workspace/data.csv" }, - { "type": "file", "file_id": "file_def456", "mount_path": "/workspace/config.json" }, - { "type": "file", "file_id": "file_ghi789", "mount_path": "/workspace/src/main.py" } + { "type": "file", "file_id": "file_abc123", "mount_path": "/data.csv" }, + { "type": "file", "file_id": "file_def456", "mount_path": "/config.json" }, + { "type": "file", "file_id": "file_ghi789", "mount_path": "/src/main.py" } ] ``` @@ -254,77 +256,77 @@ Mount multiple files by adding entries to the `resources` array: resources: - type: file file_id: file_abc123 - mount_path: /workspace/data.csv + mount_path: /data.csv - type: file file_id: file_def456 - mount_path: /workspace/config.json + mount_path: /config.json - type: file file_id: file_ghi789 - mount_path: /workspace/src/main.py + mount_path: /src/main.py ``` ```python Python resources = [ - {"type": "file", "file_id": "file_abc123", "mount_path": "/workspace/data.csv"}, - {"type": "file", "file_id": "file_def456", "mount_path": "/workspace/config.json"}, - {"type": "file", "file_id": "file_ghi789", "mount_path": "/workspace/src/main.py"}, + {"type": "file", "file_id": "file_abc123", "mount_path": "/data.csv"}, + {"type": "file", "file_id": "file_def456", "mount_path": "/config.json"}, + {"type": "file", "file_id": "file_ghi789", "mount_path": "/src/main.py"}, ] ``` ```typescript TypeScript resources: [ - { type: "file", file_id: "file_abc123", mount_path: "/workspace/data.csv" }, - { type: "file", file_id: "file_def456", mount_path: "/workspace/config.json" }, - { type: "file", file_id: "file_ghi789", mount_path: "/workspace/src/main.py" } + { type: "file", file_id: "file_abc123", mount_path: "/data.csv" }, + { type: "file", file_id: "file_def456", mount_path: "/config.json" }, + { type: "file", file_id: "file_ghi789", mount_path: "/src/main.py" } ] ``` ```csharp C# var resources = new[] { - new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_abc123", MountPath = "/workspace/data.csv" }, - new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_def456", MountPath = "/workspace/config.json" }, - new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_ghi789", MountPath = "/workspace/src/main.py" }, + new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_abc123", MountPath = "/data.csv" }, + new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_def456", MountPath = "/config.json" }, + new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_ghi789", MountPath = "/src/main.py" }, }; ``` ```go Go resources := []anthropic.BetaSessionNewParamsResourceUnion{ - {OfFile: &anthropic.BetaManagedAgentsFileResourceParams{Type: "file", FileID: "file_abc123", MountPath: anthropic.String("/workspace/data.csv")}}, - {OfFile: &anthropic.BetaManagedAgentsFileResourceParams{Type: "file", FileID: "file_def456", MountPath: anthropic.String("/workspace/config.json")}}, - {OfFile: &anthropic.BetaManagedAgentsFileResourceParams{Type: "file", FileID: "file_ghi789", MountPath: anthropic.String("/workspace/src/main.py")}}, + {OfFile: &anthropic.BetaManagedAgentsFileResourceParams{Type: "file", FileID: "file_abc123", MountPath: anthropic.String("/data.csv")}}, + {OfFile: &anthropic.BetaManagedAgentsFileResourceParams{Type: "file", FileID: "file_def456", MountPath: anthropic.String("/config.json")}}, + {OfFile: &anthropic.BetaManagedAgentsFileResourceParams{Type: "file", FileID: "file_ghi789", MountPath: anthropic.String("/src/main.py")}}, } ``` ```java Java var resources = List.of( BetaManagedAgentsFileResourceParams.builder() - .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_abc123").mountPath("/workspace/data.csv").build(), + .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_abc123").mountPath("/data.csv").build(), BetaManagedAgentsFileResourceParams.builder() - .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_def456").mountPath("/workspace/config.json").build(), + .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_def456").mountPath("/config.json").build(), BetaManagedAgentsFileResourceParams.builder() - .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_ghi789").mountPath("/workspace/src/main.py").build() + .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_ghi789").mountPath("/src/main.py").build() ); ``` ```php PHP $resources = [ - ['type' => 'file', 'file_id' => 'file_abc123', 'mount_path' => '/workspace/data.csv'], - ['type' => 'file', 'file_id' => 'file_def456', 'mount_path' => '/workspace/config.json'], - ['type' => 'file', 'file_id' => 'file_ghi789', 'mount_path' => '/workspace/src/main.py'], + ['type' => 'file', 'file_id' => 'file_abc123', 'mount_path' => '/data.csv'], + ['type' => 'file', 'file_id' => 'file_def456', 'mount_path' => '/config.json'], + ['type' => 'file', 'file_id' => 'file_ghi789', 'mount_path' => '/src/main.py'], ]; ``` ```ruby Ruby resources = [ - {type: "file", file_id: "file_abc123", mount_path: "/workspace/data.csv"}, - {type: "file", file_id: "file_def456", mount_path: "/workspace/config.json"}, - {type: "file", file_id: "file_ghi789", mount_path: "/workspace/src/main.py"} + {type: "file", file_id: "file_abc123", mount_path: "/data.csv"}, + {type: "file", file_id: "file_def456", mount_path: "/config.json"}, + {type: "file", file_id: "file_ghi789", mount_path: "/src/main.py"} ] ``` -A maximum of 100 files is supported per session. +A maximum of 500 files is supported per session. ## Managing files on a running session @@ -546,7 +548,7 @@ Use the [Files API](/docs/en/build-with-claude/files) to list files scoped to a ```bash CLI # List files associated with a session ant beta:files list --scope-id sesn_abc123 \ - --beta files-api-2025-04-14,managed-agents-2026-04-01 + --beta managed-agents-2026-04-01 # Download a file ant beta:files download --file-id "$FILE_ID" --output output.txt @@ -676,6 +678,7 @@ The agent can work with any file type, including: Files mounted in the sandbox are read-only copies. The agent can read them but cannot modify the original uploaded file. To work with modified versions, the agent writes to new paths within the sandbox. -* Files are mounted at the exact path you specify +* The path you specify is rooted under the session's uploads directory: a `mount_path` of `/data.csv` places the file at `/mnt/session/uploads/data.csv` in the sandbox +* If you omit `mount_path`, the file is placed at `/mnt/session/uploads/` * Parent directories are created automatically * Paths should be absolute (starting with `/`) diff --git a/content/en/managed-agents/mcp-connector.md b/content/en/managed-agents/mcp-connector.md index 3a3375e1a..143104621 100644 --- a/content/en/managed-agents/mcp-connector.md +++ b/content/en/managed-agents/mcp-connector.md @@ -270,7 +270,7 @@ See [configuring the toolset](/docs/en/managed-agents/tools#configuring-the-tool ### MCP tool output handling -When an MCP tool output exceeds 100,000 tokens, it is automatically written to a file in the sandbox. The model receives a truncated preview with the file path and can read the full content from there. +When an MCP tool output exceeds 100,000 characters (about 25,000 tokens), it is automatically written to a file in the sandbox. The model receives a truncated preview with the file path and can read the full content from there. ## Provide authentication at session creation @@ -365,16 +365,16 @@ When starting a session, pass `vault_ids` to provide credentials for your MCP se ``` -Credentials are matched by URL, so the vault must contain a credential whose `mcp_server_url` exactly matches the `url` declared in `mcp_servers`. If none matches, the connection is attempted unauthenticated. See [Add a credential](/docs/en/managed-agents/vaults#add-a-credential) for the `static_bearer` and `mcp_oauth` credential types. +Credentials are matched by URL, so the vault must contain a credential whose `mcp_server_url` refers to the same server as the `url` declared in `mcp_servers`. Both URLs are normalized before matching (scheme and host lowercased, default ports and trailing slashes stripped), so differences in host casing, a default port, or a trailing slash don't prevent a match; a different path, subdomain, or non-default port does. If none matches, the connection is attempted unauthenticated. See [Add a credential](/docs/en/managed-agents/vaults#add-a-credential) for the `static_bearer` and `mcp_oauth` credential types. ### Handle connection and authentication failures Session creation does not validate MCP connectivity or credentials. If an MCP server is unreachable or rejects the supplied credential, the session still starts and interaction remains possible. A [`session.error`](/docs/en/managed-agents/events-and-streaming) event is emitted with the `mcp_server_name` of the affected server and a `retry_status`: -| Error type | Meaning | -| --------------------------------- | ------------------------------------------------------------------------------------------------- | -| `mcp_connection_failed_error` | The MCP server could not be reached (network error, timeout, or non-authentication HTTP failure). | -| `mcp_authentication_failed_error` | The MCP server was reached but rejected the credential from the attached vault. | +| Error type | Meaning | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `mcp_connection_failed_error` | The MCP server could not be reached (network error, timeout, or non-authentication HTTP failure). | +| `mcp_authentication_failed_error` | Authentication with the MCP server failed: the server rejected the credential from the attached vault, required authentication when no matching credential was configured, or an OAuth token refresh failed. | You can decide whether to block further interaction on this error, trigger a credential rotation, or let the session continue without the affected server's tools. The connection is retried on the next `session.status_idle` to `session.status_running` transition. diff --git a/content/en/managed-agents/multiagent-orchestration.md b/content/en/managed-agents/multiagent-orchestration.md index 7cbaa440e..5bc70a6bf 100644 --- a/content/en/managed-agents/multiagent-orchestration.md +++ b/content/en/managed-agents/multiagent-orchestration.md @@ -230,7 +230,7 @@ When [defining your agent](/docs/en/managed-agents/agent-setup), set `multiagent The coordinator's configuration, including its `multiagent.agents` roster, is snapshotted when the coordinator is created or updated. Referenced agents stay pinned to the versions resolved at that time and do not automatically pick up later updates to their definitions. To delegate to a newer version of a referenced agent, [update the coordinator](/docs/en/managed-agents/agent-setup#update-an-agent) so its roster references that version. -The coordinator can only delegate to one level of agents; depth > 1 is ignored. A maximum of 20 unique agents can be listed in `multiagent.agents`, but the coordinator can call multiple copies of each agent. +The coordinator can only delegate to one level of agents; referencing an agent that has its own `multiagent.agents` roster fails the create or update request with a validation error. A maximum of 20 unique agents can be listed in `multiagent.agents`, but the coordinator can call multiple copies of each agent. ## Create the session @@ -678,12 +678,12 @@ MCP servers are agent-scoped (each agent definition declares its own servers and In this example, only the researcher declares the GitHub MCP server, so the coordinator does not have access. The session's `vault_ids` supply the GitHub credential to the researcher's thread. - If an agent's MCP calls fail to authenticate after you declare the server, confirm the credential's `mcp_server_url` matches the agent's `mcp_servers[].url` exactly, including scheme and trailing slash. + If an agent's MCP calls fail to authenticate after you declare the server, confirm the credential's `mcp_server_url` refers to the same server as the agent's `mcp_servers[].url`. Both URLs are normalized before matching (scheme and host lowercased, default ports and trailing slashes stripped), so differences in host casing, a default port, or a trailing slash don't prevent a match; a different path, subdomain, or non-default port does. ## Threads -The **session-level event stream** (`/v1/sessions/:id/events/stream`) is considered the **primary thread**, containing a condensed view of all activity across all threads. You don't see the full activity from subagents, but you do see the start and end of their work, and blocking events such as tool permission requests. +The **session-level event stream** (`/v1/sessions/{session_id}/events/stream`) is considered the **primary thread**, containing a condensed view of all activity across all threads. You don't see the full activity from subagents, but you do see the start and end of their work, and blocking events such as tool permission requests. **Session threads** are where you drill into a specific agent's activity. @@ -762,7 +762,7 @@ The session `status` is an aggregation of all agent activity; if at least one th - Send `user.interrupt` with `session_thread_id` to stop a specific thread. Omitting `session_thread_id` targets the primary thread. + Send `user.interrupt` with `session_thread_id` to stop a specific thread. Omitting `session_thread_id` interrupts every non-archived thread in the session, including the primary. ```bash curl @@ -848,7 +848,7 @@ The session `status` is an aggregation of all agent activity; if at least one th ``` - Against a child thread blocked on `requires_action`, the interrupt marks each pending tool call denied and re-emits `session.thread_status_idle` with `stop_reason: end_turn` directly; the model is not sampled. Against a thread already at `idle`, the interrupt is a no-op. + Against a child thread blocked on `requires_action`, the interrupt closes each pending tool call with an error tool result ("Tool execution was interrupted before completion. Please retry.") and re-emits `session.thread_status_idle` with `stop_reason: end_turn` directly; the model is not sampled. Against a thread already at `idle`, the interrupt is a no-op. @@ -915,7 +915,7 @@ The session `status` is an aggregation of all agent activity; if at least one th ``` - Archive only succeeds if the thread is `idle`. If the thread is running or blocked on `requires_action`, interrupt it first: + Archive only succeeds if the thread is `idle`. A thread parked on `requires_action` counts as idle and can be archived directly; only a running thread must be interrupted first: ```bash curl @@ -1040,21 +1040,23 @@ The session `status` is an aggregation of all agent activity; if at least one th ### Primary thread events -These events surface multiagent activity on the primary thread at `/v1/sessions/:id/events/stream`. +These events surface multiagent activity on the primary thread at `/v1/sessions/{session_id}/events/stream`. Message-direction events are named relative to the thread whose stream they appear on: `agent.thread_message_received` means a message arrived on this thread from another thread, and `agent.thread_message_sent` means this thread sent one. The task the coordinator delegates, for example, arrives on the child's own stream as an `agent.thread_message_received` event. -| Type | Description | -| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -| `session.thread_created` | A thread was created. Includes `session_thread_id` and `agent_name`. | -| `session.thread_status_running` | A thread started activity. | -| `session.thread_status_idle` | The agent associated with the thread is awaiting input. Includes a `stop_reason` indicating why the agent stopped. | -| `session.thread_status_terminated` | A thread was archived or encountered a terminal error. | -| `agent.thread_message_received` | An agent delivered its result to the coordinator. Includes `from_session_thread_id`, `from_agent_name`, and `content`. | -| `agent.thread_message_sent` | The coordinator sent a follow-up to another agent. Includes `to_session_thread_id`, `to_agent_name`, and `content`. | +| Type | Description | +| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `session.thread_created` | A thread was created. Includes `session_thread_id` and `agent_name`. | +| `session.thread_status_running` | A thread started activity. | +| `session.thread_status_idle` | The agent associated with the thread is awaiting input. Includes a `stop_reason` indicating why the agent stopped. | +| `session.thread_status_terminated` | A thread was archived or encountered a terminal error. | +| `agent.thread_message_received` | On the primary thread, an agent sent a report or question to the coordinator. Includes `from_session_thread_id`, `from_agent_name`, and `content`. | +| `agent.thread_message_sent` | On the primary thread, the coordinator sent a task or follow-up message to another agent. Includes `to_session_thread_id`, `to_agent_name`, and `content`. | ### Session thread events Critical events are proxied to the primary thread. However, you might still want to investigate a specific agent's reasoning and tool calls. To do so, stream or list the events from the associated session thread. +Each session thread has its own event stream at `/v1/sessions/{session_id}/threads/{thread_id}/stream`, and it accepts the same `event_deltas[]` parameter as the session-level stream, so you can preview a subagent's text as the model generates it. A connection previews only the thread it's reading: a child thread's previews never appear on the session-level stream, so to watch a subagent live, open its own thread stream. See [Preview session thread events](/docs/en/managed-agents/events-and-streaming#preview-session-thread-events) for opting in, accumulating, and reconciling previews. + diff --git a/content/en/managed-agents/quickstart.md b/content/en/managed-agents/quickstart.md index b4fca7883..ddbce1907 100644 --- a/content/en/managed-agents/quickstart.md +++ b/content/en/managed-agents/quickstart.md @@ -21,7 +21,7 @@ This guide walks you through creating an agent, setting up an environment, start ## Prerequisites -* An Anthropic [Console account](https://platform.claude.com) +* A [Claude Console account](https://platform.claude.com) * An [API key](/settings/keys) ## Install the CLI @@ -37,7 +37,7 @@ This guide walks you through creating an agent, setting up an environment, start For Linux environments, download the release binary directly. ```bash - VERSION=1.17.0 + VERSION=1.19.0 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;; @@ -88,7 +88,7 @@ ant --version ```groovy Gradle - implementation("com.anthropic:anthropic-java:2.48.0") + implementation("com.anthropic:anthropic-java:2.50.0") ``` diff --git a/content/en/managed-agents/reference.md b/content/en/managed-agents/reference.md index 6e20655b3..f1aeba27b 100644 --- a/content/en/managed-agents/reference.md +++ b/content/en/managed-agents/reference.md @@ -18,7 +18,7 @@ Persisted event type strings follow a `{domain}.{action}` naming convention; the | Type | Description | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | `user.message` | A user message with text content. | + | `user.message` | A user message with text, image, or document content. | | `user.interrupt` | Stop the agent mid-execution. | | `user.custom_tool_result` | Response to a custom tool call from the agent. | | `user.tool_confirmation` | Approve or deny an agent or MCP tool call when a permission policy requires confirmation. | @@ -27,57 +27,57 @@ Persisted event type strings follow a `{domain}.{action}` naming convention; the - | Type | Description | - | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | - | `agent.message` | Agent response containing text content blocks. | - | `agent.thinking` | Agent thinking content, emitted separately from messages. | - | `agent.tool_use` | Agent invokes a pre-built agent tool (bash, file operations, and so on). | - | `agent.tool_result` | Result of a pre-built agent tool execution. | - | `agent.mcp_tool_use` | Agent invokes an MCP server tool. | - | `agent.mcp_tool_result` | Result of an MCP tool execution. | - | `agent.custom_tool_use` | Agent invokes one of your custom tools. Respond with a `user.custom_tool_result` event. | - | `agent.thread_context_compacted` | Conversation history was compacted to fit the context window. | - | `agent.thread_message_received` | In a [multiagent](/docs/en/managed-agents/multiagent-orchestration) session, an agent delivered its result to the coordinator. | - | `agent.thread_message_sent` | In a [multiagent](/docs/en/managed-agents/multiagent-orchestration) session, the coordinator sent a follow-up to another agent. | + | Type | Description | + | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `agent.message` | Agent response containing text content blocks. | + | `agent.thinking` | Signals the agent is making forward progress through extended thinking. This is a progress signal only and does not carry the thinking content. | + | `agent.tool_use` | Agent invokes a pre-built agent tool (bash, file operations, and so on). | + | `agent.tool_result` | Result of a pre-built agent tool execution. | + | `agent.mcp_tool_use` | Agent invokes an MCP server tool. | + | `agent.mcp_tool_result` | Result of an MCP tool execution. | + | `agent.custom_tool_use` | Agent invokes one of your custom tools. Respond with a `user.custom_tool_result` event. | + | `agent.thread_context_compacted` | Conversation history was compacted to fit the context window. | + | `agent.thread_message_received` | In a [multiagent](/docs/en/managed-agents/multiagent-orchestration) session, a message from another thread arrived on the thread whose stream carries this event; on the primary thread, an agent sent a report or question to the coordinator. | + | `agent.thread_message_sent` | In a [multiagent](/docs/en/managed-agents/multiagent-orchestration) session, the thread whose stream carries this event sent a message to another thread; on the primary thread, the coordinator sent a task or follow-up message to another agent. | - | Type | Description | - | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | - | `session.status_running` | Agent is actively processing. | - | `session.status_idle` | Agent finished its current task and is waiting for input. Includes a `stop_reason` indicating why the agent stopped. | - | `session.status_rescheduled` | A transient error occurred and the session is retrying automatically. | - | `session.status_terminated` | Session ended because of an unrecoverable error. | - | `session.deleted` | Session was deleted. Terminates any active event stream; no further events are emitted for this session. | - | `session.updated` | Session update request changed at least one field. Includes only the fields that changed. Updates apply on the next turn. | - | `session.error` | An error occurred during processing. Includes a typed `error` object with a `retry_status`. | - | `session.thread_created` | A [multiagent](/docs/en/managed-agents/multiagent-orchestration) thread was created. | - | `session.thread_status_running` | A [multiagent](/docs/en/managed-agents/multiagent-orchestration) thread started activity. | - | `session.thread_status_idle` | A [multiagent](/docs/en/managed-agents/multiagent-orchestration) thread finished its turn and is awaiting input. Includes `stop_reason`. | - | `session.thread_status_rescheduled` | A [multiagent](/docs/en/managed-agents/multiagent-orchestration) thread hit a transient error and is retrying automatically. | - | `session.thread_status_terminated` | A [multiagent](/docs/en/managed-agents/multiagent-orchestration) thread was archived or reached a terminal error. | + | Type | Description | + | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | + | `session.status_running` | Agent is actively processing. | + | `session.status_idle` | Agent finished its current task and is waiting for input. Includes a `stop_reason` indicating why the agent stopped. | + | `session.status_rescheduled` | A transient error occurred and the session is retrying automatically. | + | `session.status_terminated` | Session ended, either because of an unrecoverable error or on completion. | + | `session.deleted` | Session was deleted. Terminates any active event stream; no further events are emitted for this session. | + | `session.updated` | Session update request changed at least one field. Includes only the fields that changed. Updates apply on the next turn. | + | `session.error` | An error occurred during processing. Includes a typed `error` object with a `retry_status`. | + | `session.thread_created` | A [multiagent](/docs/en/managed-agents/multiagent-orchestration) thread was created. | + | `session.thread_status_running` | A session thread began executing. Every session emits this for its primary thread; in [multiagent](/docs/en/managed-agents/multiagent-orchestration) sessions, child-thread transitions are also cross-posted to the primary stream. | + | `session.thread_status_idle` | A session thread finished its turn and is awaiting input. Includes `stop_reason`. | + | `session.thread_status_rescheduled` | A session thread hit a transient error and is retrying automatically. | + | `session.thread_status_terminated` | A session thread was archived or reached a terminal error. | Span events are observability markers that wrap activity for timing and usage tracking. - | Type | Description | - | --------------------------------- | ------------------------------------------------------------------------------------------ | - | `span.model_request_start` | A model inference call has started. | - | `span.model_request_end` | A model inference call has completed. Includes `model_usage` with token counts. | - | `span.outcome_evaluation_start` | [Outcome](/docs/en/managed-agents/define-outcomes) evaluation has started. | - | `span.outcome_evaluation_ongoing` | Heartbeat during an ongoing [outcome](/docs/en/managed-agents/define-outcomes) evaluation. | - | `span.outcome_evaluation_end` | [Outcome](/docs/en/managed-agents/define-outcomes) evaluation has completed. | + | Type | Description | + | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `span.model_request_start` | A model inference call has started. | + | `span.model_request_end` | A model inference call has completed. Includes `model_usage` with token counts. | + | `span.outcome_evaluation_start` | [Outcome](/docs/en/managed-agents/define-outcomes) evaluation has started. | + | `span.outcome_evaluation_ongoing` | Heartbeat during an ongoing [outcome](/docs/en/managed-agents/define-outcomes) evaluation. | + | `span.outcome_evaluation_end` | An [outcome](/docs/en/managed-agents/define-outcomes) evaluation cycle has completed. A `needs_revision` result means another cycle follows; `satisfied`, `max_iterations_reached`, `failed`, and `interrupted` are terminal. | - | Type | Description | - | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | - | `system.message` | Update the agent's system prompt between turns. Supported on Claude Fable 5, [Claude Mythos 5](https://anthropic.com/glasswing), and Claude Opus 4.8. | + | Type | Description | + | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `system.message` | Append privileged system-level context that applies to the accompanying turn and all subsequent turns. Supported on Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5; on an unsupported primary model the event is rejected with `model_does_not_support_mid_conversation_system`. | - Event deltas are stream-only preview events. They are emitted on session event stream connections that opt in with the `event_deltas[]` parameter, and they are never persisted to the session's event history. See [Event deltas](/docs/en/managed-agents/events-and-streaming#event-deltas) for opting in, accumulating, and reconciling them. + Event deltas are stream-only preview events. They are emitted on stream connections (session-level or per-thread) that opt in with the `event_deltas[]` parameter, and they are never persisted to the session's event history. See [Event deltas](/docs/en/managed-agents/events-and-streaming#event-deltas) for opting in, accumulating, and reconciling them. | Type | Description | | ------------- | ------------------------------------------------------------------------------------------------------------------------ | @@ -90,19 +90,19 @@ Persisted event type strings follow a `{domain}.{action}` naming convention; the These are the `ant beta:worker` CLI flags for the pre-built worker that drives a `self_hosted` environment. See [Self-hosted sandboxes](/docs/en/managed-agents/self-hosted-sandboxes) for setting up the environment, running a worker, and the SDK helper options. -| Flag | Description | -| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. | -| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. | -| `--workdir` | Directory where skills are downloaded and tools read and write files. Defaults to `.` (the current directory); the system default working directory is `/workspace`. | -| `--on-work` | Script to call for each claimed work item instead of running tools in-process. Receives session details as environment variables. | -| `--unrestricted-paths` | Allow tool calls to access paths outside `--workdir`. | -| `--max-idle` | How long to wait after the session goes idle with an `end_turn` [stop reason](/docs/en/api/handling-stop-reasons) before shutting down. Defaults to `60s`. | -| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. | +| Flag | Description | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. | +| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. | +| `--workdir` | Directory where skills are downloaded and tools read and write files. Defaults to `.` (the current directory); the system default working directory is `/workspace`. | +| `--on-work` | Script to call for each claimed work item instead of running tools in-process. Receives session details as environment variables. | +| `--unrestricted-paths` | Allow the file tools to read and write paths outside `--workdir`. The workdir check is a guardrail for the file tools only, not a sandbox; it does not constrain bash. | +| `--max-idle` | How long to wait after the session goes idle with an `end_turn` [stop reason](/docs/en/api/handling-stop-reasons) before shutting down. Defaults to `60s`. | +| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. | ## Supported MCP server types -Claude Managed Agents connects to [remote MCP servers](/docs/en/agents-and-tools/remote-mcp-servers) that expose an HTTP endpoint, or to private MCP servers through [MCP tunnels](/docs/en/agents-and-tools/mcp-tunnels/overview). The server must support the MCP protocol's streamable HTTP transport. See [MCP connector](/docs/en/managed-agents/mcp-connector) for declaring servers on an agent. +Claude Managed Agents connects to [remote MCP servers](/docs/en/agents-and-tools/remote-mcp-servers) that expose an HTTP endpoint, or to private MCP servers through [MCP tunnels](/docs/en/agents-and-tools/mcp-tunnels/overview). The server should support the MCP protocol's streamable HTTP transport; servers that only support the deprecated SSE transport still work through an automatic fallback. See [MCP connector](/docs/en/managed-agents/mcp-connector) for declaring servers on an agent. For more information on MCP and building MCP servers, see the [MCP documentation](https://modelcontextprotocol.io). diff --git a/content/en/managed-agents/scheduled-deployments.md b/content/en/managed-agents/scheduled-deployments.md index 68fa95748..d966612c0 100644 --- a/content/en/managed-agents/scheduled-deployments.md +++ b/content/en/managed-agents/scheduled-deployments.md @@ -17,7 +17,7 @@ For the launch context and examples of what teams run on schedules, see [schedul When creating a deployment, you pass the [session configurations](/docs/en/managed-agents/sessions) required for execution, in addition to a `schedule`. * Deployments require [agent configuration](/docs/en/managed-agents/agent-setup) and [environment configuration](/docs/en/managed-agents/environments), and optionally accept [files](/docs/en/managed-agents/files), [GitHub](/docs/en/managed-agents/github), [memory stores](/docs/en/managed-agents/memory), and [vaults](/docs/en/managed-agents/vaults). -* Deployments also require an initial `user.message` event that starts the session's work. +* Deployments also require at least one initial event, a `user.message` or `user.define_outcome`, that starts each session's work. * In the `schedule`, you define a cron `expression` and a `timezone`. Maximum granularity supported is at the minute level. @@ -242,7 +242,7 @@ The response includes a deployment object with a populated `schedule.upcoming_ru } ``` -The upcoming run timestamps are based on the exact schedule configured. However, to distribute load, deployments may apply jitter of up to 10 seconds. +The upcoming run timestamps reflect the exact schedule configured. However, to distribute load, actual execution applies jitter of up to 15% of the interval between runs, with a minimum of 5 seconds and a maximum of 9 minutes. A maximum of **1,000 scheduled deployments** is supported per organization. Contact Anthropic support if you need more. @@ -602,7 +602,7 @@ Each lifecycle change emits a [webhook event](/docs/en/managed-agents/webhooks#s Session creation rate-limit responses are recorded immediately as a `session_rate_limited_error` run without retry; the schedule attempts again at the next scheduled occurrence. Rate limits on underlying API calls within a session are handled by the session itself. -If a deployment's agent has been archived or deleted, the deployment is automatically archived in the same operation; no deployment run is recorded. If a subagent referenced by the agent has been archived, the next trigger records a failed run with `error.type: "agent_archived_error"` and the deployment is automatically paused so you can update the agent and resume. Other unrecoverable session-creation errors, such as an archived environment or vault, behave the same way: the trigger records a failed run and the deployment is automatically paused. The deployment's `paused_reason.error.type` mirrors the failed run's `error.type`. +If a deployment's agent has been archived, the deployment is automatically archived in the same operation. If the agent has been deleted, the next scheduled trigger detects the missing agent and automatically archives the deployment. In both cases no deployment run is recorded. If a subagent referenced by the agent has been archived, the next trigger records a failed run with `error.type: "agent_archived_error"` and the deployment is automatically paused so you can update the agent and resume. Other unrecoverable session-creation errors, such as an archived environment or vault, behave the same way: the trigger records a failed run and the deployment is automatically paused. The deployment's `paused_reason.error.type` mirrors the failed run's `error.type`. ## Trigger a manual run diff --git a/content/en/managed-agents/self-hosted-sandboxes-security.md b/content/en/managed-agents/self-hosted-sandboxes-security.md index 71ab0090e..82e37ea3f 100644 --- a/content/en/managed-agents/self-hosted-sandboxes-security.md +++ b/content/en/managed-agents/self-hosted-sandboxes-security.md @@ -17,7 +17,7 @@ Anthropic secures the control plane across all environments: session and work qu ## What Anthropic cannot do for you -* **Instantly invalidate a leaked key.** Anthropic can detect anomalous usage patterns, but cannot instantly invalidate a key. Treat `ANTHROPIC_ENVIRONMENT_KEY` like a database password: rotate it immediately if compromised. +* **Know that your key leaked.** Anthropic can detect anomalous usage patterns, but cannot know your key was compromised. If you suspect `ANTHROPIC_ENVIRONMENT_KEY` leaked, revoke it and generate a replacement immediately. Revocation is validated on every request, so it takes effect on the worker's next call. * **Verify your worker build.** Anthropic does not inspect your sandbox image or runtime. A supply-chain compromise in your image is not detectable from the control plane. * **Isolate tools inside your sandbox.** Anthropic's security boundary stops at the sandbox. How you isolate individual tool executions from each other inside that boundary is entirely your responsibility. * **Enforce data retention in your environment.** Once session content reaches your worker, it is outside Anthropic's data lifecycle controls. diff --git a/content/en/managed-agents/self-hosted-sandboxes.md b/content/en/managed-agents/self-hosted-sandboxes.md index e91a70218..8a0813d6c 100644 --- a/content/en/managed-agents/self-hosted-sandboxes.md +++ b/content/en/managed-agents/self-hosted-sandboxes.md @@ -44,7 +44,7 @@ The CLI and SDK both ship pre-built workers. The `ant` CLI supports the always-o ### Sandbox filesystem * **`/workspace`:** the system default working directory for tool execution and skill download. The CLI's `--workdir` flag defaults to the current directory; pass `--workdir /workspace` to match the system default. Skills are downloaded to `/skills//`. If you use a different working directory, update your agent's system prompt so Claude can locate the skill files. -* **`/mnt/session/outputs`:** the worker harness instructs Claude to write final deliverables here. In sandbox mode, mount a host directory at this path to retrieve outputs after the session ends. In in-process mode, the worker's file tools write under the working directory instead, so this path does not apply. +* **Outputs:** on self-hosted environments the session's system prompt omits the `/mnt/session/outputs` instruction used on Anthropic-managed sandboxes, so final deliverables land wherever the agent writes them in your sandbox filesystem, typically under the working directory. ## Before you begin @@ -201,7 +201,7 @@ Choose **always-on** for the simplest setup: a long-running process polls the qu For Linux environments, download the release binary directly. ```bash - VERSION=1.17.0 + VERSION=1.19.0 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;; @@ -232,7 +232,7 @@ Choose **always-on** for the simplest setup: a long-running process polls the qu --workdir "/workspace" ``` - The worker exits cleanly on SIGTERM or SIGINT, draining in-flight tool calls before stopping. + The worker exits cleanly on SIGTERM or SIGINT: it cancels any in-flight tool call, posts its error result, and releases the work item before stopping. **Sandbox per session** @@ -240,17 +240,17 @@ Choose **always-on** for the simplest setup: a long-running process polls the qu ```text FROM your-base-image - ARG ANT_VERSION=1.17.0 + ARG ANT_VERSION=1.19.0 ARG TARGETARCH RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo arm64 || echo amd64) && \ curl -fsSL "https://github.com/anthropics/anthropic-cli/releases/download/v${ANT_VERSION}/ant_${ANT_VERSION}_linux_${ARCH}.tar.gz" \ | tar -xz -C /usr/local/bin ant WORKDIR /workspace - VOLUME /mnt/session/outputs + VOLUME /workspace ENTRYPOINT ["ant", "beta:worker", "run"] ``` - Then write a spawn script that forwards session details into a fresh sandbox. The poller injects `ANTHROPIC_SESSION_ID`, `ANTHROPIC_WORK_ID`, `ANTHROPIC_ENVIRONMENT_ID`, and `ANTHROPIC_ENVIRONMENT_KEY` into the script's environment. `ANTHROPIC_BASE_URL` is optional and is passed through only if it was set on the poller host; it overrides the default API endpoint. In the example, `/host/outputs` is a host directory you choose; it is bind-mounted to the sandbox's `/mnt/session/outputs` so you can retrieve session deliverables after the sandbox exits. + Then write a spawn script that forwards session details into a fresh sandbox. The poller injects `ANTHROPIC_SESSION_ID`, `ANTHROPIC_WORK_ID`, `ANTHROPIC_ENVIRONMENT_ID`, and `ANTHROPIC_ENVIRONMENT_KEY` into the script's environment. `ANTHROPIC_BASE_URL` is optional and is passed through only if it was set on the poller host; it overrides the default API endpoint. In the example, `/host/outputs` is a host directory you choose; it is bind-mounted to the sandbox's working directory (`/workspace`) so you can retrieve session deliverables after the sandbox exits. On self-hosted environments the agent writes deliverables under the working directory rather than `/mnt/session/outputs` (see [Sandbox filesystem](#sandbox-filesystem)), so mounting the working directory is what captures them; the mount also picks up the downloaded `skills/` tree and any intermediate files the agent creates. ```bash #!/bin/bash @@ -259,7 +259,7 @@ Choose **always-on** for the simplest setup: a long-running process polls the qu exec docker run --rm \ -e ANTHROPIC_SESSION_ID -e ANTHROPIC_ENVIRONMENT_KEY \ -e ANTHROPIC_WORK_ID -e ANTHROPIC_ENVIRONMENT_ID -e ANTHROPIC_BASE_URL \ - -v "/host/outputs/$ANTHROPIC_SESSION_ID":/mnt/session/outputs \ + -v "/host/outputs/$ANTHROPIC_SESSION_ID":/workspace \ your-image ``` @@ -852,7 +852,7 @@ If `workers_polling` stays at 0, the worker isn't reaching the queue: confirm `A Once your worker is running, create a session that targets the environment. Set `AGENT_ID` to the agent ID you noted in [Before you begin](#before-you-begin). The session enters the environment's work queue and waits there until a worker claims it; if no worker is connected, the session stays queued rather than failing. -Anthropic doesn't mount files or GitHub repositories into self-hosted sandboxes. To make session-specific files available, pass file references (such as an S3 path or commit SHA) in the session `metadata` field. Your spawn script or `--on-work` handler reads that metadata from the claimed work item (the CLI poller pipes the work item's JSON to the script's stdin, and SDK handlers can read it through the [Environments Work endpoints](/docs/en/api/beta/environments/work)) and stages the files into the working directory before tool execution begins. +Anthropic doesn't mount files or GitHub repositories into self-hosted sandboxes. To make session-specific files available, pass file references (such as an S3 path or commit SHA) in the session `metadata` field. The claimed work item doesn't carry the session's metadata, but it does carry the session ID: your spawn script or `--on-work` handler retrieves the session (`GET /v1/sessions/{session_id}`) to read the `metadata` field, then stages the files into the working directory before tool execution begins. ```bash cURL @@ -943,7 +943,7 @@ Anthropic doesn't mount files or GitHub repositories into self-hosted sandboxes. - [Memory](/docs/en/managed-agents/memory) is not currently supported with self-hosted sandboxes. + Self-hosted sandboxes don't support `resources` entries; a session that includes any resource on a self-hosted environment is rejected. See [Self-hosted worker](/docs/en/managed-agents/reference#self-hosted-worker) in the reference for the full list of CLI flags, and [SDK helpers](#sdk-helpers) for the SDK helper options. @@ -1529,9 +1529,9 @@ The SDKs' [Client-side MCP helpers](/docs/en/agents-and-tools/mcp-connector#clie Keep the following in mind when you wrap an MCP server: * **Tools are declared, not discovered at runtime.** The worker lists the MCP server's tools once at startup and cannot add tools to a running session. When the server's tools change, declare them again, on the agent or on an idle session through [Updating the agent configuration](/docs/en/managed-agents/session-operations#updating-the-agent-configuration), and restart the worker. -* **Names and descriptions must fit the Managed Agents API.** Custom tool names are unique per agent and use letters, digits, underscores, and hyphens (1–128 characters); a description is required (1–1,024 characters); and an agent's `tools` array takes at most 128 entries (each wrapped tool is one entry, and the built-in toolset is one more). The API rejects a declaration that reuses a tool name, names a custom tool after a built-in agent tool such as `bash` or `read`, or uses the reserved `mcp__` prefix. The MCP helpers keep the server's names and descriptions, so rename or trim where needed. When two servers expose the same tool name, define the wrapper yourself under a prefixed name and have it call the server's original tool name. +* **Names and descriptions must fit the Managed Agents API.** Custom tool names are unique per agent and use letters, digits, underscores, and hyphens (1–128 characters); a description is required (1–4,096 characters); and an agent's `tools` array takes at most 128 entries (each wrapped tool is one entry, and the built-in toolset is one more). The API rejects a declaration that reuses a tool name, names a custom tool after a built-in agent tool such as `bash` or `read`, or uses the reserved `mcp__` prefix. The MCP helpers keep the server's names and descriptions, so rename or trim where needed. When two servers expose the same tool name, define the wrapper yourself under a prefixed name and have it call the server's original tool name. * **Most schemas pass through unchanged.** The API accepts the JSON Schema keywords MCP servers commonly emit, such as `additionalProperties` and `title`. It rejects reference keywords such as `$ref` anywhere in a custom tool's `input_schema`, so inline the schemas that generators such as pydantic factor into `$defs`. It also rejects top-level `oneOf`, `anyOf`, and `allOf`, and property names outside letters, digits, underscores, dots, and hyphens (1–64 characters). -* **Tool failures surface as error tool results.** When the MCP server reports a tool error, the worker posts an error tool result the model can react to. MCP content with no tool result equivalent, such as audio blocks and resource links, also surfaces as an error. Set a timeout on the MCP client for a faster and clearer failure, as the Python worker example does with `read_timeout_seconds`. Without one, a hung call becomes an error result only when the TypeScript MCP SDK's default request timeout fires (about a minute) or, in Python, when the worker's own backstop does (about two and a half minutes). In Go neither the MCP client nor the worker applies a default: a hung call waits until the session's context ends, so bound the per-call context with a deadline. +* **Tool failures surface as error tool results.** When the MCP server reports a tool error, the worker posts an error tool result the model can react to. MCP content with no tool result equivalent, such as audio blocks and resource links, also surfaces as an error. Set a timeout on the MCP client for a faster and clearer failure, as the Python worker example does with `read_timeout_seconds`. Without one, a hung call becomes an error result only when the TypeScript MCP SDK's default request timeout fires (about a minute) or when the worker's own backstop does: about two and a half minutes in Python, and two minutes in Go, where the worker cancels a tool call that outlives its 120-second default and posts an error result. * **Wrap servers you operate or trust.** A wrapped tool's name, description, and results enter the model's context like any other tool's: untrusted input that can influence what the agent does with its other tools, including `bash` on the worker host. Declare only the tools you intend the agent to use. * **Permission policies do not apply to custom tools.** [Permission policies](/docs/en/managed-agents/permission-policies#custom-tools) govern the built-in and MCP toolsets; the worker executes every wrapped tool call the model makes, so put any approval step in your own tool code. @@ -1540,7 +1540,7 @@ Keep the following in mind when you wrap an MCP server: These calls run from your monitoring or operations tooling, authenticated with your Claude API key, to observe and manage the worker fleet. The claim and keep-alive loop is handled inside the worker helpers, so you don't call those endpoints directly. - These endpoints authenticate with your organization API key, not the environment key. Call them from outside the worker host. Setting `ANTHROPIC_API_KEY` on the worker host exposes an organization-scoped credential to agent tool calls. + These endpoints accept either your organization API key or the environment key. Call them from outside the worker host with your organization API key. Setting `ANTHROPIC_API_KEY` on the worker host exposes an organization-scoped credential to agent tool calls. ### Read queue depth @@ -1548,8 +1548,8 @@ These calls run from your monitoring or operations tooling, authenticated with y `work.stats` returns the queue state for an environment: * `depth` is the number of items waiting to be claimed. Scale your worker fleet or alert on backlog based on this value. -* `pending` is the number of items a worker has claimed and is currently processing. -* `oldest_queued_at` is the timestamp of the oldest item still queued or being processed, or `null` when there is none. +* `pending` is the number of items claimed by a worker but not yet acknowledged. The worker helpers acknowledge each item before processing it, so this value stays near zero in normal operation; a sustained non-zero value means a worker stalled between claiming and acknowledging. +* `oldest_queued_at` is the timestamp of the oldest item still in the queue, waiting to be claimed or claimed but not yet acknowledged, or `null` when there is none. * `workers_polling` is the number of workers that have polled in the last 30 seconds. Use this for liveness alerting. @@ -1677,7 +1677,7 @@ These calls run from your monitoring or operations tooling, authenticated with y ### Stop a session gracefully -Use `work.stop` to ask the worker handling a specific session to shut it down cleanly. The worker finishes any in-flight tool call, posts a final status, and releases the session. Pass `force: true` in the request body (with the CLI, pass `--force`) to interrupt immediately instead of waiting for the current tool call to complete. +Use `work.stop` to ask the worker handling a specific session to shut it down. By default the work item moves to `stopping`: the worker notices on its next lease heartbeat, cancels the session's in-flight tool call, and confirms the shutdown, at which point the work item becomes `stopped`. Pass `force: true` in the request body (with the CLI, pass `--force`) to mark the work item `stopped` immediately instead of waiting for the worker's confirmation. Because these calls run from your operations tooling rather than the worker host, `ANTHROPIC_WORK_ID` isn't set automatically. Set it to the target work item's ID before running the following examples. To find a work item's ID, list the environment's work items through the [Environments Work endpoints](/docs/en/api/beta/environments/work). diff --git a/content/en/managed-agents/session-operations.md b/content/en/managed-agents/session-operations.md index 0318fbe1f..04b9f1653 100644 --- a/content/en/managed-agents/session-operations.md +++ b/content/en/managed-agents/session-operations.md @@ -14,18 +14,18 @@ Once a session exists, use these operations to read, update, archive, or delete Sessions progress through these statuses. See [Start a session](/docs/en/managed-agents/sessions) for the session lifecycle. -| Status | Description | -| -------------- | ---------------------------------------------------------------------------------------------------- | -| `idle` | Agent is waiting for input, including user messages or tool confirmations. Sessions start in `idle`. | -| `running` | Agent is actively executing. | -| `rescheduling` | Transient error occurred, retrying automatically. | -| `terminated` | Session has ended because of an unrecoverable error. | +| Status | Description | +| -------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| `idle` | Agent is waiting for input, including user messages or tool confirmations. Sessions created without `initial_events` start in `idle`. | +| `running` | Agent is actively executing. | +| `rescheduling` | Transient error occurred, retrying automatically. | +| `terminated` | Session has ended, either because of an unrecoverable error or on completion. | ## Updating the agent configuration You can update a session's `agent.tools` and `agent.mcp_servers`, including permission policies, mid-session without creating a new agent version. Updates are session-local and do not propagate back to the underlying agent. -Only the agent's `tools` and `mcp_servers` can change after a session is created. To run a session with `model`, `system`, or `skills` values other than the agent's, use [agent configuration overrides](/docs/en/managed-agents/sessions#override-agent-configuration-for-a-session) when you create the session. The agent's configured `system` field is fixed for the session's lifetime. On models that support it, you can still replace the effective system prompt between turns by sending a [`system.message` event](/docs/en/managed-agents/events-and-streaming#sending-system-messages). +Only the agent's `tools` and `mcp_servers` can change after a session is created. To run a session with `model`, `system`, or `skills` values other than the agent's, use [agent configuration overrides](/docs/en/managed-agents/sessions#override-agent-configuration-for-a-session) when you create the session. The agent's configured `system` field is fixed for the session's lifetime. On models that support it, you can still append system-level guidance mid-session by sending a [`system.message` event](/docs/en/managed-agents/events-and-streaming#sending-system-messages). The semantics of a `tools` or `mcp_servers` update are full replacement: the provided array is the new value. To preserve existing entries, `GET` the session, modify the array, and `POST` it back. diff --git a/content/en/managed-agents/sessions.md b/content/en/managed-agents/sessions.md index ae6205b2d..a03bba200 100644 --- a/content/en/managed-agents/sessions.md +++ b/content/en/managed-agents/sessions.md @@ -4,7 +4,7 @@ Create a session to run your agent and begin executing tasks. --- -A session is an agent instance within an environment. Each session references an [agent](/docs/en/managed-agents/agent-setup) and an [environment](/docs/en/managed-agents/environments) (both created separately), and maintains conversation history across multiple interactions. Sessions follow a two-step lifecycle: first [create the session](#creating-a-session) to provision its sandbox, then [send a user event](#starting-the-session) to start work. +A session is an agent instance within an environment. Each session references an [agent](/docs/en/managed-agents/agent-setup) and an [environment](/docs/en/managed-agents/environments) (both created separately), and maintains conversation history across multiple interactions. Sessions follow a two-step lifecycle: first [create the session](#creating-a-session), then [send a user event](#starting-the-session) to start work. You can also collapse both steps into one call with [`initial_events`](#seed-the-session-with-initial-events). Managed Agents API requests require the `managed-agents-2026-04-01` beta header, except memory store endpoints, which use `agent-memory-2026-07-22` instead. The SDK sets the correct beta header automatically. See [Beta headers](/docs/en/api/beta-headers#endpoint-specific-headers). @@ -141,7 +141,7 @@ To pin a session to a specific agent version, pass an object. This lets you cont { Agent = new BetaManagedAgentsAgentParams { - Type = Anthropic.Models.Beta.Sessions.Type.Agent, + Type = BetaManagedAgentsAgentParamsType.Agent, ID = agent.ID, Version = 1, }, @@ -191,6 +191,273 @@ To pin a session to a specific agent version, pass an object. This lets you cont ``` +### Seed the session with initial events + +You can create a session and start its work in one call. `initial_events` is an optional array of initial [events](/docs/en/managed-agents/reference#event-types) to send to the session at creation, processed in order. It supports `user.message` and [`user.define_outcome`](/docs/en/managed-agents/define-outcomes) events, and accepts a maximum of 50 events. A non-empty list starts the agent loop in the same call: the session is created directly in the `running` status, with no further request. + +The following example creates a session with a single `user.message` in `initial_events`: + + + ```bash cURL + seeded_session=$(curl -fsSL https://api.anthropic.com/v1/sessions \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -H "anthropic-beta: managed-agents-2026-04-01" \ + -H "content-type: application/json" \ + -d @- <beta->sessions->create( + agent: $agent->id, + environmentID: $environment->id, + initialEvents: [ + [ + 'type' => 'user.message', + 'content' => [['type' => 'text', 'text' => 'List the files in the working directory.']], + ], + ], + ); + + // initial_events are not echoed on the create response; read them back + // from the session's event list. + $seededEvents = $client->beta->sessions->events->list($seededSession->id); + foreach ($seededEvents->getItems() as $event) { + if ($event->type === 'user.message') { + echo "Seeded event: {$event->content[0]->text}\n"; + } + } + ``` + + ```ruby Ruby + seeded_session = client.beta.sessions.create( + agent: agent.id, + environment_id: environment.id, + initial_events: [ + { + type: :"user.message", + content: [{type: :text, text: "List the files in the working directory."}] + } + ] + ) + + # initial_events are not echoed on the create response; read them back from + # the session's event list. + client.beta.sessions.events.list(seeded_session.id).auto_paging_each do |event| + next unless event.type == :"user.message" + event.content.each do |block| + puts "Seeded event: #{block.text}" if block.type == :text + end + end + ``` + + +No other event type is accepted. Events that respond to an agent turn (`user.tool_confirmation`, `user.tool_result`, and `user.custom_tool_result`) aren't accepted because no agent turn exists yet, and `user.interrupt` isn't accepted because there is no turn to stop. Unlike `initial_events` on a scheduled deployment, a session's `initial_events` don't accept `system.message`. + +Each event in `initial_events` is validated and persisted before the create response returns, in list order, with a server-assigned ID, exactly as if you had posted it to the [send events](/docs/en/managed-agents/events-and-streaming) endpoint immediately after creation. Per-event content rules are also the same as on that endpoint. An empty list is equivalent to omitting the field. Validation is all-or-nothing: if any event fails validation, the whole request is rejected and no session is created. + +The create request is rejected in the following cases: + +| Condition | Status | +| ------------------------------------------------------------------------------------------------------------------------------ | ------ | +| More than one `user.define_outcome` event | 400 | +| A `user.define_outcome` event without a `rubric` | 400 | +| More than 100 file-sourced [`document` content blocks](/docs/en/build-with-claude/files#document-blocks) across the whole list | 400 | +| A request body over 32 MB | 413 | + +A `user.define_outcome` event in `initial_events` is accepted under the same conditions as sending one to an existing session; see [Define outcomes](/docs/en/managed-agents/define-outcomes). + ### Override agent configuration for a session You can pass `agent` in three forms: an agent ID string, a pinned-version object (`type: "agent"`), or an overrides object. The overrides form changes parts of the agent's configuration for a single session. Use it to try a different model or grant an extra tool in one session without versioning the agent. For the overrides form, set `type` to `agent_with_overrides` and pass the agent's `id` and optionally a `version` (omit `version` to use the agent's latest version). Then include any of `model`, `system`, `tools`, `mcp_servers`, or `skills` with the values the session should use. @@ -199,12 +466,14 @@ Each overridable field follows the same three rules: * **Omit the field:** The session inherits the value from the agent version it references. -* **Set the field to `null`, or to an empty array for list fields:** The session runs with that field cleared. This rule applies in full to `system`, `mcp_servers`, and `skills`. There are two exceptions: +* **Set the field to `null`, or to an empty array for list fields:** The session runs with that field cleared. This rule applies in full to `system` and `skills`. There are three exceptions: * `model` is never clearable. A session always needs a model, so `model: null` returns a 400 `agent_model_required` error. * Clearing `tools` returns a 400 error when the session's effective `skills` is non-empty, because skills require the `read` tool. Otherwise, `tools: null` and `tools: []` clear the field. + * Clearing `mcp_servers` returns a 400 error when the session's effective `tools` still contains an `mcp_toolset` that references one of the agent's servers. Override `tools` in the same request to remove those `mcp_toolset` entries, then clear `mcp_servers`. -* **Set the field to a value:** The value replaces the agent's value in full. Overrides never merge with the agent's configuration, so a `tools` override must list every tool the session should have. +* **Set the field to a value:** The value replaces the agent's value in full. Overrides never merge with the agent's configuration, so a `tools` override must list every tool the session should have. There is one exception: + * An `effort` level inside a per-session `model` override isn't applied. Set `effort` on the [agent](/docs/en/managed-agents/agent-setup#agent-configuration-fields) instead. Overrides apply only to the session you create. They do not modify the agent resource or create a new agent version, so other sessions that reference the same agent are unaffected. @@ -478,7 +747,7 @@ If your agent uses MCP tools that require authentication, pass `vault_ids` at se ## Starting the session -Creating a session provisions the environment's sandbox but does not start any work. To delegate a task, send events to the session using a [user event](/docs/en/managed-agents/reference#event-types). The session acts as a state machine that tracks progress while events drive the actual execution. +Creating a session without `initial_events` registers the session but does not start any work; the environment's sandbox is provisioned when the session first needs it. To delegate a task, send events to the session using a [user event](/docs/en/managed-agents/reference#event-types). To supply the first event in the create request instead, see [Seed the session with initial events](#seed-the-session-with-initial-events). The session acts as a state machine that tracks progress while events drive the actual execution. ```bash cURL diff --git a/content/en/managed-agents/skills.md b/content/en/managed-agents/skills.md index 108cf1a25..9f52e4589 100644 --- a/content/en/managed-agents/skills.md +++ b/content/en/managed-agents/skills.md @@ -21,7 +21,7 @@ To learn how to author custom skills, see [Agent Skills](/docs/en/agents-and-too A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](#attach-skills-to-an-agent). -When you call the Skills API directly with cURL or the CLI, pass the `anthropic-beta: skills-2025-10-02` header explicitly. The SDKs send it automatically. +When you call the Skills API directly with cURL, pass the `anthropic-beta: skills-2025-10-02` header explicitly. The CLI and SDKs send it automatically. These examples omit the optional `display_title` field, so the skill's title is derived from `SKILL.md`. An explicitly passed `display_title` must be unique among the custom skills in your workspace. @@ -36,8 +36,7 @@ These examples omit the optional `display_title` field, so the skill's title is ```bash CLI ant beta:skills create \ - --file example_skill.zip \ - --beta skills-2025-10-02 + --file example_skill.zip ``` ```python Python @@ -205,7 +204,7 @@ Each entry in the `skills` array uses the following fields: | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | Either `anthropic` for pre-built skills or `custom` for workspace-authored skills. | | `skill_id` | The skill identifier. For Anthropic skills, use the short name (for example, `xlsx`). For custom skills, use the `skill_*` ID returned at creation (see [Create a custom skill](#create-a-custom-skill)). | -| `version` | Custom skills only. Pin to a specific version or use `latest`. Optional. Defaults to `latest` when omitted. | +| `version` | Pin to a specific version or use `latest`. Optional. Defaults to `latest` when omitted. Applies to both Anthropic and custom skills. | ```bash cURL diff --git a/content/en/managed-agents/tools.md b/content/en/managed-agents/tools.md index 2ffc22907..0ec3b8487 100644 --- a/content/en/managed-agents/tools.md +++ b/content/en/managed-agents/tools.md @@ -27,7 +27,7 @@ The agent toolset includes the following tools. All are enabled by default when | Web fetch | `web_fetch` | Fetch content from a URL | | Web search | `web_search` | Search the web for information | -When a tool output exceeds 100,000 tokens, it is automatically written to a file in the [sandbox](/docs/en/managed-agents/environments). The model receives a truncated preview with the file path and can read the full content from there. +When a tool output exceeds 100,000 characters (about 25,000 tokens), it is automatically written to a file in the [sandbox](/docs/en/managed-agents/environments). The model receives a truncated preview with the file path and can read the full content from there. ## Configuring the toolset diff --git a/content/en/managed-agents/vaults.md b/content/en/managed-agents/vaults.md index ef45a83b7..e26bfea38 100644 --- a/content/en/managed-agents/vaults.md +++ b/content/en/managed-agents/vaults.md @@ -708,6 +708,10 @@ The actual credential values you supply (`token`, `access_token`, `refresh_token A placeholder in a disabled location is neither substituted nor stripped. The request is sent to the third party with the literal opaque placeholder string in that location. If a request arrives at the third party containing the literal placeholder string, either that location is disabled for the credential or the destination host is not covered by the credential's `networking.allowed_hosts`. + + Credentials created in the Console enable header injection only. If your client sends the secret in the request body, such as a form-encoded token request, the placeholder passes through literally and the service rejects it with its own authentication error. Enable body injection in the Console form when you create the credential, or update the credential with `{"injection_location": {"body": true}}`. + + The substitution happens at egress, not inside the sandbox. Anything that processes the credential locally sees the opaque placeholder, not the real value: clients that validate the credential format at startup may reject it, and clients that compute a request signature from the secret (for example, AWS SigV4) produce an invalid signature. Environment variable credentials work for clients that send the secret value verbatim in an outbound request, in a location the credential's `injection_location` enables. Substitution is outbound only. If a client uses the stored secret to fetch a session token (for example, an OAuth client-credentials grant), the returned token arrives in the sandbox unredacted. For exchange-based flows, perform the exchange yourself and store the resulting token in the vault instead. diff --git a/content/en/managed-agents/webhooks.md b/content/en/managed-agents/webhooks.md index e559955b1..b7ebf071c 100644 --- a/content/en/managed-agents/webhooks.md +++ b/content/en/managed-agents/webhooks.md @@ -12,30 +12,30 @@ Webhook events return the event `type` and `id`, not the full object. When you r - | Event | Trigger | - | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | - | `session.status_run_started` | Agent execution kicked off. This triggers at every session status transition to `running`. | - | `session.status_idled` | Agent awaiting input, for example a tool permission approval or a new user message. | - | `session.status_rescheduled` | A transient error occurred and the session is retrying automatically. | - | `session.status_terminated` | The session hit a terminal error. | - | `session.thread_created` | New [multiagent thread](/docs/en/managed-agents/multiagent-orchestration) opened, meaning an additional agent called by the coordinator is kicking off work. | - | `session.thread_idled` | An agent in a [multiagent interaction](/docs/en/managed-agents/multiagent-orchestration) is waiting for input. | - | `session.thread_terminated` | A [multiagent thread](/docs/en/managed-agents/multiagent-orchestration) was archived. | - | `session.outcome_evaluation_ended` | [Outcome evaluation](/docs/en/managed-agents/define-outcomes) for a single iteration completed. | - | `session.updated` | Session properties changed (for example, its name or configuration was updated). | - | `session.deleted` | Session permanently deleted. There is no object left to fetch, so treat the event itself as final. | + | Event | Trigger | + | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `session.status_run_started` | Agent execution kicked off. This triggers at every session status transition to `running`. | + | `session.status_idled` | Agent awaiting input, for example a tool permission approval or a new user message. | + | `session.status_rescheduled` | A transient error occurred and the session is retrying automatically. | + | `session.status_terminated` | The session terminated, either because of an error or completion. | + | `session.thread_created` | New [multiagent thread](/docs/en/managed-agents/multiagent-orchestration) opened, meaning an additional agent called by the coordinator is kicking off work. | + | `session.thread_idled` | An agent in a [multiagent interaction](/docs/en/managed-agents/multiagent-orchestration) is waiting for input. | + | `session.thread_terminated` | A [multiagent thread](/docs/en/managed-agents/multiagent-orchestration) terminated, either because the child agent completed its work or because the thread was archived. Fires for child threads only; the primary thread's end surfaces as `session.status_terminated`. | + | `session.outcome_evaluation_ended` | [Outcome evaluation](/docs/en/managed-agents/define-outcomes) for a single iteration completed. | + | `session.updated` | Session properties changed (for example, its name or configuration was updated). | + | `session.deleted` | Session permanently deleted. There is no object left to fetch, so treat the event itself as final. | - | Event | Trigger | - | --------------------------------- | -------------------------------------------------------------------------------------------------------------------- | - | `vault.created` | Vault created. | - | `vault.archived` | Vault archived. A `vault_credential.archived` event is also emitted for each underlying credential. | - | `vault.deleted` | Vault deleted. A `vault_credential.deleted` event is also emitted for each underlying credential. | - | `vault_credential.created` | Credential created. | - | `vault_credential.archived` | Credential archived, either directly or as a result of vault archival. | - | `vault_credential.deleted` | Credential deleted, either directly or as a result of vault deletion. | - | `vault_credential.refresh_failed` | An `mcp_oauth` credential cannot be refreshed (invalid refresh token, or irrecoverable error from the OAuth server). | + | Event | Trigger | + | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `vault.created` | Vault created. | + | `vault.archived` | Vault archived. A `vault_credential.archived` event is also emitted for each underlying credential. | + | `vault.deleted` | Vault deleted. A `vault_credential.deleted` event is also emitted for each underlying credential. There is no object left to fetch, so treat the event itself as final. | + | `vault_credential.created` | Credential created. | + | `vault_credential.archived` | Credential archived, either directly or as a result of vault archival. | + | `vault_credential.deleted` | Credential deleted, either directly or as a result of vault deletion. There is no object left to fetch, so treat the event itself as final. | + | `vault_credential.refresh_failed` | An `mcp_oauth` credential cannot be refreshed (invalid refresh token, or irrecoverable error from the OAuth server). | @@ -56,7 +56,7 @@ Webhook events return the event `type` and `id`, not the full object. When you r | `deployment.updated` | Deployment properties changed (for example, its schedule was updated). | | `deployment.paused` | Deployment paused, either by request or automatically when a scheduled run fails with an unrecoverable error, such as an archived subagent or an archived environment. Recoverable failures, including rate limits, don't pause the deployment. See [Failure behavior](/docs/en/managed-agents/scheduled-deployments#failure-behavior). | | `deployment.unpaused` | Deployment unpaused, resuming its schedule. | - | `deployment.archived` | Deployment archived, either directly or as a result of agent archival or deletion. | + | `deployment.archived` | Deployment archived, either directly or as a result of its agent being archived or deleted. | | `deployment.deleted` | Deployment permanently deleted. There is no object left to fetch, so treat the event itself as final. | @@ -67,6 +67,27 @@ Webhook events return the event `type` and `id`, not the full object. When you r | `deployment_run.succeeded` | A scheduled run created its session. The event carries the same `data.id` (the run ID) as the run's `deployment_run.started` event. To follow the session's work, subscribe to its session events (the Session events tab), or fetch the [deployment run](/docs/en/managed-agents/scheduled-deployments#deployment-runs) for its `session_id`. | | `deployment_run.failed` | A scheduled run did not create a session. The event carries the same `data.id` as the run's `deployment_run.started` event. Fetch the [deployment run](/docs/en/managed-agents/scheduled-deployments#deployment-runs) for the error details. | + + + | Event | Trigger | + | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | + | `environment.created` | Environment created. | + | `environment.updated` | Environment updated with at least one changed field. A no-op update emits nothing. | + | `environment.archived` | Environment archived. Re-archiving an already-archived environment emits nothing. | + | `environment.deleted` | Environment deleted, including delete of an already-archived environment. There is no object left to fetch, so treat the event itself as final. | + + An environment's [work items](/docs/en/managed-agents/self-hosted-sandboxes) emit no webhook events. + + + + | Event | Trigger | + | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `memory_store.created` | Memory store created, either by you or by an Anthropic-operated process that clones one of your existing stores. | + | `memory_store.archived` | Memory store archived. Re-archiving an already-archived store emits nothing. | + | `memory_store.deleted` | Memory store deleted, including delete of an already-archived store. Deleting a store cascades to its memories and memory versions without emitting per-memory events; the single `memory_store.deleted` event is the signal. There is no object left to fetch, so treat the event itself as final. | + + Individual [memories](/docs/en/managed-agents/memory) and memory versions emit no webhook events. + ## Register an endpoint @@ -76,12 +97,12 @@ Visit **Manage > Webhooks** in [Console](https://platform.claude.com/settings/wo A webhook endpoint consists of: * **URL:** Must be HTTPS on port 443 with a publicly resolvable hostname. -* **Event types:** The list of `data.type` values this endpoint receives. An endpoint only receives events it's subscribed to, plus test events (see [Delivery behavior](#delivery-behavior)). +* **Event types:** The list of `data.type` values this endpoint receives. An endpoint only receives events it's subscribed to. * **Signing secret:** A 32-byte `whsec_`-prefixed secret generated at creation. It's shown only once, so store it securely to verify webhook deliveries. ## Verify the signature -Every delivery carries an `X-Webhook-Signature` header. Use the SDK's `unwrap()` helper to verify the signature and parse the event in one step. It throws if the signature is invalid or the payload is more than five minutes old. +Every delivery carries the `webhook-id`, `webhook-timestamp`, and `webhook-signature` headers. Use the SDK's `unwrap()` helper to verify the signature and parse the event in one step. It throws if the signature is invalid or the payload is more than five minutes old. Set `ANTHROPIC_WEBHOOK_SIGNING_KEY` to the `whsec_`-prefixed secret shown at endpoint creation. @@ -310,14 +331,14 @@ Set `ANTHROPIC_WEBHOOK_SIGNING_KEY` to the `whsec_`-prefixed secret shown at end ## Handle an event -Parse the body, switch on `data.type`, and fetch the resource by ID. Return any `2xx` to acknowledge. Anything else (including `3xx`) counts as a failure and triggers a retry. +Parse the body, switch on `data.type`, and fetch the resource by ID. Return any `2xx` to acknowledge. Any other response counts against the endpoint: a `3xx` disables it immediately (redirects are never followed), while other failures are retried; see [Delivery behavior](#delivery-behavior) for the retry and auto-disable rules. -Every event payload has the same structure, including the event type, identifier, and timestamp of when the object was created. +Every event payload has the same structure, including the event type, identifier, and the timestamp of when the event occurred. ```json { "type": "event", - "id": "event_01ABC...", + "id": "whe_9d5c1f7e...", "created_at": "2026-03-18T14:05:22Z", "data": { "type": "session.status_idled", @@ -393,7 +414,20 @@ The top-level `event.id` is unique per event, not per delivery. If you receive t ## Delivery behavior -* **Ordering is not guaranteed.** `session.status_idled` may arrive before `session.outcome_evaluation_ended` even if the outcome was produced first. Use the `created_at` timestamp to sort if ordering matters. -* **Retries:** Anthropic retries at least once. The retry delivers the same `event.id`. -* **Redirects are not followed.** A `3xx` is treated as a failure. If your endpoint moves, update the URL in Console. -* **Auto-disable:** An endpoint is automatically set to `disabled` with a machine-readable `disabled_reason` after roughly 20 consecutive failed deliveries, or immediately if the hostname resolves to a private IP or the endpoint returns a redirect. Re-enable manually in Console after resolving the issue. +* **Duplicates:** An endpoint can receive the same event more than once, and every attempt delivers the same top-level `event.id` (the same value as the `webhook-id` header). Deduplicate on it. + +* **Subscription scope:** An event is delivered only to endpoints subscribed to its type at the moment it's emitted. An event emitted while no endpoint is subscribed to its type is never delivered, and subscribing later doesn't backfill it, so subscribe to an event type before you need it. + +* **Ordering is not guaranteed.** Events aren't delivered in the order they occurred: `session.status_idled` may arrive before `session.outcome_evaluation_ended` even if the outcome was produced first, and a `.deleted` event can arrive before the `.archived` event for the same resource. Drive your state from the resource you fetch, not from the order events arrive in. + +* **Retries:** For each endpoint and event, Anthropic makes up to three delivery attempts (a response that triggers auto-disable, described later in this section, is never retried) with jittered exponential backoff between 5 and 120 seconds. Every attempt delivers the same `event.id`. After the last attempt fails, the event is dropped: it isn't queued for later delivery and there's no signal that it was lost. Webhooks aren't a durable log, so if you need to observe every transition, reconcile by listing or fetching the resource through the API. + +* **Timestamps:** The `webhook-timestamp` header is stamped when a delivery attempt is signed and is regenerated on every retry, so retries aren't rejected by the SDK's freshness check. It's the clock for the delivery attempt, not for the event: use the event payload's `created_at` for when the event occurred. + +* **Auto-disable:** An endpoint is automatically set to `disabled` with a machine-readable `disabled_reason` in three cases: + + * The endpoint returns a `3xx` response. Redirects are never followed; this disables the endpoint immediately, on the first attempt, with the reason `auto-disabled: endpoint URL returned a redirect (3xx)`. If your endpoint moves, update the URL in Console and re-enable the endpoint. + * The endpoint's URL resolves to a non-public IP address when Anthropic connects. This disables the endpoint immediately, with the reason `auto-disabled: endpoint URL resolved to an invalid address`. + * Deliveries to the endpoint fail continuously for a sustained period, with the reason `auto-disabled after sustained delivery failures`. The trigger is how long the endpoint has been failing without interruption, not a delivery count. A single `2xx` resets the window, so one flaky event can't disable the endpoint. + + All three are reversible: re-enable the endpoint in Console after you resolve the issue. Events emitted while the endpoint was disabled aren't replayed. diff --git a/content/en/release-notes/overview.md b/content/en/release-notes/overview.md index b62d40789..e37a75ba4 100644 --- a/content/en/release-notes/overview.md +++ b/content/en/release-notes/overview.md @@ -10,6 +10,14 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C For updates to Claude Code, see the [complete CHANGELOG.md](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) in the `claude-code` repository. +### July 22, 2026 + +* You can now set an `effort` level on a Claude Managed Agents agent's model configuration. Pass `effort` inside the `model` object when you [create the agent](/docs/en/managed-agents/agent-setup#create-an-agent). See [Effort levels](/docs/en/build-with-claude/effort#effort-levels) for what each level does. +* Webhooks for Claude Managed Agents now cover the environment and memory store lifecycle: four `environment.*` event types and three `memory_store.*` event types. You can react to environment and memory store lifecycle changes without polling. See the Environment events and Memory store events tabs in [Subscribe to webhooks](/docs/en/managed-agents/webhooks#supported-event-types). +* When creating a Claude Managed Agents session, you can now [seed it with initial events](/docs/en/managed-agents/sessions#seed-the-session-with-initial-events). Pass `initial_events` on `POST /v1/sessions` with up to 50 `user.message` and `user.define_outcome` events. A non-empty list starts the agent loop in the same call, so you don't need a separate send-events request to start work. +* The `version` field is now optional when [updating a Claude Managed Agents agent](/docs/en/managed-agents/agent-setup#update-an-agent). Supply it for optimistic concurrency (a mismatch returns a 409 error), or omit it to apply the update unconditionally. See [Update semantics](/docs/en/managed-agents/agent-setup#update-semantics). +* Claude Managed Agents session thread event streams now support [event deltas](/docs/en/managed-agents/events-and-streaming#event-deltas). `GET /v1/sessions/{session_id}/threads/{thread_id}/stream` accepts the same `event_deltas[]` query parameter as the session-level stream, so you can preview a subagent's text as the model generates it. A connection previews only the thread it's reading. See [Preview session thread events](/docs/en/managed-agents/events-and-streaming#preview-session-thread-events). + ### July 17, 2026 * The legacy **Workbench** ([platform.claude.com/workbench](https://platform.claude.com/workbench)) in the Claude Console is being sunset with access ending on August 17, 2026. Saved prompts, variables, and evals are not supported in the updated [Workbench](https://platform.claude.com/playground). You can export any data you want to keep from the banner and under your **Organizational Settings**. For more, see [How do I use the Workbench?](https://support.claude.com/en/articles/8606378-how-do-i-use-the-workbench) in the Claude Help Center. @@ -43,7 +51,7 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C ### June 30, 2026 -* We've launched **Claude Sonnet 5** (`claude-sonnet-5`), the next generation of our Sonnet model family, at introductory pricing of $2 / $10 per MTok through August 31, 2026 (standard $3 / $15 thereafter). Claude Sonnet 5 supports a [1M token context window](/docs/en/build-with-claude/context-windows), 128k max output tokens, and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. Three behavior changes apply when migrating: [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is now on by default; manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is removed and returns a 400 error (it was deprecated on Sonnet 4.6); and setting sampling parameters (`temperature`, `top_p`, `top_k`) to non-default values returns a 400 error. Claude Sonnet 5 also uses a new tokenizer that produces approximately 30% more tokens for the same text. The exact increase depends on the content and workload shape. See [What's new in Claude Sonnet 5](/docs/en/about-claude/models/whats-new-sonnet-5) for details and migration guidance. For behavioral differences and model-specific prompting patterns, see [Prompting Claude Sonnet 5](/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5). +* We've launched **Claude Sonnet 5** (`claude-sonnet-5`), the next generation of our Sonnet model family, at introductory pricing of $2 / $10 per MTok through August 31, 2026 (standard $3 / $15 thereafter). Claude Sonnet 5 supports a [1M token context window](/docs/en/build-with-claude/context-windows), 128k max output tokens, and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. Three behavior changes apply when migrating: [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is now on by default; manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is removed and returns a 400 error (it was deprecated on Sonnet 4.6); and setting sampling parameters (`temperature`, `top_p`, `top_k`) to non-default values returns a 400 error. Claude Sonnet 5 also uses a new tokenizer that produces approximately 30% more tokens for the same text. The exact increase depends on the content and workload shape. See [What's new in Claude Sonnet 5](/docs/en/about-claude/models/whats-new-sonnet-5) for details and migration guidance. For behavioral differences and model-specific prompting patterns, see [Prompting Claude Sonnet 5](/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5). * Claude Managed Agents session event streams now support [event deltas](/docs/en/managed-agents/events-and-streaming#event-deltas). Opt in with the `event_deltas[]` query parameter on `GET /v1/sessions/{session_id}/events/stream`. The `event_start` and `event_delta` events preview an agent message's text as it's generated, before the complete `agent.message` event arrives. * [Listing sessions](/docs/en/managed-agents/session-operations#listing-sessions) for Claude Managed Agents now supports backward pagination. `GET /v1/sessions` returns a `prev_page` cursor alongside `next_page`; pass it as the `page` parameter to return to the previous page. See [Pagination](/docs/en/api/overview#pagination). * When creating a Claude Managed Agents session, you can now [override the agent's configuration for that session](/docs/en/managed-agents/sessions#override-agent-configuration-for-a-session). Pass `agent` with `type: "agent_with_overrides"` to replace the model, system prompt, tools, MCP servers, or skills for a single session. The agent itself is unchanged. @@ -85,12 +93,12 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C ### June 9, 2026 -* We've launched **Claude Fable 5** (`claude-fable-5`), our most capable widely released model, alongside **Claude Mythos 5** (`claude-mythos-5`) for Project Glasswing participants. Both models support a [1M token context window](/docs/en/build-with-claude/context-windows) by default, 128k max output tokens, and always-on [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking). See [Introducing Claude Fable 5 and Claude Mythos 5](/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) for capabilities, API changes, and availability. +* We've launched **Claude Fable 5** (`claude-fable-5`), our most capable widely released model, alongside **Claude Mythos 5** (`claude-mythos-5`) for Project Glasswing participants. Both models support a [1M token context window](/docs/en/build-with-claude/context-windows) by default, 128k max output tokens, and always-on [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost). See [Introducing Claude Fable 5 and Claude Mythos 5](/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) for capabilities, API changes, and availability. * Claude Fable 5 and Claude Mythos 5 use the tokenizer introduced with Claude Opus 4.7. Compared to models before Claude Opus 4.7, the same text produces roughly 30% more tokens. The exact increase depends on the content and workload shape. Use the [token counting API](/docs/en/build-with-claude/token-counting#token-counts-on-claude-fable-5) with `model: "claude-fable-5"` to measure your prompts under the new tokenizer. * Claude Fable 5 runs safety classifiers on requests and during response generation. When a classifier declines a request, the Messages API returns `stop_reason: "refusal"`. You are not billed for a request refused before any output is generated. An opt-in `fallbacks` parameter (in beta on the Claude API and Claude Platform on AWS; not supported on the Message Batches API) re-runs refused requests on another model, billed at the fallback model's rates. See [Handling stop reasons](/docs/en/build-with-claude/handling-stop-reasons). * The [`stop_details.category`](/docs/en/build-with-claude/refusals-and-fallback#refusal-response) field on refusal responses now includes `"reasoning_extraction"` on Claude Fable 5, returned when a request is blocked under Anthropic's Terms of Service restrictions on reverse engineering or duplicating model outputs. The existing `"cyber"` and `"bio"` categories are unchanged. No beta header is required. -* On Claude Fable 5 and Claude Mythos 5, [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) is the only thinking mode: `thinking: {"type": "disabled"}` is not supported, and manual extended thinking budgets and assistant prefill are not supported (both return a 400 error). See [Migrating from Claude Mythos Preview to Claude Mythos 5](/docs/en/about-claude/models/migration-guide#migrating-from-claude-mythos-preview). -* On Claude Fable 5 and Claude Mythos 5, `thinking.display` defaults to `"omitted"`, the same as Claude Opus 4.8, Claude Opus 4.7, and Claude Mythos Preview; set `display: "summarized"` to receive readable thinking summaries. The raw chain of thought is never returned; pass thinking blocks back unchanged in multi-turn conversations on the same model. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/adaptive-thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). +* On Claude Fable 5 and Claude Mythos 5, [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) is the only thinking mode: `thinking: {"type": "disabled"}` is not supported, and manual extended thinking budgets and assistant prefill are not supported (both return a 400 error). See [Migrating from Claude Mythos Preview to Claude Mythos 5](/docs/en/about-claude/models/migration-guide#migrating-from-claude-mythos-preview). +* On Claude Fable 5 and Claude Mythos 5, `thinking.display` defaults to `"omitted"`, the same as Claude Opus 4.8, Claude Opus 4.7, and Claude Mythos Preview; set `display: "summarized"` to receive readable thinking summaries. The raw chain of thought is never returned; pass thinking blocks back unchanged in multi-turn conversations on the same model. See [Thinking output on Claude Fable 5 and Claude Mythos 5](/docs/en/build-with-claude/thinking#thinking-output-on-claude-fable-5-and-claude-mythos-5). * Claude Fable 5 requires 30-day data retention and is not available under zero data retention. See [Model-specific data retention requirements](/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements). * Claude Managed Agents now supports [scheduled deployments](/docs/en/managed-agents/scheduled-deployments), letting you run sessions on a cron schedule without managing your own scheduler. * Claude Managed Agents vaults now support [environment variable credentials](/docs/en/managed-agents/vaults#add-a-credential), so you can securely inject secrets into the agent's sandbox for CLIs, SDKs, and other services that authenticate through environment variables. @@ -117,7 +125,7 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C * The [`stop_details`](/docs/en/build-with-claude/refusals-and-fallback#refusal-response) field on refusal responses is now publicly documented; it returns a `category` (`cyber`, `bio`, or `null`) and a human-readable `explanation`, so your application can route different classes of refusal to the right next step. No beta header is required. * On Claude Opus 4.8, the [effort parameter](/docs/en/build-with-claude/effort) defaults to `high` across all surfaces, including Claude Code and the Messages API. * On Claude Opus 4.8, the minimum cacheable prompt length for [prompt caching](/docs/en/build-with-claude/prompt-caching) is 1,024 tokens, lower than on Claude Opus 4.7. -* With [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) enabled, Claude Opus 4.8 triggers reasoning only when a turn needs it, reducing wasted thinking tokens compared to Claude Opus 4.7 at the same effort level. +* With [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) enabled, Claude Opus 4.8 triggers reasoning only when a turn needs it, reducing wasted thinking tokens compared to Claude Opus 4.7 at the same effort level. * Claude Opus 4.8 supports [high-resolution image input](/docs/en/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7) (up to 2576 pixels on the long edge), same as Claude Opus 4.7. * [Task budgets](/docs/en/build-with-claude/task-budgets) now support Claude Opus 4.8. * The [advisor tool](/docs/en/agents-and-tools/tool-use/advisor-tool) now supports Claude Opus 4.8. @@ -132,14 +140,14 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C ### May 27, 2026 -* The Messages API response now includes [`usage.output_tokens_details.thinking_tokens`](/docs/en/build-with-claude/extended-thinking#working-with-thinking-budgets), reporting how many of the billed output tokens were extended thinking. When streaming, the breakdown appears only on the final `message_delta` event. No beta header is required. +* The Messages API response now includes [`usage.output_tokens_details.thinking_tokens`](/docs/en/build-with-claude/extended-thinking#budget-rules-and-tuning), reporting how many of the billed output tokens were extended thinking. When streaming, the breakdown appears only on the final `message_delta` event. No beta header is required. ### May 19, 2026 * [MCP tunnels](/docs/en/agents-and-tools/mcp-tunnels/overview) is now available as a research preview, so you can connect to MCP servers in your private network. * Self-hosted sandboxes are now available for Claude Managed Agents, as an alternative to running tool execution in Anthropic's infrastructure. See [Self-hosted sandboxes](/docs/en/managed-agents/self-hosted-sandboxes). * With Claude Managed Agents, you can now update the agent's MCP server and tool configurations associated with an active session. -* With Claude Managed Agents, large outputs from `agent_toolset` and MCP tools exceeding 100K tokens are now automatically spilled to a file in the sandbox. The model receives a truncated preview with the file path and can read the full content from there. +* With Claude Managed Agents, large outputs from `agent_toolset` and MCP tools exceeding 100K characters (about 25K tokens) are now automatically spilled to a file in the sandbox. The model receives a truncated preview with the file path and can read the full content from there. ### May 18, 2026 @@ -163,7 +171,7 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C * Claude Managed Agents vault credential background refresh is now supported for `mcp_oauth` credentials. See [Authenticate with vaults](/docs/en/managed-agents/vaults). * Webhooks for Claude Managed Agents are now supported. Webhook event types include session and vault lifecycle events. See [Subscribe to webhooks](/docs/en/managed-agents/webhooks). * Additional filtering and sorting options are now supported for Claude Managed Agents. Sessions can be filtered by status, and events can be filtered by type. Events can now be filtered by creation time. -* [Dreams](/docs/en/managed-agents/dreams) for Claude Managed Agents are now available as a research preview. A dream reads an existing memory store alongside past session transcripts and produces a reorganized output memory store with duplicates merged, stale entries replaced, and new insights surfaced. Dreams require the `dreaming-2026-04-21` beta header in addition to the standard `managed-agents-2026-04-01` header. [Request access](https://claude.com/form/claude-managed-agents) to try it. +* [Dreams](/docs/en/managed-agents/dreams) for Claude Managed Agents are now available as a research preview. A dream reads an existing memory store alongside past session transcripts and produces a reorganized output memory store with duplicates merged, stale entries replaced, and new insights surfaced. Dream endpoints are gated by the `dreaming-2026-04-21` beta header. [Request access](https://claude.com/form/claude-managed-agents) to try it. ### May 4, 2026 @@ -226,7 +234,7 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C ### March 16, 2026 -* We've launched the `display` field for extended thinking, letting you omit thinking content from responses for faster streaming. Set `thinking.display: "omitted"` to receive thinking blocks with an empty `thinking` field and the `signature` preserved for multi-turn continuity. Billing is unchanged. Learn more in [Controlling thinking display](/docs/en/build-with-claude/extended-thinking#controlling-thinking-display). +* We've launched the `display` field for extended thinking, letting you omit thinking content from responses for faster streaming. Set `thinking.display: "omitted"` to receive thinking blocks with an empty `thinking` field and the `signature` preserved for multi-turn continuity. Billing is unchanged. Learn more in [Controlling thinking display](/docs/en/build-with-claude/thinking#controlling-thinking-display). ### March 13, 2026 @@ -253,7 +261,7 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C ### February 5, 2026 -* We've launched [Claude Opus 4.6](https://www.anthropic.com/news/claude-opus-4-6), our most intelligent model for complex agentic tasks and long-horizon work. Opus 4.6 recommends [adaptive thinking](/docs/en/build-with-claude/adaptive-thinking) (`thinking: {type: "adaptive"}`); manual thinking (`type: "enabled"` with `budget_tokens`) is deprecated. Opus 4.6 does not support prefilling assistant messages. Learn more in [What's new in Claude 4.6](/docs/en/about-claude/models/whats-new-claude-4-6). +* We've launched [Claude Opus 4.6](https://www.anthropic.com/news/claude-opus-4-6), our most intelligent model for complex agentic tasks and long-horizon work. Opus 4.6 recommends [adaptive thinking](/docs/en/build-with-claude/thinking-steering-and-cost) (`thinking: {type: "adaptive"}`); manual thinking (`type: "enabled"` with `budget_tokens`) is deprecated. Opus 4.6 does not support prefilling assistant messages. Learn more in [What's new in Claude 4.6](/docs/en/about-claude/models/whats-new-claude-4-6). * The [effort parameter](/docs/en/build-with-claude/effort) is now generally available (no beta header required) and supports Claude Opus 4.6. Effort replaces `budget_tokens` for controlling thinking depth on new models. * We've launched the [compaction API](/docs/en/build-with-claude/compaction) in beta, providing server-side context summarization for effectively infinite conversations. Available on Opus 4.6. * We've introduced [data residency controls](/docs/en/manage-claude/data-residency), allowing you to specify where model inference runs with the `inference_geo` parameter. US-only inference is available at 1.1x pricing for models released after February 1, 2026. @@ -442,7 +450,7 @@ Updates to the Claude Platform, including the Claude API, client SDKs, and the C * We've launched [Claude Opus 4 and Claude Sonnet 4](https://www.anthropic.com/news/claude-4), our latest models with extended thinking capabilities. Learn more in [Models overview](/docs/en/about-claude/models). * The default behavior of [extended thinking](/docs/en/build-with-claude/extended-thinking) in Claude 4 models returns a summary of Claude's full thinking process, with the full thinking encrypted and returned in the `signature` field of `thinking` block output. -* We've launched [interleaved thinking](/docs/en/build-with-claude/extended-thinking#interleaved-thinking) in public beta, a feature that enables Claude to think in between tool calls. To enable interleaved thinking, use the [beta header](/docs/en/api/beta-headers) `interleaved-thinking-2025-05-14`. +* We've launched [interleaved thinking](/docs/en/build-with-claude/thinking#interleaved-thinking) in public beta, a feature that enables Claude to think in between tool calls. To enable interleaved thinking, use the [beta header](/docs/en/api/beta-headers) `interleaved-thinking-2025-05-14`. * We've launched the [Files API](/docs/en/build-with-claude/files) in public beta, enabling you to upload files and reference them in the Messages API and code execution tool. * We've launched the [Code execution tool](/docs/en/agents-and-tools/tool-use/code-execution-tool) in public beta, a tool that enables Claude to execute Python code in a secure, sandboxed environment. * We've launched the [MCP connector](/docs/en/agents-and-tools/mcp-connector) in public beta, a feature that allows you to connect to remote MCP servers directly from the Messages API. diff --git a/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb b/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb new file mode 100644 index 000000000..f4a8c3208 --- /dev/null +++ b/content/github/claude-cookbooks/managed_agents/CMA_watch_subagents_live.ipynb @@ -0,0 +1,373 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "7fb27b941602401d91542211134fc71a", + "metadata": {}, + "source": "# Multiagent: watch a curriculum team work in real time\n\nA coordinator that delegates to subagents has an observability gap. The session-level stream previews the primary thread's text as the model generates it, but a subagent's output only becomes visible after its whole turn is buffered. If the researcher runs for two minutes, you watch nothing for two minutes.\n\nThis notebook closes that gap, using four Managed Agents API features together:\n\n- **Per-thread delta streaming.** Each session thread's stream accepts the same `event_deltas` parameter as the session-level stream, so a subagent's text previews live on its own stream.\n- **Initial events on session create.** `sessions.create` accepts `initial_events`, so a session starts working in the same call that creates it.\n- **Effort on the agent's model.** `model.effort` sets how hard Claude works on each inference call, per agent. In a team, that's a per-role cost lever.\n- **Optional version on agent update.** `agents.update` treats the current version as an optional concurrency key rather than a required one.\n\nThe team you'll build plans a one-week 7th-grade science unit: a coordinator delegates to a standards researcher (web search, high effort) and a lesson writer (no web access), then assembles the unit plan. If the `multiagent` coordinator pattern is new to you, start with [`CMA_coordinate_specialist_team.ipynb`](CMA_coordinate_specialist_team.ipynb). This notebook builds on those shapes." + }, + { + "cell_type": "markdown", + "id": "acae54e37e7d407bbb7b55eff062a284", + "metadata": {}, + "source": "## 1. Set up the client\n\nThese features ride the standard `managed-agents-2026-04-01` beta header. The SDK calls in this notebook (`initial_events` on `sessions.create`, `event_deltas` on thread streams, `model.effort`) need `anthropic>=0.118.0`." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9a63283cbaf04dbcab1f6479b197f3a8", + "metadata": {}, + "outputs": [], + "source": [ + "%%capture\n", + "%pip install -qU \"anthropic>=0.118.0\" python-dotenv" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8dd0d8092fe74a7c96281538738b07e2", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "import anthropic\n", + "from dotenv import load_dotenv\n", + "\n", + "load_dotenv()\n", + "\n", + "BETAS = [\"managed-agents-2026-04-01\"]\n", + "MODEL = os.environ.get(\"COOKBOOK_MODEL\", \"claude-sonnet-5\")\n", + "client = anthropic.Anthropic()" + ] + }, + { + "cell_type": "markdown", + "id": "72eea5119410473aa328ad9291626812", + "metadata": {}, + "source": "## 2. Create the two specialists\n\nThe researcher gets web search and a `high` effort level, because standards alignment is judgment-heavy work: it has to weigh which performance expectations actually fit the unit rather than list everything it finds. `effort` goes inside the `model` object and accepts `low`, `medium`, `high`, `xhigh`, or `max` (as a bare string or `{\"type\": \"high\"}`). Not every model accepts every level, and an invalid combination is rejected at create time.\n\nEffort is also the team's main cost lever: higher levels let Claude spend more tokens per inference call, lower levels cap that spend. Because it's set per agent, you buy depth only for the roles that need it. In a larger team, a formatting or triage role could drop to `low` without touching the researcher's budget.\n\nSet effort on the agent, not per session: an `effort` level inside a per-session `model` override isn't applied.\n\nThe web tools' configuration also accepts allowed- and blocked-domain lists, so a production deployment can fence this researcher to the standards sites it should trust. See [Configuring the toolset](https://platform.claude.com/docs/en/managed-agents/tools#configuring-the-toolset) for the config shape." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8edb47106e1a46a883d545849b8ab81b", + "metadata": {}, + "outputs": [], + "source": [ + "RESEARCHER_SYSTEM = \"\"\"You research US middle school science standards.\n", + "Given a unit topic and grade level, use web search to find:\n", + "- The two or three NGSS performance expectations the unit should target\n", + "- What students are expected to already know, and where the topic leads next\n", + "- Two or three documented student misconceptions for the topic\n", + "Return via send_to_parent:\n", + "{\"standards\": [...], \"prior_knowledge\": ..., \"leads_to\": ...,\n", + " \"misconceptions\": [...], \"sources\": [...]}\"\"\"\n", + "\n", + "standards_researcher = client.beta.agents.create(\n", + " name=\"standards_researcher\",\n", + " description=\"Finds the NGSS standards and documented misconceptions for a science topic.\",\n", + " model={\"id\": MODEL, \"effort\": \"high\"},\n", + " system=RESEARCHER_SYSTEM,\n", + " tools=[\n", + " {\n", + " \"type\": \"agent_toolset_20260401\",\n", + " \"configs\": [{\"name\": \"web_search\"}, {\"name\": \"web_fetch\"}],\n", + " }\n", + " ],\n", + " betas=BETAS,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "10185d26023b46108eb7d9f57d49d2b3", + "metadata": {}, + "source": [ + "The lesson writer works only from what the coordinator hands it. Disabling the web tools keeps its lessons grounded in the researcher's vetted findings instead of whatever a fresh search returns." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8763a12b2bbd4a93a75aff182afb95dc", + "metadata": {}, + "outputs": [], + "source": [ + "WRITER_SYSTEM = \"\"\"You write middle school lesson plans.\n", + "You will be given a topic, grade level, target standards, and known misconceptions.\n", + "Draft five 45-minute lessons, one per day. For each day give:\n", + "- Objective (tied to a target standard)\n", + "- Warm-up (5 min)\n", + "- Main activity (30 min)\n", + "- Exit ticket (one question that probes a misconception where possible)\n", + "Return via send_to_parent: {\"days\": [{\"day\": 1, \"objective\": ..., \"warm_up\": ...,\n", + "\"main_activity\": ..., \"exit_ticket\": ...}, ...]}\"\"\"\n", + "\n", + "lesson_writer = client.beta.agents.create(\n", + " name=\"lesson_writer\",\n", + " description=\"Drafts a day-by-day lesson sequence from standards and misconceptions.\",\n", + " model={\"id\": MODEL},\n", + " system=WRITER_SYSTEM,\n", + " tools=[\n", + " {\n", + " \"type\": \"agent_toolset_20260401\",\n", + " \"configs\": [\n", + " {\"name\": \"web_search\", \"enabled\": False},\n", + " {\"name\": \"web_fetch\", \"enabled\": False},\n", + " ],\n", + " }\n", + " ],\n", + " betas=BETAS,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "7623eae2785240b9bd12b16a66d81610", + "metadata": {}, + "source": [ + "The create response echoes the resolved model configuration, including fields you omitted. The researcher shows the `high` you set, and the writer shows the model's default effort. If `effort` comes back `None`, your organization's beta header doesn't carry the feature yet: the field is dropped, not rejected, so this echo is the place to catch it." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7cdc8c89c7104fffa095e18ddfef8986", + "metadata": {}, + "outputs": [], + "source": [ + "for agent in (standards_researcher, lesson_writer):\n", + " effort = getattr(agent.model, \"effort\", None)\n", + " print(f\"{agent.name}: {agent.id} v{agent.version} effort={effort and effort.type}\")" + ] + }, + { + "cell_type": "markdown", + "id": "b118ea5561624da68c537baed56e602f", + "metadata": {}, + "source": "## 3. Create the coordinator\n\nThe coordinator carries the `multiagent` roster. The spawn and delegation tools are injected from the roster automatically, and the roster pins each child to the version that's current right now. That pinning matters later, when you update the researcher." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "938c804e27f84196a10c8828c723f798", + "metadata": {}, + "outputs": [], + "source": "COORDINATOR_SYSTEM = \"\"\"You plan one-week teaching units.\nGiven a topic and grade level:\n1. Send the topic and grade to standards_researcher.\n2. When the researcher reports back, send the topic, grade, target standards, and\nmisconceptions to lesson_writer.\n3. Write /mnt/session/outputs/unit_plan.md with sections: Overview, Standards alignment,\nDay-by-day plan (from the writer), Misconceptions to watch for, Materials.\nKeep it under three pages. To revise the plan, rewrite the whole file with the write\ntool rather than patching it with edit. While a subagent is working, wait silently: no\nstatus commentary until its report arrives.\"\"\"\n\ncoordinator = client.beta.agents.create(\n name=\"unit_planner\",\n description=\"Plans one-week teaching units by delegating research and drafting.\",\n model={\"id\": MODEL},\n system=COORDINATOR_SYSTEM,\n tools=[{\"type\": \"agent_toolset_20260401\"}],\n multiagent={\n \"type\": \"coordinator\",\n \"agents\": [standards_researcher.id, lesson_writer.id],\n },\n betas=BETAS,\n)\nprint(f\"{coordinator.name}: {coordinator.id} v{coordinator.version}\")" + }, + { + "cell_type": "markdown", + "id": "504fb2a444614c0babb325280ed9130a", + "metadata": {}, + "source": "## 4. Start the session with its first message inline\n\nWithout `initial_events`, starting a session takes two calls: create it, then post a `user.message`. Seeding the first message at create time collapses that into one. The array accepts up to 50 `user.message` and `user.define_outcome` events, processed in order, and validation is all-or-nothing: if any event fails, no session is created. A non-empty list starts the agent loop in the same call, so the session comes back already moving toward `running`.\n\nIf you want the unit plan graded against a rubric, add a single `user.define_outcome` event here (it must include a `rubric`, and only one is allowed per create). [`CMA_verify_with_outcome_grader.ipynb`](CMA_verify_with_outcome_grader.ipynb) covers that loop." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "59bbdb311c014d738909a11f9e486628", + "metadata": {}, + "outputs": [], + "source": "import time\n\nenv = client.beta.environments.create(\n name=\"curriculum-studio\",\n config={\"type\": \"anthropic_cloud\", \"networking\": {\"type\": \"unrestricted\"}},\n betas=BETAS,\n)\n\nsession = client.beta.sessions.create(\n agent=coordinator.id,\n environment_id=env.id,\n title=\"Unit plan: water cycle, grade 7\",\n initial_events=[\n {\n \"type\": \"user.message\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"Plan a one-week unit on the water cycle for 7th grade science. \"\n \"Classes are 45 minutes. Write the plan to /mnt/session/outputs/unit_plan.md.\",\n }\n ],\n }\n ],\n betas=BETAS,\n)\n\ndeadline = time.monotonic() + 60\nwhile session.status == \"idle\" and time.monotonic() < deadline:\n time.sleep(1)\n session = client.beta.sessions.retrieve(session.id, betas=BETAS)\n\nprint(f\"{session.id}: {session.status}\")\nif session.status == \"idle\":\n events = client.beta.sessions.events.list(session.id, limit=1, betas=BETAS)\n if next(iter(events), None) is None:\n raise RuntimeError(\n \"The session has no events: your organization's beta header does not carry \"\n \"initial_events yet. The field is dropped at the gateway, not rejected.\"\n )\n raise RuntimeError(\n \"The seeded message is in the event log but the session is still idle after 60s. \"\n \"Re-run this cell to keep waiting.\"\n )" + }, + { + "cell_type": "markdown", + "id": "b43b363d81ae4b689946ece5c682cd59", + "metadata": {}, + "source": "## 5. Watch the whole team live\n\nPreviews are thread-scoped by design. A connection previews only the thread it reads: the session-level stream previews the primary thread, and a child's previews appear only on that child's own stream at `GET /v1/sessions/{session_id}/threads/{thread_id}/stream`. So the pattern is one stream per thread: read the session-level stream for the coordinator, and every time a `session.thread_created` event announces a child (it carries `session_thread_id` and `agent_name`), attach a watcher to that thread's stream in a background thread.\n\nTwo rules shape the code:\n\n- **The preview is a scratch buffer, the buffered event is the record.** Deltas are best-effort and may stop under load. The buffered `agent.message` that follows carries the complete content. The SDK's `accumulate_managed_agents_event` helper folds `event_start`, `event_delta`, and the buffered event into one snapshot, replacing the preview when the record arrives. Run one accumulator per stream connection.\n- **No replay.** A connection opened after a model request started receives no deltas for that in-flight request, and a reconnect never replays missed deltas. Attaching the watcher as soon as `session.thread_created` arrives catches the child's work from its first response onward.\n\nEach watcher exits on `session.thread_status_idle`, the event emitted when the child's turn finishes." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8a65eabff63a45729fe45fb5ade58bdc", + "metadata": {}, + "outputs": [], + "source": [ + "import threading\n", + "\n", + "from anthropic.lib.sessions import accumulate_managed_agents_event\n", + "\n", + "print_lock = threading.Lock()\n", + "current_speaker = None\n", + "reconciliations = []\n", + "\n", + "\n", + "def say(speaker, text):\n", + " \"\"\"Print streamed text, labeling it whenever the speaker changes.\"\"\"\n", + " global current_speaker\n", + " with print_lock:\n", + " if speaker != current_speaker:\n", + " print(f\"\\n\\n=== {speaker} ===\")\n", + " current_speaker = speaker\n", + " print(text, end=\"\", flush=True)\n", + "\n", + "\n", + "def text_of(event):\n", + " if event is None:\n", + " return \"\"\n", + " return \"\".join(block.text for block in event.content if block.type == \"text\")\n", + "\n", + "\n", + "def fold_preview(snapshot, ev, speaker):\n", + " \"\"\"Fold one preview event into the speaker's snapshot and return the new snapshot.\n", + "\n", + " Prints delta text as it arrives. When the buffered record lands, logs a\n", + " reconciliation row comparing it against the accumulated preview. The id\n", + " check guards the case where every delta for a message was shed: the\n", + " snapshot then still holds the previous message, not a preview of this one.\n", + " \"\"\"\n", + " if ev.type == \"event_delta\":\n", + " say(speaker, ev.delta.content.text)\n", + " elif ev.type == \"agent.message\":\n", + " preview = text_of(snapshot) if snapshot and snapshot.id == ev.id else \"\"\n", + " final = text_of(ev)\n", + " reconciliations.append((speaker, len(preview), len(final), final.startswith(preview)))\n", + " return accumulate_managed_agents_event(snapshot, ev)\n", + "\n", + "\n", + "def watch_child(thread_id, agent_name):\n", + " \"\"\"Stream one child thread, previewing its text as the model generates it.\"\"\"\n", + " snapshot = None\n", + " with client.beta.sessions.threads.events.stream(\n", + " thread_id,\n", + " session_id=session.id,\n", + " event_deltas=[\"agent.message\"],\n", + " betas=BETAS,\n", + " ) as thread_stream:\n", + " for ev in thread_stream:\n", + " if ev.type in (\"event_start\", \"event_delta\", \"agent.message\"):\n", + " snapshot = fold_preview(snapshot, ev, agent_name)\n", + " elif ev.type == \"agent.tool_use\":\n", + " detail = ev.input.get(\"query\", \"\") if ev.name == \"web_search\" else \"\"\n", + " say(agent_name, f\"\\n[{ev.name}] {detail}\")\n", + " elif ev.type in (\"session.thread_status_idle\", \"session.thread_status_terminated\"):\n", + " break" + ] + }, + { + "cell_type": "markdown", + "id": "c3933fab20d04ec698c2621248eb3be0", + "metadata": {}, + "source": "The main loop feeds the same `fold_preview` for the coordinator's text, plus the coordination events that only appear on the primary thread: `session.thread_created` when a child spawns, `agent.thread_message_sent` when the coordinator hands off a task, and `agent.thread_message_received` when a child reports back. A tool call cross-posted from a child thread carries `session_thread_id`, so the loop skips those: the child's own watcher shows them.\n\nThe loop ends on any `session.status_idle`, printing the stop reason when it isn't `end_turn`: a session waiting on a tool confirmation or out of retries should end the cell, not hang it. Both loops also break on the terminated status events, so an unrecoverable session error ends the cell instead of leaving the stream open." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4dd4641cc4064e0191573fe9c69df29b", + "metadata": {}, + "outputs": [], + "source": "watchers = []\nsnapshot = None\n\nwith client.beta.sessions.events.stream(\n session.id, event_deltas=[\"agent.message\"], betas=BETAS\n) as stream:\n for ev in stream:\n if ev.type in (\"event_start\", \"event_delta\", \"agent.message\"):\n snapshot = fold_preview(snapshot, ev, \"unit_planner\")\n elif ev.type == \"session.thread_created\":\n say(\"unit_planner\", f\"\\n[spawned {ev.agent_name}]\")\n watcher = threading.Thread(\n target=watch_child,\n args=(ev.session_thread_id, ev.agent_name),\n daemon=True,\n )\n watcher.start()\n watchers.append(watcher)\n elif ev.type == \"agent.thread_message_sent\":\n say(\"unit_planner\", f\"\\n[task sent to {ev.to_agent_name}]\")\n elif ev.type == \"agent.thread_message_received\":\n say(\"unit_planner\", f\"\\n[{ev.from_agent_name} reported back]\")\n elif ev.type == \"agent.tool_use\" and not ev.session_thread_id:\n # session_thread_id marks a call cross-posted from a child thread;\n # that child's watcher already shows it\n say(\"unit_planner\", f\"\\n[{ev.name}]\")\n elif ev.type == \"session.status_terminated\":\n break\n elif ev.type == \"session.status_idle\":\n if ev.stop_reason.type != \"end_turn\":\n say(\"unit_planner\", f\"\\n[idle without end_turn: {ev.stop_reason.type}]\")\n break\n\nfor watcher in watchers:\n watcher.join(timeout=60)\nif any(watcher.is_alive() for watcher in watchers):\n print(\"\\n[a child stream is still open after the join timeout]\")" + }, + { + "cell_type": "markdown", + "id": "8309879909854d7188b41380fd92a7c3", + "metadata": {}, + "source": "If a stream connects but only ever delivers buffered events, the `event_deltas` parameter was stripped rather than rejected: that's the signature of a beta header that doesn't carry the feature. A 404 on the thread stream URL means a wrong path or a missing managed-agents beta header (the thread endpoints are beta-gated). The path is `/threads/{thread_id}/stream`, not `/threads/{thread_id}/events/stream`.\n\nThe streaming contract in full (delta shapes, the reconciliation guarantees, and the troubleshooting table) is in [events and streaming](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#event-deltas)." + }, + { + "cell_type": "markdown", + "id": "3ed186c9a28b402fb0bc4494df01f08d", + "metadata": {}, + "source": [ + "## 6. Check the preview against the record\n", + "\n", + "Concatenating a preview's deltas gives a prefix of the buffered event's text: a prefix, not necessarily the whole text, because deltas may be shed under load. That guarantee is what makes reconciliation a single replace. Each row below is one buffered `agent.message`, compared against the preview the accumulator had built when the record arrived." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cb1e1581032b452c9409d6c6813c49d1", + "metadata": {}, + "outputs": [], + "source": [ + "for agent_name, preview_chars, final_chars, is_prefix in reconciliations:\n", + " print(\n", + " f\"{agent_name:22s} preview {preview_chars:5d} chars | \"\n", + " f\"final {final_chars:5d} chars | preview is prefix: {is_prefix}\"\n", + " )" + ] + }, + { + "cell_type": "markdown", + "id": "379cbbc1e968416e875cc15c1202d7eb", + "metadata": {}, + "source": "## 7. Read the unit plan\n\nThe coordinator's prompt says to write the plan with whole-file `write` calls, so the full document is in the event log and the last `write` to the file is the final version. If your own agent patches files with `edit`, read the file itself instead of replaying writes." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "277c27b1587741f2af2001be3712ef0d", + "metadata": {}, + "outputs": [], + "source": "unit_plan = \"\"\nfor ev in client.beta.sessions.events.list(session.id, limit=1000, betas=BETAS):\n if (\n ev.type == \"agent.tool_use\"\n and ev.name == \"write\"\n and ev.input.get(\"file_path\", \"\").endswith(\"unit_plan.md\")\n ):\n unit_plan = ev.input[\"content\"] # keep the last write, in case of revisions\n\n# Show the structure rather than the full plan. Print unit_plan to read it all.\nfor line in unit_plan.splitlines():\n if line.startswith(\"#\"):\n print(line)" + }, + { + "cell_type": "markdown", + "id": "db7b79bc585a40fcaf58bf750017e135", + "metadata": {}, + "source": "## 8. Ship a prompt change without the version round trip\n\nSuppose review feedback says every alignment claim needs the standard's code next to it. `agents.update` treats the agent's current `version` as an optional concurrency key: omit it and the update applies unconditionally, with the server incrementing the version for you. A provisioning script doesn't have to read the agent just to write it back.\n\nSupply `version` when concurrent writers are possible (a mismatch returns a 409, so you always update from a known state). Omit it when a single flow owns the agent, like a CI job that syncs checked-in agent definitions." + }, + { + "cell_type": "code", + "execution_count": null, + "id": "916684f9a58a4a2aa5f864670399430d", + "metadata": {}, + "outputs": [], + "source": [ + "updated = client.beta.agents.update(\n", + " standards_researcher.id,\n", + " system=RESEARCHER_SYSTEM\n", + " + \"\\nCite the performance expectation code (for example MS-ESS2-4) next to every \"\n", + " \"alignment claim.\",\n", + " betas=BETAS,\n", + ")\n", + "print(f\"standards_researcher v{standards_researcher.version} -> v{updated.version}\")" + ] + }, + { + "cell_type": "markdown", + "id": "1671c31a24314836a5b85d7ef7fbf015", + "metadata": {}, + "source": [ + "One caveat for multiagent setups: the coordinator's roster pinned the researcher's version at coordinator create time, so existing coordinators keep delegating to the old version. Update the coordinator (its `multiagent` field, or any field) to re-resolve the roster against the latest child versions." + ] + }, + { + "cell_type": "markdown", + "id": "33b0902fd34d4ace834912fa1002cf8e", + "metadata": {}, + "source": [ + "## 9. Clean up" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f6fa52606d8c4a75a9b52967216f8f3f", + "metadata": {}, + "outputs": [], + "source": [ + "from utilities import wait_for_idle_status\n", + "\n", + "wait_for_idle_status(client, session.id)\n", + "client.beta.sessions.archive(session.id, betas=BETAS)\n", + "client.beta.environments.archive(env.id, betas=BETAS)\n", + "print(\"archived\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "anthropic-cookbook", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.12.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/content/github/claude-cookbooks/managed_agents/README.md b/content/github/claude-cookbooks/managed_agents/README.md index cc4661ed6..c246ce039 100644 --- a/content/github/claude-cookbooks/managed_agents/README.md +++ b/content/github/claude-cookbooks/managed_agents/README.md @@ -37,6 +37,7 @@ it introduces every API shape the others build on. | [`CMA_operate_in_production.ipynb`](CMA_operate_in_production.ipynb) | Production setup: MCP toolsets, vaults for per-end-user credentials, the `session.status_idled` webhook pattern for HITL without long-lived connections, and the resource lifecycle CRUD verbs. | | [`CMA_remember_user_preferences.ipynb`](CMA_remember_user_preferences.ipynb) | Memory stores: a shopping agent that learns a customer's preferences in one session and recalls them in the next. Covers `memory_stores.create`, the `resources` attachment with per-attachment `instructions`, inspecting and seeding memories from your own application, and combining a per-customer read-write store with a brand-wide read-only store. | | [`CMA_coordinate_specialist_team.ipynb`](CMA_coordinate_specialist_team.ipynb) | Heterogeneous team via the `multiagent` coordinator config: a coordinator runs three specialists (web-search researcher, file-reading librarian, rules-based pricer) with scoped toolsets to assemble a sales proposal. Covers the `multiagent` field, the `thread_created` / `thread_message_received` event types, and why per-role tool scoping matters. | +| [`CMA_watch_subagents_live.ipynb`](CMA_watch_subagents_live.ipynb) | A curriculum-planning team you can watch in real time. Covers per-thread `event_deltas` so subagent text streams live, `initial_events` on session create, per-agent model `effort` as a cost lever, and versionless `agents.update`. Builds on the coordinate-specialist-team shapes. | | [`CMA_plan_big_execute_small.ipynb`](CMA_plan_big_execute_small.ipynb) | Coordinator-pattern economics: a frontier coordinator delegates the token-heavy web reading to cheap parallel workers, measured against a rigor-matched solo-frontier control with per-thread cost metering. | | [`CMA_verify_with_outcome_grader.ipynb`](CMA_verify_with_outcome_grader.ipynb) | Build a grade-and-revise loop with Outcomes: a writer drafts a cited research brief, a stateless grader fetches every URL and checks every quote against a rubric, and feedback drives revisions until the brief passes. Covers `user.define_outcome`, the `span.outcome_evaluation_*` events, and how to write a rubric the grader can act on. | diff --git a/content/github/claude-plugins-official/.claude-plugin/marketplace.json b/content/github/claude-plugins-official/.claude-plugin/marketplace.json index a58fbc05f..9f6b9ac05 100644 --- a/content/github/claude-plugins-official/.claude-plugin/marketplace.json +++ b/content/github/claude-plugins-official/.claude-plugin/marketplace.json @@ -323,7 +323,7 @@ "url": "https://github.com/auth0/agent-skills.git", "path": "plugins/auth0", "ref": "main", - "sha": "d1b19854e60c6dfde048df91e4d97e536dba2491" + "sha": "7e9ce869824c34a871500de216f8e75344195edb" }, "homepage": "https://auth0.com" }, @@ -445,7 +445,7 @@ "url": "https://github.com/awslabs/startups.git", "path": "advisor/plugins/aws-startup-advisor", "ref": "main", - "sha": "b533244f9956412964fbd33c869c100f90b332ef" + "sha": "084d44e1dedab244c938a2eb37bd613a9643b223" }, "homepage": "https://github.com/awslabs/startups" }, @@ -690,7 +690,7 @@ "url": "https://github.com/carta/plugins.git", "path": "plugins/carta-investors", "ref": "main", - "sha": "651a08ae95ae3986ac508d24a7e541131ed72d87" + "sha": "a6c97d0e25b6c559adb905dd4a6d11ce478aec86" }, "homepage": "https://carta.com" }, @@ -717,7 +717,7 @@ "source": { "source": "url", "url": "https://github.com/ChromeDevTools/chrome-devtools-mcp.git", - "sha": "b4546ef86b86e8733f88f075169d2124f436dd1e" + "sha": "45262c0a5ca433e4d9d5700e3c1e006ac41f45f5" }, "homepage": "https://github.com/ChromeDevTools/chrome-devtools-mcp" }, @@ -758,7 +758,7 @@ "source": { "source": "url", "url": "https://github.com/ckeditor/skills.git", - "sha": "4035bf6ccd0555ec06ff0e64681ad248ad45d265" + "sha": "a75c66c8b10dd19c6788c6963e35b2c30b41a83b" }, "homepage": "https://ckeditor.com" }, @@ -927,7 +927,7 @@ "source": { "source": "url", "url": "https://github.com/cockroachdb/claude-plugin.git", - "sha": "fb845eda90ab894f26df7b084f3652e5cef49dd4" + "sha": "6c96c6394a61f366e8ec1b7cec2281e97507cbff" }, "homepage": "https://github.com/cockroachdb/claude-plugin" }, @@ -1036,7 +1036,7 @@ "source": { "source": "url", "url": "https://github.com/get-convex/convex-backend-skill.git", - "sha": "b11a1bf5ea62bd173af8f60813916393f1179da8" + "sha": "8b01557dc3dd2e390ad090025c67f5e022bd21ad" }, "homepage": "https://github.com/get-convex/convex-backend-skill", "keywords": [ @@ -1175,7 +1175,7 @@ "url": "https://github.com/awslabs/agent-plugins.git", "path": "plugins/databases-on-aws", "ref": "main", - "sha": "d2822e9483fd03aed5556d4e03dfad6d60eac91b" + "sha": "bc78579b3d65d590de8a3f3abef4b23e72ff9e59" }, "homepage": "https://github.com/awslabs/agent-plugins" }, @@ -1260,7 +1260,7 @@ "url": "https://github.com/microsoft/Dataverse-skills.git", "path": ".github/plugins/dataverse", "ref": "main", - "sha": "f4d02be7323f3f097f8c108835ef17e9f7aec8a9" + "sha": "a521f78a822c6525fe913c57d7e9946f1a568fca" }, "homepage": "https://github.com/microsoft/Dataverse-skills" }, @@ -1275,7 +1275,7 @@ "source": { "source": "url", "url": "https://github.com/confident-ai/deepeval.git", - "sha": "f2ba3f37f1929a0f9d0071fcbcffa18d2cb38b1e" + "sha": "6cf2e02d5e2f357683b5bcd177d808a755a2a49f" }, "homepage": "https://github.com/confident-ai/deepeval" }, @@ -1368,7 +1368,7 @@ "source": { "source": "url", "url": "https://github.com/DuendeSoftware/duende-skills.git", - "sha": "fc252b1747ee45bffd0d8c6007009f7ae637b09b" + "sha": "91e793dfca015a973ea51c4e26deeee1a397a09c" }, "homepage": "https://duendesoftware.com" }, @@ -1406,7 +1406,7 @@ "url": "https://github.com/expo/skills.git", "path": "plugins/expo", "ref": "main", - "sha": "8bd359f8a44d2446de12f1fe6e6316daf043056e" + "sha": "cb916609b51a71f73c8230571530ea0e673d1d7a" }, "homepage": "https://github.com/expo/skills/blob/main/plugins/expo/README.md" }, @@ -1685,7 +1685,7 @@ "source": { "source": "url", "url": "https://github.com/hostinger/claude-plugin.git", - "sha": "6fe8f03f9b1f6d71cf60f05f01f9e228e772cbb0" + "sha": "10259650b82ceee43741ce2f8a7fa564a8c286c7" }, "homepage": "https://www.hostinger.com" }, @@ -1724,7 +1724,7 @@ "source": { "source": "url", "url": "https://github.com/heygen-com/hyperframes.git", - "sha": "84e4eafacdaf96e8d137ba745af750448c5de0de" + "sha": "c39f3cf924bb5109bfc0b36f3d7b99a4cb397322" }, "homepage": "https://hyperframes.heygen.com" }, @@ -1848,7 +1848,7 @@ "source": { "source": "url", "url": "https://github.com/langfuse/claude-observability-plugin.git", - "sha": "3f301f3840c975bdbd16b8140140d139f27aa99b" + "sha": "fc96c149b19ee6e06ba8f4806eab3a8c24d2f37c" }, "homepage": "https://langfuse.com/integrations/other/claude-code" }, @@ -2334,7 +2334,7 @@ "source": { "source": "url", "url": "https://github.com/Nimbleway/agent-skills.git", - "sha": "fdd3d17713f591b2643d90c35f44546f97458163" + "sha": "74ca4dd4bad18a899b1fbf364b70e5a9ceace80d" }, "homepage": "https://docs.nimbleway.com/integrations/agent-skills/plugin-installation" }, @@ -2563,7 +2563,7 @@ "source": { "source": "url", "url": "https://github.com/PostHog/ai-plugin.git", - "sha": "4bdfca8c6d58b8c9a303374f5f93485b8d9281fa" + "sha": "00579b8a86d9caecbda117b1b3999858f785c3dd" }, "homepage": "https://posthog.com/docs/model-context-protocol" }, @@ -2723,7 +2723,7 @@ "source": { "source": "url", "url": "https://github.com/quarkusio/quarkus-agent-mcp.git", - "sha": "21f2bf222e57efa6a289d6fa95c9be8445a73fbd" + "sha": "47cd6df3582942352d63348f99e6528cd60ef93e" }, "homepage": "https://quarkus.io" }, @@ -2810,7 +2810,7 @@ "source": { "source": "url", "url": "https://github.com/render-oss/render-plugin-claude-code.git", - "sha": "9ed7e5f44a711ebd3f0b159367bbb2b48abc22fc" + "sha": "b4139c813d7b931a2d8ac6c8e0c3787166f5d1fb" }, "homepage": "https://render.com" }, @@ -2824,7 +2824,7 @@ "source": { "source": "url", "url": "https://github.com/resend/resend-skills.git", - "sha": "8a977503dc13160b1d2463471a62a689f2a5767b" + "sha": "a2d064ec1b9e6ea496af346c847ae17e52262b61" }, "homepage": "https://resend.com" }, @@ -2850,7 +2850,7 @@ "source": { "source": "url", "url": "https://github.com/rilldata/agent-skills.git", - "sha": "6e5df00631875bc9f1119d5f08194596ad02e8f1" + "sha": "aa23a8e62694809a0f44f5889d2b48b724a19bc6" }, "homepage": "https://docs.rilldata.com/developers/build/ai-configuration" }, @@ -2949,7 +2949,7 @@ "source": { "source": "url", "url": "https://github.com/sanity-io/agent-toolkit.git", - "sha": "6c81e246ed9d63588ca1fb624f29ac804184d1be" + "sha": "af54474c21b00aee8e2fa2855b8ff6ef8a0cf41c" }, "homepage": "https://www.sanity.io" }, @@ -2983,7 +2983,7 @@ "url": "https://github.com/SAP/open-ux-tools.git", "path": "packages/fiori-mcp-server", "ref": "main", - "sha": "96cdbdc7aa3cd7d28bd14488adcad6e900465a3c" + "sha": "e07b3009552002d60344dbd46fee5b957b054f03" }, "homepage": "https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server" }, @@ -3055,7 +3055,7 @@ "source": "git-subdir", "url": "https://github.com/semgrep/mcp-marketplace.git", "path": "plugin", - "sha": "7ae38e4bec51877cec71fcacc5857d746fb8b468" + "sha": "426442e17e135a302b220e43b57c102cb33b39bb" }, "homepage": "https://github.com/semgrep/mcp-marketplace.git" }, @@ -3300,7 +3300,7 @@ "source": { "source": "url", "url": "https://github.com/supabase-community/supabase-plugin.git", - "sha": "5d74232687a0a82184ecd4266ea07372edb43f4b" + "sha": "98566ec85dadb63a3e8871a027ce9c5e9ac2a3b5" }, "homepage": "https://github.com/supabase-community/supabase-plugin" }, @@ -3518,7 +3518,7 @@ "source": { "source": "url", "url": "https://github.com/EpicGames/unreal-engine-skills-for-claude-code-plugin.git", - "sha": "766fb42370d9e251f7524fffb12cfdbc5b11a426" + "sha": "7e3b09bbf6d2984c155233f9d3de5fcf523d2d42" }, "homepage": "https://dev.epicgames.com/documentation/unreal-engine/unreal-mcp-in-unreal-editor" }, @@ -3626,7 +3626,7 @@ "source": { "source": "url", "url": "https://github.com/wix/skills.git", - "sha": "bef043f07972401e14fc4b129cf3895417f09352" + "sha": "f3e0af79941465142790e4b972c5d4a856dbbc2e" }, "homepage": "https://dev.wix.com/docs/wix-cli/guides/development/about-wix-skills" }, @@ -3747,7 +3747,7 @@ "source": { "source": "url", "url": "https://github.com/langfuse/skills.git", - "sha": "abe69fac6b0e0df94605dc5ae162da4726d0fb78" + "sha": "3e89523ca290e0192395c5044b1cef11063a1842" }, "homepage": "https://langfuse.com" }, diff --git a/content/github/skills/skills/claude-api/SKILL.md b/content/github/skills/skills/claude-api/SKILL.md index 9a9407309..9d857fcfd 100644 --- a/content/github/skills/skills/claude-api/SKILL.md +++ b/content/github/skills/skills/claude-api/SKILL.md @@ -43,6 +43,7 @@ Several common Claude API shapes changed in 2025–2026. If you recall a pattern | Extended thinking | `thinking: {type: "enabled", budget_tokens: N}` | On Claude 4.6+ models: `thinking: {type: "adaptive"}`. `budget_tokens` is deprecated on Opus 4.6 / Sonnet 4.6 and **rejected with a 400** on Fable 5 / Sonnet 5 / Opus 4.8 / 4.7. Pre-4.6 models still use `budget_tokens`. | | Web search / web fetch tool type | `web_search_20250305`, `web_fetch_20250910` | `web_search_20260209`, `web_fetch_20260209` (dynamic filtering) on Opus 4.8/4.7/4.6, Sonnet 5, and Sonnet 4.6. Older models keep the basic variants; on Vertex AI only basic `web_search_20250305` is available (web fetch is not on Vertex) — see the Server Tools QR below. | | PHP parameter names | snake_case wire names as named args (`max_tokens`) | Top-level named args are camelCase (`maxTokens`). Nested array keys vary by feature (e.g. `'taskBudget'`, `'skillID'`, `'mcp_server_name'`) — copy the exact key from the documented example; do not bulk-convert. | +| Managed Agents credentials | Keep secrets host-side via custom tools (the only option before vaults shipped) | Vault `environment_variable` credentials — stored by Anthropic, substituted at egress, never visible in the sandbox (`shared/managed-agents-tools.md` → Vaults). Host-side custom tools remain the fallback for self-hosted sandboxes. | The `{lang}/` files in this skill are authoritative over recalled patterns. @@ -94,24 +95,15 @@ Before reading code examples, determine which language the user is working in: ### Language-Specific Feature Support -| Language | Tool Runner | Managed Agents | Notes | -| ---------- | ----------- | -------------- | ------------------------------------- | -| Python | Yes (beta) | Yes (beta) | Full support — `@beta_tool` decorator | -| TypeScript | Yes (beta) | Yes (beta) | Full support — `betaZodTool` + Zod | -| Java | Yes (beta) | Yes (beta) | Beta tool use with annotated classes | -| Go | Yes (beta) | Yes (beta) | `BetaToolRunner` in `toolrunner` pkg | -| Ruby | Yes (beta) | Yes (beta) | `BaseTool` + `tool_runner` in beta | -| C# | Yes (beta) | Yes (beta) | `BetaToolRunner` + raw JSON schema | -| PHP | Yes (beta) | Yes (beta) | `BetaRunnableTool` + `toolRunner()` | -| cURL | N/A | Yes (beta) | Raw HTTP, no SDK features | +Every SDK language above supports both the beta Tool Runner and Managed Agents (beta) — Python (`@beta_tool` decorator), TypeScript (`betaZodTool` + Zod), Java (annotated classes), Go (`BetaToolRunner` in the `toolrunner` pkg), Ruby (`BaseTool` + `tool_runner`), C# (`BetaToolRunner` + raw JSON schema), PHP (`BetaRunnableTool` + `toolRunner()`); code entry points are in the Tool Use Patterns quick reference below. cURL is raw HTTP (no SDK features) and supports Managed Agents. -> **Managed Agents code examples**: dedicated language-specific READMEs are provided for Python, TypeScript, Go, Ruby, PHP, Java, and cURL (`{lang}/managed-agents/README.md`, `curl/managed-agents.md`). Read your language's README plus the language-agnostic `shared/managed-agents-*.md` concept files. **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI (`ant`) is one convenient way to create agents and environments from version-controlled YAML — see `shared/anthropic-cli.md`. If a binding you need isn't shown in the README, WebFetch the relevant entry from `shared/live-sources.md` rather than guess. C# has beta Managed Agents support via `client.Beta.Agents` and related namespaces. +> **Managed Agents code examples**: see the reading guide in the `## Managed Agents (Beta)` section below. --- ## Which Surface Should I Use? -> **Start simple.** Default to the simplest tier that meets your needs. Single API calls and workflows handle most use cases — only reach for agents when the task genuinely requires open-ended, model-driven exploration. +> **Start simple.** Default to the simplest tier that meets your needs. Single API calls and workflows handle most use cases — only reach for agents when the task genuinely requires open-ended, model-driven exploration. "Simplest" means the least code you own: for a hosted, scheduled, or memory-backed agent, Managed Agents is usually the simplest option (no loop code, no state files, no scheduler), even though it's a bigger platform. | Use Case | Tier | Recommended Surface | Why | | ----------------------------------------------- | --------------- | ------------------------- | ------------------------------------------------------------ | @@ -122,37 +114,32 @@ Before reading code examples, determine which language the user is working in: | Server-managed stateful agent with workspace | Agent | **Managed Agents** | Anthropic runs the loop and hosts the tool-execution sandbox | | Persisted, versioned agent configs | Agent | **Managed Agents** | Agents are stored objects; sessions pin to a version | | Long-running multi-turn agent with file mounts | Agent | **Managed Agents** | Per-session containers, SSE event stream, Skills + MCP | +| Agent that runs on a schedule (cron, "every night") | Agent | **Managed Agents** — scheduled deployments | Deployments fire sessions autonomously; no client-side scheduler | -> **Note:** Managed Agents is the right choice when you want Anthropic to run the agent loop *and* host the container where tools execute — file ops, bash, code execution all run in the per-session workspace. If you want to host the compute yourself or run your own custom tool runtime, Claude API + tool use is the right choice — use the tool runner for automatic loop handling, or the manual loop for fine-grained control (approval gates, custom logging, conditional execution). +> **Note:** Managed Agents is the right choice when you want Anthropic to run the agent loop *and* host the container where tools execute — file ops, bash, code execution all run in the per-session workspace. If you want to host the compute yourself or run your own custom tool runtime, Claude API + tool use is the right choice — use the tool runner for the agentic loop — its per-turn hooks still give you approval gates, logging, error interception, and conditional execution (see `shared/tool-use-concepts.md`) — or the manual loop when you want to own the entire loop yourself. > **Cloud-provider access.** **Claude Platform on AWS** is Anthropic-operated with same-day API parity — see `shared/claude-platform-on-aws.md` for client setup. For per-feature availability on **Claude Platform on AWS**, **Amazon Bedrock**, **Google Vertex AI**, and **Microsoft Foundry**, see `shared/platform-availability.md` — that table is the single source of truth in this skill; do not infer availability from anywhere else. -### Decision Tree +### Building an Agent: Four Approaches -``` -What does your application need? - -0. Which provider? - ├── First-party API or Claude Platform on AWS → continue (full surface available; per-feature exceptions in shared/platform-availability.md). - └── Amazon Bedrock, Google Vertex AI, or Microsoft Foundry → Claude API (+ tool use for agents); see shared/platform-availability.md for per-feature support. - -1. Single LLM call (classification, summarization, extraction, Q&A) - └── Claude API — one request, one response +Once you've decided you actually need an agent (open-ended, model-driven tool use), there are four distinct ways to build one. Two independent questions separate them: **who supplies the harness** (the agent loop + context management) and **who supplies the deployment** (the infra the agent runs on). The Tool Runner and the Claude Agent SDK both supply a *harness only* — you still host and deploy them yourself — which is why they're easy to conflate. Managed Agents (CMA) is the only option that supplies **both** the harness *and* managed deployment; the manual loop supplies neither. -2. Do you want Anthropic to run the agent loop and host a per-session - container where Claude executes tools (bash, file ops, code)? - └── Yes → Managed Agents — server-managed sessions, persisted agent configs, - SSE event stream, Skills + MCP, file mounts. - Examples: "stateful coding agent with a workspace per task", - "long-running research agent that streams events to a UI", - "agent with persisted, versioned config used across many sessions" +| # | Approach | You write | Harness & deployment | Tools available | Use when | +|---|----------|-----------|----------------------|-----------------|----------| +| 1 | **Claude API — manual loop** | The `while stop_reason == "tool_use"` loop yourself | You build the harness; you host | Only tools you define | You want to own the *entire* loop — no beta dependency, or a control flow the Tool Runner's per-turn hooks don't fit | +| 2 | **Claude API — Tool Runner** (`client.beta.messages.tool_runner` + `@beta_tool` / `betaZodTool`) | Just the tool functions | SDK supplies the loop (**harness only**); you host | Only tools you define | A custom-tool agent without hand-writing the loop (most cases). Per-turn hooks still give you approval gates, error interception, result modification (e.g. `cache_control`), retries, streaming, and compaction | +| 3 | **Managed Agents** (REST, beta) | Agent config + your tool results | Anthropic supplies the harness **and** hosts a per-session sandbox (**harness + deployment**) | Anthropic-hosted sandbox (bash, files, code exec) + Skills/MCP + your tools | You want Anthropic to run the loop *and* host the per-session workspace; persisted/versioned configs; long-running sessions | +| 4 | **Claude Agent SDK** — *separate product* (`claude-agent-sdk` / `@anthropic-ai/claude-agent-sdk`) | A prompt + options | SDK supplies the Claude Code harness + built-in tools (**harness only**); you host | Built-in Read/Write/Edit/Bash/Glob/Grep/WebSearch/WebFetch + MCP + subagents | You want a batteries-included coding/filesystem agent running on your own infra | -3. Workflow (multi-step, code-orchestrated, with your own tools) - └── Claude API with tool use — you control the loop +The harness/deployment split is the key mental model: options 1, 2, and 4 all **leave deployment to you**; only option 3 (CMA) adds managed deployment. Options 1–3 are what this skill generates; option 4 is a different library with its own docs — see the disambiguation below. -4. Open-ended agent (model decides its own trajectory, your own tools, you host the compute) - └── Claude API agentic loop (maximum flexibility) -``` +> **Tool Runner ≠ Claude Agent SDK.** These sound alike but are different packages: +> - **Tool Runner** is part of the regular Anthropic API SDK (`anthropic` / `@anthropic-ai/sdk`), reached via `client.beta.messages.tool_runner`. It automates the request → execute → loop cycle *for tools you define*. No built-in tools, no filesystem access, no sandbox — you supply every tool and host the compute. It is option 2 above, a thin helper over `POST /v1/messages`. +> - **Claude Agent SDK** (`claude-agent-sdk` / `@anthropic-ai/claude-agent-sdk`) is Claude Code packaged as a library. It ships built-in tools (file read/write/edit, bash, grep, web search), the full agent loop, context management, hooks, subagents, permissions, and sessions. You call `query(prompt, options)` and it drives everything. +> +> Both are **harness-only — you host and deploy them.** The difference is scope of harness: the Tool Runner loops over tools *you* define (with per-turn hooks for approval, interception, result modification, and retries — but no built-in tools); the Agent SDK is the full Claude Code harness with built-in tools. Neither provides managed deployment — that's what **Managed Agents (CMA)** adds (Anthropic hosts the loop and a per-session sandbox). +> +> **This skill covers the Claude API and Managed Agents (options 1–3); it does not generate Claude Agent SDK code.** If the user actually wants the Claude Agent SDK, point them to its docs (`code.claude.com/docs/en/agent-sdk`) — don't substitute the API Tool Runner for it, or vice-versa. ### Should I Build an Agent? @@ -194,23 +181,23 @@ Everything goes through `POST /v1/messages`. Tools and output constraints are fe | Claude Sonnet 4.6 | `claude-sonnet-4-6` | 1M | $3.00 | $15.00 | | Claude Haiku 4.5 | `claude-haiku-4-5` | 200K | $1.00 | $5.00 | -**ALWAYS use `claude-opus-4-8` unless the user explicitly names a different model.** This is non-negotiable. Do not use `claude-sonnet-5`, `claude-sonnet-4-6`, or any other model unless the user literally says "use sonnet" or "use haiku". Never downgrade for cost — that's the user's decision, not yours. Use `claude-fable-5` only when the user explicitly asks for Claude Fable 5, "fable", or Anthropic's most capable model — it has different API behavior than the Opus family (see below) and pricing that exceeds Opus-tier. +**Partner pricing:** The prices above are Anthropic first-party API rates — they also apply to Claude on Microsoft Foundry, which is billed through the Microsoft Marketplace at standard API rates. Claude on Amazon Bedrock and Vertex AI is partner-operated with separate pricing — see [Bedrock](https://aws.amazon.com/bedrock/pricing/) or [Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models). For WebFetch, use the Pricing row in `shared/live-sources.md`. + +**ALWAYS use `claude-opus-4-8` unless the user explicitly names a different model.** This is non-negotiable. Do not use `claude-sonnet-5`, `claude-sonnet-4-6`, or any other model unless the user literally says "use sonnet" or "use haiku". Never downgrade for cost — that's the user's decision, not yours. Use `claude-fable-5` only when the user explicitly asks for Claude Fable 5, "fable", or Anthropic's most capable model — it has different API behavior than the Opus family (see below) and pricing that exceeds Opus-tier. **Use only the exact model ID strings from the table — they are complete as-is; never append date suffixes** (`claude-sonnet-4-6`, never `claude-sonnet-4-6-20251114` or any other date-suffixed variant you might recall from training data). If the user requests an older model not in the table (e.g., "opus 4.5", "sonnet 3.7"), read `shared/models.md` for the exact ID — do not construct one yourself. ### Claude Fable 5 (`claude-fable-5`) — most capable widely released model -Claude Fable 5 is Anthropic's most capable widely released model, for the most demanding reasoning and long-horizon agentic work. **Claude Mythos 5** (`claude-mythos-5`) offers the same capabilities, pricing, and API surface through Project Glasswing (participation is the only way to access it), succeeding the invitation-only Claude Mythos Preview (`claude-mythos-preview`) — everything below applies to both models. 1M context window (the maximum is also the default), 128K max output. Key API differences from Opus-tier — see `shared/model-migration.md` → Migrating to Claude Fable 5 for details: +Claude Fable 5 is Anthropic's most capable widely released model, for the most demanding reasoning and long-horizon agentic work; everything below also applies to **Claude Mythos 5** (`claude-mythos-5`, Project Glasswing — same capabilities, pricing, and API surface; successor to the invitation-only `claude-mythos-preview`). 1M context window (the maximum is also the default), 128K max output. Key API differences from Opus-tier — see `shared/model-migration.md` → Migrating to Claude Fable 5 for details: - **Thinking is always on** — omit the `thinking` parameter entirely (or send `{type: "adaptive"}`). Any other explicit configuration is rejected: `{type: "disabled"}` and `{type: "enabled", budget_tokens: N}` both return a 400. Control depth with `output_config.effort` (supports `low` through `xhigh` and `max`). -- **The raw chain of thought is never returned** — responses carry regular `thinking` blocks (not `redacted_thinking`): `display: "summarized"` returns a readable summary, `"omitted"` (the default) leaves the `thinking` field as an empty string. Replay rules: pass thinking blocks back exactly as received on the same model (including empty-text blocks — the API rejects *modified* blocks, not read ones); a **different** model **drops** them from the prompt (typically silently — not an error; the drop happens before pricing, so dropped blocks aren't billed and there's nothing to strip). Regular thinking blocks from other models replay across models freely. -- **Tokenizer** — same tokenizer as Opus 4.8 (introduced with Opus 4.7). Token counts are roughly unchanged when migrating from Opus 4.7/4.8; per-token pricing differs. Coming from Opus 4.6, Sonnet, Haiku, or older, re-baseline with `count_tokens`. -- **`refusal` stop reason — handle it, and opt into fallbacks by default** — safety classifiers may decline a request (HTTP 200, `stop_reason: "refusal"`, with a `stop_details` category). A pre-output refusal has an empty `content` array and is not billed at all; a mid-stream refusal bills the already-streamed output — discard the partial output. Always check `stop_reason` before reading `content`. Recovery is **opt-in on the API**: most Claude consumer surfaces ship with built-in Claude Opus 4.8 fallbacks, but an API request that doesn't opt in simply stops on a refusal — and false positives on benign adjacent work (security tooling, life-sciences tasks) do happen. **When you write `claude-fable-5` code, include the server-side `fallbacks` parameter by default** (`betas: ["server-side-fallback-2026-06-01"]` + `fallbacks: [{"model": "claude-opus-4-8"}]`; Claude API and Claude Platform on AWS): a declined request is transparently re-served by the fallback model inside the same call, with credit-style repricing applied automatically (a decline before any output isn't billed; the rescue bills at the fallback model's own rates). Tell the user you've enabled it; drop it only if they decline. The GA SDKs' client-side `BetaRefusalFallbackMiddleware` + `BetaFallbackState` handle retry everywhere server-side fallbacks aren't supported (incl. Amazon Bedrock, Vertex AI, Microsoft Foundry); fallback credit refunds the cache-switch cost of client-side retries. Code examples: the Refusal Fallbacks section of your language's claude-api doc; full semantics in the migration guide's refusal section. +- **The raw chain of thought is never returned** — responses carry regular `thinking` blocks (not `redacted_thinking`): `display: "summarized"` returns a readable summary, `"omitted"` (the default) leaves the `thinking` field as an empty string. Replay rules: pass thinking blocks back unchanged on the same model; other models drop them silently (unbilled — nothing to strip); details in `shared/model-migration.md`. +- **Tokenizer** — same tokenizer as Opus 4.8 (introduced with Opus 4.7). Token counts are roughly unchanged when migrating from Opus 4.7/4.8; per-token pricing differs. Coming from Opus 4.6, Sonnet, Haiku, or older, re-baseline with `count_tokens` (the Opus 4.7 tokenizer uses ~1×–1.35× as many tokens). +- **`refusal` stop reason — handle it, and opt into fallbacks by default** — safety classifiers may decline a request (HTTP 200, `stop_reason: "refusal"`, with a `stop_details` category); always check `stop_reason` before reading `content`. **When you write `claude-fable-5` code, include the server-side `fallbacks` parameter by default** (`betas: ["server-side-fallback-2026-06-01"]` + `fallbacks: [{"model": "claude-opus-4-8"}]`; Claude API and Claude Platform on AWS — elsewhere, incl. Bedrock/Vertex/Foundry, use the SDKs' client-side `BetaRefusalFallbackMiddleware` + `BetaFallbackState`). Tell the user you've enabled it; drop it only if they decline. Full semantics (billing, mid-stream refusals, credit repricing) in `shared/model-migration.md` → refusal section; code examples in `{lang}/claude-api/README.md` § Refusal Fallbacks. - **No assistant prefill** — same as the rest of the 4.6+ family. - **30-day data retention required** — Claude Fable 5 is not available under zero data retention; requests from an org whose retention configuration doesn't meet the requirement return `400 invalid_request_error`. -- **Longer turns, different prompting** — single requests on hard tasks can run many minutes (plan timeouts/streaming/progress UX); effort sweeps should include low/medium for routine work; prompts written for prior models are often too prescriptive and reduce output quality. See `shared/model-migration.md` → Migrating to Claude Fable 5 → Behavioral shifts (prompt-tunable) for the recommended prompt snippets (anti-overplanning, no-tidying, grounded progress claims, boundaries, async sub-agents, memory, `send_to_user`). - -**CRITICAL: Use only the exact model ID strings from the table above — they are complete as-is. Do not append date suffixes.** For example, use `claude-sonnet-4-6`, never `claude-sonnet-4-6-20251114` or any other date-suffixed variant you might recall from training data. If the user requests an older model not in the table (e.g., "opus 4.5", "sonnet 3.7"), read `shared/models.md` for the exact ID — do not construct one yourself. +- **Longer turns, different prompting** — single requests on hard tasks can run many minutes (plan timeouts/streaming/progress UX); effort sweeps should include low/medium for routine work; prompts written for prior models are often too prescriptive and reduce output quality. See `shared/model-migration.md` → Migrating to Claude Fable 5 → Behavioral shifts (prompt-tunable) for the recommended prompt snippets. -A note: if any of the model strings above look unfamiliar to you, that's to be expected — that just means they were released after your training data cutoff. Rest assured they are real models; we wouldn't mess with you like that. +If any model strings above look unfamiliar, that just means they were released after your training data cutoff — they are real models. **Live capability lookup:** The table above is cached. When the user asks "what's the context window for X", "does X support vision/thinking/effort", or "which models support Y", query the Models API (`client.models.retrieve(id)` / `client.models.list()`) — see `shared/models.md` for the field reference and capability-filter examples. @@ -233,17 +220,21 @@ Full auth details (named profiles, scopes, the API-key-shadows-profile trap, ref ## Thinking & Effort (Quick Reference) -**Fable 5 / Opus 4.8 / 4.7 / Sonnet 5 — Adaptive thinking only:** Use `thinking: {type: "adaptive"}`. `thinking: {type: "enabled", budget_tokens: N}` returns a 400 — adaptive is the only on-mode. On Opus 4.8, Opus 4.7, and Sonnet 5, `{type: "disabled"}` and omitting `thinking` both work (on Sonnet 5, omitting runs adaptive; on Opus 4.7/4.8, omitting runs without thinking — set `{type: "adaptive"}` explicitly); on Fable 5, an explicit `{type: "disabled"}` returns a 400 — omit the `thinking` param entirely instead. Sampling parameters (`temperature`, `top_p`, `top_k`) are also removed and will 400. Opus 4.8 keeps the same request surface as 4.7 (no new breaking changes) — see `shared/model-migration.md` → Migrating to Opus 4.8 for the behavioral re-tuning, and → Migrating to Opus 4.7 for the full breaking-change list when coming from 4.6 or earlier. Note: with `thinking` disabled, Opus 4.8 may write longer reasoning into the visible response — leave adaptive thinking on, or add a final-answer-only instruction (see the migration guide). -**Opus 4.6 — Adaptive thinking (recommended):** Use `thinking: {type: "adaptive"}`. Claude dynamically decides when and how much to think. No `budget_tokens` needed — `budget_tokens` is deprecated on Opus 4.6 and Sonnet 4.6 and should not be used for new code. Adaptive thinking also automatically enables interleaved thinking (no beta header needed). **When the user asks for "extended thinking", a "thinking budget", or `budget_tokens`: always use Fable 5, Opus 4.8, 4.7, or 4.6 with `thinking: {type: "adaptive"}`. The concept of a fixed token budget for thinking is deprecated — adaptive thinking replaces it. Do NOT use `budget_tokens` for new 4.6/4.7/4.8 code and do NOT switch to an older model.** *Gradual-migration carve-out:* `budget_tokens` is still functional on Opus 4.6 and Sonnet 4.6 as a transitional escape hatch — if you're migrating existing code and need a hard token ceiling before you've tuned `effort`, see `shared/model-migration.md` → Transitional escape hatch. Note: this carve-out does **not** apply to Fable 5, Opus 4.7 or 4.8 — `budget_tokens` is fully removed there. -**Effort parameter (GA, no beta header):** Controls thinking depth and overall token spend via `output_config: {effort: "low"|"medium"|"high"|"max"}` (inside `output_config`, not top-level). Default is `high` (equivalent to omitting it). `max` is supported on Fable 5, Opus 4.6 and later, Sonnet 5, and Sonnet 4.6 (not Haiku or earlier Sonnets). Opus 4.7 added `"xhigh"` (between `high` and `max`) — the best setting for most coding and agentic use cases on Fable 5 / Opus 4.7/4.8 / Sonnet 5, and the default in Claude Code; use a minimum of `high` for most intelligence-sensitive work. Works on Fable 5, Opus 4.5, Opus 4.6, Opus 4.7, Opus 4.8, Sonnet 5, and Sonnet 4.6. Will error on Sonnet 4.5 / Haiku 4.5. On Fable 5, Opus 4.7/4.8, and Sonnet 5, effort matters more than on any prior model in their tier — re-tune it when migrating, and run long-horizon/agentic tasks at `high`/`xhigh` with the full task spec given up front. Combine with adaptive thinking for the best cost-quality tradeoffs. Lower effort means fewer and more-consolidated tool calls, less preamble, and terser confirmations — `high` is often the sweet spot balancing quality and token efficiency; use `max` when correctness matters more than cost; use `low` for subagents or simple tasks. +Use adaptive thinking (`thinking: {type: "adaptive"}`) on every current model — Claude dynamically decides when and how much to think. Per-model rules: -**Thinking display — `"omitted"` by default on Fable 5 / Mythos 5 / Opus 4.8 / 4.7 / Sonnet 5:** `display: "summarized"` returns a readable summary of the reasoning; `"omitted"` (the default on all five — a silent change from Opus 4.6 and Sonnet 4.6, where it was `"summarized"`) streams `thinking` blocks with empty text. `display` controls visibility only — thinking happens and is billed the same under every setting; the raw chain of thought is never exposed on any model. If you stream reasoning to users, the default looks like a long pause before output — set `thinking: {type: "adaptive", display: "summarized"}` explicitly. (Independent of display, echo thinking blocks back unchanged when continuing on the same model; other models silently ignore them — see the migration guide.) +| Model | Thinking config | Omitting `thinking` | `budget_tokens` | Sampling (`temperature`/`top_p`/`top_k`) | Effort levels | +|---|---|---|---|---|---| +| Fable 5 | `{type: "adaptive"}` or omit; explicit `{type: "disabled"}` returns 400 — omit the param instead | Runs adaptive (thinking is always on) | Removed — `{type: "enabled", budget_tokens: N}` returns 400 | Removed — 400 | `low`/`medium`/`high`/`xhigh`/`max` | +| Opus 4.8 / 4.7 | `{type: "adaptive"}` is the only on-mode; `{type: "disabled"}` accepted | Runs **without** thinking — set `{type: "adaptive"}` explicitly | Removed — 400 | Removed — 400 | `low`/`medium`/`high`/`xhigh`/`max` | +| Sonnet 5 | `{type: "adaptive"}` is the only on-mode; `{type: "disabled"}` accepted | Runs adaptive | Removed — 400 | Removed — 400 | `low`/`medium`/`high`/`xhigh`/`max` | +| Opus 4.6 / Sonnet 4.6 | `{type: "adaptive"}` (recommended; auto-enables interleaved thinking, no beta header) | Set `{type: "adaptive"}` explicitly | Deprecated — do not use in new code; transitional escape hatch only (see below) | Allowed | `low`/`medium`/`high`/`max` (`xhigh` arrived with Opus 4.7) | +| Older (Sonnet 4.5, Haiku 4.5, …) — only if explicitly requested | `{type: "enabled", budget_tokens: N}` | No thinking | Required for thinking; must be less than `max_tokens`, minimum 1024 — errors otherwise | Allowed | `effort` works on Opus 4.5 (`low`/`medium`/`high` only — no `xhigh`/`max`); errors on Sonnet 4.5 / Haiku 4.5 | -**Task Budgets (beta, Fable 5 / Opus 4.7 / 4.8 / Sonnet 5):** `output_config: {task_budget: {type: "tokens", total: N}}` tells the model how many tokens it has for a full agentic loop — it sees a running countdown and self-moderates (minimum 20,000; beta header `task-budgets-2026-03-13`). Distinct from `max_tokens`, which is an enforced per-response ceiling the model is not aware of. See `shared/model-migration.md` → Task Budgets. +Opus 4.8 keeps the same request surface as 4.7 (no new breaking changes) — see `shared/model-migration.md` → Migrating to Opus 4.8 for the behavioral re-tuning, and → Migrating to Opus 4.7 for the full breaking-change list when coming from 4.6 or earlier. With `thinking` disabled, Opus 4.8 may write longer reasoning into the visible response — leave adaptive thinking on, or add a final-answer-only instruction (see the migration guide). -**Sonnet 4.6:** Supports adaptive thinking (`thinking: {type: "adaptive"}`). `budget_tokens` is deprecated on Sonnet 4.6 — use adaptive thinking instead. - -**Older models (only if explicitly requested):** If the user specifically asks for Sonnet 4.5 or another older model, use `thinking: {type: "enabled", budget_tokens: N}`. `budget_tokens` must be less than `max_tokens` (minimum 1024). Never choose an older model just because the user mentions `budget_tokens` — use Opus 4.8 with adaptive thinking instead. +- **Effort (GA, no beta header):** `output_config: {effort: "low"|"medium"|"high"|"xhigh"|"max"}` — inside `output_config`, not top-level; default `high` (equivalent to omitting it). Controls thinking depth and overall token spend; combine with adaptive thinking for the best cost-quality tradeoffs. `xhigh` (added on Opus 4.7, between `high` and `max`) is the best setting for most coding and agentic use cases on Fable 5 / Opus 4.7/4.8 / Sonnet 5, and the default in Claude Code; effort matters more on those models than on any prior model in their tier — re-tune it when migrating, and run long-horizon/agentic tasks at `high`/`xhigh` with the full task spec given up front. Use a minimum of `high` for intelligence-sensitive work, `max` when correctness matters more than cost, and `low` for subagents or simple tasks — lower effort means fewer and more-consolidated tool calls, less preamble, and terser confirmations (`high` is often the sweet spot balancing quality and token efficiency). +- **Thinking display — `"omitted"` by default on Fable 5 / Mythos 5 / Opus 4.8 / 4.7 / Sonnet 5:** `display: "summarized"` returns a readable summary of the reasoning; `"omitted"` (the default on all five — a silent change from Opus 4.6 and Sonnet 4.6, where it was `"summarized"`) streams `thinking` blocks with empty text. `display` controls visibility only — thinking happens and is billed the same under every setting; the raw chain of thought is never exposed on any model. If you stream reasoning to users, the default looks like a long pause before output — set `thinking: {type: "adaptive", display: "summarized"}` explicitly. (Independent of display, echo thinking blocks back unchanged when continuing on the same model; other models silently ignore them — see the migration guide.) +- **When the user asks for "extended thinking", a "thinking budget", or `budget_tokens`:** always use Fable 5, Opus 4.8, 4.7, or 4.6 with `thinking: {type: "adaptive"}` — the fixed thinking-token-budget concept is deprecated and adaptive thinking replaces it. Do NOT use `budget_tokens` for new 4.6/4.7/4.8 code and do NOT switch to an older model just because the user mentions it. *Gradual-migration carve-out:* `budget_tokens` is still functional on Opus 4.6 and Sonnet 4.6 only, as a transitional escape hatch for existing code that needs a hard token ceiling before you've tuned `effort` — see `shared/model-migration.md` → Transitional escape hatch. It is fully removed on Fable 5, Opus 4.7/4.8, and Sonnet 5. --- @@ -299,7 +290,7 @@ client.beta.messages.create( ## Task Budgets (Quick Reference) -**Beta, Fable 5 / Sonnet 5 / Opus 4.8 / 4.7.** A task budget gives Claude a token ceiling for an agentic loop so it paces itself and finishes gracefully instead of being cut off. Set `task_budget` inside `output_config` on `client.beta.messages.stream(...)` with beta flag `task-budgets-2026-03-13` — use streaming so the large `max_tokens` doesn't hit HTTP timeouts: +**Beta, Fable 5 / Sonnet 5 / Opus 4.8 / 4.7.** A task budget gives Claude a token ceiling for an agentic loop so it paces itself and finishes gracefully instead of being cut off — distinct from `max_tokens`, which is an enforced per-response ceiling the model is not aware of. Minimum `total`: 20,000. Set `task_budget` inside `output_config` on `client.beta.messages.stream(...)` with beta flag `task-budgets-2026-03-13` — use streaming so the large `max_tokens` doesn't hit HTTP timeouts (full details: `shared/model-migration.md` → Task Budgets): ```python with client.beta.messages.stream( @@ -404,11 +395,11 @@ Availability: `shared/platform-availability.md`. For agents on Bedrock / Vertex |---|---| | `managed-agents-onboard` | Walk the user through setting up a Managed Agent from scratch. **Read `shared/managed-agents-onboarding.md` immediately** and follow its interview script: **describe → configure the agent (propose, don't interrogate) → environment → session** (same arc as the Console quickstart, auth deferred to the session step) — defaults and inline suggestions do the work, with a silent viability gate (job vs tools/credentials/data) before any code is emitted. Do not summarize — run the interview. | -**Reading guide:** Start with `shared/managed-agents-overview.md`, then the topical `shared/managed-agents-*.md` files (core, environments, tools, events, outcomes, multiagent, webhooks, memory, scheduled-deployments, client-patterns, onboarding, api-reference). For Python, TypeScript, Go, Ruby, PHP, and Java, read `{lang}/managed-agents/README.md` for code examples. For cURL, read `curl/managed-agents.md`. **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI (`ant`) is one convenient way to create agents and environments from version-controlled YAML — see `shared/anthropic-cli.md`. If a binding you need isn't shown in the language README, WebFetch the relevant entry from `shared/live-sources.md` rather than guess. C# has beta Managed Agents support via `client.Beta.Agents` and related namespaces. +**Reading guide:** Start with `shared/managed-agents-overview.md`, then the topical `shared/managed-agents-*.md` files (core, environments, tools, events, outcomes, multiagent, webhooks, memory, scheduled-deployments, client-patterns, onboarding, api-reference). For Python, TypeScript, Go, Ruby, PHP, and Java, read `{lang}/managed-agents/README.md` for code examples. For cURL, read `curl/managed-agents.md`. **Agents are persistent — create once, reference by ID.** Define agents and environments as version-controlled YAML applied with the `ant` CLI — this is the recommended flow (see `shared/anthropic-cli.md`): the CLI owns the control plane (creating and updating agents), your code owns the data plane (`sessions.create` with the stored agent ID). Call `agents.create()` in code only when you must provision programmatically; either way, store the returned agent ID and pass it to every subsequent `sessions.create`; never call `agents.create()` in the request path. If a binding you need isn't shown in the language README, WebFetch the relevant entry from `shared/live-sources.md` rather than guess. C# has beta Managed Agents support via `client.Beta.Agents` and related namespaces — see `csharp/claude-api/README.md` for details, or `curl/managed-agents.md` for raw HTTP reference. **When the user wants to set up a Managed Agent from scratch** (e.g. "how do I get started", "walk me through creating one", "set up a new agent"): read `shared/managed-agents-onboarding.md` and run its interview — same flow as the `managed-agents-onboard` subcommand. -**When the user asks "how do I write the client code for X":** reach for `shared/managed-agents-client-patterns.md` — covers lossless stream reconnect, `processed_at` queued/processed gate, interrupt, `tool_confirmation` round-trip, the correct idle/terminated break gate, post-idle status race, stream-first ordering, file-mount gotchas, keeping credentials host-side via custom tools, etc. +**When the user asks "how do I write the client code for X":** reach for `shared/managed-agents-client-patterns.md` — covers lossless stream reconnect, `processed_at` queued/processed gate, interrupt, `tool_confirmation` round-trip, the correct idle/terminated break gate, post-idle status race, stream-first ordering, file-mount gotchas, etc. For credentials, lead with vault `environment_variable` credentials — the first-class mechanism; secrets are substituted at egress and never enter the sandbox (`shared/managed-agents-tools.md` → Vaults). Keeping credentials host-side via custom tools is the fallback where vault credentials don't fit (e.g. self-hosted sandboxes). **When the user wants the agent to run on a schedule** (cron, "every night", "weekly report"): read `shared/managed-agents-scheduled-deployments.md` — deployments fire sessions autonomously on a cron cadence, with per-firing run records and lifecycle controls (pause/unpause/archive). @@ -434,13 +425,13 @@ Server-side tools run on Anthropic's infrastructure — no client-side execution **Files API (beta `files-api-2025-04-14`):** upload via `client.beta.files.upload(...)` → response `id` is the `file_id`. Reference it as `{"type": "document", "source": {"type": "file", "file_id": "..."}}` for PDF/text, or `{"type": "image", ...}` for images — the content-block type must match the file's MIME type. The beta header is required on **both** the upload and the `messages.create` that references the file. Availability: `shared/platform-availability.md`. -**Citations (no beta):** set `citations: {enabled: true}` on each `document` content block (all or none). Response splits into multiple `text` blocks; cited blocks carry a `citations` array. Each citation has `cited_text`, `document_index`, `document_title`, and a location by `type`: `char_location` (`start_char_index`/`end_char_index`) for plain text, `page_location` (`start_page_number`/`end_page_number`, 1-indexed) for PDF, `content_block_location` for custom content. Incompatible with `output_config.format`. +**Citations (no beta):** set `citations: {enabled: true}` on each `document` content block (all or none). Response splits into multiple `text` blocks; cited blocks carry a `citations` array. Each citation has `cited_text`, `document_index`, `document_title`, and a location by `type`: `char_location` (`start_char_index`/`end_char_index`) for plain text, `page_location` (`start_page_number`/`end_page_number`, 1-indexed) for PDF, `content_block_location` for custom content. Incompatible with `output_config.format` (returns a 400). ## Tool Use Patterns (Quick Reference) **Strict tool use (no beta):** set `strict: true` as a top-level field on the tool definition (alongside `name`/`description`/`input_schema`), **not** on `tool_choice`. Schema must have `additionalProperties: false` + `required`. Guarantees `tool_use.input` validates exactly. Go: `Strict: anthropic.Bool(true)` + `additionalProperties` via `InputSchema.ExtraFields`; Java: `.strict(true)` + `.putAdditionalProperty("additionalProperties", JsonValue.from(false))`. -**Parallel tool use (default on):** one assistant message may contain multiple `tool_use` blocks. Execute them concurrently, then return **all** `tool_result` blocks in a **single** user message (don't split across multiple messages). For a failed tool, return `tool_result` with `is_error: true` — don't drop it. +**Parallel tool use (default on):** one assistant message may contain multiple `tool_use` blocks. Execute them concurrently, then return **all** `tool_result` blocks in a **single** user message — splitting them across multiple messages silently trains Claude to stop making parallel calls. For a failed tool, return `tool_result` with `is_error: true` — don't drop it. **Tool Runner (SDK beta helper):** drives the tool-call loop for you via `client.beta.messages.*`. Python: `@beta_tool` decorator + `client.beta.messages.tool_runner(...)` → `runner.until_done()`. TypeScript: `betaZodTool({...})` from `@anthropic-ai/sdk/helpers/beta/zod` + `client.beta.messages.toolRunner(...)` → `await runner`. Go: `toolrunner.NewBetaToolFromJSONSchema(...)` + `client.Beta.Messages.NewToolRunner(...)` → `.RunToCompletion(ctx)`. Java requires `.addBeta("structured-outputs-2025-11-13")`. Ruby: `Anthropic::BaseTool` subclass + `client.beta.messages.tool_runner(...)`. PHP: `BetaRunnableTool` + `->toolRunner(...)`. C#: raw JSON-schema tools + `BetaToolRunner` via `client.Beta.Messages.ToolRunner(...)`. @@ -473,56 +464,42 @@ The Quick Task Reference below uses the `{lang}/claude-api/FILE.md` path notatio ### Quick Task Reference **Single text classification/summarization/extraction/Q&A:** -→ Read only `{lang}/claude-api/README.md` +→ Read only `{lang}/claude-api/README.md` — **always read the README first** for any task (installation, quick start, common patterns, error handling) **Chat UI or real-time response display:** → Read `{lang}/claude-api/README.md` + `{lang}/claude-api/streaming.md` **Long-running conversations (may exceed context window):** → Read `{lang}/claude-api/README.md` — see Compaction section -**Migrating to a newer model (Fable 5 / Opus 4.8 / Opus 4.7 / Opus 4.6 / Sonnet 5 / Sonnet 4.6) or replacing a retired model:** +**Migrating to a newer model (Fable 5 / Opus 4.8 / Opus 4.7 / Opus 4.6 / Sonnet 5 / Sonnet 4.6), replacing a retired model, or translating `budget_tokens` / prefill patterns to the current API:** → Read `shared/model-migration.md` **Prompting or tuning Fable 5 (long turns, effort, verbosity, autonomous runs, sub-agents):** → Read `shared/model-migration.md` → Migrating to Fable 5 → Behavioral shifts (prompt-tunable) + Long-running agent recommendations **Prompt caching / optimize caching / "why is my cache hit rate low":** -→ Read `shared/prompt-caching.md` + `{lang}/claude-api/README.md` (Prompt Caching section) +→ Read `shared/prompt-caching.md` (prefix-stability design, breakpoint placement, anti-patterns that silently invalidate cache) + `{lang}/claude-api/README.md` (Prompt Caching section) **Count tokens in a file / prompt / diff ("how many tokens is X"):** → Read `shared/token-counting.md` — use `messages.count_tokens`, never `tiktoken` **Function calling / tool use / agents:** -→ Read `{lang}/claude-api/README.md` + `shared/tool-use-concepts.md` + `{lang}/claude-api/tool-use.md` +→ Read `{lang}/claude-api/README.md` + `shared/tool-use-concepts.md` (conceptual foundations: function calling, code execution, memory, structured outputs) + `{lang}/claude-api/tool-use.md` (language-specific code examples: tool runner, manual loop, code execution, memory, structured outputs) **Agent design (tool surface, context management, caching strategy):** -→ Read `shared/agent-design.md` +→ Read `shared/agent-design.md` (bash vs. dedicated tools, programmatic tool calling, tool search/skills, context editing vs. compaction vs. memory, caching principles) -**Batch processing (non-latency-sensitive):** +**Batch processing (non-latency-sensitive; runs asynchronously at 50% cost):** → Read `{lang}/claude-api/README.md` + `{lang}/claude-api/batches.md` -**File uploads across multiple requests:** +**File uploads across multiple requests (same file without re-uploading):** → Read `{lang}/claude-api/README.md` + `{lang}/claude-api/files-api.md` -**Managed Agents (server-managed stateful agents with workspace):** -→ Read `shared/managed-agents-overview.md` + the rest of the `shared/managed-agents-*.md` files. For Python, TypeScript, Go, Ruby, PHP, and Java, read `{lang}/managed-agents/README.md` for code examples. For cURL, read `curl/managed-agents.md`. **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI (`ant`) is one convenient way to create agents and environments from version-controlled YAML — see `shared/anthropic-cli.md`. If a binding you need isn't shown in the language README, WebFetch the relevant entry from `shared/live-sources.md` rather than guess. C# has beta Managed Agents support — see `csharp/claude-api/README.md` for details, or `curl/managed-agents.md` for raw HTTP reference. - -### Claude API (Full File Reference) +**Debugging HTTP errors or implementing error handling:** +→ Read `shared/error-codes.md` — per-SDK typed exception class table and the Go `errors.As` pattern -Read the **language-specific Claude API source** — `{language}/claude-api/` for every SDK language, `curl/examples.md` for cURL: +**Latest official documentation:** +→ WebFetch the URLs in `shared/live-sources.md` -1. **`{language}/claude-api/README.md`** — **Read this first.** Installation, quick start, common patterns, error handling. -2. **`shared/tool-use-concepts.md`** — Read when the user needs function calling, code execution, memory, or structured outputs. Covers conceptual foundations. -3. **`shared/agent-design.md`** — Read when designing an agent: bash vs. dedicated tools, programmatic tool calling, tool search/skills, context editing vs. compaction vs. memory, caching principles. -4. **`{language}/claude-api/tool-use.md`** — Read for language-specific tool use code examples (tool runner, manual loop, code execution, memory, structured outputs). -5. **`{language}/claude-api/streaming.md`** — Read when building chat UIs or interfaces that display responses incrementally. -6. **`{language}/claude-api/batches.md`** — Read when processing many requests offline (not latency-sensitive). Runs asynchronously at 50% cost. -7. **`{language}/claude-api/files-api.md`** — Read when sending the same file across multiple requests without re-uploading. -8. **`shared/prompt-caching.md`** — Read when adding or optimizing prompt caching. Covers prefix-stability design, breakpoint placement, and anti-patterns that silently invalidate cache. -9. **`shared/error-codes.md`** — Read when debugging HTTP errors or implementing error handling. Includes the per-SDK typed exception class table and the Go `errors.As` pattern. -10. **`shared/model-migration.md`** — Read when upgrading to newer models, replacing retired models, or translating `budget_tokens` / prefill patterns to the current API. -11. **`shared/live-sources.md`** — WebFetch URLs for fetching the latest official documentation. - -Not every language has every file (e.g., Ruby has no `batches.md`); if a file is absent, that feature's example is not yet documented for that language. - -> **Note:** For the Managed Agents file reference, see the `## Managed Agents (Beta)` section above — it lists every `shared/managed-agents-*.md` file and the language-specific READMEs. +**Managed Agents (server-managed stateful agents with workspace):** +→ See the reading guide in the `## Managed Agents (Beta)` section above — it lists every `shared/managed-agents-*.md` file and the language-specific READMEs (`{lang}/managed-agents/README.md`, `curl/managed-agents.md`). --- @@ -538,13 +515,8 @@ Live documentation URLs are in `shared/live-sources.md`. ## Common Pitfalls -- **No `ANTHROPIC_API_KEY` ≠ no credentials.** Don't bail or ask the user for a key just because the env var is unset — run `ant auth status` first. After `ant auth login`, a bare `Anthropic()` client and `ant …` work with no env var; for raw curl, use `Authorization: Bearer $(ant auth print-credentials --access-token)` plus header `anthropic-beta: oauth-2025-04-20`. See the Authentication quick reference above and `shared/anthropic-cli.md`. - Don't truncate inputs when passing files or content to the API. If the content is too long to fit in the context window, notify the user and discuss options (chunking, summarization, etc.) rather than silently truncating. -- **Fable 5 / Sonnet 5 / Opus 4.8 / 4.7 thinking:** Adaptive only. `thinking: {type: "enabled", budget_tokens: N}` returns 400 — `budget_tokens` is fully removed (along with `temperature`, `top_p`, `top_k`). Use `thinking: {type: "adaptive"}`. Opus 4.8 inherits this surface from 4.7 with no new breaking changes; Fable 5 adds one — an explicit `thinking: {type: "disabled"}` returns a 400 (accepted on Sonnet 5 / 4.7 / 4.8); omit the param instead. -- **Opus 4.6 / Sonnet 4.6 thinking:** Use `thinking: {type: "adaptive"}` — do NOT use `budget_tokens` for new 4.6 code (deprecated on both Opus 4.6 and Sonnet 4.6; for gradual migration of existing code, see the transitional escape hatch in `shared/model-migration.md` — note this carve-out does not apply to Fable 5, Opus 4.7 or 4.8). For older models, `budget_tokens` must be less than `max_tokens` (minimum 1024). This will throw an error if you get it wrong. - **Prefill removed (Fable 5 and the 4.6/4.7/4.8 family):** Assistant message prefills (last-assistant-turn prefills) return a 400 error on Fable 5, Opus 4.6, Opus 4.7, Opus 4.8, and Sonnet 4.6. Use structured outputs (`output_config.format`) or system prompt instructions to control response format instead. (One exception: the fallback-credit prefill claim — when redeeming a credit with `fallback_has_prefill_claim: true`, the server accepts the echoed assistant message; see the migration guide's refusal section.) -- **Fable 5 `refusal` stop reason:** Safety classifiers may decline a request — a successful HTTP 200 with `stop_reason: "refusal"` (pre-output: empty `content`, nothing billed; mid-stream: partial output billed — discard it). Check `stop_reason` before reading `response.content[0]`, or you'll hit index errors on refused requests. To retry on another model, replay the history as-is — other models drop the refused model's thinking blocks from the prompt, unbilled; no stripping needed (and a fallback-credit redemption must echo the refused body exactly anyway, thinking blocks included). Fallbacks are **opt-in** — new `claude-fable-5` code should include the server-side `fallbacks` parameter by default so a refusal doesn't fail the request outright; see the Claude Fable 5 section above. -- **Fable 5 tokenizer:** Same tokenizer as Opus 4.8 — token counts are roughly unchanged when migrating from Opus 4.7/4.8. Coming from Opus 4.6, Sonnet, Haiku, or older, token counts differ (the Opus 4.7 tokenizer uses ~1×–1.35× as many tokens) — re-measure by calling `count_tokens` once with each model and comparing `input_tokens`. - **Confirm migration scope before editing:** When a user asks to migrate code to a newer Claude model without naming a specific file, directory, or file list, **ask which scope to apply first** — the entire working directory, a specific subdirectory, or a specific set of files. Do not start editing until the user confirms. Imperative phrasings like "migrate my codebase", "move my project to X", "upgrade to Sonnet 4.6", or bare "migrate to Opus 4.8" are **still ambiguous** — they tell you what to do but not where, so ask. Proceed without asking only when the prompt names an exact file, a specific directory, or an explicit file list ("migrate `app.py`", "migrate everything under `services/`", "update `a.py` and `b.py`"). See `shared/model-migration.md` Step 0. - **`max_tokens` defaults:** Don't lowball `max_tokens` — hitting the cap truncates output mid-thought and requires a retry. For non-streaming requests, default to `~16000` (keeps responses under SDK HTTP timeouts). For streaming requests, default to `~64000` (timeouts aren't a concern, so give the model room). Only go lower when you have a hard reason: classification (`~256`), cost caps, deliberately short outputs, or **`max_tokens: 0`** for cache pre-warming (see `shared/prompt-caching.md` → Pre-warming). - **128K output tokens:** Fable 5, Opus 4.6, Opus 4.7, Opus 4.8, Sonnet 5, and Sonnet 4.6 support up to 128K `max_tokens`, but the SDKs require streaming for values that large to avoid HTTP timeouts. Use `.stream()` with `.get_final_message()` / `.finalMessage()`. @@ -557,22 +529,13 @@ Live documentation URLs are in `shared/live-sources.md`. - **Advisor tool model pairing.** The advisor tool's `model` must be at least as capable as the request's top-level `model` — e.g. executor `claude-sonnet-5` → advisor `claude-opus-4-8` or `claude-opus-4-7`. An invalid pair returns 400. Pairing table in `shared/tool-use-concepts.md` § Advisor. Availability: `shared/platform-availability.md`. - **Agent Skills ≠ Managed Agents.** To have Claude generate a `.pptx`/`.xlsx`/etc. via Agent Skills, call `client.beta.messages.create` with `container={"skills": [...]}`, the `code_execution_20260521` tool, and both `code-execution-2025-08-25` + `skills-2025-10-02` betas. Do not use `client.beta.agents` / `sessions` / `environments` here — those are the Managed Agents surface, not Agent Skills. - **MCP connector needs both halves.** `mcp_servers=[{type:"url", url, name}]` alone is rejected as a validation error — also add `tools=[{type:"mcp_toolset", mcp_server_name:}]` with beta `mcp-client-2025-11-20`. Availability: `shared/platform-availability.md`. -- **Context editing ≠ compaction.** Context editing *clears* tool results and thinking blocks; compaction *summarizes* history. For context editing, use `context_management.edits` with type `clear_tool_uses_20250919` (or `clear_thinking_20251015`) on `client.beta.messages.*` with beta `context-management-2025-06-27` — not the `compact_20260112` type or `compact-2026-01-12` beta, which are compaction. - **`inference_geo` is a direct top-level request parameter** — `client.messages.create(..., inference_geo="us")` / `.inferenceGeo("us")`. Do not put it in `extra_body` / `putAdditionalBodyProperty`. Supported on Opus 4.6 / Sonnet 4.6 and later; availability: `shared/platform-availability.md`. `response.usage.inference_geo` reports where inference ran. - **Fine-grained tool streaming is not a beta feature.** Set `eager_input_streaming: true` on the tool definition and call the regular `client.messages.stream(...)`. There is no beta header and no `client.beta.*` path. - **Cache diagnostics is beta.** Use `client.beta.messages.*` with beta `cache-diagnosis-2026-04-07`. Pass `diagnostics: {previous_message_id: null}` on the first turn and `diagnostics: {previous_message_id: }` on subsequent turns; the result is on `response.diagnostics`. Availability: `shared/platform-availability.md`. - **Memory tool type is `memory_20250818`.** Declare `{"type": "memory_20250818", "name": "memory"}`. Go uses the beta-namespace type `{OfMemoryTool20250818: &anthropic.BetaMemoryTool20250818Param{}}` on `client.Beta.Messages.New`; Python/TypeScript/Ruby/PHP/C# use the non-beta `client.messages.create`; Java has both a non-beta `MemoryTool20250818` and a beta tool-runner path. Python/TypeScript provide `BetaAbstractMemoryTool` / `betaMemoryTool` helpers for implementing the backend. - **Use a model the feature actually supports.** Some features are restricted to specific model tiers — fast mode is Opus 4.8 / 4.7 only, task budgets are Fable 5 / Sonnet 5 / Opus 4.8 / 4.7 only, and the advisor tool requires a valid executor↔advisor pair. If the user's prompt names a model that the feature doesn't support, use a supported model instead and note the substitution in the output. -- **Bedrock / Foundry: use the platform client class.** For Bedrock use the `…BedrockMantle…` client (e.g. Python `AnthropicBedrockMantle`, Java `BedrockMantleBackend`) with `anthropic.`-prefixed model IDs; `AnthropicBedrock`/`BedrockBackend` without `Mantle` is the legacy path. For Foundry use `AnthropicFoundry` / `FoundryBackend` / `AnthropicFoundryClient` where the SDK supports it (C#, Java, PHP, Python, TypeScript); Go and Ruby have no Foundry client — Ruby's documented fallback is the first-party client with a custom `base_url`. Per-language table above. - **Don't define custom types for SDK data structures:** The SDK exports types for all API objects. Use `Anthropic.MessageParam` for messages, `Anthropic.Tool` for tool definitions, `Anthropic.ToolUseBlock` / `Anthropic.ToolResultBlockParam` for tool results, `Anthropic.Message` for responses. Defining your own `interface ChatMessage { role: string; content: unknown }` duplicates what the SDK already provides and loses type safety. - **Report and document output:** For tasks that produce reports, documents, or visualizations, the code execution sandbox has `python-docx`, `python-pptx`, `matplotlib`, `pillow`, and `pypdf` pre-installed. Claude can generate formatted files (DOCX, PDF, charts) and return them via the Files API — consider this for "report" or "document" type requests instead of plain stdout text. - **Server-tool errors don't raise.** Web search and web fetch errors return HTTP 200 with a `web_search_tool_result` / `web_fetch_tool_result` block whose `content` is a single error object (e.g. `{error_code: "max_uses_exceeded"}`) — not a raised exception. For web search, a success `content` is a *list*; an error `content` is an *object* — branch on that before indexing. - **Code execution output block type:** `code_execution_20260521` returns `bash_code_execution_tool_result` (with `.content.stdout`), **not** the legacy bare `code_execution_tool_result`. Iterate `response.content` and match on the correct type. - **Tool search: never defer everything.** The search tool itself must not have `defer_loading: true`, and at least one tool in `tools` must be non-deferred, or the API returns 400 `All tools have defer_loading set`. -- **`strict: true` goes on the tool, not `tool_choice`.** Putting `strict` on `tool_choice` does nothing; it's a sibling of `name`/`description`/`input_schema` on the tool definition itself. -- **Parallel tool results go in ONE user message.** Splitting `tool_result` blocks across multiple user messages silently trains Claude to stop making parallel calls. One assistant message of `tool_use` blocks → one user message of `tool_result` blocks. -- **Citations + structured outputs are incompatible.** Enabling `citations: {enabled: true}` on a document while also setting `output_config.format` returns a 400. -- **Batch results are unordered.** Match by `custom_id`, never by position in the results stream. -- **Vertex model IDs have no prefix.** Unlike Bedrock's `anthropic.`-prefixed IDs, Vertex takes the bare first-party ID for current-generation models (e.g. `"claude-opus-4-8"`); dated-snapshot models use an `@` separator (e.g. `claude-haiku-4-5@20251001`). -- **`stop_details` is `null` unless `stop_reason == "refusal"`.** For `max_tokens`, `end_turn`, etc., `stop_details` is `null` — guard before reading `.category`. -- **WIF auth: unset `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, and `ANTHROPIC_PROFILE`.** `ANTHROPIC_API_KEY` and `ANTHROPIC_AUTH_TOKEN` (even set to `""`) outrank Workload Identity Federation in the SDK's precedence chain and silently win; a set `ANTHROPIC_PROFILE` also wins (a missing named profile is an error, not a fall-through). `unset` them, don't blank them. diff --git a/content/github/skills/skills/claude-api/csharp/claude-api/README.md b/content/github/skills/skills/claude-api/csharp/claude-api/README.md index 243be71c5..5c40f001a 100644 --- a/content/github/skills/skills/claude-api/csharp/claude-api/README.md +++ b/content/github/skills/skills/claude-api/csharp/claude-api/README.md @@ -45,7 +45,7 @@ Note that `strings` will not surface wire-format snake_case field names (`output ### Minimal working skeleton -**Write a plain `Program.cs` body** — `using` statements followed by top-level statements, as below. Do **not** add a `#!/usr/bin/env dotnet` shebang or `#:package Anthropic@*` directive: those are .NET file-based-app syntax and fail with `CS1024: Preprocessor directive expected` when the file is compiled via an existing `.csproj`. The standard project setup (per the [C# quickstart](https://docs.claude.com/en/docs/get-started): `dotnet new console` → `dotnet add package Anthropic` → edit `Program.cs` → `dotnet run`) provides the `.csproj` and package reference. +**Write a plain `Program.cs` body** — `using` statements followed by top-level statements, as below. Do **not** add a `#!/usr/bin/env dotnet` shebang or `#:package Anthropic@*` directive: those are .NET file-based-app syntax and fail with `CS1024: Preprocessor directive expected` when the file is compiled via an existing `.csproj`. The standard project setup (per the [C# quickstart](https://platform.claude.com/docs/en/get-started): `dotnet new console` → `dotnet add package Anthropic` → edit `Program.cs` → `dotnet run`) provides the `.csproj` and package reference. Start from this — it compiles as-is. Fill in the feature-specific fields; do not spend turns running reflection or XML-doc inspection to discover type names first. diff --git a/content/github/skills/skills/claude-api/curl/managed-agents.md b/content/github/skills/skills/claude-api/curl/managed-agents.md index 4b594a9ea..62de232cb 100644 --- a/content/github/skills/skills/claude-api/curl/managed-agents.md +++ b/content/github/skills/skills/claude-api/curl/managed-agents.md @@ -78,7 +78,7 @@ curl -X POST https://api.anthropic.com/v1/sessions \ "environment_id": "env_abc123" }' # → { "id": "sesn_abc123", ... } -# Trace: https://platform.claude.com/workspaces/default/sessions/sesn_abc123 +# Trace: https://platform.claude.com/workspaces/default/sessions/sesn_abc123 (swap 'default' for your workspace ID if the API key is not in the Default workspace) ``` ### With system prompt, custom tools, and GitHub repo @@ -210,7 +210,7 @@ curl -X POST https://api.anthropic.com/v1/sessions/$SESSION_ID/events \ -d '{ "events": [ { - "type": "interrupt" + "type": "user.interrupt" } ] }' diff --git a/content/github/skills/skills/claude-api/go/claude-api/tool-use.md b/content/github/skills/skills/claude-api/go/claude-api/tool-use.md index 5094e6105..45fff7d94 100644 --- a/content/github/skills/skills/claude-api/go/claude-api/tool-use.md +++ b/content/github/skills/skills/claude-api/go/claude-api/tool-use.md @@ -81,7 +81,7 @@ for _, block := range message.Content { ### Manual Loop -For fine-grained control over the agentic loop, define tools with `ToolParam`, check `StopReason`, execute tools yourself, and feed `tool_result` blocks back. This is the pattern when you need to intercept, validate, or log tool calls. +Prefer the tool runner above. For interception, validation, logging, or human-in-the-loop approval, gate inside the tool's run function or step the runner with `NextMessage()`/`All()` and inspect each message (the runner's public `Params` field lets you adjust the next request) — a manual loop is not required. Drop to a manual loop only when you need control the runner does not expose: define tools with `ToolParam`, check `StopReason`, execute tools yourself, and feed `tool_result` blocks back. Derived from `anthropic-sdk-go/examples/tools/main.go`. diff --git a/content/github/skills/skills/claude-api/go/managed-agents/README.md b/content/github/skills/skills/claude-api/go/managed-agents/README.md index 73689eb94..92abd2a49 100644 --- a/content/github/skills/skills/claude-api/go/managed-agents/README.md +++ b/content/github/skills/skills/claude-api/go/managed-agents/README.md @@ -2,7 +2,7 @@ > **Bindings not shown here:** This README covers the most common managed-agents flows for Go. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the Go SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK. -> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.New` and pass it to every subsequent `sessions.New`; do not call `agents.New` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path. +> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.New` and pass it to every subsequent `sessions.New`; do not call `agents.New` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path. ## Installation @@ -95,7 +95,7 @@ if err != nil { panic(err) } fmt.Printf("Session ID: %s, status: %s\n", session.ID, session.Status) -fmt.Printf("Trace: https://platform.claude.com/workspaces/default/sessions/%s\n", session.ID) +fmt.Printf("Trace: https://platform.claude.com/workspaces/default/sessions/%s\n", session.ID) // swap 'default' for your workspace ID if the API key is not in the Default workspace ``` ### Updating an Agent diff --git a/content/github/skills/skills/claude-api/java/managed-agents/README.md b/content/github/skills/skills/claude-api/java/managed-agents/README.md index 22d2e746d..0bf2b6f87 100644 --- a/content/github/skills/skills/claude-api/java/managed-agents/README.md +++ b/content/github/skills/skills/claude-api/java/managed-agents/README.md @@ -2,7 +2,7 @@ > **Bindings not shown here:** This README covers the most common managed-agents flows for Java. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the Java SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK. -> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `client.beta().agents().create` and pass it to every subsequent `client.beta().sessions().create`; do not call `agents().create` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path. +> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `client.beta().agents().create` and pass it to every subsequent `client.beta().sessions().create`; do not call `agents().create` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path. ## Installation @@ -75,7 +75,7 @@ var session = client.beta().sessions().create(SessionCreateParams.builder() .title("Quickstart session") .build()); System.out.println("Session ID: " + session.id()); -System.out.println("Trace: https://platform.claude.com/workspaces/default/sessions/" + session.id()); +System.out.println("Trace: https://platform.claude.com/workspaces/default/sessions/" + session.id()); // swap 'default' for your workspace ID if the API key is not in the Default workspace ``` ### Updating an Agent diff --git a/content/github/skills/skills/claude-api/php/managed-agents/README.md b/content/github/skills/skills/claude-api/php/managed-agents/README.md index 97182145c..5913fbf53 100644 --- a/content/github/skills/skills/claude-api/php/managed-agents/README.md +++ b/content/github/skills/skills/claude-api/php/managed-agents/README.md @@ -2,7 +2,7 @@ > **Bindings not shown here:** This README covers the most common managed-agents flows for PHP. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the PHP SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK. -> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `$client->beta->agents->create` and pass it to every subsequent `->sessions->create`; do not call `agents->create` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path. +> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `$client->beta->agents->create` and pass it to every subsequent `->sessions->create`; do not call `agents->create` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path. ## Installation @@ -64,7 +64,7 @@ $session = $client->beta->sessions->create( title: 'Quickstart session', ); echo "Session ID: {$session->id}\n"; -echo "Trace: https://platform.claude.com/workspaces/default/sessions/{$session->id}\n"; +echo "Trace: https://platform.claude.com/workspaces/default/sessions/{$session->id}\n"; // swap 'default' for your workspace ID if the API key is not in the Default workspace ``` ### Updating an Agent diff --git a/content/github/skills/skills/claude-api/python/claude-api/streaming.md b/content/github/skills/skills/claude-api/python/claude-api/streaming.md index a21ba933b..00649efdc 100644 --- a/content/github/skills/skills/claude-api/python/claude-api/streaming.md +++ b/content/github/skills/skills/claude-api/python/claude-api/streaming.md @@ -73,7 +73,7 @@ with client.messages.stream( ## Streaming with Tool Use -The Python tool runner currently returns complete messages. Use streaming for individual API calls within a manual loop if you need per-token streaming with tools: +The Python tool runner supports streaming: pass `stream=True` to `client.beta.messages.tool_runner(...)` and each iteration yields a stream you consume event-by-event, with `get_final_message()` for the accumulated message per turn (see `shared/tool-use-concepts.md` → Tool Runner vs Manual Loop). Use the manual-loop pattern below only when you're not using the tool runner and need per-token streaming with tools: ```python with client.messages.stream( diff --git a/content/github/skills/skills/claude-api/python/claude-api/tool-use.md b/content/github/skills/skills/claude-api/python/claude-api/tool-use.md index 5ac51789d..8fde8b1f1 100644 --- a/content/github/skills/skills/claude-api/python/claude-api/tool-use.md +++ b/content/github/skills/skills/claude-api/python/claude-api/tool-use.md @@ -47,6 +47,43 @@ For async usage, use `@beta_async_tool` with `async def` functions. - Tool schemas are generated automatically from function signatures - Iteration stops automatically when Claude has no more tool calls +### Server tools with the tool runner + +The runner's `tools` list accepts raw server-tool definitions (`web_search_20260209`, `web_fetch_20260209`, code execution) alongside decorated tools — pass the literal tool dict; server tools run on Anthropic's servers, so there is no function to implement. + +**Caution — the runner does not auto-resume `pause_turn` (as of `anthropic` 0.116.0).** A long-running server-tool turn can stop with `stop_reason: "pause_turn"`. The runner only continues after a client tool produces a result, so a paused turn ends the loop and is returned as the final message — no error, no warning, just a silently truncated answer. Unlike the TypeScript runner, the Python runner cannot be resumed mid-loop: it exits unconditionally when no client tool ran, and `runner.append_messages(...)` does not prevent the exit. To handle `pause_turn`, mirror the conversation history as you iterate, then restart the runner with the paused turn appended: + +```python +messages = [{"role": "user", "content": user_input}] + +max_restarts = 5 # cap pause_turn restarts, mirroring max_continuations advice +restarts = 0 +while True: + runner = client.beta.messages.tool_runner( + model="claude-opus-4-8", + max_tokens=16000, + tools=tools, # may mix @beta_tool functions and server-tool definitions + messages=messages, + ) + last = None + for message in runner: + last = message + # Mirror the history — the runner keeps its own copy and does not expose it + messages.append({"role": "assistant", "content": message.content}) + tool_response = runner.generate_tool_call_response() # cached; tools still run once + if tool_response is not None: + messages.append(tool_response) + if last is None or last.stop_reason != "pause_turn": + break + restarts += 1 + if restarts > max_restarts: + raise RuntimeError("giving up: turn still paused after max_restarts") + # Paused mid-turn: `messages` already ends with the paused assistant + # turn, so the next runner resumes it +``` + +Alternatively, use the manual loop below, which handles `pause_turn` explicitly. + --- ## MCP Tool Conversion Helpers @@ -130,7 +167,9 @@ Conversion functions raise `UnsupportedMCPValueError` if an MCP value cannot be ## Manual Agentic Loop -Use this when you need fine-grained control over the loop (e.g., custom logging, conditional tool execution, human-in-the-loop approval): +Prefer the tool runner above. Drop to a manual loop only when you need control the runner does not expose (e.g., a custom transport, request shapes the SDK cannot build, or avoiding a beta dependency — the runner is beta). Human-in-the-loop approval does *not* require a manual loop — gate inside the tool function (return a "user declined" result) or inspect pending `tool_use` blocks in the `for message in runner:` body and call `runner.set_messages_params()`. + +If you do need a manual loop: ```python import anthropic diff --git a/content/github/skills/skills/claude-api/python/managed-agents/README.md b/content/github/skills/skills/claude-api/python/managed-agents/README.md index f670f9a56..5ffa8b37a 100644 --- a/content/github/skills/skills/claude-api/python/managed-agents/README.md +++ b/content/github/skills/skills/claude-api/python/managed-agents/README.md @@ -2,7 +2,7 @@ > **Bindings not shown here:** This README covers the most common managed-agents flows for Python. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the Python SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK. -> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path. +> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path. ## Installation @@ -61,7 +61,7 @@ session = client.beta.sessions.create( environment_id=environment.id, ) print(session.id, session.status) -print(f"Trace: https://platform.claude.com/workspaces/default/sessions/{session.id}") +print(f"Trace: https://platform.claude.com/workspaces/default/sessions/{session.id}") # swap 'default' for your workspace ID if the API key is not in the Default workspace ``` ### With system prompt and custom tools diff --git a/content/github/skills/skills/claude-api/ruby/managed-agents/README.md b/content/github/skills/skills/claude-api/ruby/managed-agents/README.md index ee5579d65..8e4392707 100644 --- a/content/github/skills/skills/claude-api/ruby/managed-agents/README.md +++ b/content/github/skills/skills/claude-api/ruby/managed-agents/README.md @@ -2,7 +2,7 @@ > **Bindings not shown here:** This README covers the most common managed-agents flows for Ruby. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the Ruby SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK. -> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `client.beta.agents.create` and pass it to every subsequent `client.beta.sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path. +> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `client.beta.agents.create` and pass it to every subsequent `client.beta.sessions.create`; do not call `agents.create` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path. ## Installation @@ -63,7 +63,7 @@ session = client.beta.sessions.create( title: "Quickstart session" ) puts "Session ID: #{session.id}" -puts "Trace: https://platform.claude.com/workspaces/default/sessions/#{session.id}" +puts "Trace: https://platform.claude.com/workspaces/default/sessions/#{session.id}" # swap 'default' for your workspace ID if the API key is not in the Default workspace ``` ### Updating an Agent diff --git a/content/github/skills/skills/claude-api/shared/live-sources.md b/content/github/skills/skills/claude-api/shared/live-sources.md index 5f12d8853..a9e2e4e32 100644 --- a/content/github/skills/skills/claude-api/shared/live-sources.md +++ b/content/github/skills/skills/claude-api/shared/live-sources.md @@ -106,7 +106,7 @@ Use these when a managed-agents binding, behavior, or wire-level detail isn't co ### Anthropic CLI -The `ant` CLI provides terminal access to the Claude API. Every API resource is exposed as a subcommand. It is one convenient way to create agents, environments, sessions, and other resources from version-controlled YAML, and to inspect responses interactively. +The `ant` CLI provides terminal access to the Claude API. Every API resource is exposed as a subcommand. It is the recommended way to create agents and environments from version-controlled YAML (`ant beta:agents create < agent.yaml` — see `shared/anthropic-cli.md`), and also exposes sessions and every other API resource for scripting and interactive inspection. | Topic | URL | Extraction Prompt | | ------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-api-reference.md b/content/github/skills/skills/claude-api/shared/managed-agents-api-reference.md index e3ac0b83a..8f721b425 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-api-reference.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-api-reference.md @@ -2,6 +2,8 @@ All endpoints require `x-api-key` and `anthropic-version: 2023-06-01` headers. Managed Agents endpoints additionally require the `anthropic-beta` header. +> Most users should define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md`. The endpoints below are the underlying API that the CLI and SDKs drive. + ## Beta Headers ``` @@ -42,7 +44,7 @@ All resources are under the `beta` namespace. Python and TypeScript share identi **Agent shorthand:** `agent` on session create accepts three forms — a bare string (`agent="agent_abc123"`, latest version), a pinned reference `{type: "agent", id, version}`, or `{type: "agent_with_overrides", id, version?, model?, system?, tools?, mcp_servers?, skills?}` to override those fields for this session only (see `shared/managed-agents-core.md` → Override agent configuration for a session). -**Model shorthand:** `model` on agent create accepts either a bare string (`model="claude-opus-4-8"` — uses `standard` speed) or the full config object (`{id: "claude-opus-4-8", speed: "fast"}`). Note: `speed: "fast"` is supported only on Opus 4.8 and Opus 4.7. Opus 4.7 fast mode is deprecated; after removal, `speed: "fast"` on Opus 4.7 returns an error. Opus 4.8 is the durable fast-capable tier. +**Model shorthand:** `model` on agent create accepts either a bare string (`model="claude-opus-4-8"` — uses `standard` speed) or the full config object, which takes `speed` and `effort` alongside `id`: `{id: "claude-opus-4-8", speed: "fast"}`, `{id: "claude-opus-4-8", effort: "high"}`. `effort` accepts a level string (`low`/`medium`/`high`/`xhigh`/`max`) or `{type: ""}`, and is **agent-configuration only** — an `effort` inside a per-session `model` override is ignored. See `shared/managed-agents-core.md` → Effort on the agent model. Note: `speed: "fast"` is supported only on Opus 4.8 and Opus 4.7. Opus 4.7 fast mode is deprecated; after removal, `speed: "fast"` on Opus 4.7 returns an error. Opus 4.8 is the durable fast-capable tier. --- @@ -55,7 +57,7 @@ All resources are under the `beta` namespace. Python and TypeScript share identi | `GET` | `/v1/agents` | ListAgents | List agents | | `POST` | `/v1/agents` | CreateAgent | Create a saved agent configuration | | `GET` | `/v1/agents/{agent_id}` | GetAgent | Get agent details | -| `POST` | `/v1/agents/{agent_id}` | UpdateAgent | Update agent configuration | +| `POST` | `/v1/agents/{agent_id}` | UpdateAgent | Update agent configuration. `version` is **optional**: supply it (≥ 1) for optimistic concurrency — a mismatch returns 409 — or omit it for an unconditional last-write-wins update. | | `POST` | `/v1/agents/{agent_id}/archive` | ArchiveAgent | Archive an agent. Makes it **read-only**; existing sessions continue, new sessions cannot reference it. No unarchive — this is the terminal state. | | `GET` | `/v1/agents/{agent_id}/versions` | ListAgentVersions | List agent versions | @@ -232,7 +234,7 @@ Immutable per-mutation snapshots (`memver_...`) — the audit and rollback surfa ```json { "name": "string (required, 1-256 chars)", - "model": "claude-opus-4-8 (required — bare string, or {id, speed} object)", + "model": "claude-opus-4-8 (required — bare string, or {id, speed?, effort?} object)", "description": "string (optional, up to 2048 chars)", "system": "string (optional, up to 100,000 chars)", "tools": [ @@ -281,6 +283,9 @@ Immutable per-mutation snapshots (`memver_...`) — the audit and rollback surfa "checkout": { "type": "branch", "name": "main" } } ], + "initial_events": [ + { "type": "user.message", "content": [{ "type": "text", "text": "Review the auth module." }] } + ], "vault_ids": ["vlt_abc123 (optional — vault credentials: MCP auth + environment variables)"], "metadata": { "key": "value" @@ -288,7 +293,9 @@ Immutable per-mutation snapshots (`memver_...`) — the audit and rollback surfa } ``` -> The `agent` field accepts a string ID, `{type: "agent", id, version}`, or `{type: "agent_with_overrides", id, version?, ...}` for session-local overrides of `model`/`system`/`tools`/`mcp_servers`/`skills`. Outside the overrides form, those fields live on the agent, not here. +> The `agent` field accepts a string ID, `{type: "agent", id, version}`, or `{type: "agent_with_overrides", id, version?, ...}` for session-local overrides of `model`/`system`/`tools`/`mcp_servers`/`skills`. Outside the overrides form, those fields live on the agent, not here. An `effort` inside a `model` override is ignored — set it on the agent. +> +> **`initial_events`** (optional, max 50) sends events at creation and starts the agent loop in the same call. Only `user.message` and `user.define_outcome` are accepted — no `system.message`, and none of the tool-result kinds. Validation is all-or-nothing. See `shared/managed-agents-core.md` → Seeding a session with `initial_events`. > > **`checkout`** accepts `{type: "branch", name: "..."}` or `{type: "commit", sha: "..."}`. Omit for the repo's default branch. @@ -347,7 +354,7 @@ Immutable per-mutation snapshots (`memver_...`) — the audit and rollback surfa } ``` -> `system.message` events (update the system prompt between turns) use the same envelope with `type: "system.message"` — Claude Opus 4.8 only; see `shared/managed-agents-events.md` § Updating the system prompt mid-session. +> `system.message` events (append system-level context for this turn and later ones) use the same envelope with `type: "system.message"` — supported on Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5, checked against the agent's *primary* model only; see `shared/managed-agents-events.md` § Adding system context mid-session. ### Define Outcome Event diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-client-patterns.md b/content/github/skills/skills/claude-api/shared/managed-agents-client-patterns.md index 26d588f8a..9290e3452 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-client-patterns.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-client-patterns.md @@ -39,7 +39,9 @@ for await (const event of stream) { ## 2. `processed_at` — queued vs processed -Every event on the stream carries `processed_at` (ISO 8601). For client-sent events (`user.message`, `user.interrupt`, `user.tool_confirmation`, `user.custom_tool_result`) it's `null` when the event has been queued but not yet picked up by the agent, and populated once the agent processes it. The same event appears on the stream twice — once with `processed_at: null`, once with a timestamp. +Every event on the stream carries `processed_at` (ISO 8601), set when the event finishes processing. For client-sent events (`user.message`, `user.interrupt`, `user.tool_confirmation`) it's `null` while the event is queued behind earlier ones, and populated once the agent processes it — so the same event appears on the stream twice, once with `null` and once with a timestamp. + +**Three event types skip the queued phase:** `user.define_outcome`, `user.custom_tool_result`, and `user.tool_result` are processed on receipt and echoed back with `processed_at` already populated. A pending → acknowledged UI that assumes "first sighting is always `null`" will never clear for these — treat a populated `processed_at` on first sighting as immediately acknowledged. ```ts for await (const event of stream) { @@ -198,7 +200,11 @@ for await (const event of stream) { if (event.type === 'agent.custom_tool_use' && event.name === 'linear_graphql') { const result = await linear.request(event.input.query, event.input.vars) // host's key await client.beta.sessions.events.send(session.id, { - events: [{ type: 'user.custom_tool_result', tool_use_id: event.id, result }], + events: [{ + type: 'user.custom_tool_result', + custom_tool_use_id: event.id, + content: [{ type: 'text', text: JSON.stringify(result) }], + }], }) } } diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-core.md b/content/github/skills/skills/claude-api/shared/managed-agents-core.md index 401181802..9787de403 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-core.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-core.md @@ -41,19 +41,19 @@ rescheduling → running ↔ idle → terminated | `idle` | Agent has finished the current task, and is awaiting input. It's either waiting for input to continue working via a `user.message` or blocked awaiting a `user.custom_tool_result` or `user.tool_confirmation`. The `stop_reason` attached contains more information about why the Agent has stopped working. | | `running` | Session has starting running, and the Agent is actively doing work. | | `rescheduling` | Session is (re)scheduling after a retryable error has occurred, ready to be picked up by the orchestration system. | -| `terminated` | Session has terminated, entering an irreversible and unusable state. | +| `terminated` | Session has ended and is in an irreversible, unusable state — **either on completion or because of an unrecoverable error**. Terminated does not by itself mean failure; fetch the session to tell the two apart. | - Events can be sent when the session is `running` or `idle`. Messages are queued and processed in order. - The agent transitions `idle → running` when it receives a new event, then back to `idle` when done. - Errors surface as `session.error` events in the stream, not as a status value. -Every session has a live trace view in the Anthropic Console at `https://platform.claude.com/workspaces/default/sessions/{session_id}`. Print this URL immediately after creating a session so the user can watch tool calls and messages stream in real time. The `default` workspace segment auto-resolves to the session's actual workspace on load, so you don't need the workspace id. +Every session has a live trace view in the Anthropic Console at `https://platform.claude.com/workspaces/{workspace}/sessions/{session_id}`. Print this URL immediately after creating a session so the user can watch tool calls and messages stream in real time. **`{workspace}` is the workspace the API key belongs to** — use `default` only when that's the org's Default workspace. The session response does **not** include a workspace field and the Console has no workspace-agnostic session route, so for non-default workspaces substitute the workspace's ID (visible in the Console URL bar, or expose it as a config value alongside the API key). A `default` link to a session that lives in another workspace lands on a **"Session not found"** page — the **Search workspaces** button there will locate it, but it is not an automatic redirect. ### Built-in session features - **Context compaction** — if you approach max context, the API automatically condenses session history to keep the interaction going - **Prompt caching** — historical repeated tokens are cached, reducing processing time and cost -- **Extended thinking** — on by default, returned as `agent.thinking` events +- **Extended thinking** — on by default; `agent.thinking` events signal thinking progress and carry no thinking content ### Session operations @@ -124,7 +124,7 @@ const session = await client.beta.sessions.create( ); ``` -> 💡 **Watch it live in Console.** While developing, print a link so you can click through to the session UI instead of parsing the event stream: `https://platform.claude.com/workspaces/default/sessions/{session.id}`. The `default` workspace segment auto-resolves to the session's actual workspace on load, so you don't need to know the workspace id. Include this `print`/`console.log` in code you generate for users who are iterating locally. +> 💡 **Watch it live in Console.** While developing, print a link so you can click through to the session UI instead of parsing the event stream: `https://platform.claude.com/workspaces/{workspace}/sessions/{session.id}`. Use `default` for `{workspace}` only when the API key belongs to the org's Default workspace; otherwise substitute the workspace's ID (the session response does not carry it — read it from the Console URL bar or make it a config value). Include this `print`/`console.log` in code you generate for users who are iterating locally. **Session creation parameters:** @@ -134,15 +134,38 @@ const session = await client.beta.sessions.create( | `environment_id`| string | **Yes** | Environment ID | | `title` | string | No | Human-readable name (appears in logs/dashboards) | | `resources` | array | No | Files, GitHub repos, or memory stores, attached to the container at startup. Memory stores are session-create-only (not addable via `resources.add()`). | +| `initial_events`| array | No | Events to send at creation, processed in order — collapses create + first send into one call. See § Seeding a session with `initial_events` below. | | `vault_ids` | array | No | Vault IDs (`vlt_*`) — MCP credentials with auto-refresh + `environment_variable` secrets substituted at egress. See `shared/managed-agents-tools.md` → Vaults. | | `metadata` | object | No | User-provided key-value pairs | +#### Seeding a session with `initial_events` + +Creating a session without `initial_events` registers the session in `idle` and starts no work; the sandbox is provisioned when the session first needs it. Passing a **non-empty** `initial_events` array starts the agent loop in the same call — the session is **created directly in `running`**, never passing through `idle`. A client that waits for an `idle → running` transition to know work began will wait forever; check `status` on the create response instead. + +```python +session = client.beta.sessions.create( + agent=AGENT_ID, + environment_id=ENVIRONMENT_ID, + initial_events=[ + {"type": "user.message", "content": [{"type": "text", "text": "Review the auth module."}]}, + ], +) +``` + +- **Only `user.message` and `user.define_outcome` are accepted**, max **50** events. The tool-result kinds (`user.tool_confirmation`, `user.tool_result`, `user.custom_tool_result`) are rejected because no agent turn exists yet, and `user.interrupt` because there is no turn to stop. Unlike a scheduled deployment's `initial_events`, a session's does **not** accept `system.message`. +- Each event is validated and persisted before the create response returns, in list order, with a server-assigned ID — exactly as if you had posted it to the send-events endpoint immediately after creation. Per-event content rules are the same as on that endpoint. +- **The events are not echoed on the create response.** Read them back with `sessions.events.list(session.id)` if you need their server-assigned IDs. +- **Validation is all-or-nothing:** if any event fails, the whole request is rejected and no session is created. An empty list is equivalent to omitting the field. +- Rejections: more than one `user.define_outcome` → 400; a `user.define_outcome` without a `rubric` → 400; more than 100 file-sourced `document` content blocks across the whole list → 400; a request body over 32 MB → 413. + +An outcome-driven session is therefore a single call — pass one `user.define_outcome` in `initial_events` instead of creating the session and then sending the event (see `shared/managed-agents-outcomes.md`). + **Agent configuration fields** (passed to `agents.create()`, not `sessions.create()`): | Field | Type | Required | Description | | ------------- | -------- | -------- | ---------------------------------------------- | | `name` | string | **Yes** | Human-readable name (1-256 chars) | -| `model` | string or object | **Yes** | Claude model ID (bare string, or `{id, speed}` object). All Claude 4.5+ models supported. | +| `model` | string or object | **Yes** | Claude model ID (bare string, or an object taking `id`, `speed`, and `effort`). All Claude 4.5+ models supported. See § Effort on the agent model below. | | `system` | string | No | System prompt — defines the agent's behavior (up to 100K chars) | | `tools` | array | No | Encompasses three kinds: (1) pre-built Claude Agent tools (`agent_toolset_20260401`), (2) MCP tools (`mcp_toolset`), and (3) custom client-side tools. Max 128. | | `mcp_servers` | array | No | MCP server connections — standardized third-party capabilities (e.g. GitHub, Asana). Max 20, unique names. See `shared/managed-agents-tools.md` → MCP Servers. | @@ -164,7 +187,7 @@ The API is **flat** — `model`, `system`, `tools` etc. are top-level fields, no | Field | Type | Required | Description | | ------------------ | -------- | -------- | -------------------------------------------------- | | `name` | string | Yes | Human-readable name | -| `model` | string | Yes | Claude model ID | +| `model` | string or object | Yes | Claude model ID — bare string, or `{id, speed?, effort?}` | | `system` | string | No | System prompt | | `tools` | array | No | Agent toolset / MCP toolset / custom tools | | `mcp_servers` | array | No | MCP server connections | @@ -189,10 +212,27 @@ The agent is a **persistent resource**, not a per-run parameter. The intended pa > **Recommended — define agents and environments as YAML + apply via the `ant` CLI.** The split is **CLI for the control plane, SDK for the data plane**: agents and environments are relatively static resources you manage with `ant` (version-controlled YAML, applied from CI); sessions are dynamic and driven by your application through the SDK. See `shared/anthropic-cli.md` → *Version-controlled Managed Agents resources* for the `ant beta:agents create < agent.yaml` / `update --version N` flow. The SDK `agents.create()` call shown elsewhere in this doc is the in-code equivalent — use it when you need to provision programmatically, but prefer the YAML flow for anything a human maintains. +### Effort on the agent model + +Pass `model` as an object to set the effort level: `{"id": "claude-opus-4-8", "effort": "high"}`. `effort` accepts a level string (`low`, `medium`, `high`, `xhigh`, `max`) or an object such as `{"type": "high"}`. The create/update response echoes it in object form and fills in omitted `model` fields with their defaults. + +> ⚠️ **Effort is agent configuration only.** An `effort` set inside a per-session `model` override is **not applied** — the session runs at the agent's effort. To change effort you must update the agent (or point the session at a different agent). This is the one field where the override form silently does nothing rather than erroring. + +The same object form carries `speed` for fast mode: `{"id": "claude-opus-4-8", "speed": "fast"}`. + ### Versioning Each `POST /v1/agents/{id}` (update) creates a new immutable version (numeric timestamp, e.g. `1772585501101368014`). The agent's history is append-only — you can't edit a past version. +**`version` on update is optional.** Supply it for optimistic concurrency, or omit it to apply the update unconditionally: + +| `version` | Behavior | Fits | +|---|---|---| +| Supplied (must be ≥ 1) | 409 if it doesn't match the agent's current version — **even when the fields you send already equal the stored values**. Re-read and retry. | Interactive callers; the recommended default | +| Omitted | Applies unconditionally. The most recent update silently replaces any concurrent one, with no error to either caller. | Declarative apply loops — e.g. a CI job syncing checked-in agent definitions, where the loop owns the agent | + +**Update semantics.** Omitted fields are preserved. Scalar fields (`model`, `system`, `name`, `description`) are replaced; `system` and `description` can be cleared with `null`, while `model` and `name` cannot. Array fields (`tools`, `mcp_servers`, `skills`) are replaced wholesale — `null` or `[]` clears them. **`effort` is the exception inside a `model` object you supply:** if the model `id` is unchanged, omitting `effort` leaves the stored level alone; if you change the `id`, an omitted `effort` resets to the new model's default. + **Why version:** - **Reproducibility** — pin a session to a known-good config: `{type: "agent", id, version: 3}` - **Safe iteration** — update the agent without breaking sessions already running on the old version @@ -252,8 +292,8 @@ session = client.beta.sessions.create( Each overridable field follows tri-state rules: - **Omit** → the session inherits the value from the referenced agent version. -- **`null` (or `[]` for list fields)** → the session runs with that field cleared. Applies in full to `system`, `mcp_servers`, `skills`. Two exceptions: `model` is never clearable (`model: null` → 400 `agent_model_required`); clearing `tools` returns 400 when the session's effective `skills` is non-empty (skills require the `read` tool), otherwise `tools: null` / `tools: []` clears. -- **A value** → replaces the agent's value **in full**. Overrides never merge — a `tools` override must list every tool the session should have. +- **`null` (or `[]` for list fields)** → the session runs with that field cleared. Applies in full to `system` and `skills`. Three exceptions: `model` is never clearable (`model: null` → 400 `agent_model_required`); clearing `tools` returns 400 when the session's effective `skills` is non-empty (skills require the `read` tool); and clearing `mcp_servers` returns 400 when the effective `tools` still contains an `mcp_toolset` referencing one of the agent's servers — override `tools` in the same request to drop those entries, then clear `mcp_servers`. +- **A value** → replaces the agent's value **in full**. Overrides never merge — a `tools` override must list every tool the session should have. One exception: an `effort` level inside a `model` override is **not applied** (set it on the agent instead — see § Effort on the agent model). Overrides are session-local: they do **not** modify the agent resource or create a new agent version. The response's `agent` object reflects the post-override configuration, while its `id` and `version` still identify the base agent — so you can trace a session back to its base. In multiagent sessions, overrides apply to the coordinator and its `{type: "self"}` copies; roster agents referenced by ID always use their own as-created configuration (see `shared/managed-agents-multiagent.md`). @@ -261,7 +301,7 @@ Overrides are session-local: they do **not** modify the agent resource or create `sessions.update()` can change `agent.tools`, `agent.mcp_servers` (including permission policies), and `vault_ids` on an **existing** session. This is a **session-local override** — it does not create a new agent version and does not propagate back to the agent object. The provided arrays are **full replacements**; to append one tool, `GET` the session, modify, and `POST` back. The session must be `idle` — interrupt first if running. -Only `tools` and `mcp_servers` can change after a session is created — to run with a `model`, `system`, or `skills` other than the agent's values, use `agent_with_overrides` at create time (above). The agent's configured `system` field is fixed for the session's lifetime; you can still **replace the effective system prompt between turns** by sending a `system.message` event (see `shared/managed-agents-events.md` § Updating the system prompt mid-session). +Only `tools` and `mcp_servers` can change after a session is created — to run with a `model`, `system`, or `skills` other than the agent's values, use `agent_with_overrides` at create time (above). The agent's configured `system` field is fixed for the session's lifetime; you can still **append system-level context between turns** by sending a `system.message` event (see `shared/managed-agents-events.md` § Adding system context mid-session). ```python client.beta.sessions.update( diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-environments.md b/content/github/skills/skills/claude-api/shared/managed-agents-environments.md index 64558539b..f44f76bd5 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-environments.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-environments.md @@ -61,7 +61,7 @@ To run tool execution in **your own infrastructure** instead of Anthropic's, set ## Resources -Attach files, GitHub repositories, and memory stores to a session. **Session creation blocks until all resources are mounted** — the container won't go `running` until every file and repo is in place. Max **999 file resources** per session. Multiple GitHub repositories per session are supported. For `type: "memory_store"` resources (persistent cross-session memory — max 8 per session), see `shared/managed-agents-memory.md`. +Attach files, GitHub repositories, and memory stores to a session. Resources are resolved during session creation, so a bad `file_id` or an unreachable repo surfaces on the create call rather than mid-run. Creating a session does **not** by itself start work or provision the sandbox — without `initial_events` the session is only registered, and the sandbox comes up when the session first needs it (see `shared/managed-agents-core.md` → Seeding a session with `initial_events`). Max **999 file resources** per session. Multiple GitHub repositories per session are supported. For `type: "memory_store"` resources (persistent cross-session memory — max 8 per session), see `shared/managed-agents-memory.md`. ### File Uploads (input — host → agent) diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-events.md b/content/github/skills/skills/claude-api/shared/managed-agents-events.md index 289b9a18c..a4d9f736e 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-events.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-events.md @@ -13,11 +13,11 @@ Send events to a session via `POST /v1/sessions/{id}/events`. | `user.tool_confirmation` | Approve/deny a tool call (when `always_ask` policy) | | `user.custom_tool_result` | Provide result for a custom tool call | | `user.define_outcome` | Start a rubric-graded iterate loop — see `shared/managed-agents-outcomes.md` | -| `system.message` | Update the agent's system prompt between turns — **Claude Opus 4.8 only**; see § Updating the system prompt mid-session | +| `system.message` | Append privileged system-level context for this turn and every turn after it; see § Adding system context mid-session | -#### Updating the system prompt mid-session (`system.message`) +#### Adding system context mid-session (`system.message`) -Unlike the `system` field on the agent definition (fixed at session creation), a `system.message` event changes the system prompt **as the session progresses** — a different persona, revised constraints, or runtime-fetched context that should shape behavior going forward: +The `system` field on the agent definition sets the top-level system prompt and is fixed for the session's lifetime. A `system.message` event **appends** to the session's system context as a `role: "system"` turn — it does not replace that prompt. The content applies to the accompanying turn and all subsequent turns. Use it for a different persona, revised constraints, or runtime-fetched context that should shape behavior going forward: ```python client.beta.sessions.events.send( @@ -35,8 +35,8 @@ client.beta.sessions.events.send( Constraints: -- **Claude Opus 4.8 only.** If any model configured on the agent does not support mid-conversation system injection, the event is rejected with a `model_does_not_support_mid_conversation_system` validation error. -- **Cannot be sent while the session is idle with `stop_reason: requires_action`** (blocked on `user.custom_tool_result` / `user.tool_confirmation`). +- **Model-gated: Claude Opus 4.8, Claude Sonnet 5, Claude Fable 5, and Claude Mythos 5.** Only the agent's **primary** model is checked — `system.message` lands on the primary thread only, so subagent models are not considered. On an unsupported primary model the event is rejected with a `model_does_not_support_mid_conversation_system` validation error. +- **While the session is idle with `stop_reason: requires_action`** (blocked on `user.custom_tool_result` / `user.tool_confirmation`), a `system.message` is accepted **only when it trails a tool result event in the same request**. Sent on its own — or alongside a `user.message` — it is rejected until the pending tool events are resolved. - `content` accepts 1–1000 text items. ### Receiving Events @@ -47,7 +47,7 @@ Three methods: 2. **Polling**: `GET /v1/sessions/{id}/events` — paginated event list (query params: `limit` default 1000, `page`). **Returns immediately** — this is a plain paginated GET, not a long-poll. 3. **Webhooks**: Anthropic POSTs session state transitions to your HTTPS endpoint — thin payloads (IDs only), HMAC-signed, Console-registered. See `shared/managed-agents-webhooks.md`. -All **persisted** events carry `id`, `type`, and `processed_at` (ISO 8601; `null` if not yet processed by the agent). The stream-only `event_start` / `event_delta` preview events (see § Live previews) carry only the `id` of the event they preview. +All **persisted** events carry `id`, `type`, and `processed_at` (ISO 8601), set when the event finishes processing. On events you send, `processed_at` is `null` while the event is still queued behind earlier ones — **except** `user.define_outcome`, `user.custom_tool_result`, and `user.tool_result`, which are processed on receipt and echoed back with `processed_at` already populated. The stream-only `event_start` / `event_delta` preview events (see § Live previews) carry only the `id` of the event they preview. > ⚠️ **Robust polling (raw HTTP).** If you bypass the SDK and roll your own poll loop, don't rely on `requests` or `httpx` timeouts as wall-clock caps — they're **per-chunk** read timeouts, reset every time a byte arrives. A trickling response (heartbeats, a wedged chunked-encoding body, a misbehaving proxy) can keep the call blocked indefinitely even with `timeout=(5, 60)` or `httpx.Timeout(120)`. Neither library has a "total wall-clock" timeout built in. For a hard deadline: track `time.monotonic()` at the loop level and break/cancel if a single request exceeds your budget (e.g. via a watchdog thread, or `asyncio.wait_for()` around async httpx). **Prefer the SDK** — `client.beta.sessions.events.stream()` and `client.beta.sessions.events.list()` handle timeout + retry sanely. > @@ -60,7 +60,7 @@ Event types use dot notation, grouped by namespace: | Event Type | Description | | --- | --- | | `agent.message` | Agent text output | -| `agent.thinking` | Extended thinking blocks | +| `agent.thinking` | Progress signal that the agent is thinking — it does **not** carry the thinking content | | `agent.tool_use` | Agent used a built-in tool (`agent_toolset_20260401`) | | `agent.tool_result` | Result from a built-in tool | | `agent.mcp_tool_use` | Agent used an MCP tool | @@ -70,7 +70,7 @@ Event types use dot notation, grouped by namespace: | `session.status_idle` | Agent has finished the current task, and is awaiting input. It's either waiting for input to continue working via a `user.message` or blocked awaiting a `user.custom_tool_result` or `user.tool_confirmation`. The `stop_reason` attached contains more information about why the Agent has stopped working. | | `session.status_running` | Session has starting running, and the Agent is actively doing work. | | `session.status_rescheduled` | Session is (re)scheduling after a retryable error has occurred, ready to be picked up by the orchestration system. | -| `session.status_terminated` | Session has terminated, entering an irreversible and unusable state. | +| `session.status_terminated` | Session ended and is irreversibly unusable — **on completion or on error**, not error-only. | | `session.error` | Error occurred during processing | | `span.model_request_start` | Model inference started | | `span.model_request_end` | Model inference completed | @@ -89,7 +89,9 @@ Stream-only delta preview events (`event_start`, `event_delta`) are the one exce By default, assistant text reaches the stream as buffered `agent.message` events — emitted only after the model request that produced them finishes. **Live previews** let you render that text incrementally while the model is still generating. The buffered `agent.message` is always the authoritative record; a client that ignores previews still receives a complete, correct stream. The wire format is **not** Messages-API streaming: the delta type is `content_delta`, not `content_block_delta`, so Messages-API accumulator code does not carry over unchanged. -**Opt in per stream connection** by adding the `event_deltas[]` query parameter to `GET /v1/sessions/{id}/events/stream`, repeated once per event type to preview. Accepted values: `agent.message`, `agent.thinking` (any other value → 400). Only the session-level stream supports it — per-thread streams (`/threads/{tid}/stream`) reject the parameter. +**Opt in per stream connection** by adding the `event_deltas[]` query parameter, repeated once per event type to preview. Accepted values: `agent.message`, `agent.thinking` — any other value returns a 400, as does a request with more than 100 values. **Both stream endpoints accept it:** the session-level stream (`GET /v1/sessions/{id}/events/stream`) and each session thread's own stream (`GET /v1/sessions/{sid}/threads/{tid}/stream`). In a shell, quote the URL or percent-encode the brackets as `%5B%5D` — bare `[]` is a glob pattern. + +**Previews are thread-scoped.** A connection previews only the thread it is reading. A child thread's previews are delivered on that child's stream and are *never* cross-posted to the session-level stream, whose previews stay scoped to the primary thread. To watch a subagent's text as the model generates it, open that subagent's thread stream — see `shared/managed-agents-multiagent.md`. Run one accumulator instance per connection. ```python stream = client.beta.sessions.events.stream( @@ -105,15 +107,25 @@ When a previewed event begins, the stream emits an `event_start` carrying the up {"type": "event_delta", "event_id": "sevt_01abc...", "delta": {"type": "content_delta", "index": 0, "content": {"type": "text", "text": "Here is the summary"}}} ``` -`event_start` and `event_delta` have no `id` or `processed_at` of their own — the only identifier they carry is the `id` of the event they preview. For `agent.thinking`, **only** the `event_start` is emitted (a "thinking has started" signal) — no deltas follow; read content from the buffered `agent.thinking` event. +`event_start` and `event_delta` have no `id` or `processed_at` of their own — the only identifier they carry is the `id` of the event they preview. For `agent.thinking`, **only** the `event_start` is emitted (a "thinking has started" signal) — no deltas follow, and the buffered `agent.thinking` that concludes the preview carries no thinking content either. It is a progress signal, not a content carrier; there is nothing to read out of it. **Accumulate-and-reconcile pattern.** Treat the preview as a scratch buffer keyed by `(event_id, index)`. On `event_start`, create an empty entry for the announced `id`. On each `event_delta`, append `delta.content.text` to `(event_id, delta.index)` and render the running text. When the buffered `agent.message` arrives, match it by `id`, **discard the accumulated preview**, and render the message's content instead. The identifiers always line up: `event_start.event.id`, every `event_delta.event_id`, and the buffered event's `id` are the same value. On a normal turn the order is fixed: `session.status_running` → `span.model_request_start` → `event_start` → `event_delta`* → buffered `agent.message` → `span.model_request_end`. If the turn errors or is interrupted the buffered event may never arrive, but `span.model_request_end` still does — close any unreconciled preview when you see it. Python/TypeScript/Go SDKs ship an accumulator helper that implements this; in other SDKs apply the manual pattern to the generated event types. +**Two guarantees the pattern relies on:** concatenating a preview's deltas in arrival order, keyed by `(event_id, index)`, yields a *prefix* of `content[index].text` in the buffered event (a prefix, not necessarily the whole text — deltas may be shed under load); and a connection emits at most one `event_start` per `event_id`, with the buffered event as the last thing that connection delivers for that `id`. + **Limitations:** - **Best effort** — under load the server may shed deltas for an event; you receive a contiguous prefix and then no further deltas for that event. The buffered `agent.message` still arrives complete. Never treat an accumulated preview as final. -- **No replay on reconnect** — deltas are delivered only to the connection that opted in, while it's open. After a drop, follow the consolidation pattern in § Reconnecting after a dropped stream — the history fetch returns any buffered events emitted during the gap; missed deltas cannot be re-requested. -- **Primary thread, text only** — tool use, tool results, MCP results, and subagent-thread activity are never previewed. -- **Never persisted** — `event_start` / `event_delta` exist only on the live SSE stream, never in `GET /v1/sessions/{id}/events`. +- **No replay on reconnect** — deltas are delivered only to the connection that opted in, while it's open; this holds for the session-level stream and each thread stream alike. A connection opened after a model request started receives no deltas for that in-flight event. After a drop, follow the consolidation pattern in § Reconnecting after a dropped stream — the history fetch returns any buffered events emitted during the gap; missed deltas cannot be re-requested. +- **One thread, text only** — previews cover assistant text on the thread the connection is reading. Tool use, tool results, MCP results, and activity on any *other* thread are never previewed on that connection. +- **Never persisted** — `event_start` / `event_delta` exist only on the live SSE stream, never in `GET /v1/sessions/{id}/events` or any thread's event history. + +**Troubleshooting:** + +| You see | What it means | +| --- | --- | +| Buffered events but no `event_start` / `event_delta` | This connection didn't opt in (`event_deltas[]` is per connection, not per session), or the turn ran on a different thread. List `GET /v1/sessions/{sid}/threads` to find which one ran. | +| 404 on the stream URL | Wrong path or ID, or the request carries no managed-agents beta header — the thread endpoints are beta-gated, so without it they don't exist. The thread path is `/threads/{tid}/stream`, **not** `/threads/{tid}/events/stream` (which doesn't exist) and not `/events/stream` (session level only). | +| 400 naming `event_deltas` | Only `agent.message` and `agent.thinking` are accepted, max 100 values. | --- @@ -182,16 +194,20 @@ Events can be sent up to the Session at any time. There is no need to wait on a ### Interrupt -An `interrupt` event **jumps the queue** (ahead of any pending user messages) and forces the session into `idle`. Use this for "stop" / "nevermind" / "cancel" commands: +A `user.interrupt` event **jumps the queue** (ahead of any pending user messages) and forces the session into `idle`. Use this for "stop" / "nevermind" / "cancel" commands: ```ts await client.beta.sessions.events.send(sessionId, { - events: [{ type: 'interrupt' }], + events: [{ type: 'user.interrupt' }], }); ``` The agent stops mid-task. It does not see the interrupt as a message — it just halts. Send a follow-up `user` event to explain what to do instead. If an outcome is active, the interrupt also marks `span.outcome_evaluation_end.result: "interrupted"` (see `shared/managed-agents-outcomes.md`). +**The interrupted turn ends with `stop_reason: end_turn`** — the same value a turn that finishes on its own carries. There is no interruption-specific stop reason, so a drain loop can't distinguish the two from `stop_reason` alone; track that you sent the interrupt. + +**In a multiagent session, omitting `session_thread_id` interrupts every non-archived thread, including the primary** — it is not primary-only. Pass `session_thread_id` to stop one thread. See `shared/managed-agents-multiagent.md`. + > **Note**: Interrupt events may have empty IDs in the current implementation. When troubleshooting, use the `processed_at` timestamp along with surrounding event IDs. ### Event payloads diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-memory.md b/content/github/skills/skills/claude-api/shared/managed-agents-memory.md index 70e6d3aeb..3c01d1fe3 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-memory.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-memory.md @@ -6,6 +6,8 @@ Sessions are ephemeral by default — when one ends, anything the agent learned Every mutation to a memory produces an immutable **memory version** (`memver_...`), giving you an audit trail and point-in-time rollback/redact. +> ⚠️ **Never store credentials, API keys, or tokens in memory stores.** Memories persist across sessions and are returned verbatim into future contexts — a key written once is replayed into every later session that mounts the store. Use vault `environment_variable` credentials instead (`shared/managed-agents-tools.md` → Vaults). If a secret has already been written, delete the memory and redact the affected versions (see "Redact a version" below). + ## Object model | Object | ID prefix | Scope | Notes | diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-multiagent.md b/content/github/skills/skills/claude-api/shared/managed-agents-multiagent.md index 06dbb6684..50a4a2099 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-multiagent.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-multiagent.md @@ -37,7 +37,7 @@ session = client.beta.sessions.create(agent=orchestrator.id, environment_id=env. If the session was created with `agent_with_overrides` (see `shared/managed-agents-core.md` → Override agent configuration for a session), those overrides apply to the **coordinator and its `self` copies**. Roster agents referenced by ID always use their own as-created configuration — overrides do not propagate to them. -Up to **20 unique agents** in the roster; the coordinator may spawn **multiple copies** of each. **One level of delegation only** — depth > 1 is ignored. +Up to **20 unique agents** in the roster; the coordinator may spawn **multiple copies** of each. **One level of delegation only** — and it is enforced rather than silently flattened: rostering an agent that itself carries a `multiagent.agents` roster fails the create or update with a validation error. --- @@ -66,8 +66,24 @@ Each `SessionThread` carries `id`, `status` (`running` | `idle` | `rescheduling` | `session.thread_status_idle` | `session_thread_id`, `agent_name`, **`stop_reason`** | Thread is awaiting input. Inspect `stop_reason` (same shape as `session.status_idle.stop_reason`). | | `session.thread_status_rescheduled` | `session_thread_id`, `agent_name` | Thread is rescheduling after a retryable error. | | `session.thread_status_terminated` | `session_thread_id`, `agent_name` | Thread was archived or hit a terminal error. | -| `agent.thread_message_sent` | `to_session_thread_id`, `to_agent_name`, `content` | Coordinator sent a follow-up to another thread. | -| `agent.thread_message_received` | `from_session_thread_id`, `from_agent_name`, `content` | An agent delivered its result to the coordinator. | +| `agent.thread_message_sent` | `to_session_thread_id`, `to_agent_name`, `content` | *This* thread sent a message to another thread. On the primary stream: the coordinator sent a task or follow-up to an agent. | +| `agent.thread_message_received` | `from_session_thread_id`, `from_agent_name`, `content` | A message arrived on *this* thread from another. On the primary stream: an agent sent a report or question to the coordinator. | + +> **Direction is relative to the thread whose stream carries the event**, not to the coordinator. The same delegated task is an `agent.thread_message_sent` on the primary stream and an `agent.thread_message_received` on the child's own stream. Reading `_received` as "a subagent finished" is wrong once you're reading a child stream. + +--- + +## Previewing a subagent's text + +Each thread's stream accepts the same `event_deltas[]` parameter as the session-level stream, so you can watch a subagent's text as the model generates it: + +``` +GET /v1/sessions/{sid}/threads/{tid}/stream?event_deltas%5B%5D=agent.message +``` + +**Previews are thread-scoped.** A child's previews are delivered only on that child's stream and never cross-posted to the session-level stream, whose previews stay scoped to the primary thread. So watching a subagent live means opening its thread stream — the session stream will not show it, no matter what you pass. + +> ⚠️ **Only plain assistant text previews.** A subagent's *reply to its coordinator* rides `agent.thread_message_sent` and is never previewed. A worker that does nothing but report back therefore streams no deltas at all, even with a correct opt-in on the right thread. To get a live preview out of a subagent, its prompt has to make it write the answer as a plain assistant message in its own thread first, and only then report to the coordinator. Run one accumulator per connection, and exit the read loop on `session.thread_status_idle`. Opt-in, accumulate, and reconcile details: `shared/managed-agents-events.md` → Live previews. --- @@ -92,10 +108,18 @@ The same pattern applies to `user.custom_tool_result`. --- +## Interrupting and archiving threads + +- **`user.interrupt` without `session_thread_id` interrupts every non-archived thread in the session, including the primary** — it is not a primary-only stop. Pass `session_thread_id` to target one thread. +- **Against a child thread blocked on `requires_action`**, the interrupt closes each pending tool call with an *error* tool result (`"Tool execution was interrupted before completion. Please retry."`) and re-emits `session.thread_status_idle` with `stop_reason: end_turn` directly — the model is not sampled. Against a thread already `idle`, the interrupt is a no-op. +- **Archive requires the thread to be idle, and `requires_action` counts as idle** — a thread parked on a pending tool call can be archived directly. Only a *running* thread must be interrupted first. + +--- + ## Pitfalls - **Don't put the roster on `sessions.create()` or in `tools[]`.** `multiagent` is a top-level agent field; update the coordinator, then start a session that references it. - **Don't assume shared context.** Threads share the filesystem but not conversation history or tools. If the coordinator needs a subagent to act on something, it must say so in the delegated message (or write it to disk). -- **Depth > 1 is ignored.** A subagent's own `multiagent` roster (if any) doesn't cascade — only the session's coordinator delegates. +- **Depth > 1 is a validation error.** Rostering an agent that itself carries a `multiagent.agents` roster fails the create or update — only the session's coordinator delegates. For per-language bindings beyond Python, WebFetch `https://platform.claude.com/docs/en/managed-agents/multi-agent.md` (see `shared/live-sources.md`). diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-onboarding.md b/content/github/skills/skills/claude-api/shared/managed-agents-onboarding.md index b3d07cda1..fab80ac76 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-onboarding.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-onboarding.md @@ -49,7 +49,7 @@ Usually zero or one question: - `user.define_outcome` + rubric — when §2 settled on an Outcome; the harness iterates and grades until the rubric passes. - **Scheduled shape?** Skip per-session kickoff entirely — create a **deployment** (`deployments.create()` with `schedule` + `initial_events`); each firing creates the session autonomously. See `shared/managed-agents-scheduled-deployments.md`. -Mechanics to bake into the runtime code: session creation blocks until resources mount (bad mounts surface there, before tokens); open the event stream *before* sending the kickoff; break on `session.status_terminated`, or `session.status_idle` with a terminal `stop_reason` — anything except `requires_action` (`shared/managed-agents-client-patterns.md` Pattern 5); usage lands on `span.model_request_end`; artifacts land in `/mnt/session/outputs/` (`files.list({scope_id: session.id, ...})`). +Mechanics to bake into the runtime code: session creation resolves resources (a bad mount surfaces there, before tokens) but does not itself provision the sandbox; open the event stream *before* sending the kickoff; break on `session.status_terminated`, or `session.status_idle` with a terminal `stop_reason` — anything except `requires_action` (`shared/managed-agents-client-patterns.md` Pattern 5); usage lands on `span.model_request_end`; artifacts land in `/mnt/session/outputs/` (`files.list({scope_id: session.id, ...})`). ## 5. Integrate — emit the code diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-outcomes.md b/content/github/skills/skills/claude-api/shared/managed-agents-outcomes.md index aee3f4e3f..edfdefeb3 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-outcomes.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-outcomes.md @@ -10,6 +10,8 @@ The SDK sets the `managed-agents-2026-04-01` beta header automatically on all `c Outcomes are not a field on `sessions.create()`. You create a normal session, then send a `user.define_outcome` event. The agent starts working on receipt — **do not also send a `user.message`** to kick it off. +You can collapse both calls into one by passing a single `user.define_outcome` in the session's `initial_events` array — same event, same rules, one round trip (see `shared/managed-agents-core.md` → Seeding a session with `initial_events`). More than one `user.define_outcome` in that array, or one without a `rubric`, rejects the whole create with a 400. + ```python session = client.beta.sessions.create( agent=AGENT_ID, @@ -62,7 +64,7 @@ These appear on the standard event stream (`sessions.events.stream` / `.list`) a | `needs_revision` | Agent starts another iteration. | | `max_iterations_reached` | No further grader cycles. Agent may run one final revision, then session → `idle`. | | `failed` | Session → `idle`. Rubric fundamentally doesn't match the task (e.g. description and rubric contradict). | -| `interrupted` | Only emitted if `_start` had already fired before a `user.interrupt` arrived. | +| `interrupted` | Emitted whenever a `user.interrupt` arrives while an outcome is active — **even if evaluation hadn't started**. In that case `outcome_evaluation_start_id` is an empty string rather than an event ID, so don't use it as a lookup key without checking. | ```json { diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-overview.md b/content/github/skills/skills/claude-api/shared/managed-agents-overview.md index b12c55908..9b4c6a6ea 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-overview.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-overview.md @@ -15,7 +15,7 @@ Every session references a pre-created `/v1/agents` object. Create the agent onc If you're about to write `sessions.create()` with `model`, `system`, or `tools` on the session body — **stop**. Those fields live on `agents.create()`. The session takes a *pointer* only. -**When generating code, separate setup from runtime.** `agents.create()` belongs in a setup script (or a guarded `if agent_id is None:` block), not at the top of the hot path. If the user's code calls `agents.create()` on every invocation, they're accumulating orphaned agents and paying the create latency for nothing. The correct shape is: create once → persist the ID (config file, env var, secrets manager) → every run loads the ID and calls `sessions.create()`. +**When generating code, separate setup from runtime.** `agents.create()` belongs in a setup script (or a guarded `if agent_id is None:` block), not at the top of the hot path. If the user's code calls `agents.create()` on every invocation, they're accumulating orphaned agents and paying the create latency for nothing. The correct shape is: define the agent as a version-controlled YAML manifest, apply it once with `ant beta:agents create < agent.yaml` (or a guarded setup script — see `shared/anthropic-cli.md`), persist the returned ID (config file, env var, secrets manager), and have every run load the ID and call `sessions.create()`. **To change the agent's behavior, use `POST /v1/agents/{id}` — don't create a new one.** Each update bumps the version; running sessions keep their pinned version, new sessions get the latest (or pin explicitly via `{type: "agent", id, version}`). See `shared/managed-agents-core.md` → Agents → Versioning. To change `tools`/`mcp_servers`/`vault_ids` on **one running session** without touching the agent object, use `sessions.update()` — see `shared/managed-agents-core.md` → Updating the agent configuration mid-session. @@ -29,7 +29,7 @@ Managed Agents is in beta. The SDK sets required beta headers automatically: | `skills-2025-10-02` | Skills API (for managing custom skill definitions) | | `files-api-2025-04-14` | Files API for file uploads | -**Which beta header goes where:** The SDK sets `managed-agents-2026-04-01` automatically on `client.beta.{agents,environments,sessions,vaults,memory_stores,deployments,deployment_runs}.*` calls, and `files-api-2025-04-14` / `skills-2025-10-02` automatically on `client.beta.files.*` / `client.beta.skills.*` calls. You do NOT need to add the Skills or Files beta header when calling Managed Agents endpoints. **Exception — session-scoped file listing:** `client.beta.files.list({scope_id: session.id})` is a Files endpoint that takes a Managed Agents parameter, so it needs **both** headers. Pass `betas: ["managed-agents-2026-04-01"]` explicitly on that call (the SDK adds the Files header; you add the Managed Agents one). See `shared/managed-agents-environments.md` → Session outputs. +**Which beta header goes where:** The SDK sets `managed-agents-2026-04-01` automatically on `client.beta.{agents,environments,sessions,vaults,memory_stores,deployments,deployment_runs}.*` calls, and `files-api-2025-04-14` / `skills-2025-10-02` automatically on `client.beta.files.*` / `client.beta.skills.*` calls. You do NOT need to add the Skills or Files beta header when calling Managed Agents endpoints. On raw HTTP the Managed Agents header **grants Files API access on its own**, so uploading a file for use as a session resource does not need `files-api-2025-04-14` alongside it. (Direct Skills API calls over cURL do still need `skills-2025-10-02`; the `ant` CLI and the SDKs send it for you.) **Exception — session-scoped file listing:** `client.beta.files.list({scope_id: session.id})` is a Files endpoint that takes a Managed Agents parameter, so it needs **both** headers. Pass `betas: ["managed-agents-2026-04-01"]` explicitly on that call (the SDK adds the Files header; you add the Managed Agents one). See `shared/managed-agents-environments.md` → Session outputs. ## Reading Guide diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-scheduled-deployments.md b/content/github/skills/skills/claude-api/shared/managed-agents-scheduled-deployments.md index 0eb67cc57..389a74665 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-scheduled-deployments.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-scheduled-deployments.md @@ -9,7 +9,7 @@ Requires the `managed-agents-2026-04-01` beta header (the SDK sets it automatica A deployment bundles everything a session needs (agent, environment, optional files / GitHub / memory stores / vaults) plus a `schedule` and the `initial_events` that kick off each run: - `agent` and `environment_id` are required — same shapes as `sessions.create` (see `shared/managed-agents-core.md`). -- `initial_events` must contain the starting `user.message`. +- `initial_events` must contain at least one starting event — a `user.message` **or** a `user.define_outcome`. (A deployment's `initial_events` also accepts `system.message`, which a session's does not.) - `schedule` takes a cron `expression` and an IANA `timezone`. Minute-level granularity is the maximum. ```bash @@ -71,7 +71,7 @@ The response is a deployment object (`depl_` ID prefix). Check `schedule.upcomin } ``` -Deployments may apply up to **10 seconds of jitter** to distribute load. Maximum **1000 scheduled deployments per organization** (contact Anthropic support for more). +`upcoming_runs_at` reflects the exact configured schedule, but **execution is jittered to distribute load: up to 15% of the interval between runs, floored at 5 seconds and capped at 9 minutes.** An hourly deployment can therefore fire up to 9 minutes late; don't build a downstream deadline that assumes the listed timestamp. Maximum **1000 scheduled deployments per organization** (contact Anthropic support for more). ### Cron and timezone semantics @@ -139,7 +139,7 @@ Raw HTTP: `POST /v1/deployments/{deployment_id}/pause` (likewise `/unpause`, `/a - **Rate-limited:** recorded immediately as a `session_rate_limited` run, **no retry** — the schedule simply tries again at the next occurrence. (Rate limits on API calls *inside* a session are handled by the session itself.) - **Other failed runs** (e.g. `environment_archived`, `vault_not_found`, `service_unavailable`): the run records the `error.type` — monitor runs and fix the referenced resource, or pause the deployment. -- **Agent archived or deleted:** the deployment is automatically **archived** (terminal) and no further sessions are created. +- **Agent archived:** the deployment is automatically **archived** (terminal) in the same operation. **Agent deleted:** the next scheduled trigger detects the missing agent and archives the deployment then. Either way no deployment run is recorded, and no further sessions are created. ## Manual runs diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-tools.md b/content/github/skills/skills/claude-api/shared/managed-agents-tools.md index 672a5b602..efcdb13e4 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-tools.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-tools.md @@ -70,7 +70,7 @@ Control when server-executed tools (agent toolset + MCP) run automatically vs wa | Policy | Behavior | |---|---| | `always_allow` | Tool executes automatically (default) | -| `always_ask` | Session emits `session.status_idle` and pauses until you send a `tool_confirmation` event | +| `always_ask` | Session emits `session.status_idle` and pauses until you send a `user.tool_confirmation` event | ```json { @@ -88,8 +88,8 @@ Control when server-executed tools (agent toolset + MCP) run automatically vs wa **Responding to `always_ask`:** Send a `user.tool_confirmation` event with `tool_use_id` from the triggering `agent_tool_use`/`mcp_tool_use` event: ```json -{ "type": "tool_confirmation", "tool_use_id": "sevt_abc123", "result": "allow" } -{ "type": "tool_confirmation", "tool_use_id": "sevt_def456", "result": "deny", "message": "Read .env.example instead" } +{ "type": "user.tool_confirmation", "tool_use_id": "sevt_abc123", "result": "allow" } +{ "type": "user.tool_confirmation", "tool_use_id": "sevt_def456", "result": "deny", "message": "Read .env.example instead" } ``` The optional `message` on a deny is delivered to the agent so it can adjust its approach. @@ -184,7 +184,7 @@ This keeps secrets out of reusable agent definitions. Each vault credential is t > 💡 **Changing tools/MCP servers on a running session:** `sessions.update()` can replace `agent.tools`, `agent.mcp_servers`, and `vault_ids` while the session is `idle` — a session-local override that doesn't touch the agent object. See `shared/managed-agents-core.md` → Updating the agent configuration mid-session. -**Large MCP tool outputs.** If an MCP tool returns more than **100K tokens**, the output is automatically offloaded to a file in the sandbox — the agent receives a truncated preview plus the file path and can `read` the full content. No configuration required. +**Large tool outputs.** If a tool returns more than **100,000 characters (roughly 25,000 tokens)**, the output is automatically offloaded to a file in the sandbox — the agent receives a truncated preview plus the file path and can `read` the full content. No configuration required. The threshold is in *characters*, not tokens, and applies to built-in agent tools as well as MCP tools. **Invalid vault credentials don't block session creation.** If a vault credential is invalid for a declared MCP server, the session still creates successfully; a `session.error` event describes the MCP auth failure, and auth retries on the next `session.status_idle` → `session.status_running` transition. @@ -194,7 +194,7 @@ This keeps secrets out of reusable agent definitions. Each vault credential is t **Vaults** store credentials that Anthropic manages on your behalf. Two credential categories: -- **MCP credentials** (`mcp_oauth`, `static_bearer`) — keyed by `mcp_server_url`. When the agent connects to a server at that URL, the token is injected automatically. `mcp_oauth` tokens are auto-refreshed via the standard OAuth 2.0 `refresh_token` grant. This is the only way to authenticate MCP servers. +- **MCP credentials** (`mcp_oauth`, `static_bearer`) — keyed by `mcp_server_url`. When the agent connects to a server at that URL, the token is injected automatically. **Matching is normalized, not byte-exact:** scheme and host are lowercased, and default ports and trailing slashes are stripped, so host casing, an explicit default port, or a trailing slash won't break the match. A different path, subdomain, or *non-default* port will. If nothing matches, the connection is attempted unauthenticated. `mcp_oauth` tokens are auto-refreshed via the standard OAuth 2.0 `refresh_token` grant. This is the only way to authenticate MCP servers. - **Environment variables** (`environment_variable`) — keyed by `secret_name` (the env var name). The sandbox sees only an **opaque placeholder**; the real secret is substituted into the outbound request **at egress**. Use this for any service that authenticates through an environment variable: CLIs (`aws`, `gcloud`, `stripe`), SDKs, or direct `curl` calls from the `bash` tool. Secret fields you supply (`token`, `access_token`, `refresh_token`, `client_secret`, `secret_value`) are write-only — never returned in API responses. @@ -205,7 +205,7 @@ Vaults store credentials; those credentials **never enter the sandbox**. This is - **MCP tool calls** are routed through an Anthropic-side proxy that fetches the credential from the vault and adds it to the outbound request. - **Git operations on attached GitHub repositories** (`git pull`, `git push`, GitHub REST calls) are routed through a git proxy that injects the `github_repository` resource's `authorization_token` the same way. -- **Environment-variable credentials** appear in the sandbox as an opaque placeholder; the real value replaces the placeholder at egress, on requests to the credential's allowed hosts only. +- **Environment-variable credentials** appear in the sandbox as an opaque placeholder; the real value replaces the placeholder at egress, on requests to the credential's allowed hosts only. Substitution covers request **headers and body only** — a secret embedded in the **URL path** is never substituted, so path-secret endpoints (e.g. Slack incoming-webhook URLs) can't be vaulted; use header-based auth instead (for Slack: a bot token in `Authorization` via `chat.postMessage`). **When vault credentials don't fit** (e.g. self-hosted sandboxes — `environment_variable` is not yet supported there), **register a custom tool:** the agent emits `agent.custom_tool_use`, your orchestrator (which already holds the credential) executes the call and returns `user.custom_tool_result` over the same authenticated event stream. No public endpoint is exposed; the sandbox never sees the secret. See `shared/managed-agents-client-patterns.md` → Pattern 9. @@ -280,6 +280,8 @@ Omit `refresh` entirely if you only have an access token with no refresh capabil A credential must have at least one location enabled; a create or update that would disable both returns 400, as does explicit `null` for the object or either field (omit instead). The response always returns both fields with their resolved values. +> ⚠️ **Credentials created in the Console are header-only by default** — unlike the API, where omitting the field enables both. If your client sends the secret in the request body (a form-encoded token request, for example), the placeholder passes through literally and the service rejects it with its own authentication error. Tick body injection in the Console form, or `POST` the credential with `{"injection_location": {"body": true}}`. + > ⚠️ **Two networking layers, both required.** `networking.allowed_hosts` on the credential controls which requests *use the secret*, not which requests are *allowed*. The agent must also be able to reach the domain at the **environment level** (`unrestricted`, or the host listed in the environment's `allowed_hosts` — see `shared/managed-agents-environments.md`). A domain missing from either layer means the secret-substituted request fails. > ⚠️ **Client-side validation caveat.** Substitution happens at egress, not inside the sandbox — clients that validate the credential *format* locally before making a network request (e.g. a CLI that checks the key starts with `sk-`) will see the opaque placeholder and may fail at startup. If a client rejects the credential before any network call, that's why. @@ -350,7 +352,9 @@ agent = client.beta.agents.create( |---|---|---| | `type` | `"anthropic"` | `"custom"` | | `skill_id` | Skill name (e.g. `"xlsx"`, `"docx"`, `"pptx"`, `"pdf"`) | Skill ID from Skills API (e.g. `"skill_abc123"`) | -| `version` | — | `"latest"` or a specific version number | +| `version` | `"latest"` or a specific version number | `"latest"` or a specific version number | + +`version` is optional on **both** kinds and defaults to `"latest"` — it is not custom-skill-only. ### Skills API diff --git a/content/github/skills/skills/claude-api/shared/managed-agents-webhooks.md b/content/github/skills/skills/claude-api/shared/managed-agents-webhooks.md index d25786c17..28ce2f2bf 100644 --- a/content/github/skills/skills/claude-api/shared/managed-agents-webhooks.md +++ b/content/github/skills/skills/claude-api/shared/managed-agents-webhooks.md @@ -13,14 +13,14 @@ Console → **Manage → Webhooks**. There is no programmatic endpoint-managemen | Field | Constraint | |---|---| | URL | HTTPS on port 443, publicly resolvable hostname | -| Event types | Subscribe per `data.type` — you only receive subscribed types (plus test events) | +| Event types | Subscribe per `data.type` — an endpoint receives only the types it is subscribed to | | Signing secret | `whsec_`-prefixed, 32 bytes, **shown once at creation** — store it | --- ## Verify the signature -Every delivery is HMAC-signed. **Use the SDK's `client.beta.webhooks.unwrap()`** — it verifies the signature, rejects payloads more than ~5 minutes old, and returns the parsed event. It reads the `whsec_` secret from `ANTHROPIC_WEBHOOK_SIGNING_KEY`. +Every delivery carries the `webhook-id`, `webhook-timestamp`, and `webhook-signature` headers. **Use the SDK's `client.beta.webhooks.unwrap()`** — it verifies the signature, rejects payloads more than ~5 minutes old, and returns the parsed event. It reads the `whsec_` secret from `ANTHROPIC_WEBHOOK_SIGNING_KEY`. Pass the headers through untouched; don't hand-roll verification against a single `X-Webhook-Signature` header, which is not the wire format. ```python import anthropic @@ -63,7 +63,7 @@ Pass the **raw request body** to `unwrap()` — frameworks that re-serialize JSO ```json { "type": "event", - "id": "event_01ABC...", + "id": "whe_9d5c1f7e...", "created_at": "2026-03-18T14:05:22Z", "data": { "type": "session.status_idled", @@ -74,7 +74,9 @@ Pass the **raw request body** to `unwrap()` — frameworks that re-serialize JSO } ``` -Switch on `data.type`, fetch the resource by `data.id`, return any **2xx** to acknowledge. `created_at` is when the *state transition* happened, not when the webhook fired. +Switch on `data.type`, fetch the resource by `data.id`, return any **2xx** to acknowledge. `created_at` is when the *event occurred*, not when the delivery was attempted — the `webhook-timestamp` header is the clock for the attempt (see Delivery behavior). + +The top-level `id` is the same value as the `webhook-id` header, and it is per *event*, not per delivery — every retry carries it unchanged. Dedupe on it. --- @@ -85,16 +87,20 @@ Switch on `data.type`, fetch the resource by `data.id`, return any **2xx** to ac | `session.status_scheduled` | Session created and ready to accept events | | `session.status_run_started` | Agent execution kicked off (every transition to `running`) | | `session.status_idled` | Agent awaiting input (tool approval, custom tool result, or next message) | -| `session.status_terminated` | Session hit a terminal error | +| `session.status_rescheduled` | A transient error occurred; the session is retrying automatically | +| `session.status_terminated` | Session ended — **on completion or on error**, not error-only | | `session.thread_created` | Multiagent: coordinator opened a new subagent thread | | `session.thread_idled` | Multiagent: a subagent thread is waiting for input | +| `session.thread_terminated` | A thread ended — child completed its work, or the thread was archived. **Child threads only**; the primary thread's end surfaces as `session.status_terminated` | | `session.outcome_evaluation_ended` | Outcome grader finished one iteration | +| `session.updated` | Session properties changed (name, configuration) | +| `session.deleted` | Session permanently deleted — no object left to fetch; treat the event itself as final | | `vault.archived` | Vault was archived | | `vault.created` | Vault was created | -| `vault.deleted` | Vault was deleted | -| `vault_credential.archived` | Vault credential was archived | +| `vault.deleted` | Vault was deleted — a `vault_credential.deleted` also fires per underlying credential. No object left to fetch; treat the event itself as final | +| `vault_credential.archived` | Credential archived, directly or via vault archival | | `vault_credential.created` | Vault credential was created | -| `vault_credential.deleted` | Vault credential was deleted | +| `vault_credential.deleted` | Credential deleted, directly or via vault deletion. No object left to fetch; treat the event itself as final | | `vault_credential.refresh_failed` | MCP OAuth vault credential failed to refresh | | `agent.created` | Agent created | | `agent.updated` | A new agent version was published. Updates that do not create a new version do **not** fire this. | @@ -109,6 +115,15 @@ Switch on `data.type`, fetch the resource by `data.id`, return any **2xx** to ac | `deployment_run.started` | A **scheduled** run started. Manual runs do **not** emit `deployment_run.*` events. | | `deployment_run.succeeded` | Scheduled run created its session. Same `data.id` (the run ID) as the run's `.started` event — fetch the deployment run for its `session_id`, then subscribe to the session events to follow the work. | | `deployment_run.failed` | Scheduled run did not create a session. Same `data.id` as the run's `.started` event — fetch the deployment run for `error.type` / `error.message`. | +| `environment.created` | Environment created | +| `environment.updated` | Environment updated with at least one changed field. A no-op update emits nothing. | +| `environment.archived` | Environment archived. Re-archiving an already-archived environment emits nothing. | +| `environment.deleted` | Environment deleted, including delete of an already-archived one. No object left to fetch; treat the event itself as final | +| `memory_store.created` | Memory store created — by you, or by an Anthropic-operated process that clones one of your stores | +| `memory_store.archived` | Memory store archived. Re-archiving an already-archived store emits nothing. | +| `memory_store.deleted` | Memory store deleted, including delete of an already-archived one. Cascades to its memories and versions **without** per-memory events — this single event is the signal. No object left to fetch; treat it as final | + +> **There is deliberately no `memory_store.updated`.** Individual memories and memory versions emit no webhook events at all, and neither do an environment's self-hosted work items. If you need per-memory change tracking, poll the memory-versions endpoints (`shared/managed-agents-memory.md`). > These are **webhook** `data.type` values — a separate namespace from SSE event types (`session.status_idle`, `span.outcome_evaluation_end`, etc. in `shared/managed-agents-events.md`). Don't reuse SSE constants in webhook handlers. @@ -116,8 +131,13 @@ Switch on `data.type`, fetch the resource by `data.id`, return any **2xx** to ac ## Delivery behavior & pitfalls -- **No ordering guarantee.** `session.status_idled` may arrive before `session.outcome_evaluation_ended` even if the evaluation finished first. Sort by envelope `created_at` if order matters. -- **Retries carry the same `event.id`.** At least one retry on non-2xx. Dedupe on `event.id`. -- **3xx is failure.** Redirects are not followed — update the URL in Console if your endpoint moves. -- **Auto-disable** after ~20 consecutive failed deliveries, or immediately if the hostname resolves to a private IP or returns a redirect. Re-enable manually in Console. +- **Duplicates.** An endpoint can receive the same event more than once; every attempt carries the same top-level `event.id` (= the `webhook-id` header). Dedupe on it. +- **Subscription scope.** An event reaches only endpoints subscribed to its type **at the moment it is emitted**. An event emitted while nothing was subscribed is never delivered, and subscribing later does not backfill — subscribe before you need the type. +- **No ordering guarantee.** Events are not delivered in occurrence order: `session.status_idled` may arrive before `session.outcome_evaluation_ended`, and a `.deleted` can arrive before the `.archived` for the same resource. **Drive state from the resource you fetch, not from arrival order.** +- **Retries: up to three attempts** per endpoint per event, with jittered exponential backoff between 5 and 120 seconds. A response that triggers auto-disable is never retried. **After the last attempt fails the event is dropped** — not queued, and with no signal that it was lost. Webhooks are not a durable log: if you must observe every transition, reconcile by listing or fetching the resource. +- **`webhook-timestamp` is re-stamped on every attempt**, so retries don't fail the SDK's five-minute freshness check. It times the *delivery attempt*; use the payload's `created_at` for when the event occurred. +- **Auto-disable — three triggers**, each setting `disabled_reason`, all reversible from Console (events emitted while disabled are **not** replayed): + - A `3xx` response. Redirects are never followed; disables immediately, on the first attempt. Reason: `auto-disabled: endpoint URL returned a redirect (3xx)`. + - The URL resolves to a non-public IP at connect time. Disables immediately. Reason: `auto-disabled: endpoint URL resolved to an invalid address`. + - Continuous failure for a sustained period. Reason: `auto-disabled after sustained delivery failures`. **The trigger is duration, not a delivery count** — a single `2xx` resets the window, so one flaky event can't disable the endpoint. - **Thin payload is intentional.** Don't expect `stop_reason`, `outcome_evaluations`, credential secrets, etc. on the webhook body — fetch the resource. diff --git a/content/github/skills/skills/claude-api/shared/tool-use-concepts.md b/content/github/skills/skills/claude-api/shared/tool-use-concepts.md index 94f2cffad..616f69f19 100644 --- a/content/github/skills/skills/claude-api/shared/tool-use-concepts.md +++ b/content/github/skills/skills/claude-api/shared/tool-use-concepts.md @@ -59,9 +59,25 @@ Any `tool_choice` value can also include `"disable_parallel_tool_use": true` to ### Tool Runner vs Manual Loop -**Tool Runner (Recommended):** The SDK's tool runner handles the agentic loop automatically — it calls the API, detects tool use requests, executes your tool functions, feeds results back to Claude, and repeats until Claude stops calling tools. Available in Python, TypeScript, Java, Go, Ruby, and PHP SDKs (beta). The Python SDK also provides MCP conversion helpers (`anthropic.lib.tools.mcp`) to convert MCP tools, prompts, and resources for use with the tool runner — see `python/claude-api/tool-use.md` for details. +**Tool Runner (Recommended):** The SDK's tool runner handles the agentic loop automatically — it calls the API, detects tool use requests, executes your tool functions, feeds results back to Claude, and repeats until Claude stops calling tools. Available in Python, TypeScript, Java, Go, Ruby, PHP, and C# SDKs (beta). The Python SDK also provides MCP conversion helpers (`anthropic.lib.tools.mcp`) to convert MCP tools, prompts, and resources for use with the tool runner — see `python/claude-api/tool-use.md` for details. **Default to the tool runner** for any custom-tool agent. -**Manual Agentic Loop:** Use when you need fine-grained control over the loop (e.g., custom logging, conditional tool execution, human-in-the-loop approval). Loop until `stop_reason == "end_turn"`, always append the full `response.content` to preserve tool_use blocks, and ensure each `tool_result` includes the matching `tool_use_id`. +**The tool runner is not a black box — "I need control" is rarely a reason to drop to the manual loop.** Each iteration yields the assistant message *before* the tools run and lets you intervene, so most "fine-grained control" needs are covered without hand-writing the loop: + +- **Human-in-the-loop approval / gating** — gate in the tool's run function (return a "user declined" result instead of executing), or inspect the tool call in the yielded message and override the pending request with `set_messages_params()` / `setMessagesParams()` / `append_messages()` / `pushMessages()` to allow or deny *before* the tool executes. The runner runs your function automatically only if you don't intervene. +- **Error interception** — inspect the tool result before it returns to Claude (`generate_tool_call_response()` / `generateToolResponse()`); stop early or handle it yourself. +- **Result modification** — mutate the tool result before it goes back (e.g. add `cache_control` for prompt caching, or transform the output). +- **Per-turn retries / param changes** — e.g. bump `max_tokens` and re-run a truncated turn; bound the whole loop with `max_iterations`. +- **Streaming and automatic compaction** are both supported. + +These hooks are SDK helper features, not separate API parameters — for the exact method names and worked examples, WebFetch the per-language SDK repo listed in `shared/live-sources.md` → *Claude API SDK Repositories* (the tool-runner helpers live in each repo's `tools.md` / `helpers.md`). The bundled `python/claude-api/tool-use.md` and `typescript/claude-api/tool-use.md` show the basic tool-runner setup. + +**Don't drop to a manual loop because of these misconceptions:** + +- The tool runner does not require Zod/Pydantic — `betaTool()` (TS) and `@beta_tool` (Python) accept raw JSON Schema; other SDKs use plain structs/maps/classes. +- The runner makes detecting the final turn *easier*, not harder — iteration ends when Claude stops calling tools, and the last yielded message is the final response. Most SDKs also offer a one-shot variant (`runner.until_done()` / `runner.runUntilDone()` / `RunToCompletion()`). +- Confirmation/approval gates work with the runner (see Security below). + +**Manual Agentic Loop:** Reach for this only when you want to own the *entire* loop — you need control the runner does not expose (e.g., a custom transport, request shapes the SDK cannot build, per-token streaming on SDKs whose runner does not support it), you'd rather not take the beta dependency, or your control flow doesn't fit the runner's per-turn hooks (e.g. interleaving unrelated work mid-loop). Approval gates, logging, interception, result modification, and conditional execution do **not** require it — the tool runner covers those (above). Loop until `stop_reason == "end_turn"`, always append the full `response.content` to preserve tool_use blocks, and ensure each `tool_result` includes the matching `tool_use_id`. **Stop reasons for server-side tools:** When using server-side tools (code execution, web search, etc.), the API runs a server-side sampling loop. If this loop reaches its default limit of 10 iterations, the response will have `stop_reason: "pause_turn"`. To continue, re-send the user message and assistant response and make another API request — the server will resume where it left off. Do NOT add an extra user message like "Continue." — the API detects the trailing `server_tool_use` block and knows to resume automatically. @@ -78,9 +94,11 @@ if response.stop_reason == "pause_turn": ) ``` +**Note:** the SDK tool runners do not auto-resume `pause_turn` (as of `@anthropic-ai/sdk` 0.110.0 / `anthropic` 0.116.0) — a paused turn ends the runner and is returned as the final message, with no error. In TypeScript you can resume inside the iteration body (push the paused assistant turn back onto the runner); in Python the runner cannot be resumed mid-loop — restart a new runner with the paused turn appended, or handle `pause_turn` in a manual loop. See each language's `tool-use.md` for the pattern. + Set a `max_continuations` limit (e.g., 5) to prevent infinite loops. For the full guide, see: `https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons` -> **Security:** The tool runner executes your tool functions automatically whenever Claude requests them. For tools with side effects (sending emails, modifying databases, financial transactions), validate inputs within your tool functions and consider requiring confirmation for destructive operations. Use the manual agentic loop if you need human-in-the-loop approval before each tool execution. +> **Security:** The tool runner executes your tool functions automatically whenever Claude requests them. For tools with side effects (sending emails, modifying databases, financial transactions), validate inputs and gate destructive operations behind human approval. **Both** the tool runner and the manual loop support this — with the tool runner, gate inside the tool's run function (prompt the user and return a "user declined" result instead of executing), or inspect the tool call in each yielded message and take over message history with `set_messages_params()` / `setMessagesParams()` to allow or deny *before* the tool runs (it executes your function automatically only if you don't intervene); with the manual loop you gate inline before calling the function. --- diff --git a/content/github/skills/skills/claude-api/typescript/claude-api/tool-use.md b/content/github/skills/skills/claude-api/typescript/claude-api/tool-use.md index bbf8b2543..e16ced15a 100644 --- a/content/github/skills/skills/claude-api/typescript/claude-api/tool-use.md +++ b/content/github/skills/skills/claude-api/typescript/claude-api/tool-use.md @@ -39,18 +39,59 @@ const finalMessage = await client.beta.messages.toolRunner({ console.log(finalMessage.content); ``` +Zod is optional — `betaTool()` from `@anthropic-ai/sdk/helpers/beta/json-schema` accepts a raw JSON Schema `inputSchema` plus a `run` function if you don't want a Zod dependency. + **Key benefits of the tool runner:** - No manual loop — the SDK handles calling tools and feeding results back -- Type-safe tool inputs via Zod schemas +- Type-safe tool inputs via Zod schemas (or raw JSON Schema via `betaTool()`) - Tool schemas are generated automatically from Zod definitions - Iteration stops automatically when Claude has no more tool calls +### Server tools with the tool runner + +The runner's `tools` array accepts raw server-tool definitions (`web_search_20260209`, `web_fetch_20260209`, code execution) alongside runnable tools — pass the literal tool object; server tools run on Anthropic's servers, so there is no `run` function. + +**Caution — the runner does not auto-resume `pause_turn` (as of `@anthropic-ai/sdk` 0.110.0).** A long-running server-tool turn can stop with `stop_reason: "pause_turn"`. The runner only continues after a client tool produces a result, so a paused turn ends the loop and is returned as the final message — no error, no warning, just a silently truncated answer. If you mix server tools into the runner, check `stop_reason` on every iteration and resume by pushing the paused assistant turn back: + +```typescript +const params = { + model: "claude-opus-4-8", + max_tokens: 16000, + tools: [getWeather, { type: "web_search_20260209", name: "web_search", max_uses: 5 }], + messages: [{ role: "user", content: "Compare this week's forecasts for Paris across two sources" }], +}; + +const runner = client.beta.messages.toolRunner(params); + +// Non-streaming: each iteration yields a complete message +for await (const message of runner) { + if (message.stop_reason === "pause_turn") { + runner.pushMessages({ role: "assistant", content: message.content }); + } +} + +// Streaming alternative — construct the runner with `stream: true` (same +// params as above). Each iteration then yields a stream, not a message — a +// bare `message.stop_reason` check never fires. Resolve the stream first: +const streamingRunner = client.beta.messages.toolRunner({ ...params, stream: true }); +for await (const stream of streamingRunner) { + const message = await stream.finalMessage(); + if (message.stop_reason === "pause_turn") { + streamingRunner.pushMessages({ role: "assistant", content: message.content }); + } +} +``` + +Each pause–resume consumes a `max_iterations` tick, so a capped run can still end paused — check the final message's `stop_reason` before trusting the result (after the loop, call `.done()` on the runner you iterated to get the final message). Alternatively, use the manual loop below, which handles `pause_turn` explicitly. + --- ## Manual Agentic Loop -Use this when you need fine-grained control (custom logging, conditional tool execution, streaming individual iterations, human-in-the-loop approval): +Prefer the tool runner above. Drop to a manual loop only when you need control the runner does not expose (e.g., a custom transport, request shapes the SDK cannot build, or avoiding a beta dependency — the runner is beta, and it supports per-token streaming via `stream: true`). Human-in-the-loop approval does *not* require a manual loop — gate inside the tool's `run()` function (return a "user declined" result) or inspect pending `tool_use` blocks and call `setMessagesParams()` between iterations. + +If you do need a manual loop: ```typescript import Anthropic from "@anthropic-ai/sdk"; diff --git a/content/github/skills/skills/claude-api/typescript/managed-agents/README.md b/content/github/skills/skills/claude-api/typescript/managed-agents/README.md index 12c14f85f..6d81141bc 100644 --- a/content/github/skills/skills/claude-api/typescript/managed-agents/README.md +++ b/content/github/skills/skills/claude-api/typescript/managed-agents/README.md @@ -2,7 +2,7 @@ > **Bindings not shown here:** This README covers the most common managed-agents flows for TypeScript. If you need a class, method, namespace, field, or behavior that isn't shown, WebFetch the TypeScript SDK repo **or the relevant docs page** from `shared/live-sources.md` rather than guess. Do not extrapolate from cURL shapes or another language's SDK. -> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. The Anthropic CLI is one convenient way to create agents and environments from version-controlled YAML — its URL is in `shared/live-sources.md`. The examples below show in-code creation for completeness; in production the create call belongs in setup, not in the request path. +> **Agents are persistent — create once, reference by ID.** Store the agent ID returned by `agents.create` and pass it to every subsequent `sessions.create`; do not call `agents.create` in the request path. **Recommended:** define agents and environments as version-controlled YAML applied with the `ant` CLI — see `shared/anthropic-cli.md` (its live-docs URL is in `shared/live-sources.md`). The CLI owns the control plane (create/update); your code owns the data plane (sessions with the stored ID). The examples below show in-code creation for when you must provision programmatically; in production the create call belongs in setup, not in the request path. ## Installation @@ -67,7 +67,7 @@ const session = await client.beta.sessions.create( }, ); console.log(session.id, session.status); -console.log(`Trace: https://platform.claude.com/workspaces/default/sessions/${session.id}`); +console.log(`Trace: https://platform.claude.com/workspaces/default/sessions/${session.id}`); // swap 'default' for your workspace ID if the API key is not in the Default workspace ``` ### With system prompt and custom tools diff --git a/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md b/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md index 7af12e0fc..5d68febaa 100644 --- a/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md +++ b/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md @@ -38,7 +38,7 @@ To regain access to your account on any device, you'll need to authenticate agai If you used your Claude account to authenticate into Claude Code, you can manage your authorization tokens by navigating to [Settings > Claude Code](http://claude.ai/settings/claude-code). To remove a token and log out of Claude Code, click the trash can icon. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1608263923/b4fa7d6f6f08f2adffb4ea63bc58/image+%287%29.png?expires=1784741400&signature=daa5f99cb3126d3ecf9243962339f5c70b0c91c18de676e83178314beb4d8ca7&req=dSYnHst4nohdWvMW1HO4zVuHihj60ma%2FAQofdwM8qVd5X6Yqsil06wdBKU6E%0AO0BoGlhk8Neg9heMm28%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1608263923/b4fa7d6f6f08f2adffb4ea63bc58/image+%287%29.png?expires=1784781000&signature=3ee9ee72336ca9791635b82b95806836b714201ab9d9e427f233d2032321d0a3&req=dSYnHst4nohdWvMW1HO4zVuHihj63ma7AQofdwM8qVemNXtkeUWdUh7YrCPc%0A%2FBkc4c%2FB2dHTdJKy6cw%3D%0A) ## Unable to access your account? diff --git a/content/support/10366376-how-can-i-delete-my-claude-console-account.md b/content/support/10366376-how-can-i-delete-my-claude-console-account.md index 6ce95391d..16dbaec28 100644 --- a/content/support/10366376-how-can-i-delete-my-claude-console-account.md +++ b/content/support/10366376-how-can-i-delete-my-claude-console-account.md @@ -36,7 +36,7 @@ If you followed the steps above to delete your Console organization but want to If you have an outstanding balance, you will see a message during the deletion flow that prompts you to pay the balance first by routing you to [Settings > Billing](https://platform.claude.com/settings/billing). -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957766/5c2dd87c0818a0400099a833c9b3/4cc3130a-f696-4967-9fe3-e5623c6f02bd?expires=1784741400&signature=d5e3195fa6d1b56296444c35d3fce5f94748bfc5d1e881e5f0946b210d7de107&req=dSkgFcB7moZZX%2FMW1HO4zbYXUBNlWOUfFZRyvJPpBZ8c6InW990gf2Coxjyb%0AHbriuQ37sA304qvhlg8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957766/5c2dd87c0818a0400099a833c9b3/4cc3130a-f696-4967-9fe3-e5623c6f02bd?expires=1784781000&signature=199bb5ac4548f5964f7e0260159fb74b0fd277f4dc7fb1ae2be136f1e18c1362&req=dSkgFcB7moZZX%2FMW1HO4zbYXUBNlVOUbFZRyvJPpBZ%2BnNFu%2B01hePRtO%2BMtt%0A53mY1YRBIQPLdNuEnlw%3D%0A) You must pay this outstanding balance before you’re able to move forward with the deletion process. @@ -44,6 +44,6 @@ You must pay this outstanding balance before you’re able to move forward with There are some scenarios where you will need to contact our team to delete your account. If this is the case, it will be noted when you try to delete your organization: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957765/19dda72a40db95d78c00c27a1a1c/6ce89be6-93ce-409c-bbea-d34be09db348?expires=1784741400&signature=3abe37644058f16c9b0dae26d19bf936c3ba6c637e21dedb5c5704aa2c7955fc&req=dSkgFcB7moZZXPMW1HO4zRW12%2BHKfKX9ZxDZGlqR6GhQnk9oNCpGVDkeXWCC%0AAX5u7Cx2RmlDoNcXFeg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957765/19dda72a40db95d78c00c27a1a1c/6ce89be6-93ce-409c-bbea-d34be09db348?expires=1784781000&signature=af273d3172a2fde3050e7cb35f5e8ae5f89db732df0db6f32714f2bcc9ab0934&req=dSkgFcB7moZZXPMW1HO4zRW12%2BHKcKX5ZxDZGlqR6GiYUikz0QfZnYOZogWe%0ABLCFXSq5zUKMxifoxcg%3D%0A) If you are seeing this message, this indicates that your Console organization cannot be deleted via the self-service pathway. \ No newline at end of file diff --git a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md index debe47534..0791d488e 100644 --- a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md +++ b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md @@ -6,6 +6,6 @@ As a Primary Owner or Owner of a Team or Enterprise plan, you can manage the abi 2. Use the toggle to change the **Rate chats** setting for your organization: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2058292603/75752add0bed6a9f3ab217f01708/CleanShot%2B2026-02-12%2Bat%2B08_55_14-402x.png?expires=1784741400&signature=cdc4bd3155879f28d40a38b8cddef7740b56746e1046f24ca42d3dc7355a0112&req=diAiHst3n4dfWvMW1HO4zYGm8iMbFKnI085gFtEpvcS4nuVyjOmzNyPmX%2FLu%0Apt%2B9WsgouUtzV%2FyjkUY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2058292603/75752add0bed6a9f3ab217f01708/CleanShot%2B2026-02-12%2Bat%2B08_55_14-402x.png?expires=1784781000&signature=d3fa81d653feb3bfa8cd584832d4d960887bf4842a59fb5aedf9488bcf5daea0&req=diAiHst3n4dfWvMW1HO4zYGm8iMbGKnM085gFtEpvcR%2FcPvTC4rZYYZvyJrm%0AaTjRYng35Ape2CP4vWU%3D%0A) More information on how Anthropic collects, uses, and stores feedback data can be found in our Privacy Center: **[How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data)** \ No newline at end of file diff --git a/content/support/10504853-manage-user-feedback-settings-on-claude-console.md b/content/support/10504853-manage-user-feedback-settings-on-claude-console.md index 8853f8d4d..dfbd32970 100644 --- a/content/support/10504853-manage-user-feedback-settings-on-claude-console.md +++ b/content/support/10504853-manage-user-feedback-settings-on-claude-console.md @@ -8,6 +8,6 @@ To manage feedback for your Console organization: 2. Toggle the feedback switch on or off. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1729186182/ebf4032a12a8c56959ca927726ce/Screenshot+2025-09-16+at+12_32_31%E2%80%AFPM.png?expires=1784741400&signature=e26642be2657577454ddf51627af4b76f3035a7e495f0b4a7d47f6ac23026692&req=dSclH8h2m4BXW%2FMW1HO4zVpN5HMaXWlBJ%2FadMup7FQcP%2BZCfprChgdiJrp%2BV%0AeRyUMqyfWuiAM2Rijn8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1729186182/ebf4032a12a8c56959ca927726ce/Screenshot+2025-09-16+at+12_32_31%E2%80%AFPM.png?expires=1784781000&signature=12d2195cfb0adc97ea191acd4736e5c79b6866a093cc175384e968e7d930d266&req=dSclH8h2m4BXW%2FMW1HO4zVpN5HMaUWlFJ%2FadMup7FQd3eOgEjE2PbYZWbvrK%0ATcoFzCNeHMfpsNjWOwc%3D%0A) More information on how Anthropic collects, uses, and stores feedback data can be found in our Privacy Center: [How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data) \ No newline at end of file diff --git a/content/support/10593882-share-and-unshare-chats.md b/content/support/10593882-share-and-unshare-chats.md index 60e2f59dc..26d434fb1 100644 --- a/content/support/10593882-share-and-unshare-chats.md +++ b/content/support/10593882-share-and-unshare-chats.md @@ -38,12 +38,12 @@ To unshare a chat: Users on free, Pro, or Max plans can review a log of shared chats by navigating to **[Settings > Privacy](https://claude.ai/settings/data-privacy-controls)**. Find the **Privacy settings** section and click “Manage” next to **Shared chats:** -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1921669913/7cc7be48cfc7a18f9f469d6cd83c/CleanShot+2026-01-08+at+10_20_43%402x.png?expires=1784741400&signature=e0bbde99aa63ee6cfc72738cd7a1112902f98bf0298b0e6d5e9953a7aa73c194&req=dSklF894lIheWvMW1HO4zWn5HzcaZkRvc9cNIYuX0GEGW2%2BBV2yg0gd7TINb%0ACMuI8Dy9Y5YzEJbHX90%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1921669913/7cc7be48cfc7a18f9f469d6cd83c/CleanShot+2026-01-08+at+10_20_43%402x.png?expires=1784781000&signature=5b89f927914f9fd2f1884ead2c70572df62eb2d84b7976d1142fbb3665876301&req=dSklF894lIheWvMW1HO4zWn5HzcaakRrc9cNIYuX0GHijWNAddYElhBPG8hp%0AKwlgJTLSEqQBcyIrb8s%3D%0A) This will open a **Shared chats** modal listing the title, date shared, and link to each chat, allowing you to easily review and access all your previously-shared content. From here, you also have the option to click “Unshare” next to each listed chat to revoke access to the last snapshot you shared: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243810/e6fe1d262597446c7fe21dff9f10/AD_4nXdW-GhByF8uKV7fCq9lTbkVB91FglSL6TSyXAOUk_MLcTV9YsEMBMkm9rgm1oXqv0k3sJh1JhlzZP6tHVkKbDJJ71pDRRtM3aVNG64MDuKDIzgmknh-XDZdNa7biTsTdwGoPr5GRg?expires=1784741400&signature=20144024f5ecd38d7a6de0add677339c2b0bd6bf0ab835eddbb09e90e187c23a&req=dSYlEst6noleWfMW1HO4ze44eCNmkBM6guvTv9woD7bQE0OBCIgH65N7cztk%0AHUhAYZjTHZQ6nva2ZqI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243810/e6fe1d262597446c7fe21dff9f10/AD_4nXdW-GhByF8uKV7fCq9lTbkVB91FglSL6TSyXAOUk_MLcTV9YsEMBMkm9rgm1oXqv0k3sJh1JhlzZP6tHVkKbDJJ71pDRRtM3aVNG64MDuKDIzgmknh-XDZdNa7biTsTdwGoPr5GRg?expires=1784781000&signature=ee28004adac35d4dff81e9b7af9a5dc163b44d86711b5340b577380d5fe52369&req=dSYlEst6noleWfMW1HO4ze44eCNmnBM%2BguvTv9woD7ZTvkbe8BSgx00Aj1YR%0AvULgFzKP%2BjZOnP9zD5Q%3D%0A) If you don’t have any shared chat snapshots, the **Shared chats** modal will show “No shared content found”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243808/b025db8e598f0c88fb16d83d48d5/AD_4nXeUwCKnmFzzrjMHhfr5By4zk5pJlkEn3wbJ8-aNfu13Yl99IjBywpqPx9G07QRzpH1EwRY7uG7Q9m9fib98Gql1cIV7XwUCTzEgBNu79Ey8tCOS5CEVmwveIcEOxJ4fonBhe3g9MA?expires=1784741400&signature=73764f50211922c8ef9551362daee27bd052a6157703b47b1387b81d58433e82&req=dSYlEst6nolfUfMW1HO4zdaFncFzhYi1DeZsm0Gz1Hu7w3kKhyPAVOD6eykJ%0A7cyKnY6C7eqvRcDHBkQ%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243808/b025db8e598f0c88fb16d83d48d5/AD_4nXeUwCKnmFzzrjMHhfr5By4zk5pJlkEn3wbJ8-aNfu13Yl99IjBywpqPx9G07QRzpH1EwRY7uG7Q9m9fib98Gql1cIV7XwUCTzEgBNu79Ey8tCOS5CEVmwveIcEOxJ4fonBhe3g9MA?expires=1784781000&signature=63a338f8f1703a93d02df78275443de0c37aa0afafc5062a993eca15ef19a188&req=dSYlEst6nolfUfMW1HO4zdaFncFziYixDeZsm0Gz1HvTO9AQrqZXpWy9SN4%2F%0ArDKC3NnEx6hOszR0EDc%3D%0A) \ No newline at end of file diff --git a/content/support/10684626-enable-and-use-web-search.md b/content/support/10684626-enable-and-use-web-search.md index 75eba3693..29b4640db 100644 --- a/content/support/10684626-enable-and-use-web-search.md +++ b/content/support/10684626-enable-and-use-web-search.md @@ -22,7 +22,7 @@ Web search expands Claude's knowledge with real-time data, helping you make bett An Owner or Primary Owner must first enable web search for the entire workspace. This can be found in **[Admin settings > Capabilities](https://claude.ai/admin-settings/capabilities)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2032032614/ad907328c4d9a26ee4bd9ca27a52/CleanShot+2026-02-05+at+09_01_42%402x.png?expires=1784741400&signature=13c13bb4ae36782f7368f071d45788464467fb315bb844d5819a759fac8fc283&req=diAkFMl9n4deXfMW1HO4zetvyra9HM9UUJIbgsqS2%2BPcaj%2BcQz5rC52T6Zzp%0A6iCjhSZG7%2FWLqPx%2Fykw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2032032614/ad907328c4d9a26ee4bd9ca27a52/CleanShot+2026-02-05+at+09_01_42%402x.png?expires=1784781000&signature=b32a005109faaaeb5c38f1333b3a96f9bcbe37aff7bb0b1b124e04edb88207ea&req=diAkFMl9n4deXfMW1HO4zetvyra9EM9QUJIbgsqS2%2BPxlH65cj0LGusbMEzJ%0AR6O4os2KZwPMawePvYM%3D%0A) Once this is enabled at the workspace level, any member of the organization can switch it on while starting a chat by clicking the “+” button in the lower left corner of the chat window and selecting “Web search." Users can toggle this off for chats that don’t require web search capabilities. diff --git a/content/support/10722177-sharing-prompts-in-the-claude-console.md b/content/support/10722177-sharing-prompts-in-the-claude-console.md index d9db5faa6..0acb5ff43 100644 --- a/content/support/10722177-sharing-prompts-in-the-claude-console.md +++ b/content/support/10722177-sharing-prompts-in-the-claude-console.md @@ -10,13 +10,13 @@ The prompt sharing feature enables teams to collaborate on prompt development wi 3. Select "Share" from the dropdown menu: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409899224/f39d557d4925710cb16384886baa/AD_4nXf-Ev9bV40PoDjQX2fMF_zYpHSMQp7u3X92DNp-KRcykraFg8DnLdHCamIzXEPhtAEYhsBT9grnobQwQm1tgtnjR0EfyEuOFV61_InUuDwa121cj-1_KDtm9_NOYRD4LjcZQUIK?expires=1784741400&signature=265356ec0c089b3efb5b2fce5c4b7a73cca98f6e5c597f17edd374b417168047&req=dSQnH8F3lINdXfMW1HO4zajBO10pPQ6%2F5HPc4FxcZuq%2BmggpIYJ%2FKIJ6GN8Q%0ArlD5%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409899224/f39d557d4925710cb16384886baa/AD_4nXf-Ev9bV40PoDjQX2fMF_zYpHSMQp7u3X92DNp-KRcykraFg8DnLdHCamIzXEPhtAEYhsBT9grnobQwQm1tgtnjR0EfyEuOFV61_InUuDwa121cj-1_KDtm9_NOYRD4LjcZQUIK?expires=1784781000&signature=93fa92390cc57437b651830fa35d1d1eff1a027d0b268b9a398fb99a3ca131b5&req=dSQnH8F3lINdXfMW1HO4zajBO10pMQ675HPc4FxcZupXxkKXkn40fyjeQ6B%2B%0ABIGg%0A) 4. Change the access settings from "Private" to "Shared." 5. Click the "Copy link" button that appears: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409899713/0fd923a839b2c0ff8a0b5e11cf0c/AD_4nXdGUlO0CiCdnhllDnlz2Dd75uiNClFmR8_Qi1Wx6MM9rF-EUSIzRzvs_P6kGSqWBuF-l4iBMRtoEN8ip1-c8bqNzSqKA7SX1STIjtRqNisW-NCmcl9DEhWjv4edORWaT4LNZuPVww?expires=1784741400&signature=6535972871b45f97b40c3d0437c1acb32d040f4b994a42cf46ce0bb9ad282697&req=dSQnH8F3lIZeWvMW1HO4zaU8nlOzOs2tiqPPSiDAl9KvAU6gArThbi%2FICwiS%0Au5JL%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409899713/0fd923a839b2c0ff8a0b5e11cf0c/AD_4nXdGUlO0CiCdnhllDnlz2Dd75uiNClFmR8_Qi1Wx6MM9rF-EUSIzRzvs_P6kGSqWBuF-l4iBMRtoEN8ip1-c8bqNzSqKA7SX1STIjtRqNisW-NCmcl9DEhWjv4edORWaT4LNZuPVww?expires=1784781000&signature=8cd58dbca298498c8a4bd2045493d06d057777d4e5b2a6cef12c15296d1efed1&req=dSQnH8F3lIZeWvMW1HO4zaU8nlOzNs2piqPPSiDAl9Ja1x%2FPS22OuOkSBeLl%0AAI7Z%0A) 6. Share the link with members of your workspace. @@ -38,7 +38,7 @@ When working on a shared prompt: **Note:** If a collaborator saves changes to the prompt while you are viewing it, you will be prompted with a message to “Go to the Latest Version,” where all their changes will be reflected. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409901036/6b69f2878fcb1b4e9ba0747464ac/AD_4nXcp1htcsSLR8H98i7KazEFqIkOhVUHnw__-17jbMZ-n70qnSttxx_m7wNNaHsK7FZHoG8v6zRyqkElQrtdVkxnydo2hzsznCwt6ehzqlGAR7Js7TggP6WmVfwnUTgbouDIxyGS0?expires=1784741400&signature=9f9df5309b942999aa5a7cac1a89c2068995f8e6e0a751270e2b346706117e6a&req=dSQnH8B%2BnIFcX%2FMW1HO4zUnGutMIAUIi83rdFAdB3KzJ67jcVu%2FMOJb%2FllFO%0AEHI0nWNw6wJuORLj3a4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409901036/6b69f2878fcb1b4e9ba0747464ac/AD_4nXcp1htcsSLR8H98i7KazEFqIkOhVUHnw__-17jbMZ-n70qnSttxx_m7wNNaHsK7FZHoG8v6zRyqkElQrtdVkxnydo2hzsznCwt6ehzqlGAR7Js7TggP6WmVfwnUTgbouDIxyGS0?expires=1784781000&signature=6146ae5b7eba396789f2fcc96ebb2c93a4bbe0957424cf01c6d0e289609a9249&req=dSQnH8B%2BnIFcX%2FMW1HO4zUnGutMIDUIm83rdFAdB3KyNO%2BEUAFVNhbNACtUe%0AyZvvFxY4LY9f%2F9kB28o%3D%0A) ## Viewing Version History @@ -48,13 +48,13 @@ To see previous versions of a prompt: 2. Select "Version history" from the dropdown: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409901693/2924593d08c79c5ef1c4ca795f9d/AD_4nXf-Ev9bV40PoDjQX2fMF_zYpHSMQp7u3X92DNp-KRcykraFg8DnLdHCamIzXEPhtAEYhsBT9grnobQwQm1tgtnjR0EfyEuOFV61_InUuDwa121cj-1_KDtm9_NOYRD4LjcZQUIK?expires=1784741400&signature=8b893f7f4943e8524e3daa1f420237a34a8466e60a08ca03ae6ae7bdcd1a3e9f&req=dSQnH8B%2BnIdWWvMW1HO4zdOs5EAnMXPaplKKWUPxWw2iEwunhCswKBAd2dM0%0A%2F1zq%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409901693/2924593d08c79c5ef1c4ca795f9d/AD_4nXf-Ev9bV40PoDjQX2fMF_zYpHSMQp7u3X92DNp-KRcykraFg8DnLdHCamIzXEPhtAEYhsBT9grnobQwQm1tgtnjR0EfyEuOFV61_InUuDwa121cj-1_KDtm9_NOYRD4LjcZQUIK?expires=1784781000&signature=b278c438a781d1752503c7a71356363884675f57facf6ab44e0cef9d9cd6b42a&req=dSQnH8B%2BnIdWWvMW1HO4zdOs5EAnPXPeplKKWUPxWw3nWfj9vCUKYZtCWNf5%0AJC0u%0A) 3. Choose the specific version you want to view from the list. **Note:** Past versions cannot be edited. To restore the prompt to a previous version, select the version from the version history list, and click the “Restore” button in the pop up. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409902092/39258424bd71205743134bb5a2d8/AD_4nXe7EGQNq4UAioXobBxbEdluYda1qU277VuDxoqXgmL9z1ch8ro5k3RjDmBWlpPzcfI8eeAbbmiouCc2AEfGPO_LiwFekOgCDj5MV8klaRgH1BHko5OZ1WtWq8Ow0HlYif77j2AxRQ?expires=1784741400&signature=dc9511e7b673b8dedb936984bea24cf858f5b5a88474da513af0d581446f4ea1&req=dSQnH8B%2Bn4FWW%2FMW1HO4zeZkcjNUj9YkRPhLT%2BKEBGPAa%2BIFY48bBdVok73c%0AfYM1YhX9zp%2B8Et7GZLE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409902092/39258424bd71205743134bb5a2d8/AD_4nXe7EGQNq4UAioXobBxbEdluYda1qU277VuDxoqXgmL9z1ch8ro5k3RjDmBWlpPzcfI8eeAbbmiouCc2AEfGPO_LiwFekOgCDj5MV8klaRgH1BHko5OZ1WtWq8Ow0HlYif77j2AxRQ?expires=1784781000&signature=fe573f6f18162345750ef33fe710d72f46cefcfc3601d19aa105aa1ed940bf87&req=dSQnH8B%2Bn4FWW%2FMW1HO4zeZkcjNUg9YgRPhLT%2BKEBGN4WPXOfaHB4w2wp3vr%0AdsmP9dGVNOi0G32HpiM%3D%0A) ## Unsharing a Prompt @@ -64,6 +64,6 @@ To see previous versions of a prompt: 3. Change the access settings from "Shared" to "Private": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409898166/d7f3c0233ef3a3fa66701b558db7/AD_4nXcuZY7tln-InGzsyEmOZdRER_FWN9rQmcKalQqRTu6lSEyFSGBhGuvVPkLv7QHvsJCZsHz6-lTOX_tw77ribji4VlTsdG2dp-orGm6ST7IQ9aRnZvQMNvetkik0voTDZ1rHuFP5zA?expires=1784741400&signature=42ea7937044f9d473d90a149f70fe75e5812a2f82a6436be68d18df0888f4e00&req=dSQnH8F3lYBZX%2FMW1HO4zZMvtFPZQPdlH68akkuAPm2Cmu%2FzV2Nj6SahAciq%0An0cj2wr5RnolETYCXrc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1409898166/d7f3c0233ef3a3fa66701b558db7/AD_4nXcuZY7tln-InGzsyEmOZdRER_FWN9rQmcKalQqRTu6lSEyFSGBhGuvVPkLv7QHvsJCZsHz6-lTOX_tw77ribji4VlTsdG2dp-orGm6ST7IQ9aRnZvQMNvetkik0voTDZ1rHuFP5zA?expires=1784781000&signature=f02ac1c3d8d4a7bea664fa83043df326efd4fbcc052c7918710dcea0fb7dd01d&req=dSQnH8F3lYBZX%2FMW1HO4zZMvtFPZTPdhH68akkuAPm3%2B%2BtYCLCbieJpfUzbB%0ALXpnLQsn4LkwWqCbpjw%3D%0A) **Note:** Unsharing immediately disables access via the direct link. Anyone that the link was previously shared with will no longer be able to view the prompt. \ No newline at end of file diff --git a/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md b/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md index 18157c98d..556ae1879 100644 --- a/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md +++ b/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md @@ -48,7 +48,7 @@ for specific instructions. Custom desktop extensions uploads allow Team and Enterprise plans to leverage organization-specific workflows that aren’t available in the public directory. After creating a custom desktop extension, Owners and Primary Owners can navigate to Settings > Extensions within Claude Desktop and click “Advanced settings” to access the **Extension Developer** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1681607607/ba6e379d2769d190f0970a0adaed/AD_4nXd4aZkqjJFpiXMPF28Pih7HmSJ9pPsnoWAfVgiLdFRFiTkO92YtXteIjvDHaPl7T0tjfpRTBOlyrMbQ_aciCNDgfIuEvV3szmKvt72x5O51DMSClXOYWk1JIRIzylwkj3joXqZcLw?expires=1784741400&signature=8a1e96ea74c9df40592a6e498fa916da3ae3df66e24dbf30367f4bbb50320406&req=dSYvF89%2BmodfXvMW1HO4zWbPxER4Mzw2Hn9K2IaIG2KzWJ1U7%2BoYCMfjVYqK%0AvB7ipe3lNwgcaYDI74o%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1681607607/ba6e379d2769d190f0970a0adaed/AD_4nXd4aZkqjJFpiXMPF28Pih7HmSJ9pPsnoWAfVgiLdFRFiTkO92YtXteIjvDHaPl7T0tjfpRTBOlyrMbQ_aciCNDgfIuEvV3szmKvt72x5O51DMSClXOYWk1JIRIzylwkj3joXqZcLw?expires=1784781000&signature=2b7f5250d549497e3333ee07a7705d87dac1896380950fec576464911fdcf95d&req=dSYvF89%2BmodfXvMW1HO4zWbPxER4PzwyHn9K2IaIG2I%2FcQq9KMBhSROs6Vgg%0AmK7vZ5DlpLQR1W0PtLI%3D%0A) Click “Install Extension…” and select the .mcpb file. Follow the prompts to install and configure your custom desktop extension. For more in-depth information, please refer to our [desktop extension developer documentation](https://github.com/anthropics/mcpb). diff --git a/content/support/11101966-use-voice-mode.md b/content/support/11101966-use-voice-mode.md index 7f3385096..ce2b4727b 100644 --- a/content/support/11101966-use-voice-mode.md +++ b/content/support/11101966-use-voice-mode.md @@ -22,7 +22,7 @@ Voice mode transforms how you interact with Claude by: 2. Tap the sound wave symbol in the lower right corner of the chat window to activate voice mode: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042358620/1bf2311353615c1c494da1312a17/124b93a8-0a9b-4c84-9d1f-ede6ca3498dd?expires=1784741400&signature=a12270520e2f212e3397f6b110d37fa89a79c70794c7f5ee232b65d93a6cec02&req=diAjFMp7lYddWfMW1HO4zZyGrsp1v1YUF6uXnTLMvvBWZRDnkGQ97Cz0s4Co%0AFP4u%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042358620/1bf2311353615c1c494da1312a17/124b93a8-0a9b-4c84-9d1f-ede6ca3498dd?expires=1784781000&signature=d225fce69546fc4c583f68fd15a513f06e90a7dee7df633c14beffef167f8bf5&req=diAjFMp7lYddWfMW1HO4zZyGrsp1s1YQF6uXnTLMvvByBOeOYwCP3WnqV3Cc%0AaYlw%0A) 3. Start talking and see your prompt automatically populate in the chat input. @@ -30,7 +30,7 @@ Voice mode transforms how you interact with Claude by: 5. Claude will remain in voice mode until you click the “Stop” button in the lower right corner of the chat window: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352060/162f9e61f7fbeb689201dfc1cac1/6a7fafb2-31df-43be-a43f-0059d735e3c4?expires=1784741400&signature=fbc5b850b5b6055f288a51e924f4c3d0b73cc34014b1aa81bc7468e01fa9bee5&req=diAjFMp7n4FZWfMW1HO4zU6VRfnNTL1txNdRzYWrfF5unEZV6iHQ0A%2FUmVSx%0A3Rp5q%2BE5kFh6PKSEtq4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352060/162f9e61f7fbeb689201dfc1cac1/6a7fafb2-31df-43be-a43f-0059d735e3c4?expires=1784781000&signature=cb31cec11661df0495f1d62d703277330dfbf89060c27d0e1821b35626870678&req=diAjFMp7n4FZWfMW1HO4zU6VRfnNQL1pxNdRzYWrfF5CIZZBiNqN2WuKKoVv%0ApzCE7ORZepLERT7%2FBwY%3D%0A) ### On mobile (iOS and Android) @@ -38,7 +38,7 @@ Voice mode transforms how you interact with Claude by: 2. Tap the voice mode icon (sound wave symbol next to the microphone icon) in the text input field: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042359690/68879db64559ecf87991f73ce058/671ff972-9e08-4686-bc04-955dab4b2de3?expires=1784741400&signature=eace3f6f1c32cd9f6114079b0b39f362f4f704bea4e46b4cf828ea8a82cbabf9&req=diAjFMp7lIdWWfMW1HO4zQTUIfB9lNlKD%2FRXAPlQ7Lat9SjslyPAOLww%2BC9B%0ATLJ2%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042359690/68879db64559ecf87991f73ce058/671ff972-9e08-4686-bc04-955dab4b2de3?expires=1784781000&signature=3420c825b51cd3362e47f26a98865a03439414557992c6eeccdd906cb686b1cd&req=diAjFMp7lIdWWfMW1HO4zQTUIfB9mNlOD%2FRXAPlQ7La5NzAKmCJ7DdIDwf8x%0AbT%2Bn%0A) 3. Choose a voice to personalize your experience. @@ -76,7 +76,7 @@ To change the voice later: - **On mobile:** Click the settings button in the bottom left corner while chatting with Claude in voice mode, then tap your preferred voice and pace: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352063/25eca25bcfd573ecab30dd53158c/074454a6-fa5a-4c49-8b19-02d434b4ca50?expires=1784741400&signature=48b53e7d6cc5b91e44f65938ea68742a9e27bedc27414e97b10d4f61eace357a&req=diAjFMp7n4FZWvMW1HO4zZ3%2FGG6SZFEOy8OQfYsvK3yxxcOskuDXZAtBqcqs%0A5COjBJggMlGjUc11ZpA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352063/25eca25bcfd573ecab30dd53158c/074454a6-fa5a-4c49-8b19-02d434b4ca50?expires=1784781000&signature=21ce6b5053d5a6f89f790fce8a083dd18da9f5e744d4fb5c0bf07faab4a75b4d&req=diAjFMp7n4FZWvMW1HO4zZ3%2FGG6SaFEKy8OQfYsvK3wtiwK5vuBaLPp4qUo3%0A%2BRyvtdygg6nwGDmOyPk%3D%0A) ## Switch between text and voice diff --git a/content/support/11175166-get-started-with-custom-connectors-using-remote-mcp.md b/content/support/11175166-get-started-with-custom-connectors-using-remote-mcp.md index 173126a8a..69b6a8354 100644 --- a/content/support/11175166-get-started-with-custom-connectors-using-remote-mcp.md +++ b/content/support/11175166-get-started-with-custom-connectors-using-remote-mcp.md @@ -1,6 +1,6 @@ # Get started with custom connectors using remote MCP -Custom connectors using remote MCP are available on Claude, Cowork, and Claude Desktop for users on Free, Pro, Max, Team, and Enterprise plans. Free users are limited to one custom connector. This feature is currently in beta. +Custom connectors using remote MCP are available on Claude, Cowork, and Claude Desktop for users on Free, Pro, Max, Team, and Enterprise plans. Free users are limited to one custom connector. ## What are custom connectors? @@ -12,9 +12,9 @@ You can: - Build your own remote MCP servers to connect with any tool. -**⚠️ Security and Privacy with Custom Connectors (beta)** +**Security and privacy with custom connectors** -Be aware that custom connectors allow you to connect Claude to services that have not been verified by Anthropic, and allow Claude to access and take action in these services. For more guidance, review the **[Security and privacy considerations](#h_9088ccdf4d)** section below. +Custom connectors allow you to connect Claude to services that haven't been verified by Anthropic. Once connected, Claude can access those services and take action in them. For more guidance, review the **[Security and privacy considerations](#h_b79c05dfcd)** section below. ## What are remote MCP servers? @@ -172,7 +172,7 @@ You can interact with these connectors directly — filtering data, checking off ### Using Claude with Research -**Note:** **[Advanced Research](https://claude.com/blog/integrations)** is not currently able to invoke tools from local MCP servers. +**Note: [Advanced Research](https://claude.com/blog/integrations)** is not currently able to invoke tools from local MCP servers. Research allows Claude to deeply investigate queries by searching through hundreds of internal and external sources. During the research process, Claude can invoke tools from your connectors automatically without further approval. diff --git a/content/support/11506255-get-started-with-claude-in-slack.md b/content/support/11506255-get-started-with-claude-in-slack.md index f5ad792af..1d5971648 100644 --- a/content/support/11506255-get-started-with-claude-in-slack.md +++ b/content/support/11506255-get-started-with-claude-in-slack.md @@ -12,17 +12,17 @@ It’s how we’ve brought Claude’s capabilities directly to Slack, bringing A **Direct message with Claude**: Start a private conversation with @Claude. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755143775/0ac74968f16b0c304ad05c1501c3/8f870a90-c622-449d-9eba-0a2edf5d63f1?expires=1784741400&signature=b3fc6a43ef06502757537e1b9e614c465affc84056f85d15b41dc7920cb028d0&req=dSciE8h6noZYXPMW1HO4zb2WCgEEEoVz5mlLMjhGEMGts2gdQ2C2tbXmobiC%0Ahcq0TdUDCBW2ltp784Q%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755143775/0ac74968f16b0c304ad05c1501c3/8f870a90-c622-449d-9eba-0a2edf5d63f1?expires=1784781000&signature=5f237bc50f8bccc07d99588d408958b7b265a02cfea96ec85287e545bb3c8865&req=dSciE8h6noZYXPMW1HO4zb2WCgEEHoV35mlLMjhGEMEeS0qmBiEjoijEzMIq%0AeqF1GEq7ijEWKO229H4%3D%0A) **AI assistant panel**: Click the Claude icon in Slack's AI assistant header to open a panel on the right side of your Slack window, allowing you to access Claude from anywhere in the Slack app. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755144720/47781e38d6f97597aa494e0aeb2d/38f88d2c-aa96-4d35-8a02-7ad6b23f8699?expires=1784741400&signature=fac8f1ee0c0bf211e65763c8c6252600bce7201ceb5cc660a179f8525ad1edb3&req=dSciE8h6mYZdWfMW1HO4zUifzTXeE6KgPUSeDntyEuVRSoqNpScXfXSX9ySi%0ApebuoIdbliB7MnU%2B4bo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755144720/47781e38d6f97597aa494e0aeb2d/38f88d2c-aa96-4d35-8a02-7ad6b23f8699?expires=1784781000&signature=811a5b8d260b1965e4352691a35ff6538a52b13df6dac886bebf5977775412ea&req=dSciE8h6mYZdWfMW1HO4zUifzTXeH6KkPUSeDntyEuV0NkwVW2fOWGUiB3XN%0AitXyZKe8CBcNYYiquxM%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755145556/3155c34bba5a64e0ab7b760e78c2/5c54e519-3c0d-4ffa-a555-0b9d9660ea53?expires=1784741400&signature=99e82fb593ba7302c44c46bd7e36a6871212663995eef8f7a148ac4656d630ba&req=dSciE8h6mIRaX%2FMW1HO4zXrVUtx79I7HBGejWRiWDiI%2Fm%2FY7O9zyXRxFy2QQ%0AyWC1aesWc%2FM38ABCKz8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755145556/3155c34bba5a64e0ab7b760e78c2/5c54e519-3c0d-4ffa-a555-0b9d9660ea53?expires=1784781000&signature=a565acaa8f4beb5a38942750135349f8c453dd413f284720fa8f64f551e11d3c&req=dSciE8h6mIRaX%2FMW1HO4zXrVUtx7%2BI7DBGejWRiWDiKmMK5C1J%2FUF%2Faf9BFg%0AtD4dK0C3slqV29neUEY%3D%0A) **Thread participation**: Mention @Claude in any thread to get Claude's help with the conversation. -![A Slack thread where a user @mentions Claude and asks for a summary. Claude replies in the thread with a short bulleted summary of the conversation.](https://downloads.intercomcdn.com/i/o/lupk8zyo/2398958204/25a1254c9c17bb0af6bf64ac99d3/Slack_Claude_Thread.png?expires=1784741400&signature=be63ee004094335b4d9a2561d64a417326411f19d12014d47382f906b7ca1daa&req=diMuHsB7lYNfXfMW1HO4zdOLiZ8qKOqsZVaRIDJSo4IR0fv5b4Edwl%2FtW4Iu%0AXKK3WgCFFucGvDHwmpU%3D%0A) +![A Slack thread where a user @mentions Claude and asks for a summary. Claude replies in the thread with a short bulleted summary of the conversation.](https://downloads.intercomcdn.com/i/o/lupk8zyo/2398958204/25a1254c9c17bb0af6bf64ac99d3/Slack_Claude_Thread.png?expires=1784781000&signature=0e52403c374906923e2da34e262e9a95cb34bfa9a0f208b10888b458a75beeb4&req=diMuHsB7lYNfXfMW1HO4zdOLiZ8qJOqoZVaRIDJSo4Jz9i%2B8HGhv34%2F%2FDw3P%0AxycB4gqTyEo1sgFf1lk%3D%0A) All surfaces provide the same capabilities that you have enabled in Claude, including web search and connections to your integrated tools, allowing you to seamlessly integrate AI assistance into your existing workflow. @@ -60,17 +60,17 @@ Once your Slack admin has approved Claude (or if you're on a personal Slack plan 2. Click "Connect Account” to be prompted to connect your Claude account: - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755147280/abac53f0415690817c630a420091/98c15ecd-761c-4e0d-aeae-1c52d38e52c8?expires=1784741400&signature=563e02c41b3d374e8d79aa66f10541ededac94d73c75e46d1253b81cbd46c968&req=dSciE8h6moNXWfMW1HO4zRIwhUi7QSFi%2Fy7g3WAjXh535JgeOwcacg%2FLULcI%0ASDwB%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755147280/abac53f0415690817c630a420091/98c15ecd-761c-4e0d-aeae-1c52d38e52c8?expires=1784781000&signature=8b4e67227fa3bab06869d287fccfed59ef518c69b90ebeb692a8a1307be18654&req=dSciE8h6moNXWfMW1HO4zRIwhUi7TSFm%2Fy7g3WAjXh7GNq%2BwjoPazPa0oCo7%0Aw62h%0A) 3. In the window that opens, select which organization you would like to connect with Claude for Slack. 4. Click “Authorize” to allow Claude in Slack to access your Claude chat account: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755147985/57be4bd15a4720466d9114ef9e0d/5944ab3f-20b9-43f7-b475-127b98a3eef4?expires=1784741400&signature=83329f70aa4406645b332e78d0932e358df26041706cf3f2b634d2a49b21b5af&req=dSciE8h6mohXXPMW1HO4zcpXSpE8FgyQFQ%2BRWX0w%2Fe7H4CaAZYDa9jkYXgB5%0ADRKk%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755147985/57be4bd15a4720466d9114ef9e0d/5944ab3f-20b9-43f7-b475-127b98a3eef4?expires=1784781000&signature=0b5d1cc00620b79757d56222cf3a1809d1086c53e3eae06384e38016bfd7c590&req=dSciE8h6mohXXPMW1HO4zcpXSpE8GgyUFQ%2BRWX0w%2Fe6dYMpi9aGZXSVsbklB%0AzgBE%0A) 5. You should see a confirmation message upon successful connection: - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755148657/71571a264d97c7a145c399b3e653/f0d32375-bf8f-47d5-89e3-c165eb3a1d41?expires=1784741400&signature=c9ae16bbff9a4550360c66e7e2dcd29cc12cbf8d670241f0ddb650f19efd62b2&req=dSciE8h6lYdaXvMW1HO4zZ9S6jUecJBvXLLzhWuBjzN9eGneBJftsvuq2D2%2F%0A8oJv%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755148657/71571a264d97c7a145c399b3e653/f0d32375-bf8f-47d5-89e3-c165eb3a1d41?expires=1784781000&signature=02271e76e93bfa262e0393bdfd23a3121dedd10777934463cb7c22ba295d471c&req=dSciE8h6lYdaXvMW1HO4zZ9S6jUefJBrXLLzhWuBjzO%2FiC3klkpse%2Fb9rPTC%0AX0mr%0A) 6. After successful authentication, return to Slack. @@ -142,7 +142,7 @@ To disconnect your Claude account from Slack: 3. Confirm the disconnection. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755149744/97a579fedf87deb5e5b6abf48963/4cab9f61-9f98-40c4-969a-f590716dfb38?expires=1784741400&signature=99a55a9dbb089ffac87605261d2c1ee73fcb8a4ce60d33bfa2710db59639fe0a&req=dSciE8h6lIZbXfMW1HO4zdIAvZFMarCUQgg7UiXQlE2FgdYMp9CxOWwaTjta%0A2B7f1O9x%2BlWJzyo17tQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755149744/97a579fedf87deb5e5b6abf48963/4cab9f61-9f98-40c4-969a-f590716dfb38?expires=1784781000&signature=123b22778f63fe86c2e1212b1eac200776f46f28a01cc2fe924ea1380100e984&req=dSciE8h6lIZbXfMW1HO4zdIAvZFMZrCQQgg7UiXQlE0oUV7lp1Zn7JCggmp%2B%0AjkzU6Hhru0Acjo66zpw%3D%0A) Disconnecting will: diff --git a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md index 52e816ca9..15cf05522 100644 --- a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md +++ b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md @@ -44,7 +44,7 @@ This article provides information on how to enable the Claude LTI integration in 5. Click "Install" and refresh the course page. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611422430/c8e0875feac1f2c7cb033be74fc9/AD_4nXfLU_bui3EXcCjQ0qm70HD97neqjGayKeDer_t76utlci8gZSUjYRhw6ZSOlDdqSEcwXBzd_shAh7pQEJ-8OoE0O21DM5coOgxmO_WD5hlwiuwtS2iYXcTavhIRyQT5zKFWvfn3NA?expires=1784741400&signature=16c7b7dfceb2041ae8ac3221b33dedeed07c0cb28c3a4de3ec4328b84fb22902&req=dSYmF818n4VcWfMW1HO4zTEDau8Zn%2FKFEv2ojHLMylb5lZ2Vj0XlR92xSTkO%0AX3Zlkx84ySlE6yP2u60%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611422430/c8e0875feac1f2c7cb033be74fc9/AD_4nXfLU_bui3EXcCjQ0qm70HD97neqjGayKeDer_t76utlci8gZSUjYRhw6ZSOlDdqSEcwXBzd_shAh7pQEJ-8OoE0O21DM5coOgxmO_WD5hlwiuwtS2iYXcTavhIRyQT5zKFWvfn3NA?expires=1784781000&signature=b1275a0e917dc127b873d720551877030a7949af6e15e3643a4999f16f75e92d&req=dSYmF818n4VcWfMW1HO4zTEDau8Zk%2FKBEv2ojHLMylZ55OF1dAOc0u%2BH7Yd7%0AoTDPSjq0nYnuUrrsjOw%3D%0A) ## Turn on the Claude LTI Integration in Claude for Education organization settings diff --git a/content/support/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context.md b/content/support/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context.md index 6f38e9082..dce9aa790 100644 --- a/content/support/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context.md +++ b/content/support/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context.md @@ -40,7 +40,7 @@ When Claude searches your previous chats, you will see this reflected in your cu Yes, navigate to **[Settings > Memory](https://claude.ai/new#settings/customize-memory)** and switch the toggle next to "Search and reference chats" off: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533482439/4dee2d7b267f865205feefc8f4f3/cb60c334-d1e2-4828-a01d-dfb36bbaa7eb?expires=1784741400&signature=34b5c2c0440f7e927786fb9517aa021843ce78bb4a9ffbfaada35dee06a32ef6&req=diUkFc12n4VcUPMW1HO4zY9IRA5rUdBzYNcz5nFaZkExd%2FRwkK23UqbVYKbb%0AYuANwWHBjy6bUghkKlI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533482439/4dee2d7b267f865205feefc8f4f3/cb60c334-d1e2-4828-a01d-dfb36bbaa7eb?expires=1784781000&signature=628af9ff989c2bc238f825a3bcf9dba4d7dd6b4b3c5a0e472aeefece6b6e8e83&req=diUkFc12n4VcUPMW1HO4zY9IRA5rXdB3YNcz5nFaZkERI11V%2FlKdkn7HS945%0ARu8%2BZlSQx91VVbJ95rY%3D%0A) ## Can I exclude a specific past chat from searches? @@ -80,7 +80,7 @@ Each project has its own separate memory space and dedicated project summary, so You can toggle Claude’s memory on by navigating to **[Settings > Memory](https://claude.ai/new#settings/customize-memory)** and turning on **Generate memory from chats**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533482441/b5c806a8e3f68bf34c4a70724d38/d30be013-d099-4c93-99d1-23d404792f08?expires=1784741400&signature=b9e082b8a60cd58aa499d7cf7b85acf6e143f7dc53bf1ba2dbaf76bd1d8ec917&req=diUkFc12n4VbWPMW1HO4zRlYrp9q5lEoNshWSMEMw9fBJS3V5EcDl0Mnq55y%0A5HCXECDBIABTs8ei8eY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533482441/b5c806a8e3f68bf34c4a70724d38/d30be013-d099-4c93-99d1-23d404792f08?expires=1784781000&signature=b24da13e825cde005007ae6213fc0fc99c489216e901b7125c0c1f172454f2af&req=diUkFc12n4VbWPMW1HO4zRlYrp9q6lEsNshWSMEMw9dzfM3RXKmJy8dMSPVw%0AvSbaLbLD7zsfHvjUP8U%3D%0A) If you want to disable Claude’s memory, click the toggle and you'll see two options: @@ -184,7 +184,7 @@ When Claude searches your previous chats, you will see this reflected in your cu Yes, navigate to **[Settings > Capabilities](http://claude.ai/settings/capabilities)** and find the **Preferences** section. Switch the toggle next to “Search and reference chats” off: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719730889/3fafbf5ecaa0ae31d7d84a66229b/c25536c1-7433-4b94-a5e9-cd5acf97a4fd?expires=1784741400&signature=b2666bef51f96d8cb5ab28e23b1cf7bac5d11b46971b34d1806a6451d42888e4&req=dScmH859nYlXUPMW1HO4zRzXH1s3JzDGJG68qZhl783DcU8pG4rqc2fQ0oSr%0AbNFMgchY5LlCz4zL5mY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719730889/3fafbf5ecaa0ae31d7d84a66229b/c25536c1-7433-4b94-a5e9-cd5acf97a4fd?expires=1784781000&signature=81b813ea56da40d524730f9856f6ae4020517439b28646ffb4ba2149c10db667&req=dScmH859nYlXUPMW1HO4zRzXH1s3KzDCJG68qZhl783TcpkRjyfwVg7hOA6l%0AatvWmPBiSrUztQuLj2g%3D%0A) ### Can I exclude a specific past chat from searches? @@ -192,7 +192,7 @@ Incognito chats are available to all Claude users (free, Pro, Max, Team, and Ent When starting a new chat with Claude outside of a project, you'll see a ghost icon in the upper right corner of your screen: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719730893/9549b21954e0070ceb6b85231fd5/88e59234-6fc2-4229-84fe-733b33efff26?expires=1784741400&signature=1afc657be0510417f35820704114e1660ba7bc864d26b159ca19c7f848659075&req=dScmH859nYlWWvMW1HO4za54sKdrOIe%2FXDpzhlKsgjPzBTEw1fJOd1lp3QE2%0APBUyx4%2Fn3sznNTNp%2BWU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719730893/9549b21954e0070ceb6b85231fd5/88e59234-6fc2-4229-84fe-733b33efff26?expires=1784781000&signature=cd7830bf01f3191d0d26c8638955838094ef4d368c33b1a109e312456e0d49bc&req=dScmH859nYlWWvMW1HO4za54sKdrNIe7XDpzhlKsgjMK8Zr%2BCAxbOgRIhfuT%0ABPCHI2OJCR3tzPUvpOE%3D%0A) Clicking the ghost icon will open an incognito chat, creating a temporary conversation that isn’t saved to your chat history. Claude won’t pull information from incognito chats when searching previous conversations. @@ -224,7 +224,7 @@ Each project has its own separate memory space and dedicated project summary, so You can toggle Claude’s memory on by navigating to **[Settings > Capabilities](http://claude.ai/settings/capabilities)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719730892/62f9f2b68d675a8e33393f06024f/89198978-192f-4c52-915d-5294b16f3fe1?expires=1784741400&signature=e9955779f6f6e50798d8f405c55bb876d35cd2f8b11bd55361837c39d680ce16&req=dScmH859nYlWW%2FMW1HO4zTD5MMXhc%2BVBBq9N9dRTKYe70YrcIDwXhDJ4fWV4%0A6fn7u3%2Fq82x8%2B%2B%2B7ICk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719730892/62f9f2b68d675a8e33393f06024f/89198978-192f-4c52-915d-5294b16f3fe1?expires=1784781000&signature=58dbaa49376d26cb954c990e196919e51728ecc9af72198390c5a94c8b42fbd2&req=dScmH859nYlWW%2FMW1HO4zTD5MMXhf%2BVFBq9N9dRTKYc3egNwUumLxNMtUoFu%0AS9kWYzH8EXsA2EuChrw%3D%0A) If you want to disable Claude’s memory, click the toggle to see two options: diff --git a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md index 2339513b6..a6478c89f 100644 --- a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md +++ b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md @@ -2,7 +2,7 @@ If you see the following pop-up when you log in to your Claude account, you’ll need to click the “Verify now” button to verify your payment method: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1631413861/42c3b13d7fc44a11a88ec2b9cd03/AD_4nXeMx8QXpeZZCkfAnVSwx8KZ9n4Vr2rvPdQddyE6ZNxch__F6ZqFs1G4ZmU52Wvb7gRlwRqquTLdw8IQv-gICDyP-MXqiQK_Oe7gX3SKsCKKt2IEpMx4qDeMeeZufMaJfv16XgOH5g?expires=1784741400&signature=179626dc67746c04978a86ade97c4838eacb2b81ec92ea5293d7188c3f17bf91&req=dSYkF81%2FnolZWPMW1HO4zf7%2BjEDp7IH2n6MrEicvimC7F%2Ba44J%2FioFPzf5Zc%0ARRR14LhrLg%2BhIs9Pkjo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1631413861/42c3b13d7fc44a11a88ec2b9cd03/AD_4nXeMx8QXpeZZCkfAnVSwx8KZ9n4Vr2rvPdQddyE6ZNxch__F6ZqFs1G4ZmU52Wvb7gRlwRqquTLdw8IQv-gICDyP-MXqiQK_Oe7gX3SKsCKKt2IEpMx4qDeMeeZufMaJfv16XgOH5g?expires=1784781000&signature=eb8992361ecd98cb4d0831079c0121dfb5604638439eb507746b4f5eb6d6842d&req=dSYkF81%2FnolZWPMW1HO4zf7%2BjEDp4IHyn6MrEicvimA%2BrXioAvnzDirF1VZp%0AE8Kkv8jxtbPIrDdZs5g%3D%0A) ## What happens if I click “Remind me later?” diff --git a/content/support/11869629-use-claude-with-android-apps.md b/content/support/11869629-use-claude-with-android-apps.md index a357f4fa6..94f2091b5 100644 --- a/content/support/11869629-use-claude-with-android-apps.md +++ b/content/support/11869629-use-claude-with-android-apps.md @@ -224,7 +224,7 @@ Permission requirements vary by feature: For features requiring permissions (like location or calendar access), Claude will request permission contextually with clear explanations of why the access is needed. You’ll be prompted to approve the action with three options: Allow once, Always allow, or Don't allow. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1707351614/ccb910e4b87b1e96ad9a11bbd835/b57b2130-d8d6-4499-89f6-6c12de236fd4?expires=1784741400&signature=86b3c45222b7690f78cd62134809abef31532dae632798173bc1e392a0ab1421&req=dScnEcp7nIdeXfMW1HO4zQe5GluI3yTwS5x65TIld%2FCPc61TdiopnrMpbe73%0ABhKhaqONJP0s7VkDJnc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1707351614/ccb910e4b87b1e96ad9a11bbd835/b57b2130-d8d6-4499-89f6-6c12de236fd4?expires=1784781000&signature=e7378f6d3385cdf070ee5f15a7cca1e41f4e3fe0a2f576c0550917bcb89c2ff4&req=dScnEcp7nIdeXfMW1HO4zQe5GluI0yT0S5x65TIld%2FD9vvEuh508Mt%2Fck4vh%0AMcfbA0oeKanng66jKF4%3D%0A) These permissions can be managed at any time in your device settings by going to Settings > Apps > Claude > Permissions. Click into each permission listed under **Allowed** and **Not allowed** to make changes. You can toggle between “Allow only while using the app” or “Ask every time” to change Claude’s access, or remove permissions by choosing “Don’t allow.” Claude will only request permissions if needed for specific features, and you can always choose to decline while still using other capabilities. diff --git a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md index 04e6a3f61..2f8e312e2 100644 --- a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md +++ b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md @@ -70,7 +70,7 @@ After navigating to **[Organization settings > Usage](https://claude.ai/admin-se The **Usage and spend limits** section will show the current limit (if any) or **Unlimited**. Clicking on "Adjust limit" opens a modal where you can either input an amount and click "Set spend limit," or click "Set to unlimited" to remove the organization-wide monthly spend limit. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149347604/936ac4eb025d3ef1f00c3b8a26b0/image.png?expires=1784741400&signature=11a6c039b2b2ec9fab50390408c9c2060a2a00669763091de61f16dd2d6f1550&req=diEjH8p6modfXfMW1HO4zQHwg6XQki%2Bi6DwhVVpk1mCTJmwv3tbJX9PjmwmA%0ACuqUBHqxVtjVgix5NLA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149347604/936ac4eb025d3ef1f00c3b8a26b0/image.png?expires=1784781000&signature=493755cdaa03a6413e844f834014d1a39a34bef9d83b1442a192145ad4c89d3e&req=diEjH8p6modfXfMW1HO4zQHwg6XQni%2Bm6DwhVVpk1mB2rfJaOJAU0cP4FbLe%0AdHNS58Pez%2BweIlnRNWM%3D%0A) Changes to your organization’s overall spend limit go into effect immediately. @@ -78,11 +78,11 @@ Changes to your organization’s overall spend limit go into effect immediately. Owners and Primary Owners on **seat-based Enterprise plans only** can set spend limits that apply to all users within a specific seat tier. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149351600/c5b979c366ac2738f60ea84e85b3/CleanShot+2026-03-10+at+15_37_41%402x.png?expires=1784741400&signature=0d5fdcca0601182435364bff22820f164a2c18e0164deceee06abaa43fc6ce02&req=diEjH8p7nIdfWfMW1HO4zYnqMIGTJ3GN0wfO62ivdG9oTPiAMYYdOpMlSH1I%0A7QLk0G5hEP6B1ZzDqUA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149351600/c5b979c366ac2738f60ea84e85b3/CleanShot+2026-03-10+at+15_37_41%402x.png?expires=1784781000&signature=83d39018420bac42833acc2a2f66927976c89404bd1bd48be00a09446a3bbc24&req=diEjH8p7nIdfWfMW1HO4zYnqMIGTK3GJ0wfO62ivdG%2BcOnJoddcbBrorikh4%0AAfcsG1MGMcIX9xw1%2BuE%3D%0A) Select the "By group" tab to see **Standard seats** and **Premium seats** groups. Click the "..." icon next to the current limit, then "Edit limit." This opens a modal where you can either select "Set dollar amount" and input an amount, or click "Unlimited" to remove the limit for that seat type. Click "Set limit" to save your changes. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149362056/44993661ca2db771fe924d0346f6/image.png?expires=1784741400&signature=4c1077f3947dfdf73718c734c4192e613b9365e5308f330a253c5de8e8c377aa&req=diEjH8p4n4FaX%2FMW1HO4zRzvvIEMdExCq7nEDCGq9G5fiLZQPpeCvUydEr2Q%0ALcQDKb6j5ZMl1%2BWGVSc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149362056/44993661ca2db771fe924d0346f6/image.png?expires=1784781000&signature=323164f64b94c3b921fd73af2132adf3fa4097b01a4549a7ebaa3859bf212201&req=diEjH8p4n4FaX%2FMW1HO4zRzvvIEMeExGq7nEDCGq9G5425OoOMHt7K63tvt6%0AL1g8pojlEZAChAAV1LE%3D%0A) --- @@ -90,11 +90,11 @@ Select the "By group" tab to see **Standard seats** and **Premium seats** groups Owners and Primary Owners can also set individual monthly spend limits for each member by finding **Spend limits by user** and clicking the "..." button next to the user, then "Edit limit." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149370853/db66f5cd03683b9cc119d0dcd6b8/image.png?expires=1784741400&signature=0387ea4ffffb8b0c5dd62d6a7a51b79fa99dbf0778012e333a04d92446e711a2&req=diEjH8p5nYlaWvMW1HO4zaPdGQNQUS5Ce9HwvwG7ubhMTwDSdpHEIQUAziHa%0AYQNyWnQY4%2BJIUW6I1yA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149370853/db66f5cd03683b9cc119d0dcd6b8/image.png?expires=1784781000&signature=ad2c82d11982f475619509616c5a1c34aad96107c2481023e22552771291e538&req=diEjH8p5nYlaWvMW1HO4zaPdGQNQXS5Ge9HwvwG7ubgjmh6qvQeNnRqu6tm%2B%0ASFHBQkXk%2BIGfSWRwbfw%3D%0A) Enter the amount and click "Set limit." Alternatively, selecting "Set to unlimited" will remove that member's monthly spend limit (they will still be subject to any organization or seat-level spend limits). -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149374028/97813fe3b515c2e839d8d92abd79/image.png?expires=1784741400&signature=27383e82bc51aa34e84c11903dac04862c403622d20914e86c27b5c231399b03&req=diEjH8p5mYFdUfMW1HO4zevsAvONN%2BqOw6z2wGSwkbt4wzTFDheCZOHwqRtz%0AIF1yXBV3QWEESsxfqfo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149374028/97813fe3b515c2e839d8d92abd79/image.png?expires=1784781000&signature=90037c120f503d475ea655b467471de7207136e16d94433686cdaed12fc078e3&req=diEjH8p5mYFdUfMW1HO4zevsAvONO%2BqKw6z2wGSwkbvFIMiEC%2FoNvanYFpk9%0Ab%2FI1gprAEavT8Y3HCI0%3D%0A) This allows owners fine control over usage credits, so you can set limits for different members based on their roles or individual needs. Once a user reaches their defined spend limit, this will automatically pause their usage credits until the end of the month. They will need to wait for their usage limits to reset before using Claude again. diff --git a/content/support/12012173-get-started-with-claude-in-chrome.md b/content/support/12012173-get-started-with-claude-in-chrome.md index b4e16adeb..eb8727ace 100644 --- a/content/support/12012173-get-started-with-claude-in-chrome.md +++ b/content/support/12012173-get-started-with-claude-in-chrome.md @@ -34,7 +34,7 @@ Follow these steps to enable the Claude in Chrome connector in your desktop app: 4. Toggle the connector on, then download and install the extension if you haven’t already. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1892696502/a23969725f631e99b9e4c47ec6e9/89803b8f-4f3c-4983-8b4d-63aec687ea1a?expires=1784741400&signature=ca28124e2fb02d3da945d569fa2707dc94c1fe08bdcd5ee97c8f085974f4baa8&req=dSguFM93m4RfW%2FMW1HO4zdOezI9b7LJ9hnw73Y7ib%2BcxrbFm%2FXdbLhiwBbP3%0AIfKE4ernjAWm4RPJu8U%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1892696502/a23969725f631e99b9e4c47ec6e9/89803b8f-4f3c-4983-8b4d-63aec687ea1a?expires=1784781000&signature=58d55a4177efd6b420b898ca89926131ba424b2cf03533305eed56d14d6d792f&req=dSguFM93m4RfW%2FMW1HO4zdOezI9b4LJ5hnw73Y7ib%2Bf4%2FIXsTDc2F7NFbOST%0AXZSliSZGEdPnyfu9JQk%3D%0A) Completing these steps will add Claude in Chrome to the “Connectors” drop-down on your chats with Claude. This is disabled by default, so you’ll need to enable it manually for each conversation. diff --git a/content/support/12111783-create-and-edit-files-with-claude.md b/content/support/12111783-create-and-edit-files-with-claude.md index 7ceb8f522..d08944ada 100644 --- a/content/support/12111783-create-and-edit-files-with-claude.md +++ b/content/support/12111783-create-and-edit-files-with-claude.md @@ -48,7 +48,7 @@ These capabilities make it easy to produce professional documents by simply chat To give Claude access to external data sources, toggle **Allow network egress** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2054774005/25bcfffba6c249cd128d6c3f6d52/CleanShot+2026-02-11+at+16_34_47%402x.png?expires=1784741400&signature=ab265071b24924555ae33975ff5023a587d7e08df181afd805eea7e7d2fef958&req=diAiEs55mYFfXPMW1HO4zYFJywlCCJjKPQVowIiib2nZPk4sy9QDgWUF8tqT%0ARjIA3ly7sJbsQoXkqLo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2054774005/25bcfffba6c249cd128d6c3f6d52/CleanShot+2026-02-11+at+16_34_47%402x.png?expires=1784781000&signature=95998f5082865e6ef0feeb7ca889df2ffb9abac1303e3d02ae95b2d42a44f693&req=diAiEs55mYFfXPMW1HO4zYFJywlCBJjOPQVowIiib2m6EIiUEDJICqjC%2BCvq%0AKRO4jSeMT8cBjn%2Fzyzc%3D%0A) ### Enabling on Claude Mobile @@ -66,11 +66,11 @@ Team and Enterprise organization owners can control network access settings in * - **Allow network egress to package managers and specific domains:** Claude can access package managers plus additional domains you specify. Add domains individually to whitelist specific resources your organization needs: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945362/ad72504d5429960f369b8b91b43c/86f06c0e-6eaa-4574-a4cb-2c38b273613a?expires=1784741400&signature=52334ad5ce58fdec8be6a74aa4976e82a2df651c3fdb6c1c5a95b23eaf97f6c8&req=dScvH8B6mIJZW%2FMW1HO4zXJcBmlEkShPpMW6Iph6YZeEgNfJVGBel8WcSeEg%0AJBFK0JUfUwpY2ZkS2qQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945362/ad72504d5429960f369b8b91b43c/86f06c0e-6eaa-4574-a4cb-2c38b273613a?expires=1784781000&signature=07b0f1d0f44bba79a0be5d5987691e6f05db1a38a771e50d3723fd0e35de023c&req=dScvH8B6mIJZW%2FMW1HO4zXJcBmlEnShLpMW6Iph6YZe1UozQ7u%2B%2FJakPfcZN%0ArEIpcIKgEkX07wc9Ugc%3D%0A) **All domains:** Claude has full internet access except for domains on Anthropic's legal blocklist. While this provides maximum flexibility for file creation and analysis tasks, it’s also the riskiest option. Please review the **[security considerations below](#h_0ee9d698a1)** before enabling “All domains”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945361/e3188cb8edb9ca7c303615da6378/f1c99a7d-5956-48d5-9ec7-b7ae6c8c3d28?expires=1784741400&signature=6e90c1f49302f1c18b80bc441db8a833e056a6b55da19b47824b886515cd2192&req=dScvH8B6mIJZWPMW1HO4zdnseBCV6j6mqgKIA6CM1tpCp5kNlm%2BdWPL1cJnR%0AfauVXfXaU%2BPEfYf9XH8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945361/e3188cb8edb9ca7c303615da6378/f1c99a7d-5956-48d5-9ec7-b7ae6c8c3d28?expires=1784781000&signature=254cb4f448b6b08d97bf8b55282ea5e035f3ac11307df7347ba5682ff4283987&req=dScvH8B6mIJZWPMW1HO4zdnseBCV5j6iqgKIA6CM1tptJR%2B1HbyfbpP0i%2Fwu%0AEdKq6lJV15asaQcGGWU%3D%0A) --- diff --git a/content/support/12157520-claude-code-usage-analytics.md b/content/support/12157520-claude-code-usage-analytics.md index b015f2ed3..0e483a3a0 100644 --- a/content/support/12157520-claude-code-usage-analytics.md +++ b/content/support/12157520-claude-code-usage-analytics.md @@ -50,7 +50,7 @@ The **Usage** tab displays the following metrics for your organization. Data on - **Top commands**: The Claude Code commands used most often across your organization. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1717579277/46c512f4b3ed05c359cecd78ed5c/e0ce2c19-39e2-411f-9a1f-cb1d46439a42?expires=1784741400&signature=10ccab67d166694f36a049075a4028c75ec04989dd3f18f602a110c24893d388&req=dScmEcx5lINYXvMW1HO4zfiEP6JXi3jKCX9h5MbdDjPBALA9suZlRIpX0Z9v%0A4CVBs900WWwQWroDY%2Fg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1717579277/46c512f4b3ed05c359cecd78ed5c/e0ce2c19-39e2-411f-9a1f-cb1d46439a42?expires=1784781000&signature=ec6a4a9a9ab6671b8be9ef94d261159cd3489a3aee9bb7fa10d16ba41eecfc64&req=dScmEcx5lINYXvMW1HO4zfiEP6JXh3jOCX9h5MbdDjNnWPU%2Fv0AHzgTkZLrs%0AWkT8pBz2o%2Fz4W8fgKro%3D%0A) ### User-level metrics diff --git a/content/support/12260368-use-incognito-chats.md b/content/support/12260368-use-incognito-chats.md index bfe055b78..294924933 100644 --- a/content/support/12260368-use-incognito-chats.md +++ b/content/support/12260368-use-incognito-chats.md @@ -30,7 +30,7 @@ Incognito chats are temporary conversations that aren't saved to your chat histo When starting a new chat with Claude outside of a project, you'll see a ghost icon in the upper right corner of your screen: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719768744/c7a2fa56cf284e48472f3b9c4dbf/030563f8-9f97-4891-a749-9ae95968a063?expires=1784741400&signature=c85b6313464a0e3ed3b34a49f02b6cdbddd61874515bbd4c5037ae845b591050&req=dScmH854lYZbXfMW1HO4zeUcuwa6auSPDCAt3Cx%2FSO0k2spR%2Fg%2B2bmx6kv%2F%2B%0AEGg%2BVFNinSAO7YJSZtk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719768744/c7a2fa56cf284e48472f3b9c4dbf/030563f8-9f97-4891-a749-9ae95968a063?expires=1784781000&signature=c1594a88f586715cea89cb2ecca358262badca35d444c3daf3a0387890f8ace8&req=dScmH854lYZbXfMW1HO4zeUcuwa6ZuSLDCAt3Cx%2FSO1vIPSzRmkJ6z7jhmQn%0AOmO0rS9shORJnNQbRO0%3D%0A) 1. Click the ghost icon to enable incognito mode. diff --git a/content/support/12293051-use-claude-in-xcode.md b/content/support/12293051-use-claude-in-xcode.md index f7b8fc7d9..54275ac6d 100644 --- a/content/support/12293051-use-claude-in-xcode.md +++ b/content/support/12293051-use-claude-in-xcode.md @@ -34,7 +34,7 @@ To start using Claude in Xcode: 3. Log in with your Claude account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1727371585/b18ca03a6357c52d12d10386f28e/dab2dcb2-f670-4173-b77d-38767a34cec1?expires=1784741400&signature=56bd25eb903744462898857d24f59731a39c400fcf4e9b1cb833c5c3bc365ff0&req=dSclEcp5nIRXXPMW1HO4zUAXI8gFVqnQFalhp3bugHIx%2BXr1XiepEJT5ibX4%0AwH7pwB4jRMnaj%2Bk3bhI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1727371585/b18ca03a6357c52d12d10386f28e/dab2dcb2-f670-4173-b77d-38767a34cec1?expires=1784781000&signature=604e352b065be7fbd5ff4bbb2eab17f3947d74dbadb9325fae71690c55182276&req=dSclEcp5nIRXXPMW1HO4zUAXI8gFWqnUFalhp3bugHJ%2F%2F%2Fmc9bS21mFgbTCu%0A%2Bu46D%2FjQSX62Ng5Dzxo%3D%0A) ## Usage limits diff --git a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md index c66283c5b..aa5831b91 100644 --- a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md +++ b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md @@ -46,7 +46,7 @@ To enable usage credits on your paid Claude plan: 8. You can also enable auto-reload to automatically make a purchase when your balance falls below a threshold you set: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1805819785/5e203c38e6ba3f76bfd1dab0d5ce/fe062e7c-18cb-48cc-a7e2-754ac6e6c4be?expires=1784741400&signature=3f1c68b2888b66b2de29906ce1191f91c42cde1581cbf15317288648a047b68d&req=dSgnE8F%2FlIZXXPMW1HO4zYj2ARaeofE8opE7m38YdfcXfhsCXjAknmqJVTPR%0Afcw2qUmeso6lWHjB3YQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1805819785/5e203c38e6ba3f76bfd1dab0d5ce/fe062e7c-18cb-48cc-a7e2-754ac6e6c4be?expires=1784781000&signature=67fe3fb18c8a54839489d3e83ed5173ff3cd0ed570dc543d2957204dbab9f729&req=dSgnE8F%2FlIZXXPMW1HO4zYj2ARaerfE4opE7m38YdffNKN5vTtNx%2FIN2URdW%0A5Vz1xSAQTyR1%2BiFWE4k%3D%0A) **Note:** There is a daily redemption limit of $2000. diff --git a/content/support/12461605-use-claude-in-slack.md b/content/support/12461605-use-claude-in-slack.md index 38b913818..21e6caad1 100644 --- a/content/support/12461605-use-claude-in-slack.md +++ b/content/support/12461605-use-claude-in-slack.md @@ -28,7 +28,7 @@ Claude in Slack gives you AI assistance right where your team collaborates. This 6. Access previous conversations by clicking the clock icon. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755150661/a1a13c73bda421f6ee906650cfc9/22907223-e523-4a93-a6d2-3199a8368991?expires=1784741400&signature=7bd47833842f0a38721dace2cd8d089ac6aeac1431c12b9d05cf10822b43eac6&req=dSciE8h7nYdZWPMW1HO4zXK26hVJ7DAaVfOC%2FRy97LWFrL1llmrCMlVs1Fai%0AKq%2BQBO38yP0diYVvSO4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1755150661/a1a13c73bda421f6ee906650cfc9/22907223-e523-4a93-a6d2-3199a8368991?expires=1784781000&signature=aecce88750410e5b4b3a7766864c9a2d10df522a5844dc5734df068c3c4a77cf&req=dSciE8h7nYdZWPMW1HO4zXK26hVJ4DAeVfOC%2FRy97LUGMYIL6zEqqaxVT1LI%0AyMkv4C6VHHqOgSSBuNg%3D%0A) ## Mention @Claude in a thread or channel diff --git a/content/support/12466728-troubleshoot-claude-error-messages.md b/content/support/12466728-troubleshoot-claude-error-messages.md index 2680a461a..27e902021 100644 --- a/content/support/12466728-troubleshoot-claude-error-messages.md +++ b/content/support/12466728-troubleshoot-claude-error-messages.md @@ -58,4 +58,4 @@ Capacity issues will not appear on our status page because they represent normal Service incidents are disruptions where Claude is unavailable or significantly degraded for all or most users. These represent actual technical problems with our systems. To check for confirmed incidents, visit status.claude.com, where you'll find real-time updates on scope, impact, and resolution progress for any active incidents. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1753796247/e6a8c6ef8653b229c5758e881242/c2fc6fc0-d163-4119-93e0-394104d86bc9?expires=1784741400&signature=fee72d6a42c55248bd77070c79ca3c832aaebbfa798d3665de4f46c91ec8f425&req=dSciFc53m4NbXvMW1HO4za4BXqsk1rPA7y68oYp%2BYg8sx%2Bihm1%2BGDfgD0is7%0AROw0rt8jApyvmuuZf2s%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1753796247/e6a8c6ef8653b229c5758e881242/c2fc6fc0-d163-4119-93e0-394104d86bc9?expires=1784781000&signature=08d98a3b903f5e82b4a383c4324f0d0aa7090fc2ca2a90ec401958d732f8227e&req=dSciFc53m4NbXvMW1HO4za4BXqsk2rPE7y68oYp%2BYg%2BqZRq2i%2B%2FZzZgc5NG7%0A75WRjYlb0Pk2a5yZ6sE%3D%0A) \ No newline at end of file diff --git a/content/support/12512198-how-to-create-custom-skills.md b/content/support/12512198-how-to-create-custom-skills.md index 6effa54c3..a69ef2730 100644 --- a/content/support/12512198-how-to-create-custom-skills.md +++ b/content/support/12512198-how-to-create-custom-skills.md @@ -18,6 +18,62 @@ Skills can be as simple as a few lines of instructions or as complex as multi-fi --- +## Record a skill + +Recording a skill is available on Pro, Max, and Team plans, in Cowork in Claude for Mac. It isn't available in chat, on Windows, or on Free and Enterprise plans. + +Instead of writing a skill by hand, you can record yourself doing a task and let Claude build the skill from what it observes. You send Claude a video of your screen, clicks, typing, and voice, and Claude proposes a skill for you to review before you save it. + +### Before you record + +1. Update to the latest version of Claude for Mac. + +2. Grant the macOS permissions Claude asks for the first time you record: **Accessibility** for mouse and keyboard tracking, and **Screen recording** for screen visibility. macOS may ask you to restart Claude. + +3. Close any files, apps, or conversations you don't want captured. + +**Warning:** Don't type passwords or secrets, or display sensitive information or private conversations while recording. Everything on your screen is captured for the length of the session, along with anything you say. + +### Record your workflow + +1. Open Cowork in Claude for Mac. + +2. Start a recording one of two ways: + + 1. Click the "+" button in the composer, then select "Record a skill." + + 2. Go to **[Customize > Skills](https://claude.ai/customize/skills)**, click "Add," then select "Record your screen." + +3. Click "Start recording." To narrate as you work, leave the microphone on. Use the microphone control to mute it or choose a different input. + +4. Do the task the way you normally would. The capture bar shows that recording is in progress and counts the steps it's captured. + +5. Click "Done" when you're finished, or "Discard" to throw the recording away without creating anything. + +A recording can run for about 10 minutes. A countdown appears in the capture bar when you have about a minute left. When it reaches zero, recording stops and everything you've captured up to that point is sent to Claude, the same as if you'd clicked "Done." + +**Tip:** Talk through what you're doing while you record. Narration gives Claude context it can't get from your screen alone, like why you skip a step or how you choose between two options. + +### What happens after you click Done + +Claude starts a Cowork task and reviews the recording, then proposes a skill. Depending on what it finds, you'll see one of two things: + +- **A new skill,** marked **NEW** on the proposal card. Click "Save" to keep it, or "Dismiss" to discard the proposal. + +- **An update to an existing skill.** If the recording overlaps a skill you already have, Claude proposes changes to that skill instead. The card shows which skill the proposal is based on. Click "Update" to apply the changes, or "Dismiss" to discard them. + +Expand **Content** on the proposal card to read the skill before you decide. + +Skills you save from a recording appear in **[Customize > Skills](https://claude.ai/customize/skills)** and work like any other skill. You can edit them, share them, and delete them on the same terms. + +### What's kept from a recording + +The video and audio from your recording aren't retained. After you send your recording to Claude, Claude reviews the recording to build the skill. What's saved afterward is a set of screenshots from the session, which you can view by expanding the **Recorded demonstration** step in the task. + +Because those screenshots live in the Cowork task, deleting the task removes them. See **[Get started with Claude Cowork](https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork)** for how task deletion and retention work. + +--- + ## Create a skill.md file Every skill consists of a directory containing at minimum a skill.md file, which is the core of the skill. This file must start with a YAML frontmatter to hold name and description fields, which are required metadata. It can also contain additional metadata, instructions for Claude or reference files, executable scripts, or tools. diff --git a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md index 68cae10ff..6fbcd0259 100644 --- a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md +++ b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md @@ -20,11 +20,11 @@ The desktop extension allowlist is disabled by default, so an organization Owner 4. Switch to the "Desktop" tab: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755172/63c92550571842577ad435860ec5/6f5cc4e1-ff7d-48de-863a-c4e6184d4605?expires=1784741400&signature=93c59d288d82909a1e6ea91ccea55d63c453804381e3c609dfdc05ead7e8d11e&req=dScvF857mIBYW%2FMW1HO4zQ9pXU4N%2B3Hf0ugSQm1MFW%2B02SwW2yZDXzTG8t5O%0AKcAG%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755172/63c92550571842577ad435860ec5/6f5cc4e1-ff7d-48de-863a-c4e6184d4605?expires=1784781000&signature=38d162a08e92ee742ad77b05d1f403808c8c8a7995334290335f1d21592f1ee6&req=dScvF857mIBYW%2FMW1HO4zQ9pXU4N93Hb0ugSQm1MFW9XcNsKOgiaQXMU2Zsj%0Alqfa%0A) 5. Toggle **Allowlist** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755578/a6bafff5f084dc86ae463703fd3d/6cf0ee18-4e71-4129-98e8-cc08174e3c3a?expires=1784741400&signature=1d1b9c59ce2b7acef1984b5efae995c91af304c2d0df65ac4ae6f33e5e47b1a1&req=dScvF857mIRYUfMW1HO4zaj0BHUsTaYATAorLxpdoc8biuUDBFvaNxQ%2FroDQ%0AJW8%2B%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755578/a6bafff5f084dc86ae463703fd3d/6cf0ee18-4e71-4129-98e8-cc08174e3c3a?expires=1784781000&signature=e6095a04d802a30bcc9ce7cde34f498856851a9e7c6947b86f1e4daf03060e45&req=dScvF857mIRYUfMW1HO4zaj0BHUsQaYETAorLxpdoc9y09ACVqZBoOhwr2j3%0AXVdS%0A) ## What happens after enabling the allowlist? @@ -42,7 +42,7 @@ Consider completing the allowlist setup during off-hours to minimize disruption **Important:** The allowlist requires Claude Desktop version 0.13.91 or higher, so users should update the desktop app by clicking “Claude”, then either “Check for updates” or “Restart to update to Claude 0.13.91”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781756960/ad18af50c83d35f2673656c23e00/a7ee450f-0c7d-42d6-a75f-fb1bc088cb52?expires=1784741400&signature=6df237410d2b05c6adace4e707566f50f34c315e9c00f6041ce023f3d0e6989a&req=dScvF857m4hZWfMW1HO4zYUJqYetDjPvCEDZ5AdBjIY5BtkJYI4lMxu%2FjpqI%0Acuju1%2BXYGRlAA2Fdwws%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781756960/ad18af50c83d35f2673656c23e00/a7ee450f-0c7d-42d6-a75f-fb1bc088cb52?expires=1784781000&signature=200679334be37b88be96b92e02c6ffc73a19949b149241932071dae75827c8f2&req=dScvF857m4hZWfMW1HO4zYUJqYetAjPrCEDZ5AdBjIb4hQTXDFrsM9TJqhYq%0AUBcUBln4mBM5uifcbjA%3D%0A) ## Managing allowed extensions @@ -60,7 +60,7 @@ After enabling the allowlist, you can choose which extensions to allow: If you want to remove an extension from the allowlist, click the “...” button and “Remove from allowlist.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781751250/6558c0f59aea7976bd44b0213d76/e750f02b-cd0d-437e-a83f-9ac362cdf456?expires=1784741400&signature=1df043676b7d711c36b28ff2e1f8e7a3ab95b78b48e9a44d052813de78bf57e6&req=dScvF857nINaWfMW1HO4zTrxBawu%2B1aRqXridZhfx1LiAPbAEj%2FAPr%2BADOEF%0AaIOUh652h%2FX8a0KJtOQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781751250/6558c0f59aea7976bd44b0213d76/e750f02b-cd0d-437e-a83f-9ac362cdf456?expires=1784781000&signature=c3efdc7230b46a95ea856fc8d127bec33c4252447bbdc0a964159fa6f9c2e5e5&req=dScvF857nINaWfMW1HO4zTrxBawu91aVqXridZhfx1J985sjqyqnVOgi3gyb%0AqsZpo9b%2BhLT0Aq7MQ44%3D%0A) ## Uploading custom extensions diff --git a/content/support/12618689-claude-code-on-the-web.md b/content/support/12618689-claude-code-on-the-web.md index c723f9267..e01057db1 100644 --- a/content/support/12618689-claude-code-on-the-web.md +++ b/content/support/12618689-claude-code-on-the-web.md @@ -10,7 +10,7 @@ This feature works with repositories you may not have on your local machine. You Claude Code for web enables asynchronous development workflows. With Claude Code in your terminal or editor, you typically work synchronously: you make a request, wait for Claude to respond, review the changes, then make another request. Synchronous work like this gives you fine-grained control but requires your attention throughout the process. Claude Code on the web handles this differently: you can assign a larger task, let Claude work independently, and return later to review the completed work. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446157/07ec74cd46317f8278083a317841/6448f3ee-c6df-4417-8a13-90d8c2ca3d55?expires=1784741400&signature=89464f498da2717858625cf09aa2bf3f744a7f799dab85afbd9a55755c5b16f7&req=dScvEM16m4BaXvMW1HO4zR8%2BAFeHRpxy7XrRA1YwWGttPZ9AfJwvHwzjZOs9%0AiVo2FAmtkNpx%2FEgqANM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446157/07ec74cd46317f8278083a317841/6448f3ee-c6df-4417-8a13-90d8c2ca3d55?expires=1784781000&signature=4d2d2ff73bc1c26907e037772be28408a80891fdd5854421268c9a3a7177d05b&req=dScvEM16m4BaXvMW1HO4zR8%2BAFeHSpx27XrRA1YwWGtqfI8I40FyRiLRbmzU%0A4lHXieL4nij4QWGfC1U%3D%0A) You can also run multiple tasks in parallel. Since each task runs in its own isolated environment, you can have Claude working on several different issues or repositories simultaneously. Each task proceeds independently and creates its own pull request when complete. More than one task can work on the same repository at the same time. @@ -18,13 +18,13 @@ You can also run multiple tasks in parallel. Since each task runs in its own iso When you start a task, Claude Code on the web creates an isolated virtual machine for your work. Your GitHub repository is cloned into this environment, which comes pre-configured with common development tools and language ecosystems. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446158/c092f1383826cb871493f74169d4/97b7cb98-5da2-438e-a920-e170b8b9790e?expires=1784741400&signature=0a282a2fd9d128039df1a097fcd1cf8f3943d6c3f9c068b1a7455b0243e55456&req=dScvEM16m4BaUfMW1HO4zcR0rZIzi%2BjE7DtpMiX%2FBYks51iEp86vTLbLIT%2BB%0ARFG8BKQ%2Bcu2ZSiiSCnM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446158/c092f1383826cb871493f74169d4/97b7cb98-5da2-438e-a920-e170b8b9790e?expires=1784781000&signature=1430c4c6bd088e4788ed95fecce588f0f0e4c595fc3a55c682bd4f31d5da0105&req=dScvEM16m4BaUfMW1HO4zcR0rZIzh%2BjA7DtpMiX%2FBYnmfIgjuEC3xEGrkt9r%0A5z2mu9CqtyTt2ArilQQ%3D%0A) Claude prepares the environment by running any setup commands you've defined in your repository's configuration. This includes installing dependencies, setting up databases, or running other initialization steps your project needs. If your task requires network access, maybe to install packages or fetch data, you can configure the level of internet access the environment has. Once the environment is ready, Claude begins working on your task. Claude reads your code, makes changes, writes tests, and runs commands to verify the work. You can monitor progress and provide guidance through the web interface if needed. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446156/83ecf0a5b98eddc9ffc9694c50f7/353589ce-b678-441d-8909-71b45fa2d065?expires=1784741400&signature=79b6f7080b33d4addcc1d5a843c06403f303c83f3086010c1e90fedd044e32d9&req=dScvEM16m4BaX%2FMW1HO4zVbcTGeE58XKUQl3YqgIJdYuABaB50hlfmcvUYi8%0AW2uQve8EKyiza0YNnWI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446156/83ecf0a5b98eddc9ffc9694c50f7/353589ce-b678-441d-8909-71b45fa2d065?expires=1784781000&signature=fe2f0d7e13277afe952ddd0d51b1e8bebd91d02cec8bba5d7522f810adb4f47d&req=dScvEM16m4BaX%2FMW1HO4zVbcTGeE68XOUQl3YqgIJdYyz31iYj24OiB%2Betng%0AxiRBNNQcC2F3NW5zR20%3D%0A) When Claude completes the task, it pushes the changes to a new branch in your GitHub repository. You receive a notification and can review the changes, then create a pull request directly from the interface. The pull request includes all of Claude's work, ready for your review and any additional changes you want to make. diff --git a/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md b/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md index 12e586b21..ccc147776 100644 --- a/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md +++ b/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md @@ -40,7 +40,7 @@ When you first open the updated version of Claude Desktop, you'll see a prompt t Once enabled, double-tapping Option will open a text box where you can type your message and start a new chat. You can also click "New chat" to see your five most recent conversations. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893088365/2ca4b782dda90abea1fe5f4150af/CleanShot+2025-12-18+at+13_14_30%402x.png?expires=1784741400&signature=b1705d9bda27a1be4265ab95fe0d2a9dbc3bfeb4884c1d7cf868c57d020679df&req=dSguFcl2lYJZXPMW1HO4zWggD9pWop2eRC8c%2FcM5c2K1SnLrIoOG2Dp8vCMn%0AZoZZcunY0i4ok9D7CNA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893088365/2ca4b782dda90abea1fe5f4150af/CleanShot+2025-12-18+at+13_14_30%402x.png?expires=1784781000&signature=64b4e8d6a10361c87b1027e1f18b1e401386eff54c5dcaf0437b34e04e5897ef&req=dSguFcl2lYJZXPMW1HO4zWggD9pWrp2aRC8c%2FcM5c2LJsrPfaBNf0a0joaWC%0Ayrk74CnPP6qXsvw1C48%3D%0A) ### Enable the voice shortcut (optional) diff --git a/content/support/12650343-use-claude-for-excel.md b/content/support/12650343-use-claude-for-excel.md index 1ac17ce6f..1ee3f970d 100644 --- a/content/support/12650343-use-claude-for-excel.md +++ b/content/support/12650343-use-claude-for-excel.md @@ -330,7 +330,7 @@ Users can approve all of Claude’s actions via a confirmation pop-up that appea - System information: REGISTER.ID, RTD, INFO -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1849431310/ffc870a5114b4178fcd74b5cccf8/Screenshot+2025-11-25+at+11_30_10%E2%80%AFAM.png?expires=1784741400&signature=573a43f1f2dbc2ed0c8e0ecaa4ce0c87b0e282d76af5ee2f4ed13e138c0d7cf9&req=dSgjH819nIJeWfMW1HO4zYWKaOZsJtt2qAsRdssXCyBXEI%2F%2F6m8A%2BzGtNmqz%0AH300jUzc1Jy4os8CyVI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1849431310/ffc870a5114b4178fcd74b5cccf8/Screenshot+2025-11-25+at+11_30_10%E2%80%AFAM.png?expires=1784781000&signature=08f01e1f93aeef31ea5eb97130009bfcf93a89a0a0436343662032bb9c9e2b02&req=dSgjH819nIJeWfMW1HO4zYWKaOZsKttyqAsRdssXCyDnv%2B18rnwj3xnFRij2%0ABeV99bbUmgz0FUkIazk%3D%0A) While we continue to develop our offerings and improve safety measures to reduce these risks, users should exercise caution when using Claude for Excel and should not use it with spreadsheets from external, untrusted sources. diff --git a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md index 36e24722f..ccdd118c6 100644 --- a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md +++ b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md @@ -22,7 +22,7 @@ This page includes the following analytics: - Sessions in Cowork -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515895966/9f231a620f47d49e0ee648152189/848c1787-4eaa-4809-8fd2-1dbe2722560f?expires=1784741400&signature=b9e70d25153667b1b0f8387d3ac558023e6d63fde6331cf7c5c0449cd63f77e3&req=diUmE8F3mIhZX%2FMW1HO4zZL6waJ1n4R1ExEG4dCAGDaq7JXrZOX783MO6k3a%0ALtBDf44TFuowpgyjBDM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515895966/9f231a620f47d49e0ee648152189/848c1787-4eaa-4809-8fd2-1dbe2722560f?expires=1784781000&signature=0b845b6771710e5e739172ae74b1917dd01408411b5465f7acd498dbda33331f&req=diUmE8F3mIhZX%2FMW1HO4zZL6waJ1k4RxExEG4dCAGDYArwm5AYvPdycrOa92%0AASwr3HxwO5OZnNuvyYY%3D%0A) ### Who’s using Claude? @@ -32,7 +32,7 @@ This page includes the following analytics: - Members -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896351/4d955858e6662c37489cc1470871/457cf159-8c2a-4403-ba22-cb92cb47e459?expires=1784741400&signature=73bcbd416100bf3f34dc84cd678fe029680e348820cf30e0dbe8403c4b103bec&req=diUmE8F3m4JaWPMW1HO4zYEqejOuRpGrYqPRsgaNdTxgIJK0%2Bc5F2QhQrfkq%0ACnpUkwHu%2F29UUzlEZ3w%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896351/4d955858e6662c37489cc1470871/457cf159-8c2a-4403-ba22-cb92cb47e459?expires=1784781000&signature=a93616dd1ff35f4e76a58851a800e070ccd8c3b1e5934f5f11d40379f7b4089a&req=diUmE8F3m4JaWPMW1HO4zYEqejOuSpGvYqPRsgaNdTyth2dveIy0euo4pG0i%0AvsSZcHsr2NUNUcvMRxM%3D%0A) ### How are they using Claude? @@ -46,9 +46,9 @@ This page includes the following analytics: - How agentic is their work? (beta) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896562/51c6c1c2d73f9873b4ba8e64e5d3/762c32a7-e6d6-4ef1-a6b6-33d638f5008c?expires=1784741400&signature=b716aa5bc2f634c67ced65f685ff6f6ac8772dfe548f6e9fcc68075e226aa4be&req=diUmE8F3m4RZW%2FMW1HO4zQmHaEqM3IWbWdW5GUm%2B9K0x7ifol07mOFfdw1ow%0A6sf19VjYkhTGxWyp5tQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896562/51c6c1c2d73f9873b4ba8e64e5d3/762c32a7-e6d6-4ef1-a6b6-33d638f5008c?expires=1784781000&signature=56f544c5029d70d1f1981db813c39adfb5c4cda1ed78efb1e70b3b9e6d5a8e3a&req=diUmE8F3m4RZW%2FMW1HO4zQmHaEqM0IWfWdW5GUm%2B9K0X8YVJKc3703loAtTC%0A8JYXrLA5BX5WAoxyqic%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896563/abf008596ce5501297a609696362/fce5423c-4769-4b73-9a0a-c50f6407ebea?expires=1784741400&signature=cad77a0935fce4b5713c29546a534a2db0243d60cd33f4cf7dc7faa09aa5a85e&req=diUmE8F3m4RZWvMW1HO4zR%2BIDoNpufbzLS3kobW3ZgSORGEvpYnuilGQIdoj%0AKoLeVttJZyQA3h5K3zA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896563/abf008596ce5501297a609696362/fce5423c-4769-4b73-9a0a-c50f6407ebea?expires=1784781000&signature=765d263c901347f23031c3f255dc7cf5c65717fd2c68a7b219654b21fa55e505&req=diUmE8F3m4RZWvMW1HO4zR%2BIDoNptfb3LS3kobW3ZgSHX8b5VvnfGjH%2BV8mF%0A9RNNhONA96dPDQvRyVQ%3D%0A) ### What are the results? @@ -64,7 +64,7 @@ This page includes the following analytics: - Estimated time saved -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896943/dd415f03afe56ca38308ef987f86/189e8ebc-5594-4f4b-bd84-e3c11c824d5b?expires=1784741400&signature=d2b258c9055a6679081fd3a5f54da5f11bef5419e946766f7fb82aee0af38d5e&req=diUmE8F3m4hbWvMW1HO4zfJThCA4rd1CiovaLYNN7Rk0PFgGQnK%2Bl6%2BKHkrn%0Akon4Sw840dIGq1kGUDw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896943/dd415f03afe56ca38308ef987f86/189e8ebc-5594-4f4b-bd84-e3c11c824d5b?expires=1784781000&signature=eb7ed27d80ca21d28e41692275e6c3b591a30c896869a6cb55ea558bf3c859fc&req=diUmE8F3m4hbWvMW1HO4zfJThCA4od1GiovaLYNN7Rl3mP6gea0Onw7fCYbx%0AVy7YIHIT0KnKiDoZnu0%3D%0A) ### How much is Claude costing? @@ -80,9 +80,9 @@ This section includes the following analytics: - Spend by model (month-to-date, quarter-to-date, year-to-date, 1 year) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896942/b403f2d216fc40b5195911020b8e/446b99f1-3187-4b79-b2be-9f17b1632ff8?expires=1784741400&signature=04d56e9ce7fbeb96b634c4fecd6209cc4eb7cad069b4b27f33215b43d77344ae&req=diUmE8F3m4hbW%2FMW1HO4zYE%2BQ9oF6DDZWbBLGZ4vBJW3J3tdM2vcXX7Lu%2BJ3%0AjLFdCGw7sG8BI53egfc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896942/b403f2d216fc40b5195911020b8e/446b99f1-3187-4b79-b2be-9f17b1632ff8?expires=1784781000&signature=b54a792b0a439224ac37f19b49efe9b25096de65a91d22e0936a85c562bbb7fc&req=diUmE8F3m4hbW%2FMW1HO4zYE%2BQ9oF5DDdWbBLGZ4vBJU0oudNRZutFdtnT3UL%0ArK8%2BQbZh88glL%2FbC9b0%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896941/2239ce38639df339b24d5af1cb50/f829bc2a-ee52-4135-9b13-09ef1b7d66d6?expires=1784741400&signature=54fd8c939efe98d76c194dfbc956afb304b7b72412ed03a4aed5bf3bb1d75572&req=diUmE8F3m4hbWPMW1HO4zTz0Nu4FI8hUC%2BtvTPa1I7GGnndyfaC4yKSWpZ5F%0AeQDdx4%2BYKk6dsoKEvak%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896941/2239ce38639df339b24d5af1cb50/f829bc2a-ee52-4135-9b13-09ef1b7d66d6?expires=1784781000&signature=73ad420ae537404ae053e08d8409d8106c555ee4935ecaf66c4f77f7f9753edf&req=diUmE8F3m4hbWPMW1HO4zTz0Nu4FL8hQC%2BtvTPa1I7GaHVSn9%2F2VORbmoOFP%0AQKLwEoz26bsEoxAWaE8%3D%0A) ## Export a spend report @@ -158,7 +158,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top members by chats -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515898793/405db0c492da11886c28a2b82731/71a55afc-1cef-4c50-b7e1-86775cb9a168?expires=1784741400&signature=9dd7b7b8361e5d4780fb53c69021420ac3855fda6b4ac0f13625bef828ba9b55&req=diUmE8F3lYZWWvMW1HO4zbhc8fmbZeUlTcfMEUwBBiVm%2F2C03NXhbOcKok5j%0A%2B1IL4cPkrz3e0GY7pbw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515898793/405db0c492da11886c28a2b82731/71a55afc-1cef-4c50-b7e1-86775cb9a168?expires=1784781000&signature=bd1e641c94651d8d57a36dffa969dc6b213c511a3abf50854cd4195d3cd84272&req=diUmE8F3lYZWWvMW1HO4zbhc8fmbaeUhTcfMEUwBBiXXoStICqVfFK5TvWIK%0AAupn30ywpwB6cmOP%2F0k%3D%0A) ### Projects @@ -170,7 +170,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top members by project usage -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899610/91d93108f0767e795fb9e488e882/71607d6d-dff1-4a13-a445-aa1d79850eed?expires=1784741400&signature=645e6c3a1a21e47fbacd0c0d7ab16ea2d200cd49d24599088cc5ca04ac0b78ca&req=diUmE8F3lIdeWfMW1HO4zWhGoTienyKmExu5cYiHHN%2FlORdMStHsKOrWduhr%0Aa5la0gIl6UXoL3rhAy4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899610/91d93108f0767e795fb9e488e882/71607d6d-dff1-4a13-a445-aa1d79850eed?expires=1784781000&signature=9c5fad7bbec51e88c3ac71b55f148f9e78966e578c7c06dba697aa5184e1bf58&req=diUmE8F3lIdeWfMW1HO4zWhGoTiekyKiExu5cYiHHN9VTppyGRupIL3%2Br5ro%0AyUtKeH1tZIu0nIdwN0M%3D%0A) ### Artifacts @@ -180,7 +180,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top 10 users by artifacts generated (month-to-date, quarter-to-date, year-to-date, 1 year) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899838/33d737f2357d6e485704669962ae/43faadc3-47da-4a93-bbb7-47a7983e7441?expires=1784741400&signature=87203bd3a273ec39afd7fa8371657ee1c5c8d51cacdd59633c922173e9daec32&req=diUmE8F3lIlcUfMW1HO4zcSk4r7Veu%2FEjHDogqK0V%2Bwy7398YLiDEoSpkjH5%0AI8bi0T1kqrFFt%2BwwGks%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899838/33d737f2357d6e485704669962ae/43faadc3-47da-4a93-bbb7-47a7983e7441?expires=1784781000&signature=986e016d2e5596cb61557a503da169cec9a0fe7abb7617304531ba1710f468c6&req=diUmE8F3lIlcUfMW1HO4zcSk4r7Vdu%2FAjHDogqK0V%2BxITcT%2Bwam526IOpKd2%0ArA%2BA2VdlUbCdrp4CfvU%3D%0A) --- @@ -262,7 +262,7 @@ Navigate to **[Analytics > Cowork](https://claude.ai/analytics/cowork)** to view - Daily, weekly, and monthly active Cowork users -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515901489/8005693d55b7fefbfe9233258d39/106c22a0-3f47-47a6-abbd-4788dd70f218?expires=1784741400&signature=09d4135dae00b56575026894d1dfd6fae1c12cc14c025d978324c9cc4cc9565a&req=diUmE8B%2BnIVXUPMW1HO4zX7WEoy2WUCsFSi1Z3SzLLuxLaZnLzJwTHctdDSD%0AS4Z8WNCZZckeMxeLueE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515901489/8005693d55b7fefbfe9233258d39/106c22a0-3f47-47a6-abbd-4788dd70f218?expires=1784781000&signature=bf94c065525d5a8e5c6cad30f1bbbc5f749c8be2b047f1e88bb699bd6b73dba4&req=diUmE8B%2BnIVXUPMW1HO4zX7WEoy2VUCoFSi1Z3SzLLtiAvjIrEbgLjE3987e%0AQWfb9r0nyZZAZCOpgvY%3D%0A) **Note:** Cowork analytics are available alongside Chat and Claude Code data in the **[Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api)**. @@ -272,7 +272,7 @@ Navigate to **[Analytics > Cowork](https://claude.ai/analytics/cowork)** to view When your admin turns on individual usage analytics, any member of the organization can see their own usage broken down by product, model, and skill, along with where they stand against any spend limits set for them. Individual usage analytics are available in **[Settings > Usage](https://claude.ai/settings/usage)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533906328/1f5cd0a57def40676410f8f379b4/member-usage-30d-model.png?expires=1784741400&signature=b5c6deb974eba1b4c8b5e137dbca8ed9bbc513ef49dd774b9b2c0ea7455fc4f9&req=diUkFcB%2Bm4JdUfMW1HO4zfveB6vCeOreWGUKUw6QS49DjPe2ZDMlEscMBYpL%0AXD7uc2b83nYva1BHNog%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533906328/1f5cd0a57def40676410f8f379b4/member-usage-30d-model.png?expires=1784781000&signature=078827d3a3ea5bf390fd7273e264cb79355d430e50209be3011649c2b4985313&req=diUkFcB%2Bm4JdUfMW1HO4zfveB6vCdOraWGUKUw6QS4%2Fmzs%2BYwlnttLnZ5kUh%0AQ8XGxDV90idFJK2L7G8%3D%0A) --- diff --git a/content/support/12893767-getting-started-with-claude-for-nonprofits.md b/content/support/12893767-getting-started-with-claude-for-nonprofits.md index 6b30101e7..ce37529a7 100644 --- a/content/support/12893767-getting-started-with-claude-for-nonprofits.md +++ b/content/support/12893767-getting-started-with-claude-for-nonprofits.md @@ -1,5 +1,5 @@ - -Getting started with Claude for nonprofits | Claude by Anthropic diff --git a/content/support/12902446-claude-in-chrome-permissions-guide.md b/content/support/12902446-claude-in-chrome-permissions-guide.md index 7fe39b7c6..1724aa5ad 100644 --- a/content/support/12902446-claude-in-chrome-permissions-guide.md +++ b/content/support/12902446-claude-in-chrome-permissions-guide.md @@ -22,7 +22,7 @@ Claude in Chrome uses a multi-layered permission system to give you control over Choose "Manually approve" to have Claude create a plan from your prompt, which you can approve and allow Claude to execute. The plan will specify which websites you’re allowing Claude to access, as well as the approach it will follow: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1843320727/8d1c859ae9b8e0cdb536d024bf40/9bc3d239-8eb6-4bae-a032-a236f88ee606?expires=1784741400&signature=58ad26594410379069739616e6adb9a5bae33b5625349b2aa30b360cef39c313&req=dSgjFcp8nYZdXvMW1HO4zYqyZcZK%2BIOzgN0ADj5oqFC4MqPZKc1xug7RHTXH%0AK4LByD6pYUCMl%2BFXvUE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1843320727/8d1c859ae9b8e0cdb536d024bf40/9bc3d239-8eb6-4bae-a032-a236f88ee606?expires=1784781000&signature=c061213f1fc5cb181e173b8798ac6057b757a366bb8eeb606306bc43e7b1fba1&req=dSgjFcp8nYZdXvMW1HO4zYqyZcZK9IO3gN0ADj5oqFA88VsR4Y7lK6lpQ%2BxJ%0AK%2BMwKPuU99qz0EiDP5c%3D%0A) Note that Claude will only use the websites listed in the plan, so you’ll need to manually approve any additional access requests. @@ -50,7 +50,7 @@ When you choose "Skip all approvals," Claude doesn't pause to ask, and nothing c There are some websites on which Claude requires approval for every action. If you navigate to one of these sites, a **Permission required** prompt will appear in the extension side panel, Claude Cowork, or Claude Code where Claude will ask for permission before accessing the page or taking any action. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1847222875/162eb012ebe473ed2b852b97e223/0209db51-6057-4ec4-a9b7-8358287d46a3?expires=1784741400&signature=ceef70c68e45c62114fee9d42d35206e69c098493a17f2b45f25cd36246bc78f&req=dSgjEct8n4lYXPMW1HO4zeoCY8Isp3V7JCxYSFHKWIgeGOe46kzHJ9ehCcCR%0Az71uXETUxDV04k9cbXY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1847222875/162eb012ebe473ed2b852b97e223/0209db51-6057-4ec4-a9b7-8358287d46a3?expires=1784781000&signature=b79dd16a0214adff85d84d0a8899a1d12374a9a51f774f20afabb60fa786a71c&req=dSgjEct8n4lYXPMW1HO4zeoCY8Isq3V%2FJCxYSFHKWIiuqSCfP1Syslmy%2BBZs%0A4wRqj0Pvlv2lOl4QaPA%3D%0A) ### Permission options diff --git a/content/support/12923221-using-the-blackbaud-connector-in-claude.md b/content/support/12923221-using-the-blackbaud-connector-in-claude.md index 8208e10be..da44c3641 100644 --- a/content/support/12923221-using-the-blackbaud-connector-in-claude.md +++ b/content/support/12923221-using-the-blackbaud-connector-in-claude.md @@ -1,5 +1,5 @@ - -Using the Blackbaud connector in Claude | Claude by Anthropic diff --git a/content/support/12923227-using-the-benevity-connector-in-claude.md b/content/support/12923227-using-the-benevity-connector-in-claude.md index 3e9a87749..eb4095e94 100644 --- a/content/support/12923227-using-the-benevity-connector-in-claude.md +++ b/content/support/12923227-using-the-benevity-connector-in-claude.md @@ -1,5 +1,5 @@ - -Using the Benevity connector in Claude | Claude by Anthropic diff --git a/content/support/12923235-using-the-candid-connector-in-claude.md b/content/support/12923235-using-the-candid-connector-in-claude.md index e33351e94..a925dd412 100644 --- a/content/support/12923235-using-the-candid-connector-in-claude.md +++ b/content/support/12923235-using-the-candid-connector-in-claude.md @@ -1,5 +1,5 @@ - -Using the Candid connector in Claude | Claude by Anthropic diff --git a/content/support/12923668-claude-for-nonprofits-partnership-success-guide-for-admins.md b/content/support/12923668-claude-for-nonprofits-partnership-success-guide-for-admins.md index 094ff7d4c..c840eab8c 100644 --- a/content/support/12923668-claude-for-nonprofits-partnership-success-guide-for-admins.md +++ b/content/support/12923668-claude-for-nonprofits-partnership-success-guide-for-admins.md @@ -1,5 +1,5 @@ - -Claude for nonprofits partnership success guide for admins | Claude by Anthropic diff --git a/content/support/12923901-claude-for-nonprofits-partnership-guide-for-all-users.md b/content/support/12923901-claude-for-nonprofits-partnership-guide-for-all-users.md index e42fe8283..bd22bae64 100644 --- a/content/support/12923901-claude-for-nonprofits-partnership-guide-for-all-users.md +++ b/content/support/12923901-claude-for-nonprofits-partnership-guide-for-all-users.md @@ -1,5 +1,5 @@ - -Claude for nonprofits partnership guide for all users | Claude by Anthropic diff --git a/content/support/12997503-team-plan-billing-faqs.md b/content/support/12997503-team-plan-billing-faqs.md index c431c51de..2975c9c81 100644 --- a/content/support/12997503-team-plan-billing-faqs.md +++ b/content/support/12997503-team-plan-billing-faqs.md @@ -18,7 +18,7 @@ Your organization's billing address determines where your invoices are sent. You If you want to use a name other than the one tied to your payment method, an organization Owner should check the "Use a different name on invoices" box when adding or updating your payment method in **[Organization settings > Billing](https://claude.ai/admin-settings/billing)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922145253/f2e3d4e0fe43a2ea07e89244764c/image.png?expires=1784741400&signature=98a680976d3ddd3a3d11a99b280b998cdebf058238811333dd37ff623436fa8a&req=dSklFMh6mINaWvMW1HO4zRZTxF7Gv8rXKAqLF4ERnlUU6aQ0rvsxAkP9b%2Bmp%0ANhuSnHvT4o4jS0L%2Bq%2FM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922145253/f2e3d4e0fe43a2ea07e89244764c/image.png?expires=1784781000&signature=c4f31a362f6528fa06f6c36c5501da4f1363dba140e14dfbd83df718837f42cd&req=dSklFMh6mINaWvMW1HO4zRZTxF7Gs8rTKAqLF4ERnlUMP7O83Qo4Jq8G1P5S%0AEeJMbqCJPxlcxorqLes%3D%0A) ## When will I be billed? diff --git a/content/support/13132885-set-up-single-sign-on-sso.md b/content/support/13132885-set-up-single-sign-on-sso.md index 8642a0aba..2eb038174 100644 --- a/content/support/13132885-set-up-single-sign-on-sso.md +++ b/content/support/13132885-set-up-single-sign-on-sso.md @@ -42,7 +42,7 @@ You can verify multiple domains for a single organization, but all domains must 3. Enter the domain(s) you want to verify in the **Update organization email domains** modal and click the “+” button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2498843282/561d5ceb1c3a5df75bdfee8bfc3f/d2491145-362d-490b-bdcf-66a0a7656ddc?expires=1784741400&signature=9fdd4430b0cbda4dfd6a274b8f5b8ab241837927828b933baa823dd20ca742a1&req=diQuHsF6noNXW%2FMW1HO4zSdmHng%2B%2FsWIe3H0OpmIzWF%2BzIJ2lccGQBgFqydz%0A7ghi%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2498843282/561d5ceb1c3a5df75bdfee8bfc3f/d2491145-362d-490b-bdcf-66a0a7656ddc?expires=1784781000&signature=6f543778568148c8900b50cbf2891986c6a811312dc7bdee217fe85683c796be&req=diQuHsF6noNXW%2FMW1HO4zSdmHng%2B8sWMe3H0OpmIzWE6xrC%2Bq7Z8BTb2IAxb%0AL8jv%0A) 4. Click “Save” when you’re finished adding domains. @@ -50,7 +50,7 @@ You can verify multiple domains for a single organization, but all domains must 6. Enter your domain in the text box and click “Continue”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047042630/0617a562cd28a7ff0e607d66a30b/6bd08e1d-2b65-40ab-bc79-a257153854c1?expires=1784741400&signature=9ddc6564d18a7776ff60c6d9c7e5befe5571973ea4224b7cff4c7cd23e5a2d77&req=diAjEcl6n4dcWfMW1HO4zWHctRmQk9CuyoyXAW0OlXpETIg4adTyt32PzL5v%0A5zMg%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047042630/0617a562cd28a7ff0e607d66a30b/6bd08e1d-2b65-40ab-bc79-a257153854c1?expires=1784781000&signature=90460c2514eeb9281951cfdfb8367760456cb439a8f196f9b29e47b4a3dff4db&req=diAjEcl6n4dcWfMW1HO4zWHctRmQn9CqyoyXAW0OlXrv3vHLSbLcYwc4RrGN%0AWGlt%0A) 7. The setup screen displays a TXT record. **Copy the full Value using the copy button**—it begins with `anthropic-domain-verification-` and is longer than what's visible in the box. In your DNS provider, add a TXT record with **Host/Name** set to `@` (the root of your domain) and **Value** set to the copied string. Add it alongside any existing TXT records; don't replace them. The value is case-sensitive, so paste it exactly. @@ -76,7 +76,7 @@ Clicking "Refresh" re-checks your DNS; it won't show Verified until the publishe If the record is correct and propagated but the status still shows Pending, contact Support. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047044496/b8df54a0331784cc9ae8f00112aa/bf9609c1-dc93-4665-a066-4cae2fe4b002?expires=1784741400&signature=c70d7897eeba39ba6e3ca3437d4468434100b6c7419148dc74211299c6c19b55&req=diAjEcl6mYVWX%2FMW1HO4zVjmWS0Ha3W9PM2D8ZcdgrhP5bZA5un99hAAs6Si%0AvD2RxNeR8dKGLjwzY2g%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047044496/b8df54a0331784cc9ae8f00112aa/bf9609c1-dc93-4665-a066-4cae2fe4b002?expires=1784781000&signature=6ffd63ac0f433773f66d5136f8180b7c0d18cb1153da234741f79e821964fc93&req=diAjEcl6mYVWX%2FMW1HO4zVjmWS0HZ3W5PM2D8Zcdgrh3mkWP3jSlx4Xiv3gK%0AlxCTLsT80vgIIAQsSaA%3D%0A) **Note:** Once your domain is verified, you'll see a **Restrict organization creation** toggle under **Security** on the Organization and access organization settings page. Enable this if you want to prevent users from creating new Claude or Console organizations—including personal accounts—using your verified domains. @@ -116,7 +116,7 @@ For IdP-specific setup instructions, see: You can now choose to toggle on **Require SSO for Console** and/or **Require SSO for Claude,** on the **Organization and access** page, under the **Authentication** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312690200/bd2403586d4f6651ccd79e2a45af/b9f8d7ce-0def-49d9-bfb2-3a14352d7214?expires=1784741400&signature=6066b71ebef786274ed445d8e529e0655f1bf21b67c8a0cb13b835738cc5ca24&req=diMmFM93nYNfWfMW1HO4zdAICwumBn0OItXtKivx6ZGIJZJMVwFp3rwNRmBm%0AF%2F4L7Jf7sTCXo35D%2FjM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312690200/bd2403586d4f6651ccd79e2a45af/b9f8d7ce-0def-49d9-bfb2-3a14352d7214?expires=1784781000&signature=7a03e0a385838d807e031e9bd1e4bb61538896ec5bc23bf37b2db490bb04405d&req=diMmFM93nYNfWfMW1HO4zdAICwumCn0KItXtKivx6ZGCpz3bMIACiqNgTQz5%0A7wlAm19TWlXhHUpSd2Q%3D%0A) When SSO is required, users must use the “Continue with SSO” option to log in to their Claude/Console accounts. When SSO is not required, they will have the option to choose “Continue with SSO” or “Continue with email.” diff --git a/content/support/13133195-set-up-jit-or-scim-provisioning.md b/content/support/13133195-set-up-jit-or-scim-provisioning.md index 0613f4bf7..073bdc059 100644 --- a/content/support/13133195-set-up-jit-or-scim-provisioning.md +++ b/content/support/13133195-set-up-jit-or-scim-provisioning.md @@ -34,7 +34,7 @@ Use this table to help decide which provisioning mode is right for your organiza Both JIT and SCIM can be combined with **Enable group mappings** to control role or seat tier assignment based on IdP group membership. If you select either of these options for your provisioning mode, **Enable group mappings** will appear within the **User provisioning** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312706099/35d5d3ec149880a96bb7acec59f6/a4cfce55-86bf-40b0-b455-c8f412d48e9e?expires=1784741400&signature=9253acc8af6c172bd89fb7ab4c77d097b859a5dcaf292a428320bb6b80af5076&req=diMmFM5%2Bm4FWUPMW1HO4zXBDQ69TCVtyxFMG%2BIEvQSfUFB%2BoH2VTaSj2Fm6c%0ApUEs6lhG4oWaclvmZ%2FA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312706099/35d5d3ec149880a96bb7acec59f6/a4cfce55-86bf-40b0-b455-c8f412d48e9e?expires=1784781000&signature=69bfd222ccc197de1fd6eacee28e829d27357ba90b1d73b60d7d33f16f8716c1&req=diMmFM5%2Bm4FWUPMW1HO4zXBDQ69TBVt2xFMG%2BIEvQSdAB0dOKI1RW95Q1E7N%0AaNoOm2w0iCYequkOEEc%3D%0A) ### Available roles and seat tiers @@ -118,7 +118,7 @@ Once your IdP is connected, continue to Step 3. 4. Toggle **Enable group mappings** on (if it’s not already): -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312714635/b57870b51e6511c8293637bceee2/da1ceabc-b6bc-451b-9cda-24ff6aa90d02?expires=1784741400&signature=c0aba15037b566d612cd089b326ca77b2e0287df95f4c8f4f29d48af60976242&req=diMmFM5%2FmYdcXPMW1HO4zeBEbsHfk%2FtMyb72rapuHpN3J4j1lEjjU%2F3nkITc%0A791r%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312714635/b57870b51e6511c8293637bceee2/da1ceabc-b6bc-451b-9cda-24ff6aa90d02?expires=1784781000&signature=be967a69d3b5d9e71074e9d3414421f8e1769992cc4cf9db2703d327ea2d25cb&req=diMmFM5%2FmYdcXPMW1HO4zeBEbsHfn%2FtIyb72rapuHpO92U60JNjklJOBK6wE%0AB0dP%0A) 5. In the **Enable group mappings** section, click “Add” next to each role and select the corresponding group from your IdP in the dropdown. @@ -170,7 +170,7 @@ Verify you have enough seats purchased and available to add members to your org. 4. **For SCIM:** Click "Sync" to prompt an immediate sync, or wait for the automatic sync cycle: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312717421/c97fce49ad17d4660880a05fbaaf/59fbfa2a-1072-4662-8ca5-102970d5a795?expires=1784741400&signature=d8e84a5d312c0ab71c12a0dcf4d361759a9ae8538e43881f468087c292828a6d&req=diMmFM5%2FmoVdWPMW1HO4zZ9La1mqHcvG5hujYvMis4dfuB75KtU1sUQxzRTK%0AzL5B%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312717421/c97fce49ad17d4660880a05fbaaf/59fbfa2a-1072-4662-8ca5-102970d5a795?expires=1784781000&signature=e24b4df6acc5e657b3ce14ddc0904786e5a75dd2fac93cb6225d4024cbbbb7d6&req=diMmFM5%2FmoVdWPMW1HO4zZ9La1mqEcvC5hujYvMis4fRcJapDqHNM63t9brp%0ASAv5%0A) ### I lost Admin/Owner access after enabling group mappings diff --git a/content/support/13163631-configuring-session-security-settings.md b/content/support/13163631-configuring-session-security-settings.md index 9dfa47b7c..24ad12de8 100644 --- a/content/support/13163631-configuring-session-security-settings.md +++ b/content/support/13163631-configuring-session-security-settings.md @@ -18,7 +18,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s 5. Confirm your selection by clicking “Enable.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469436/1725e63ea1a2615948faecf4ec73/9bd276a1-7329-414d-87a1-d04dac93fff7?expires=1784741400&signature=a3e2c2e7caabef397ac21f546c7f951572e26309e947688734e95a2bdb4247be&req=dSgvHs14lIVcX%2FMW1HO4zQNx6%2BYgR1tUg%2F6XaftFnjxPA1B%2BQr8fKvKMDc38%0AZ%2FzrF2IhDIaXSZU8GEU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469436/1725e63ea1a2615948faecf4ec73/9bd276a1-7329-414d-87a1-d04dac93fff7?expires=1784781000&signature=549eb35055b88f8e2d594203e482aa0227512277af35ebd08cca8716f1cac72d&req=dSgvHs14lIVcX%2FMW1HO4zQNx6%2BYgS1tQg%2F6XaftFnjwMEfeAR7Fj1QPyHWz4%0Al0xdOdiAToifknabZBg%3D%0A) ### For Console Admins @@ -32,7 +32,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s 5. Confirm your selection by clicking “Enable.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469435/7a766bbe02e61c7d8f05deb5b8f0/b0bda400-47c6-43dd-9907-131ebe180b36?expires=1784741400&signature=7f7f16ab037d99ad703f00112e516e4f506bc05e34f47babd59fe4ea62ca64f5&req=dSgvHs14lIVcXPMW1HO4zWzx2L0xI34lXZ5D7eVpMtf7FihtjD28AD6Uztc1%0AcS2AdLyI06%2BkyFPrgsw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469435/7a766bbe02e61c7d8f05deb5b8f0/b0bda400-47c6-43dd-9907-131ebe180b36?expires=1784781000&signature=5e6aa6630c1ea92309603542d2a3bddf85da885849d75fa24ae9c6f649244e5a&req=dSgvHs14lIVcXPMW1HO4zWzx2L0xL34hXZ5D7eVpMtcauhbR%2FWdocb0NCjbe%0A86kS%2Bfq9jJMskeNb1X8%3D%0A) ### What happens after enabling shortened session length? @@ -50,7 +50,7 @@ You can change the session duration at any time by selecting a new value from th - Sessions scheduled to expire beyond the new duration will have their expiration shortened accordingly. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469437/46ac5bc55484ca01556d87a5ade7/b01a7651-ad65-4b32-93ff-16dbc9ca97c0?expires=1784741400&signature=a08164d816fe3ad214ae0f3b71ddf7fe85fe13547ec3db71a0feb249f33ba417&req=dSgvHs14lIVcXvMW1HO4zZ7mWsyc4zinA00cbyPOLDWbXRdmblMlgFf4Z5UX%0Aq1iY2RWMIIJB2zPPYQ4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469437/46ac5bc55484ca01556d87a5ade7/b01a7651-ad65-4b32-93ff-16dbc9ca97c0?expires=1784781000&signature=612440e2475bca1bccef31db9cbf581170ae41420c8894983b773cf522f0455a&req=dSgvHs14lIVcXvMW1HO4zZ7mWsyc7zijA00cbyPOLDUaLDJit1DY3rnvvMug%0AMBHZ6eDku6mj09m8NxA%3D%0A) ## Disabling session length settings diff --git a/content/support/13189465-log-in-to-your-claude-account.md b/content/support/13189465-log-in-to-your-claude-account.md index 0d6c16ae0..961804039 100644 --- a/content/support/13189465-log-in-to-your-claude-account.md +++ b/content/support/13189465-log-in-to-your-claude-account.md @@ -2,7 +2,7 @@ When you open Claude on a web browser ([claude.ai](http://claude.ai)), the desktop app, or a mobile app, you will see two different options for logging in to your Claude account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893216804/f2209c3ec6cf4fc2e803d13bbc9d/40520c9e-ff82-4a7c-adca-5a064fe18d8c?expires=1784741400&signature=c6ba477ccab217760a6d8ee3121c50fc31c9574ddbfdc1ac8dd7ca7e9c9a261c&req=dSguFct%2Fm4lfXfMW1HO4zXg5BoaL5xOwzWhrqpWiTMl2PDJsyRagLHdryDSG%0AG9mcug4h23dvrp396B0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893216804/f2209c3ec6cf4fc2e803d13bbc9d/40520c9e-ff82-4a7c-adca-5a064fe18d8c?expires=1784781000&signature=6437771daaa2dd057ee2c89d9511e44d87a6cea53c1df28cc7b3398d7436bb75&req=dSguFct%2Fm4lfXfMW1HO4zXg5BoaL6xO0zWhrqpWiTMkHFXBkxVAVy0bQGgSY%0ASjKE4c4aEjwrnpluzCE%3D%0A) ## Continue with Google diff --git a/content/support/13325567-account-management-faqs.md b/content/support/13325567-account-management-faqs.md index e9db9ae88..98ebedc33 100644 --- a/content/support/13325567-account-management-faqs.md +++ b/content/support/13325567-account-management-faqs.md @@ -44,6 +44,6 @@ The email domain that was used to create your Team or Enterprise plan organizati Owners can remove domains by opening up the same modal and clicking the trash can icon to the right of the domain: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053873852/1cbccea3b7067e03205f2ff8546b/CleanShot+2026-02-11+at+11_16_07%402x.png?expires=1784741400&signature=41067a444804f619bbcddc757b1c95c7ada49f902dbee3c4316188938722e30b&req=diAiFcF5nolaW%2FMW1HO4zUrhFu%2BfbQkekeFUnrkrQZhnCuURsjewv8OEcDsR%0AmNk8AmKKPq%2F1Mn22ar0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053873852/1cbccea3b7067e03205f2ff8546b/CleanShot+2026-02-11+at+11_16_07%402x.png?expires=1784781000&signature=b428b1c08931bf0d8a50cecf2b288e9c1a9d23484492eae6a33663f2c3353651&req=diAiFcF5nolaW%2FMW1HO4zUrhFu%2BfYQkakeFUnrkrQZi4rAIXZPWizoZ6Vh0h%0ApeUTW8c3icSaMXyB0s0%3D%0A) While the account creator must use a business email address, you can add public domains like @gmail.com, @yahoo.com, and @hotmail.com as allowed domains for other members of your organization. \ No newline at end of file diff --git a/content/support/13345190-get-started-with-claude-cowork.md b/content/support/13345190-get-started-with-claude-cowork.md index 3b6612de2..d5d2998c8 100644 --- a/content/support/13345190-get-started-with-claude-cowork.md +++ b/content/support/13345190-get-started-with-claude-cowork.md @@ -176,7 +176,7 @@ To set global instructions: 3. Type your instructions in the text box and click "Save": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2525926874/15324ac4155d7802272e8bdef04b/ec66cd09-a4db-4f1d-8f30-226c9d126333?expires=1784741400&signature=22baac381a0e24a1bc9fe62207772c5f7f35671b0cc72dbd38a8ec4f0ff47308&req=diUlE8B8m4lYXfMW1HO4zcDl6tzrMlC08iWjaktE9437f%2FdIP50xYFiR0TIP%0AEMsfo58I55mEH31BIgg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2525926874/15324ac4155d7802272e8bdef04b/ec66cd09-a4db-4f1d-8f30-226c9d126333?expires=1784781000&signature=14f56a317a24dc86064ff127c881c5e8a95b2a45427877cb22f7ea0631481470&req=diUlE8B8m4lYXfMW1HO4zcDl6tzrPlCw8iWjaktE940VVAw0Ju9RiWUUwTQv%0AY3lfrljqxjQ4N7uX0uY%3D%0A) ### Folder instructions diff --git a/content/support/13346458-customizing-your-console-appearance-settings.md b/content/support/13346458-customizing-your-console-appearance-settings.md index 5187faf45..d5a1e4473 100644 --- a/content/support/13346458-customizing-your-console-appearance-settings.md +++ b/content/support/13346458-customizing-your-console-appearance-settings.md @@ -8,4 +8,4 @@ 3. Select from Light, System, or Dark under **Color mode**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922579101/ede30d38dca693c59f9c15d79e69/CleanShot+2026-01-08+at+15_45_20%402x.png?expires=1784741400&signature=0081aa661fd789d2a29f59c111d7e2f3a9771bdeff10ce58383fef6058a9b90c&req=dSklFMx5lIBfWPMW1HO4zRpFC8wDSRNyO9Kw38RlAYLxlrY3Ba6twLB%2B2cfQ%0A9l11kTvdWHWl8gd0tp4%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922579101/ede30d38dca693c59f9c15d79e69/CleanShot+2026-01-08+at+15_45_20%402x.png?expires=1784781000&signature=c65f163fdb558ca066146b89a703f03832e0d15275f5f97222c718090db4f7dd&req=dSklFMx5lIBfWPMW1HO4zRpFC8wDRRN2O9Kw38RlAYIwxeC7TH7qRHMaqJKz%0ApWXBPRBhjsSczV%2BiDPA%3D%0A) \ No newline at end of file diff --git a/content/support/13371040-logging-in-to-your-console-account.md b/content/support/13371040-logging-in-to-your-console-account.md index 0348fccd2..00eea3225 100644 --- a/content/support/13371040-logging-in-to-your-console-account.md +++ b/content/support/13371040-logging-in-to-your-console-account.md @@ -2,7 +2,7 @@ When you navigate to the [Claude Console](https://platform.claude.com), you will see two different options for logging in to your Console account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1935026646/d90d1613a3dbe763fef5abb96e3c/image.png?expires=1784741400&signature=2c7b7c243349a6ef41d6bbe3f1b2d28eb0970a1adb232a4fab717d20f21def7d&req=dSkkE8l8m4dbX%2FMW1HO4zcrI543rpIEJ8vUNcPt4%2B716vUq9uBtPcCIz3Xob%0A3n3Yj9MNFR1QQmSBY3w%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1935026646/d90d1613a3dbe763fef5abb96e3c/image.png?expires=1784781000&signature=7cc0413bdc167d034db80bc8ecf7a680775b46d301f71251b392a3a6c5270f49&req=dSkkE8l8m4dbX%2FMW1HO4zcrI543rqIEN8vUNcPt4%2B73SQDoOgoJ2cA25UZrV%0A3F5pzI7a%2FyPZtvn7ul8%3D%0A) ## Continue with Google diff --git a/content/support/13641943-visual-and-interactive-content.md b/content/support/13641943-visual-and-interactive-content.md index 3f83b4861..87102d192 100644 --- a/content/support/13641943-visual-and-interactive-content.md +++ b/content/support/13641943-visual-and-interactive-content.md @@ -18,7 +18,7 @@ Claude can show current weather conditions and forecasts when you ask about the Claude automatically displays temperatures in Fahrenheit for US locations and Celsius for everywhere else. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544927/3a9c695b24df387ecdd766ad308c/8be9f393-dcb0-4ff8-89e8-5fa47bedaa38?expires=1784741400&signature=48edab565e7e538e44fdef1db844fdaabfc720c946e8b66c64d5d4bd92063845&req=diAjFsx6mYhdXvMW1HO4zXlB7Tq90RmMdgndksVD5R1Qc%2BeptPlfFEzi03y3%0AMmDUDFCO6R1WIns8KMQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544927/3a9c695b24df387ecdd766ad308c/8be9f393-dcb0-4ff8-89e8-5fa47bedaa38?expires=1784781000&signature=bf20966386d6f82e4042cd8f2b0680617226575426ed44dc37378205d1734fbf&req=diAjFsx6mYhdXvMW1HO4zXlB7Tq93RmIdgndksVD5R37QyDKneVvYMP7TZi4%0AcacCeND0gQpHPvJ5qYg%3D%0A) Weather is powered by Google Maps (). @@ -28,7 +28,7 @@ When you ask about recipes, Claude can display formatted recipe cards that are e **Note:** Visual recipe cards are available on web and desktop only. On mobile, Claude provides recipe information as text in the conversation. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544929/12f4c51eda7779d65d3ea2c7ab16/d0f4a314-cff8-421a-b401-10c2bf50374e?expires=1784741400&signature=1cb2fed04d4fd1e12953c080677ed63dac101601236fb21a8f133112160711d3&req=diAjFsx6mYhdUPMW1HO4zUQpe7QS1lWTrIPm%2FImZVg2JSUAtOF7iH0aBADUZ%0AUN6cLy1b15sR%2Botwr9Y%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544929/12f4c51eda7779d65d3ea2c7ab16/d0f4a314-cff8-421a-b401-10c2bf50374e?expires=1784781000&signature=f002e09e3c9ccc33f0d60c1489c099612253e8ac3bdb9a2ae81c5780f4635e35&req=diAjFsx6mYhdUPMW1HO4zUQpe7QS2lWXrIPm%2FImZVg15aRv1gS7sh3T9zLT3%0ATkezENGBzeNz8kxVOcM%3D%0A) ### Custom visuals @@ -76,7 +76,7 @@ For example, if you ask Claude to help you plan a trip, it might ask you to: This content appears at the bottom of the chat. You can still type a response if you prefer. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544930/9ad066e137d11e4b559b0217e12d/9bf30d2d-1715-42b3-9da5-2a9298f41f08?expires=1784741400&signature=75c414697db3ba114221b923eb178d67669fbd13822cc5fd0a82ea5fd6cff591&req=diAjFsx6mYhcWfMW1HO4zWmF5%2FG5bR%2Bmx4wz0C7CTAIaNZbsXuZMDVrgY9bV%0A%2BXckL1%2FCj9DFhbxNLY0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544930/9ad066e137d11e4b559b0217e12d/9bf30d2d-1715-42b3-9da5-2a9298f41f08?expires=1784781000&signature=0fbcc2648e224e84ff23ff75d8bd57d853232cb5a46bf0256b2e70bc4dc31773&req=diAjFsx6mYhcWfMW1HO4zWmF5%2FG5YR%2Bix4wz0C7CTAJug537HQ%2FIaL5nXjMX%0ALw9bHZTI8nd%2FTbmnWSs%3D%0A) --- diff --git a/content/support/13756069-public-sector-faqs.md b/content/support/13756069-public-sector-faqs.md index c5a5e7c93..7864fecc0 100644 --- a/content/support/13756069-public-sector-faqs.md +++ b/content/support/13756069-public-sector-faqs.md @@ -6,7 +6,7 @@ Select your product based on both your technical/functional requirements, and also your compliance/security/deployment environment requirements. Here is a list of options: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2197717161/79965a24090029e9e58c727c3c24/pubsec-product-matrix_png+%281%29.jpg?expires=1784741400&signature=f20ee4ba363d59e62962723cafa7df3f3f8491349187e3b1390d15743af21103&req=diEuEc5%2FmoBZWPMW1HO4zU94Ll0iGdw02WxtU42UVC3QFdlYhsZiDAAjMnt9%0A8594p%2BrLxtYjXD7VB6w%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2197717161/79965a24090029e9e58c727c3c24/pubsec-product-matrix_png+%281%29.jpg?expires=1784781000&signature=a8d8dcc3a93119a324c3667413e70fbf1e579c3f0e1a7723dac43dde7a5e7d18&req=diEuEc5%2FmoBZWPMW1HO4zU94Ll0iFdww2WxtU42UVC2UP3d3GKDXvWWuWeqn%0AvPKjqPTrl4ceZK3ha8U%3D%0A) ### What is Claude for Government (C4G)? diff --git a/content/support/13837433-manage-plugins-for-your-organization.md b/content/support/13837433-manage-plugins-for-your-organization.md index 020fb028d..258cf8887 100644 --- a/content/support/13837433-manage-plugins-for-your-organization.md +++ b/content/support/13837433-manage-plugins-for-your-organization.md @@ -106,7 +106,7 @@ Your personal GitHub token is verified to confirm you have access, then Cowork u An initial sync runs automatically when you connect a repository. After that, organization owners can opt-in to continued automatic updates per marketplace by going to **[Organization settings > Plugins](https://claude.ai/admin-settings/plugins)**, clicking the menu button in the upper right corner of the marketplace, then toggling "Sync automatically" on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193200015/a239033a9ab19fbd39f1a0d9edce/CleanShot+2026-03-23+at+11_41_31%402x.png?expires=1784741400&signature=67ae40953790dba10b80a77159dac9c5089d362b5da2a1f7f8dd20c03b27dd72&req=diEuFct%2BnYFeXPMW1HO4zUYv5tn%2BxX4QRDH%2FtUo5ov77LnTcV8ipOyDu92w8%0AGuEi%2B5xr8fio62QhxpI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193200015/a239033a9ab19fbd39f1a0d9edce/CleanShot+2026-03-23+at+11_41_31%402x.png?expires=1784781000&signature=3230faaaa4da584e161078e8ff87506cc66c5db1f0c9b3daa746038af357193d&req=diEuFct%2BnYFeXPMW1HO4zUYv5tn%2ByX4URDH%2FtUo5ov5s3B7n1YuvBq0KHqKB%0AtC%2FmnbIE0V41zqQ%2Bf1s%3D%0A) Enabling automatic sync creates a webhook on the connected repository. The person turning the toggle on must have admin-level access to that repository on GitHub. This is checked through their personal GitHub connection, which is separate from the Claude GitHub App installation. Without admin access, the page shows "Cannot access repository. Ensure the repository exists and the Claude GitHub App is installed," even when the App is installed correctly and manual updates work. diff --git a/content/support/13837440-use-plugins-in-claude.md b/content/support/13837440-use-plugins-in-claude.md index d7a072e09..47e84131a 100644 --- a/content/support/13837440-use-plugins-in-claude.md +++ b/content/support/13837440-use-plugins-in-claude.md @@ -40,7 +40,7 @@ In Cowork, open the "Cowork" tab first, then open **Customize**. You can also upload a custom plugin file if you built one yourself or received one from a colleague. On Claude Desktop and in Cowork, plugins you add yourself are saved locally to your computer. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2100409211/fc01614dde1a616fa31ffaa9cb04/47bacf5b-a810-45b5-a468-9769f1a58ef8?expires=1784741400&signature=3557e7c3c4a16df3f28bb8f75c2d015533b98e7b05e55854cce903d333834efb&req=diEnFs1%2BlINeWPMW1HO4zZF3IhHaN%2FRRxakFVfq5Www%2B5X2FyvBSMB4O6aeu%0A3GUt7gk%2BHEzm5F9Su60%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2100409211/fc01614dde1a616fa31ffaa9cb04/47bacf5b-a810-45b5-a468-9769f1a58ef8?expires=1784781000&signature=19b078a115d6523328f86f84ecd498cc1416dac51f8c60c31719adbb666b7d47&req=diEnFs1%2BlINeWPMW1HO4zZF3IhHaO%2FRVxakFVfq5WwxnDy2AAsk0yp9k6g8y%0AsD%2FJHs%2BSxO4eCEf3Z3Q%3D%0A) --- @@ -48,7 +48,7 @@ You can also upload a custom plugin file if you built one yourself or received o Each plugin you install adds skills you can use while working with Claude. Type "/" or click the "+" button to see the available skills from your installed plugins, in chat and in Cowork. Click any skill to see its details. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2157396844/4a790e10f5b88df770783df1d7e9/image.png?expires=1784741400&signature=b2d80216b994fe91fa64ef8e9b2f193fcd3dfb5d2eb9615a434bcd834e27ef57&req=diEiEcp3m4lbXfMW1HO4zf4NBPL7h0GQmKUxugP2BQttCuxzZioq7jZ3JD2r%0Agx5w4BTaArZTNngRh%2Bs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2157396844/4a790e10f5b88df770783df1d7e9/image.png?expires=1784781000&signature=cad2b8603797aa489ae80089db487dcabf7da82c1c0762121c6ec38578c7285f&req=diEiEcp3m4lbXfMW1HO4zf4NBPL7i0GUmKUxugP2BQtpaJ5Tunw6FIHB0Mjf%0AkHNKuQJaaZwIJjy0ff8%3D%0A) --- diff --git a/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md b/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md index c01177727..0234281ce 100644 --- a/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md +++ b/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md @@ -52,7 +52,7 @@ There are two ways to create a scheduled task: 6. You can explicitly confirm you want to schedule the task when prompted by Claude by clicking “Schedule": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2104085399/4dda7e6f76026fd827db0b9323a9/f20635bf-15e7-4978-a213-5b9f67e9fb9a?expires=1784741400&signature=d6efc338f1d59b471bff868bf69e0ccce4cf38ddbfa381e1751b157563ff60d4&req=diEnEsl2mIJWUPMW1HO4zeLJBkHj%2B%2BuDPx%2FSrZI7l8zS3PTYMPDa%2B9S3p8j3%0AgnEN%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2104085399/4dda7e6f76026fd827db0b9323a9/f20635bf-15e7-4978-a213-5b9f67e9fb9a?expires=1784781000&signature=4ba3547c32ac5e833a86d36f871dbff1e3c7ca67719c952efc1f7355324525ff&req=diEnEsl2mIJWUPMW1HO4zeLJBkHj9%2BuHPx%2FSrZI7l8yfZMDwYMGZ7eElTkeJ%0A9GI7%0A) 7. Claude will create and schedule your task, and it will be added to the **Scheduled tasks** page. diff --git a/content/support/13892150-work-across-microsoft-365-apps.md b/content/support/13892150-work-across-microsoft-365-apps.md index 5fb80a514..922fde17d 100644 --- a/content/support/13892150-work-across-microsoft-365-apps.md +++ b/content/support/13892150-work-across-microsoft-365-apps.md @@ -34,13 +34,13 @@ Open each app and activate the add-in at least once before using the cross-app f Go to **Settings** in each of the add-ins and toggle **Let Claude work across files** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2152216540/23e9f22eca1109ec09f2c6138191/2ef697a8-3a60-4193-bbd7-639ed91b20e9?expires=1784741400&signature=4a78b83619971bfba45ea24771c6cf2f5e9cc5b41052c5b8c2536a696e62c5bd&req=diEiFMt%2Fm4RbWfMW1HO4ze%2BVVHDyVA9bQEr1GSm7Lk3ZIjRkXVgrz7bCTwwX%0A5TQhl4z7T5pdsU8Sc2c%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2152216540/23e9f22eca1109ec09f2c6138191/2ef697a8-3a60-4193-bbd7-639ed91b20e9?expires=1784781000&signature=b42418132855e80328452af3b298f4698e3f52ae76489df71dc56a84ad7c3aac&req=diEiFMt%2Fm4RbWfMW1HO4ze%2BVVHDyWA9fQEr1GSm7Lk3E1TzGeYqzYcjhY3Uf%0AYRLBEq6wU3pCzTTiDAM%3D%0A) **Note:** This setting is default on for Pro and Max plans and default off for Team and Enterprise plans. You'll see connected file indicators when Excel, PowerPoint, Word, or Outlook files are linked to your session: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2152215013/db0cfd2aa4034975480d82218aad/8f11dc16-2173-4b34-a05a-e31a53b58cc2?expires=1784741400&signature=5779bd578b069a679ac5b8c80e9810c023b36c701cd3e132fd2372388346cd3b&req=diEiFMt%2FmIFeWvMW1HO4zZtV3mmx39NlGgi4PNaz7vXMft0sEENdh7sk0cjN%0ANsI0WcctWLKEUKj4n4Q%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2152215013/db0cfd2aa4034975480d82218aad/8f11dc16-2173-4b34-a05a-e31a53b58cc2?expires=1784781000&signature=89c08a9dd8393fd5e9938cafa469d21096841b34993442ce630c0c65801f468e&req=diEiFMt%2FmIFeWvMW1HO4zZtV3mmx09NhGgi4PNaz7vUpBKu3J5F%2BlOi4PfP5%0AZwVHmI%2B61GcQDN8GXeY%3D%0A) --- diff --git a/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md b/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md index c6d75e5f5..da9b5f778 100644 --- a/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md +++ b/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md @@ -66,7 +66,7 @@ Create roles that delegate parts of administration without granting the Owner ro 4. For each team or department, decide which features they need access to. -![Image of the Organization settings page in Claude, with a box around the People section which contains three options: Members, Groups, and Roles.](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484535492/d17b343f54f754bb3af73fe880a9/Org+settings+-+People.png?expires=1784741400&signature=edaefe32f19fcefc3126bec8c6b70d33aaec616e99f5d62be7881fd6505032a3&req=diQvEsx9mIVWW%2FMW1HO4zVA%2FMt6XK4yuvDbmWeIt%2FcRkE0X2ebgE4KwcuuET%0AqP0uKCQ2Gh4hVLiVYQA%3D%0A) +![Image of the Organization settings page in Claude, with a box around the People section which contains three options: Members, Groups, and Roles.](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484535492/d17b343f54f754bb3af73fe880a9/Org+settings+-+People.png?expires=1784781000&signature=332cc11bb526f0c326a3ec3a37a027d4f3130ce86849351c23121f0c2928fd39&req=diQvEsx9mIVWW%2FMW1HO4zVA%2FMt6XJ4yqvDbmWeIt%2FcSEIA4CGb3TaA8fvr5r%0ASZjNR2MDoquueh9%2BQ4s%3D%0A) Remember: any feature you want to control per-group must be **enabled** at the organization level. If a feature is toggled off at the organization level, no custom role can grant access to it. @@ -84,7 +84,7 @@ Create your custom roles before enabling any features or migrating members. This 3. Name the role and toggle the appropriate capabilities on the **Capabilities** tab, or choose "All capabilities" or "All generally available" to grant everything at once: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2539844315/2e98adc9b24a95bf64b7ef759c94/a0c6bd31-327c-48b8-9ece-1b985eafccec?expires=1784741400&signature=811c204972b0a1e542f1e5146552f2c5e19fa8bf55e2ae0c25e8e427d93abcf3&req=diUkH8F6mYJeXPMW1HO4zfzK2Ofd4tg%2BJsssa0E%2FK2YSl7ITHKpdvYk78ua4%0A9E%2FA%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2539844315/2e98adc9b24a95bf64b7ef759c94/a0c6bd31-327c-48b8-9ece-1b985eafccec?expires=1784781000&signature=f186e2ca0b3a48119efe60934dc2ad6f841f5f0a65e82339ccd3d5630ca937c4&req=diUkH8F6mYJeXPMW1HO4zfzK2Ofd7tg6Jsssa0E%2FK2YLFTqXl3fGst8PGV2s%0A11y1%0A) 4. On the **Permissions** tab, set admin permissions for the role. See **Step 3**. @@ -114,7 +114,7 @@ Set admin permissions on each role to delegate access to admin settings, like bi 3. Select the **Permissions** tab, between **Capabilities** and **Connectors**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484538453/66f52673b2d1fc7b0d4b48ed4ff6/fbf992ce-c4a1-402e-80cd-0c8449f916bd?expires=1784741400&signature=74a7246223ff6e3447ed29395daf8002e0c1af38b58ef3dd78dbde9fa9e1cae2&req=diQvEsx9lYVaWvMW1HO4za6MibagWEODJQR8u%2B9qQFkt3KvPM6tWH0%2BGgvA7%0AaX83D4cU8COZDwg%2BmVA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484538453/66f52673b2d1fc7b0d4b48ed4ff6/fbf992ce-c4a1-402e-80cd-0c8449f916bd?expires=1784781000&signature=28169847b343e01147cb7eb23f65aeac416c0b4ee06b531227c4200ed29b8aae&req=diQvEsx9lYVaWvMW1HO4za6MibagVEOHJQR8u%2B9qQFn0Te8ab%2FiGZJl1Y8zX%0ALOz669e%2BLS4RoRWOUZ0%3D%0A) ### **Set admin permissions** @@ -154,7 +154,7 @@ Set connector permissions on each role to control which connectors, and which to The default settings for new roles are permissive. When creating or modifying a role, confirm the settings on each tab to avoid granting unintended permissions. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484539079/2325428311fffccd6951d5f2dc46/e4326a16-d44b-4e5d-9ecd-5c3dbbc7651a?expires=1784741400&signature=ef9dd88617c52bbd86d13e230b22d607d07be844df3a0966f1feda3a9defe778&req=diQvEsx9lIFYUPMW1HO4zZGDXF2kDPd2HNJQDqL6ZaD4FmwJhpQDQux1wXCB%0Ao%2Bdc1tjnj%2BicNCtQLms%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484539079/2325428311fffccd6951d5f2dc46/e4326a16-d44b-4e5d-9ecd-5c3dbbc7651a?expires=1784781000&signature=ad635c06652509ac00a0621c235921c717f382a203d8cf5545b67e9c74c27c3f&req=diQvEsx9lIFYUPMW1HO4zZGDXF2kAPdyHNJQDqL6ZaD1Ihz4hJt0Mmm9becP%0Ab2alC6E7M1Or0KAeU4o%3D%0A) ### Set connector-level permissions @@ -170,7 +170,7 @@ The **Connectors** tab lists an **All connectors** row at the top, followed by e Choosing “Always allow,” “Needs approval,” or “Blocked” applies that level to every tool on the connector. The **All connectors** row works the same way one level up: it sets a baseline for every connector at once, including any connector you add later. Use it to set a role’s default, then override individual connectors. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484540660/36fd30e963d7881bbff5b85bdf32/cc91e30c-af8c-4271-bff4-b34393d6122e?expires=1784741400&signature=3641594f1f0427b4425ba49f7c0124ffef6e94d3729798ee9234a46fed34451e&req=diQvEsx6nYdZWfMW1HO4za3dLAKA2Ics%2B48W%2BGCIbmcn1xGuL7HfeVEQeQhp%0ATLpQa3uYI3a7HQnQaVg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484540660/36fd30e963d7881bbff5b85bdf32/cc91e30c-af8c-4271-bff4-b34393d6122e?expires=1784781000&signature=de6e167b5e200fb4d4522ea7fb0ebc83313e35c965736935ed67e048b9fcf54b&req=diQvEsx6nYdZWfMW1HO4za3dLAKA1Ico%2B48W%2BGCIbmcCjJVp%2BrriViLMyN8J%0AUA7tjkFJWqg55usRgTw%3D%0A) ### Set per-tool permissions @@ -178,7 +178,7 @@ Set a connector to **Custom** to reveal its tools as individual rows. Each tool Per-tool permissions let a role reach part of a connector. For example, with Jira set to **Custom**, its `search_issues` tool set to “Needs approval,” and every other Jira tool set to “Blocked,” members with the role can search Jira but nothing else. Claude only sees the tools you’ve granted, so asking it to create a ticket returns “I don’t have a tool for that” rather than an error. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484553274/3c0781dc9c7704a7b67d4858b88b/Screenshot+2026-06-17+at+4_28_45%E2%80%AFPM.png?expires=1784741400&signature=46d6a46c6e83fec2107041efe87115db3d7d598002af1b240d58338b079c5282&req=diQvEsx7noNYXfMW1HO4zXcI%2BoNHAN5n1VjQ9K3ENRuPEM2V7r1jJYoWD21V%0AJ7J2420thbWvufuqnF0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484553274/3c0781dc9c7704a7b67d4858b88b/Screenshot+2026-06-17+at+4_28_45%E2%80%AFPM.png?expires=1784781000&signature=d99a6821aafdb1cfada014bb6e7cab01a7bc44b0d061744b7f060cadec5579cb&req=diQvEsx7noNYXfMW1HO4zXcI%2BoNHDN5j1VjQ9K3ENRuGbtNLnIT1zs8jCNrR%0A%2F9blFJM1tKEiCt6QUIc%3D%0A) ### Review cross-role conflicts @@ -186,7 +186,7 @@ Because connector permissions are additive across roles, blocking a connector in If you have unsaved edits when you open a linked role, you’re asked to discard them first. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484556183/b644bbfba5350ae2a460117f23e3/Screenshot+2026-06-17+at+4_31_03%E2%80%AFPM.png?expires=1784741400&signature=b9af3fc4aafb25aef98046922701e4482905c2e2bf1a11a4dada329be7afe169&req=diQvEsx7m4BXWvMW1HO4zX8ytukC5dXTGc8KkqwXsZ7Qr8BPB02SFELbXGc1%0ALdpHv8MEMTrYk8PMcmM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484556183/b644bbfba5350ae2a460117f23e3/Screenshot+2026-06-17+at+4_31_03%E2%80%AFPM.png?expires=1784781000&signature=fbb3c1fd8eff0c5661161693ab84e2ef4db60e7e3dd6b668b4d78ebed098f620&req=diQvEsx7m4BXWvMW1HO4zX8ytukC6dXXGc8KkqwXsZ5Df4N0WVSAFOumnabw%0A8%2Fnk0Vz36Req%2BbiWGMA%3D%0A) ### Verify enforcement @@ -236,13 +236,13 @@ Verify model access after you've migrated members to "Custom" roles. See **Step 4. Assign each group to the custom roles you created in step 2. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260371973/b503c99ef71d8a89b7aff606511b/b1afd593-3b23-4fa9-8b9b-ee6beaf74fd7?expires=1784741400&signature=a8794ed85cd3d753946eb06dba65a924a9ba0178be4bf512455730814f4e4e11&req=diIhFsp5nIhYWvMW1HO4zdMu8WRxHghuKwlCydrbfL5O1QAXPSd%2BQzb%2FqdTJ%0ArbB8f4PoXMHyR3nzcSQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260371973/b503c99ef71d8a89b7aff606511b/b1afd593-3b23-4fa9-8b9b-ee6beaf74fd7?expires=1784781000&signature=861ad77479797c412e2704d19b818ed8c9b0e5d81038dc194e5f04d1a563d99a&req=diIhFsp5nIhYWvMW1HO4zdMu8WRxEghqKwlCydrbfL7mOh0gTVurf6d7umHD%0AMCc2KAgHqoMYOL%2Fgihg%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260372813/83ccc4784bdfc8600101bc42ec4b/6e7456ac-9887-4e04-b757-3972110fbdce?expires=1784741400&signature=9d02e9df6fd39d996dd01e387b5ea692522b5f5a7b530c954bdc2c0eacc29851&req=diIhFsp5n4leWvMW1HO4zQetnydQYK78czQdKdGFNse%2FxSYOZT8uBDEMsvNq%0AYT01GN3zvzz70VUVt9E%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260372813/83ccc4784bdfc8600101bc42ec4b/6e7456ac-9887-4e04-b757-3972110fbdce?expires=1784781000&signature=681418088c18a9f4e07493f1a316c7d1e394bac7bc1af86a762bfc92fd6776fc&req=diIhFsp5n4leWvMW1HO4zQetnydQbK74czQdKdGFNse1L9iupKqq%2B2f8X29h%0A2dqPIuOs%2BT32ds7ZbHA%3D%0A) If you use SCIM directory sync, you can sync groups from your identity provider instead of creating them manually. For details on SCIM group sync, see **[Manage groups and group spend limits on Enterprise plans](https://support.claude.com/en/articles/13799932-manage-groups-and-group-spend-limits-on-enterprise-plans)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260374677/5f9d8febb8ae25153a94d0b827b9/c8314b27-96c1-4743-ae8b-25e511181837?expires=1784741400&signature=854a7e79b353ce9831c1bc5bb04451076bfaddf2e66acde69355eef65e45e7bb&req=diIhFsp5mYdYXvMW1HO4zXzl64ty7DqeKYkQn0Dd8NUlw0wf%2FX%2BXL49bYhnR%0Akm%2BPAWM5QjDI0hVzIMY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260374677/5f9d8febb8ae25153a94d0b827b9/c8314b27-96c1-4743-ae8b-25e511181837?expires=1784781000&signature=938d442d174e7568886e7333f2ae36cf9e119e178d7c3d7068fff7bdc1635097&req=diIhFsp5mYdYXvMW1HO4zXzl64ty4DqaKYkQn0Dd8NWe%2FE0MrpfM3bwnAeCP%0A6Ty%2Bp8WxQuxp9p1YEnI%3D%0A) **Multiple organizations under the same parent organization:** Groups are managed at the parent organization level and propagate to all child organizations. You may see members from other organizations listed in a group—this doesn't mean they have access to your organization. Custom roles assigned to a group only grant capabilities to members who are part of your specific organization. @@ -284,7 +284,7 @@ Use this path only if your organization already enabled group mappings for role 3. Save your changes. Members in those IdP groups are migrated to "Custom" roles on the next sync. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2434934020/d154818947d8d84ebf1aec8d5462/image.png?expires=1784741400&signature=5a1d4f94031c55a1e9c14a4a54615f2170bcef8173cc96ffa285ae64dde02bf5&req=diQkEsB9mYFdWfMW1HO4zQyCmEvkTURsSnpHYy0fFQvrzOI5qkSSY3ViuvGd%0A7osBtS2Q9hRLRkroaQ8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2434934020/d154818947d8d84ebf1aec8d5462/image.png?expires=1784781000&signature=f8a8c5cdf932e212c7f554002c6af608beed2258737537d678f0eb2fcb1d983c&req=diQkEsB9mYFdWfMW1HO4zQyCmEvkQURoSnpHYy0fFQuFZCYyWRkGam6wfFsW%0AosC8ZRqaRssBgafORJQ%3D%0A) Members in IdP groups mapped to "Custom" roles follow the permissions of the custom roles assigned to their groups in Claude. Members in IdP groups mapped to User follow the organization-level capability settings. If a member is in groups across both mappings, "Custom" roles take precedence. @@ -300,11 +300,11 @@ Use this path if your organization hasn’t enabled group mappings. 3. Use the bulk assignment tool in the Members table to change the selected members' role to "Custom." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260377969/ba3b7ba08518f0a50e2a84f82655/bdf1aea3-2fe7-4f3c-868b-cc35ae8b7d1d?expires=1784741400&signature=4b7b7b12f7559950e4863854a5c60ad181a3b187e8e984a413b24e42fe0ebc2f&req=diIhFsp5mohZUPMW1HO4zYFuwIUlgciIlPaXg%2F0URInBFb5JS0gUu4muFT%2BG%0AxJ7RMTXeTLCcqgZadYA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260377969/ba3b7ba08518f0a50e2a84f82655/bdf1aea3-2fe7-4f3c-868b-cc35ae8b7d1d?expires=1784781000&signature=6691724de31741d18895f8c494763b9a2991ac62378dc7f98230e6eae0ecb779&req=diIhFsp5mohZUPMW1HO4zYFuwIUljciMlPaXg%2F0URIm6JgJz%2FGiuYSFZQz3j%0A0pi4SnCsvrExWUwwgJY%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260378309/abe25b6478c721a2f965b35361b7/beff124a-0a44-4f7f-97f8-391ce6e8c55b?expires=1784741400&signature=669b49aba33fbc9c2ecfcd76179a66c221c153e5e0e2119b93e90119cc2735b3&req=diIhFsp5lYJfUPMW1HO4zRgyEFzbV%2BjSZ8KPhClFzQmFM7VRIrjkJ8a1zqQg%0ArNeYxmBa3w5SZxByNyU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260378309/abe25b6478c721a2f965b35361b7/beff124a-0a44-4f7f-97f8-391ce6e8c55b?expires=1784781000&signature=6b7e80ff57e2ae9822bd52f7dd9b242aede301ccd1c16e4e0d0bd75a85737617&req=diIhFsp5lYJfUPMW1HO4zRgyEFzbW%2BjWZ8KPhClFzQkeUyW2Q0lrvQEUzpPz%0Abh9HBtbEJmo7M1E%2FccU%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484560173/7abf3438fa3d65afa03c4a99d4d4/Screenshot+2026-06-17+at+4_34_49%E2%80%AFPM.png?expires=1784741400&signature=1cc63c7235a54d0f88784d2fb5314f8c99243a380d815bce5b0162d5845ec617&req=diQvEsx4nYBYWvMW1HO4zUXuwkp7L4JUiQnXWL6R1K8jEZeYi56DPmoLrbRw%0Ak%2BNZFWOuRQFF6KGX5lk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484560173/7abf3438fa3d65afa03c4a99d4d4/Screenshot+2026-06-17+at+4_34_49%E2%80%AFPM.png?expires=1784781000&signature=68b0ac9c3b053fe31550c938b60b28745abb49014fa94e34bbfaa6fccc5361ef&req=diQvEsx4nYBYWvMW1HO4zUXuwkp7I4JQiQnXWL6R1K8RQLfQkam6%2BFDfkejg%0As6inKiHT6xCWM5KxBiY%3D%0A) We recommend migrating a pilot group first—one team or department—and verifying their access is correct before expanding to the rest of the organization. @@ -340,9 +340,9 @@ Enabling a feature at the organization level doesn't mean everyone gets it—cus Navigate to the “Usage” page to assign a per-user monthly spend limit to any group. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386576/377ac052069ff5a35b3023f50d12/dface609-9d85-4ee1-8ed3-bfe019a2bd0a?expires=1784741400&signature=0c23465360f3a5053009ba65e667924b9fa8af5bb04f59daf30d22ed7cdab739&req=diIhFsp2m4RYX%2FMW1HO4zfvdi5OYQQeOBMkPcsY1DF4RElCGxP%2FuHj0KUPOf%0ASmjm7LAM3AGlqs1BeXw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386576/377ac052069ff5a35b3023f50d12/dface609-9d85-4ee1-8ed3-bfe019a2bd0a?expires=1784781000&signature=5a9c841021a6e6a5f7757c6e6e269b6bee03a0ba71312bbaeebcd172650ee04e&req=diIhFsp2m4RYX%2FMW1HO4zfvdi5OYTQeKBMkPcsY1DF5JqqmKy2A6hWJx1jcN%0A9V6%2FygObplzakCetGQQ%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386575/b9798bb7a2ab92024fa4d97f2ff4/7b2327e1-ab3f-41e5-8be0-77c0f35a4015?expires=1784741400&signature=b6f6331e5cb4c43af9e0861cb78de5b3e63eb84c39b7e0006929ac96572209db&req=diIhFsp2m4RYXPMW1HO4zW55wNWexFA1JuVz%2B3EZKJ6p8m%2BzEr6L7BMYcAN1%0AHAl7YdKBSXaoouS6kuE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386575/b9798bb7a2ab92024fa4d97f2ff4/7b2327e1-ab3f-41e5-8be0-77c0f35a4015?expires=1784781000&signature=c7f8e86ce856e9733e6bae68ee3bbf494c0ea2fdd8acb490d7efec2f25c39737&req=diIhFsp2m4RYXPMW1HO4zW55wNWeyFAxJuVz%2B3EZKJ7x86pHGi7PCfc9MLgl%0AliC8TobciklC%2Fy%2BWo6Q%3D%0A) Note the following precedence rules: diff --git a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md index 69419f833..be9e8106f 100644 --- a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md +++ b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md @@ -48,11 +48,11 @@ Follow these steps to get started: 5. You’ll land on a page describing the functionality. Click “Get started”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169954086/419674f781edb2977b93cce062b4/93b1893c-d79a-4eb6-b2f1-2fe3e043bd90?expires=1784741400&signature=eb702f8e76e06658b6103429d3fabf3ee941daba076b78ac4168cf6e9b918945&req=diEhH8B7mYFXX%2FMW1HO4zSZP0paMEQ%2F7B32drIe5EDnSzIXvl95%2F%2BqPlYdcr%0Aqznw%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169954086/419674f781edb2977b93cce062b4/93b1893c-d79a-4eb6-b2f1-2fe3e043bd90?expires=1784781000&signature=e550aae4f634c859ebbfef59dd911612c0fee8d60c292619728abccc0ee3afb4&req=diEhH8B7mYFXX%2FMW1HO4zSZP0paMHQ%2F%2FB32drIe5EDlVgBi%2FfZECklN6YvuL%0AcYgY%0A) 6. On the next screen, you can give Claude access to your files and keep your computer awake by toggling those on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169955082/de4053ee0eab8fcb9263584bb171/d39b77da-1a69-4682-9fdb-7ed488f236b0?expires=1784741400&signature=3190ae5710704265895de61e199db3f752d453c364320b7fca5ee43e17e81190&req=diEhH8B7mIFXW%2FMW1HO4zaZWs96fWQAaepuGRb1rD3I5U2%2F1DkGCoh%2Bgpg88%0Aarut%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169955082/de4053ee0eab8fcb9263584bb171/d39b77da-1a69-4682-9fdb-7ed488f236b0?expires=1784781000&signature=cb04fa907b71cd75cfeb20ec78a539d4006fadd1541bdeadb70221ff23f3ee94&req=diEhH8B7mIFXW%2FMW1HO4zaZWs96fVQAeepuGRb1rD3Isq3AbmnhyFtC8%2FhI3%0AxFQE%0A) 7. Click “Finish setup.” diff --git a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md index 756dba6c4..d1a88fc18 100644 --- a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md +++ b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md @@ -22,23 +22,23 @@ Cowork is available for paid plans (Pro, Max, Team, Enterprise) on: Find **Projects** in the left navigation panel and click the “+” button to see the three different ways to create a project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183720240/6f6ef438913391703598d86d606c/CleanShot+2026-03-20+at+09_11_43.png?expires=1784741400&signature=9722b169d9c16a3df44dc999e91b1481b36924985407f65a5b0c932ee703e59b&req=diEvFc58nYNbWfMW1HO4zcOgiwG91SlxZwSvwegvtgzvDSBTvKVgh1pVXkBw%0AG5hGhpB0NQBMtWzHZuI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183720240/6f6ef438913391703598d86d606c/CleanShot+2026-03-20+at+09_11_43.png?expires=1784781000&signature=7a8c8e60334bbe3801258096ae5a73e1328ed9b8cb812e13ee2051ea87edb534&req=diEvFc58nYNbWfMW1HO4zcOgiwG92Sl1ZwSvwegvtgzQ4kRnrNjw3YBLoXG0%0Ad9kCWBY1TKygR34cZ%2Fk%3D%0A) ### Start from scratch Selecting “Start from scratch” allows you to set up a new folder with instructions and files: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177090014/07832b50003cf7fd3b4e9c7c448b/3385d9b8-c3e7-42b9-ae3f-4d213baa53a7?expires=1784741400&signature=9667d18f1759785ab43438dd2ba688baa1c1a51e702c5a3f8cebd0fc6946986e&req=diEgEcl3nYFeXfMW1HO4zZCoQ4lCSnSSvb0suCMAnj0JG3LEprGQDwpfdNtw%0ALYoN4JAFVz2gke4Kgac%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177090014/07832b50003cf7fd3b4e9c7c448b/3385d9b8-c3e7-42b9-ae3f-4d213baa53a7?expires=1784781000&signature=47618e69f651b182363035d39753e9d65263a0a7dd42a1640c556ca325ceb753&req=diEgEcl3nYFeXfMW1HO4zZCoQ4lCRnSWvb0suCMAnj0F5nDyATyV5QkHdK6z%0ArKD0M%2FC2mTYAxNeiyTA%3D%0A) ### Import from a Claude project After selecting “Import from project,” you’ll see a “Search projects in Chat…” field: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183717962/acdc11bcc825ae76a13f508365bc/CleanShot+2026-03-20+at+09_12_08.png?expires=1784741400&signature=028a33dc915c6f02ce6b42418ff44ad3643ec05f998a5788d1336727cc85b1a2&req=diEvFc5%2FmohZW%2FMW1HO4zQQ7UGdazpkbjggUT7FIJz%2BQnihawmOWWWc3Nlir%0AbB7Ng%2B27VvDun5SXibw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183717962/acdc11bcc825ae76a13f508365bc/CleanShot+2026-03-20+at+09_12_08.png?expires=1784781000&signature=fef5ad34b0ca6a014cfbe6bcaab04f5624c5167c4cbe64cf5ce34562969fb400&req=diEvFc5%2FmohZW%2FMW1HO4zQQ7UGdawpkfjggUT7FIJz89v1ytpj14%2FqNhMckv%0AeaiF5ZNjS7SQqF%2BfSrc%3D%0A) Clicking into the field will display a drop-down showing your recent projects, but you can also use it to search all your projects. After you select a chat project (bulk upload is not supported), you can name the new Cowork project and choose where to save it on your computer: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183727973/7a25430123d9e13e7c3cdd411f70/CleanShot+2026-03-20+at+09_13_41.png?expires=1784741400&signature=e1be9cfa7d988e3f653b0cc5ef3ff395a97e1e3250b80e4f79750843ad51e1dd&req=diEvFc58mohYWvMW1HO4zU%2FKAidB%2BCLII7f%2FdY0VL6jKbgKz%2B58w4WL%2BUein%0Aj5piyME4RiNtXa5ftpk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183727973/7a25430123d9e13e7c3cdd411f70/CleanShot+2026-03-20+at+09_13_41.png?expires=1784781000&signature=6ca5a9cc99e226cfe431a81e137d551487976e7cbd8fc855808265d263525a93&req=diEvFc58mohYWvMW1HO4zU%2FKAidB9CLMI7f%2FdY0VL6gf2OqJBMZLTdZjfTh%2B%0A8lFmb%2FYzT6Ci%2FsTiO58%3D%0A) Clicking “Create” will transfer the files and instructions from your existing Claude project and create a new Cowork project. @@ -46,11 +46,11 @@ Clicking “Create” will transfer the files and instructions from your existin If you select “Use an existing folder,” you’ll be prompted to pick a file to use as context for the new Cowork project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087935/2f0052dae601d0b7fecdc029e1c3/2e3ca9e7-23b1-436e-bbdb-edcd31c41f15?expires=1784741400&signature=d3ef4fe5a019308c7cc323ccb2bcd4c50f53be66c11e59ef28c106b3f7a1c32d&req=diEgEcl2mohcXPMW1HO4zejrnzLRESJbuv8e2Xj2xOXVPTOAfAs5Zkytev9W%0AbvZNU7mXOMwDuhMLleg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087935/2f0052dae601d0b7fecdc029e1c3/2e3ca9e7-23b1-436e-bbdb-edcd31c41f15?expires=1784781000&signature=3184c65a25820b0855b830209d4e2f42f9b791c37562138073f94f1e0bd26e08&req=diEgEcl2mohcXPMW1HO4zejrnzLRHSJfuv8e2Xj2xOVvxiA9LQLVsAnMacPh%0AYIZtc4hggsgPltPFXLs%3D%0A) After selecting a folder, you can name the new Cowork project, choose where to save it on your computer, add instructions, and attach any additional files. Click “Create” to start using your new project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087937/f59dbe3fc28448a9597ea097cb4d/96a59acb-4054-4b4b-a208-751f9711f535?expires=1784741400&signature=5fbd5ba21087d937a91a1455c20408ac5fa0e8b66c5f8c8b704e19e7a602a90b&req=diEgEcl2mohcXvMW1HO4zUq4V%2Bezh6M%2BMfnqHouW6MKh8g%2BagNYrfq%2FT46ej%0AYcaGggRvAPMAfekzTlo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087937/f59dbe3fc28448a9597ea097cb4d/96a59acb-4054-4b4b-a208-751f9711f535?expires=1784781000&signature=07bd2338df064c02e247cd652f27e0807d64d490a32d5067c16f2372b7a47893&req=diEgEcl2mohcXvMW1HO4zUq4V%2Bezi6M6MfnqHouW6MIh3%2BybiqGKiaVkO2Pf%0A803oKrXrAD%2Fe%2FnBRTXc%3D%0A) --- diff --git a/content/support/14128542-let-claude-use-your-computer-in-cowork.md b/content/support/14128542-let-claude-use-your-computer-in-cowork.md index b37688c55..e2c8da5c4 100644 --- a/content/support/14128542-let-claude-use-your-computer-in-cowork.md +++ b/content/support/14128542-let-claude-use-your-computer-in-cowork.md @@ -40,7 +40,7 @@ If your work involves a physical machine, Claude keeps working while you step aw Claude asks for your permission before accessing each application. You’ll see a prompt and must approve before Claude can interact with that app. Some apps are off-limits by default. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193297849/243cf7bd2386d92a253c2cec7d32/46cb6fcb-c0ee-4d1c-9974-9c1c1058c81c?expires=1784741400&signature=6eaeac7e2f6f857053fe32927c91f51b416224ed383f194d437dd1c7d1f3911d&req=diEuFct3molbUPMW1HO4za8%2BRniFRyGYOFMEfKzd96pp4r5m3h44GiDkZfDR%0AtvnOAQ49KbeGcCbdFrU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193297849/243cf7bd2386d92a253c2cec7d32/46cb6fcb-c0ee-4d1c-9974-9c1c1058c81c?expires=1784781000&signature=9b291b5b17a4c2cce17595118c4fb6985a4592329818ac3d7f8413a62102a2b1&req=diEuFct3molbUPMW1HO4za8%2BRniFSyGcOFMEfKzd96p9WPyHz3VcK3kEivOW%0AIgE0tE6gLTNrbo5k1pU%3D%0A) Claude is trained to avoid risky operations—like transferring funds, modifying or deleting files, or handling sensitive data—and to flag signs of prompt injection. However, these safeguards aren't perfect, and Claude may occasionally act outside these boundaries. @@ -128,7 +128,7 @@ To start using computer use: 3. Find the **Computer use** toggle and turn it on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193911341/630e6df3b08b27d1c7b4f1ca6a1f/image.png?expires=1784741400&signature=4c3f4b1a6dae8c4c0dd457ca33f0811eccfe1e237877329bbc0212e1d111bce0&req=diEuFcB%2FnIJbWPMW1HO4zR8GoUB7QUs0jdPXX%2BaSOrH4h3EARr76rT1RCP0b%0AAkCE%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193911341/630e6df3b08b27d1c7b4f1ca6a1f/image.png?expires=1784781000&signature=7ec8688a7ef6510e51c0eb05e4d8a474136c90f979f36e61eeba97efea0f4c12&req=diEuFcB%2FnIJbWPMW1HO4zR8GoUB7TUswjdPXX%2BaSOrF95t%2BM1l%2BpbjQ7drWw%0AsFIo%0A) 4. Open Cowork or Claude Code in the desktop app and start a session. diff --git a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md index 2a7f0fe96..c6f8c183e 100644 --- a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md +++ b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md @@ -50,7 +50,7 @@ You can trigger a manual sync from two places in your admin settings. 2. Click "Check for updates" under **SCIM sync**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312613548/44cd5970ee3c3b2c7f8dcd592d71/image+%2824%29.png?expires=1784741400&signature=b024388ea9f43505dfb6eddf5d9f8f18723b5594f2f11b7908244f0260e92ff6&req=diMmFM9%2FnoRbUfMW1HO4zW4gbDGqMcywrgfl7PnOiun20%2FFeKN8J2MHXMqDr%0ATmlj%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312613548/44cd5970ee3c3b2c7f8dcd592d71/image+%2824%29.png?expires=1784781000&signature=745263fb42aee0f01b931499be43617f3c595be02026b6efc6aa78190db71723&req=diMmFM9%2FnoRbUfMW1HO4zW4gbDGqPcy0rgfl7PnOiunzFAqtFlGhES897jrZ%0Avz0E%0A) 3. Select whether to sync members, groups, or both. @@ -62,7 +62,7 @@ You can trigger a manual sync from two places in your admin settings. 3. Select whether to sync members, groups, or both: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312608119/e4b0ef4f309f3c4eac8311a6ef47/image.png?expires=1784741400&signature=7b0fa076a251e453919942511ef43f3e737cf85d47613d4d8644980fa94cffe3&req=diMmFM9%2BlYBeUPMW1HO4zX%2F4fr73zzob43OpyTHzM9Tj6kjcjpKiHG0xWeSu%0AESdP%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312608119/e4b0ef4f309f3c4eac8311a6ef47/image.png?expires=1784781000&signature=c1e0d167d141cc6950b34e84994402960c1001760b8be63bdb637ddaca8b6f6f&req=diMmFM9%2BlYBeUPMW1HO4zX%2F4fr73wzof43OpyTHzM9R%2BhvarfS9wscU0gOEr%0AyPlF%0A) **Note:** If you trigger a manual sync while background changes are processing, your organization takes the most recent change for each member or group. If multiple changes are queued for the same member or group, you may need to resync again to make sure everything applies correctly. diff --git a/content/support/14503613-sso-login.md b/content/support/14503613-sso-login.md index 8732ce374..d7b231407 100644 --- a/content/support/14503613-sso-login.md +++ b/content/support/14503613-sso-login.md @@ -47,9 +47,9 @@ Before configuring your Identity Provider (IdP), you must verify ownership of yo 3. Wait for the DNS propagation. Once the platform detects the record, the domain status will update to “**Verified**.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256015862/476131c3139aec4db01b96127544/10c7a165-8b26-4443-b064-9d659659c65e?expires=1784741400&signature=e367dddf4f7de3f0e56106db3871568fe11e25e45f0402bd218ff6edbda916ba&req=diIiEMl%2FmIlZW%2FMW1HO4zdpfuC6PHlKL006zz1SmF9VcrTmcnfuojsDARurU%0A5JXR2DCIv8Fp5l6hoyY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256015862/476131c3139aec4db01b96127544/10c7a165-8b26-4443-b064-9d659659c65e?expires=1784781000&signature=4793b8ecf7df1119f521c0973ed3bb4840652f295084e6374db9656c6016f3a0&req=diIiEMl%2FmIlZW%2FMW1HO4zdpfuC6PElKP006zz1SmF9UWNMQNPN1ZQc3aaOsZ%0AMr7AkGFUtRyFb3Hu%2FB4%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256025910/a82e2de9382824fa9db7666f67c4/CleanShot%2B2026-04-09%2Bat%2B16_25_20-402x.png?expires=1784741400&signature=48703d595502f7c6cb1c299b34b63456e869368d3e748346a28423d1f0984701&req=diIiEMl8mIheWfMW1HO4zV%2BGnR04R75Dx57dwYq5DdL%2Bm6bCwOqTqybilL56%0A17D51mbK2%2ByeedYlVpU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256025910/a82e2de9382824fa9db7666f67c4/CleanShot%2B2026-04-09%2Bat%2B16_25_20-402x.png?expires=1784781000&signature=2c515e11ba9ec7fd9411b91b7ac543390567d4348a1c62aa30eb7ac227d5d560&req=diIiEMl8mIheWfMW1HO4zV%2BGnR04S75Hx57dwYq5DdI3FC6w5352arzPMuRA%0A3AJCThxShtErrafBLGU%3D%0A) **Important:** Each domain can only have one identity provider. If multiple organizations share a single login domain, IT administrators from both organizations will be able to modify login settings. Contact **[Anthropic Support](https://claude.fedstart.com/support)** for assistance with multi-organization setups. For more details about multi-organization setups, see our **[SCIM provisioning guide](https://support.claude.com/en/articles/14503643-set-up-scim-in-claude-for-government)**. @@ -77,7 +77,7 @@ Once your SAML application is set up in your IdP, provide Anthropic with the det - Claims Information — Attribute mappings for user name and email. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256004522/a97b91092b393e93b2d7779f63e6/2db86a6d-1582-419e-925e-cbc914468fa1?expires=1784741400&signature=2e9f818a7d53d0b2cf308844f29e409406f0849ef405aaf2a6a608b6079fac68&req=diIiEMl%2BmYRdW%2FMW1HO4zQE9JrOx%2FhX%2FbfNHh%2Fvd8OGCPXnYcB5RQGFrXIqo%0A7ZgKh%2FxtWDEmdfvX8QU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256004522/a97b91092b393e93b2d7779f63e6/2db86a6d-1582-419e-925e-cbc914468fa1?expires=1784781000&signature=80697917cecb4d0438c48a87e9de65323f1b14a85a181846cf421088cf17b608&req=diIiEMl%2BmYRdW%2FMW1HO4zQE9JrOx8hX7bfNHh%2Fvd8OFYt6VZQBqeyxzoCFsA%0AtkhXQHFN4i3etWwNG4c%3D%0A) **Tip:** Using a metadata XML file: Most IdPs let you download a metadata.xml file. Upload it on the identity settings page to auto-fill the Signing Certificate, IdP Entity ID, and SSO URL. Some IdPs (like Entra ID) also include claims information in the metadata file; if present, the system will suggest field mappings automatically. diff --git a/content/support/14503643-set-up-scim-in-claude-for-government.md b/content/support/14503643-set-up-scim-in-claude-for-government.md index 3a7986c1b..30098f790 100644 --- a/content/support/14503643-set-up-scim-in-claude-for-government.md +++ b/content/support/14503643-set-up-scim-in-claude-for-government.md @@ -41,7 +41,7 @@ With SCIM, login and provisioning are separate. Your IdP tells Anthropic who sho **Important**: Store this key securely. It cannot be retrieved after you leave the page. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040196/c3b045028c4c2edef9172b6fb424/9a71258e-ae73-41e3-83a2-d24a240ac0ae?expires=1784741400&signature=b454d8eb092f868a80d9913f71b711efbbeb4d902a5dbd080a877ef2afcae5e8&req=diIiEMl6nYBWX%2FMW1HO4zSrRlagYbTcQyIvvU1hav7Nb3zHPbB4w3p4CYCjY%0ABx6GVq%2BqGglcRV0vcDs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040196/c3b045028c4c2edef9172b6fb424/9a71258e-ae73-41e3-83a2-d24a240ac0ae?expires=1784781000&signature=eaf482c27969b758280a92f29eba025445adfd46b4f07cfe84fcc9fd0b2a2324&req=diIiEMl6nYBWX%2FMW1HO4zSrRlagYYTcUyIvvU1hav7PtHe%2FDKJy4xZMBwgrU%0ASst6g1EgZ0IIMn0tWEM%3D%0A) ### Step 2: Configure SCIM in your Identity Provider @@ -67,7 +67,7 @@ After enabling the integration in your IdP: **Warning**: When you fully enable SCIM provisioning, any users who were **not** synced via SCIM will be removed from the organization. Confirm that all expected users appear in the sync before proceeding. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040198/da9188b8b968d5f900cc08e9ceb2/3814ab37-c3fa-4256-8d16-49c1e1b4c654?expires=1784741400&signature=732361ba1d20f09dd15f797c7513236018da13a341a6c670319f51884022c97a&req=diIiEMl6nYBWUfMW1HO4zeLvMlxoTk3%2BoWupW8zJgMqiJj%2FOZF5Z%2BH3g7MrX%0AicVog%2B%2BzXdg0N2Ms%2FoA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040198/da9188b8b968d5f900cc08e9ceb2/3814ab37-c3fa-4256-8d16-49c1e1b4c654?expires=1784781000&signature=e9769988885575c45fd7035803d50067b385a6f1c92681bf5a8f0430980571d5&req=diIiEMl6nYBWUfMW1HO4zeLvMlxoQk36oWupW8zJgMo%2ByHEuSH54BX1WeKqr%0AYZIYEcRy5Ksu3RQQKh4%3D%0A) ### Step 4: Map groups to roles and seat tiers @@ -83,7 +83,7 @@ SCIM provisioning uses IdP groups to assign roles and seat tiers within Claude f 3. Save your mappings. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256056441/f7eb09bba549e9861fc81b961cc7/2760fa5b-87bb-491f-9354-ca3cd2bc4475?expires=1784741400&signature=1b2f2febc586f0248c6c3a30f01a70984af68db8f6c40d565d5acd06481a3def&req=diIiEMl7m4VbWPMW1HO4zaWhsXcltkYfh340B79BYGYDOE9AreOAXRRrDdu4%0AFaJunvN3vbERYZ59DIw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256056441/f7eb09bba549e9861fc81b961cc7/2760fa5b-87bb-491f-9354-ca3cd2bc4475?expires=1784781000&signature=919f42ece50ffa5e7f95cb1a9e56e617499d53bfd8b336003261635865ffd6c3&req=diIiEMl7m4VbWPMW1HO4zaWhsXclukYbh340B79BYGaoDib8EYBt%2BLZUU0VS%0APD4vqdL9%2Bz%2BJxesLcOk%3D%0A) If you manage multiple organizations under a single parent (see below), each organization maintains its own role and seat tier mappings. Switch between organizations using the organization selector in the bottom-left corner of the page. diff --git a/content/support/14503775-mcp-web-search.md b/content/support/14503775-mcp-web-search.md index dbfc177e8..ab8442249 100644 --- a/content/support/14503775-mcp-web-search.md +++ b/content/support/14503775-mcp-web-search.md @@ -4,7 +4,7 @@ The Web Search connector gives Claude the ability to search the public internet For questions about web search in commercial Claude, see **[Enabling and using web search](https://support.claude.com/en/articles/10684626-enabling-and-using-web-search)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256120763/7652c6c669446113eae75f3c5977/9c74d57e-aaa2-4f1c-bfe4-2b9b87fd41ab?expires=1784741400&signature=96a0ab46b9794861c67957b0e8b32998ef19d5774e5be4271c3d9e4f78403997&req=diIiEMh8nYZZWvMW1HO4zQvFLLZUicX8M%2Fw5SJgC29FGX9XfrpN3wNVAJNOt%0Aomqh1A7H1TenVydNXs8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256120763/7652c6c669446113eae75f3c5977/9c74d57e-aaa2-4f1c-bfe4-2b9b87fd41ab?expires=1784781000&signature=81f73bd650441c2b889e48058cc878b6a1d1f564466e20e65af558e6d82b7a61&req=diIiEMh8nYZZWvMW1HO4zQvFLLZUhcX4M%2Fw5SJgC29EnGvqu9PIRg03SM8pP%0AET8q4%2By%2BFJwzCO83RNI%3D%0A) ## How Web Search differs for Claude for Government diff --git a/content/support/14604397-set-up-your-design-system-in-claude-design.md b/content/support/14604397-set-up-your-design-system-in-claude-design.md index 7ad010275..932314f6f 100644 --- a/content/support/14604397-set-up-your-design-system-in-claude-design.md +++ b/content/support/14604397-set-up-your-design-system-in-claude-design.md @@ -72,7 +72,7 @@ To validate your design system, create a test project and see if the output matc Once you’re satisfied with the design system quality, make sure the “Published” toggle is switched on. After publishing, any projects created from the Claude Design homescreen while in your organization will use your design system instead of the default. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287527007/b1c46cb8dba4cd7e8bbea85fb0c3/2819c6cf-9ce1-4df5-84c8-feae0164bf2e?expires=1784741400&signature=be737edb0a09a7eefb802b88520fbdd04513a161713e776909e527a41879212c&req=diIvEcx8moFfXvMW1HO4zWNHF%2FaMCjoTIQKNMXlu0T%2B41zQaye9L0XB0My9y%0AaSOQWnzicii6PqaPUvw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287527007/b1c46cb8dba4cd7e8bbea85fb0c3/2819c6cf-9ce1-4df5-84c8-feae0164bf2e?expires=1784781000&signature=0c05513141875d3baf6ec86751c780571427c81f9725004c606db3e4ab5425f4&req=diIvEcx8moFfXvMW1HO4zWNHF%2FaMBjoXIQKNMXlu0T8JOtxINIsrpfAWLQcz%0ACCb%2BWKgp7KIS%2F4CzuAw%3D%0A) --- diff --git a/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md b/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md index 17ee5007d..1efa94eb3 100644 --- a/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md +++ b/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md @@ -18,7 +18,7 @@ Team and Enterprise plan admins can enable this organization-wide by following t 2. Find the **Claude Design** toggle under **Anthropic Labs** and switch it on. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2289240025/8a528b6cccc3ea1001c25953cb14/image.png?expires=1784741400&signature=4262eb4c8d92d4c4dafc53846cf28df08f704b01e83cacbfea3e10b5484c52dd&req=diIvH8t6nYFdXPMW1HO4zahp3eYPHechDIPtKBLQ9H8hOYbR1ziOV5kcHH%2Fx%0AYqHKC211bb4x3HZRGnA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2289240025/8a528b6cccc3ea1001c25953cb14/image.png?expires=1784781000&signature=492679f30f958016a794589c4be7aa1403ff94cde591b6888581ff7bafbe77e1&req=diIvH8t6nYFdXPMW1HO4zahp3eYPEeclDIPtKBLQ9H%2FnHCLT2IoRJU7B4eny%0AT8NNf47%2Fy0O7v1xUIF0%3D%0A) --- diff --git a/content/support/14604416-get-started-with-claude-design.md b/content/support/14604416-get-started-with-claude-design.md index 78429574f..5020aaacf 100644 --- a/content/support/14604416-get-started-with-claude-design.md +++ b/content/support/14604416-get-started-with-claude-design.md @@ -153,7 +153,7 @@ Use the “Export” button in the upper right corner when viewing your project - Send to Claude Code Web -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287510952/553a03eec5cea7b9eff53b473552/6dc33363-38b1-444e-96bb-f8218b588173?expires=1784741400&signature=44331b0ce9ce1436ef0ee012d17c5b77ada1d5fc835a9346c51c36818d94166e&req=diIvEcx%2FnYhaW%2FMW1HO4zQFD4Shdn2xwnfz9ljnuyXRYNdkApb5mDOPiBVnS%0AZs1cfdtteCspIZCMUaI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287510952/553a03eec5cea7b9eff53b473552/6dc33363-38b1-444e-96bb-f8218b588173?expires=1784781000&signature=2c4d093e4812da9b3fbcc7357aa4daaf6704c8f962e311633d452feba6716f05&req=diIvEcx%2FnYhaW%2FMW1HO4zQFD4Shdk2x0nfz9ljnuyXR9xlYw2R9IZn4voOgL%0A%2F%2F%2FFWXTxNl0cYaRnj1w%3D%0A) You can also share projects within your organization using a shareable link. Sharing options include view-only, comment, and edit access. diff --git a/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md b/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md index 2b41e5273..65de10374 100644 --- a/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md +++ b/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md @@ -24,14 +24,16 @@ CVP requires data retention to be enabled. If your API organization uses Zero Da How you apply depends on how you access Claude. Once you submit your application, we aim to send an email notification with our review decision within 2 business days. -| **How you access Claude** | **How to apply** | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **Anthropic first-party** (Claude.ai, Claude Code, the Anthropic API) | Navigate to the **[Verification Portal](http://portal.anthropic.com/programs/cvp)** to apply for access to the Cyber Verification Program.
**Note:** Only authorized admins will see this option. | -| **Microsoft Foundry** | Find both your Azure Tenant ID and Subscription ID in your Azure Portal (see instructions **[here](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id)**). Choose "Azure" under the **Surface** field in the **[Cyber Use Case Form](https://claude.com/form/cyber-use-case)**. | -| **Amazon Bedrock** | The Cyber Verification Program is not available on Bedrock at this time. | -| **Google Vertex AI** | The Cyber Verification Program is not available on Vertex at this time. | -| **Third-party platform** (coding tools and other apps powered by Claude) | Reach out to your platform directly to check if Anthropic CVP is available and if so request access to the Cyber Use Case Form through the platform. Not all platforms participate in the CVP at this time. | -| **Bring your own key (BYOK) Customers** | Follow instructions under **Anthropic first-party** | +| **How you access Claude** | **How to apply** | +| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Anthropic first-party** (Claude.ai, Claude Code, the Anthropic API) | Navigate to the **[Verification Portal](http://portal.anthropic.com/programs/cvp)** to apply for access to the Cyber Verification Program.
**Note:** Only authorized admins will see this option. | +| **Microsoft Foundry** | Find both your Azure Tenant ID and Subscription ID in your Azure Portal (see instructions **[here](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id)**). Choose "Azure" under the **Surface** field in the **[Cyber Use Case Form](https://claude.com/form/cyber-use-case)**. | +| **Amazon Bedrock** | The Cyber Verification Program is not available on Bedrock at this time. | +| **Claude Platform on AWS** | Navigate to the **[Verification Portal](http://portal.anthropic.com/link?account_source=aws&program=cvp)** to apply for access to the Cyber Verification Program. You will need to create or log into an Anthropic account, then link your AWS account. +​
**Note:** Only authorized admins will be able to apply. | +| **Google Vertex AI** | The Cyber Verification Program is not available on Vertex at this time. | +| **Third-party platform** (coding tools and other apps powered by Claude) | Reach out to your platform directly to check if Anthropic CVP is available and if so request access to the Cyber Use Case Form through the platform. Not all platforms participate in the CVP at this time. | +| **Bring your own key (BYOK) Customers** | Follow instructions under **Anthropic first-party** | [Verification Portal](http://portal.anthropic.com/programs/cvp) diff --git a/content/support/15330088-set-a-default-model-for-your-organization.md b/content/support/15330088-set-a-default-model-for-your-organization.md index b623e547b..c27fec6bc 100644 --- a/content/support/15330088-set-a-default-model-for-your-organization.md +++ b/content/support/15330088-set-a-default-model-for-your-organization.md @@ -46,7 +46,7 @@ The organization default applies to every member. To set it: 4. Click “Save changes.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514722139/d05c94072a41ea9090ecf386c53e/c32ee31d-954a-4551-a2da-91677fbd0b6f?expires=1784741400&signature=c1a11343ae1a9cc4bf77a61d83f066fddf6ba208f0a7349c28d6124d543838d8&req=diUmEs58n4BcUPMW1HO4zelOdzZHKUlDfdGVZ664dGEdpCjVWjJ2q85f%2B88G%0AVRiIIJFAvbxxXcwpW3k%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514722139/d05c94072a41ea9090ecf386c53e/c32ee31d-954a-4551-a2da-91677fbd0b6f?expires=1784781000&signature=9b61893b8a3c636805068522d23f7120ccc9c297f1c387f6ca817702a2840631&req=diUmEs58n4BcUPMW1HO4zelOdzZHJUlHfdGVZ664dGG%2BVWfHMTROe2fhU6v8%0A%2FXp4Z%2ByXFTCJh49jINc%3D%0A) --- diff --git a/content/support/15694740-manage-model-access-for-your-organization.md b/content/support/15694740-manage-model-access-for-your-organization.md index 4714c7063..412997982 100644 --- a/content/support/15694740-manage-model-access-for-your-organization.md +++ b/content/support/15694740-manage-model-access-for-your-organization.md @@ -42,9 +42,9 @@ The organization setting is the ceiling, so a role can’t grant access to a mod If any custom role uses the model you’re disabling as its default, you’ll be prompted to change that role’s default before the change can be saved. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693921/02ea72756f5163f14e5d158516dc/69102088-cd86-498e-97aa-c8a6e0004419?expires=1784741400&signature=a370ed65f2b57d50b6423d5ae05fdd2330a71c60b81fa812d9ca7f2456c81e54&req=diUmEs93nohdWPMW1HO4zXlxEuO%2BU9BTQf5Pb7M2Q0vP2lGeqcLGO06Xgjtd%0AEu%2BZTIZXf4MF46dAq44%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693921/02ea72756f5163f14e5d158516dc/69102088-cd86-498e-97aa-c8a6e0004419?expires=1784781000&signature=57631dca72304b09b6e755fb3600ae5662987b0791a48b695e02b85cbfd5c1d4&req=diUmEs93nohdWPMW1HO4zXlxEuO%2BX9BXQf5Pb7M2Q0seaNs5W0HW36BCGkKY%0AJ6q1OY96%2B%2BgXpOvwrd0%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693922/bfc5de6626eb19dca1d7caf818ca/c3cd8bb6-f86c-4d01-92da-6ae4ca966662?expires=1784741400&signature=beaaa8efaf9dac385a8059e97423994b8bf5118465eaf57612afd88cd83cd3be&req=diUmEs93nohdW%2FMW1HO4zTqNsY3CQllTAod9uc510lwW36W76sVc5M48VzoD%0ADoWVoJvI9dUAAjnaDC8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693922/bfc5de6626eb19dca1d7caf818ca/c3cd8bb6-f86c-4d01-92da-6ae4ca966662?expires=1784781000&signature=2a6c79f9088aabf3ec3daa469bee2a0418c26c45314f9e7600d7566263c01c5d&req=diUmEs93nohdW%2FMW1HO4zTqNsY3CTllXAod9uc510lxfT6q%2FVGuhiEnNS4Gd%0ADpOAVfaYhlp5TdW1jYU%3D%0A) --- @@ -62,7 +62,7 @@ If any custom role uses the model you’re disabling as its default, you’ll be Only models the role grants access to can be selected as that role’s default model. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693923/880665a87dbd4776cf19d6063a37/29d30c6d-f9fc-408c-8c72-4320c6d88d14?expires=1784741400&signature=1061719fa7a53831ba47385436f202d59df5b827eb2ecdf7d9f04193040e66ed&req=diUmEs93nohdWvMW1HO4zYj9SfEE6YC5XsqpNqvyFRLjA9S4R3k%2BxuVgq0%2Fc%0AhMB6Txkf4%2BnBVgV5%2BZo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693923/880665a87dbd4776cf19d6063a37/29d30c6d-f9fc-408c-8c72-4320c6d88d14?expires=1784781000&signature=a8cf8d15340b3e1817b271987ead6d96b354d279acf2a6dda54c017ebe9d0499&req=diUmEs93nohdWvMW1HO4zYj9SfEE5YC9XsqpNqvyFRImDK1XMDeJfHmocldt%0AqBvkdzXIKF4XTcab4AI%3D%0A) --- @@ -80,7 +80,7 @@ Effort limits determine how much computation members on a role can apply per res 5. Click "Save" to save your changes. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693927/7a25673b3b075d72adb3cdc371e3/d2d7cd8d-a713-4e91-a706-f589ac46a9fe?expires=1784741400&signature=a0bd191e1a210b33c1133eeb511ed1a6a672690c94a86039d214be9511aeb916&req=diUmEs93nohdXvMW1HO4ze1xBje7d7gdDeA1RkowXUHcm37B63c7dF0%2F4iT3%0AkUJkN0qETHhuyJRUoIY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693927/7a25673b3b075d72adb3cdc371e3/d2d7cd8d-a713-4e91-a706-f589ac46a9fe?expires=1784781000&signature=6ac570c299382fbe46863c2f57500773f2344e0ff303514b9768afa8ebbdb8ad&req=diUmEs93nohdXvMW1HO4ze1xBje7e7gZDeA1RkowXUG6ubTAzLCaqWX3Zm1z%0AIwQRhhCuyT8MMI0YK%2FA%3D%0A) Members on the role see only effort levels at or below the cap in their model menu. Note that available effort levels differ depending on the model, and some models don’t support effort level settings at all. For an explanation of each level, see **[Change the model, effort, and thinking settings](https://support.claude.com/en/articles/8664678)**. diff --git a/content/support/15936181-get-started-with-1password-for-claude.md b/content/support/15936181-get-started-with-1password-for-claude.md index 2b31ecfc1..68358b3d0 100644 --- a/content/support/15936181-get-started-with-1password-for-claude.md +++ b/content/support/15936181-get-started-with-1password-for-claude.md @@ -52,7 +52,7 @@ Once the requirements are in place, you can set up 1Password from a few places i 4. Toggle on **Password managers**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2546126596/ba71ca47e2df21cec62c243831f8/5b1c67e1-607d-4c73-8f61-d1ceb081082a?expires=1784741400&signature=ac056aac9b19206181a5a3384fb7c3222ef1fa8ef95800b4c11520ca4521fbc7&req=diUjEMh8m4RWX%2FMW1HO4zU5lnm9pqcRnGkiu4hEpcPW9VfPAi7GR%2BwHDiIU5%0AZLeaqsp7SIzkYfmiURc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2546126596/ba71ca47e2df21cec62c243831f8/5b1c67e1-607d-4c73-8f61-d1ceb081082a?expires=1784781000&signature=1ccee7dac43ccdac35770c4888c3a8f5cfc6d595878fc1a91e83e76f5d16f99a&req=diUjEMh8m4RWX%2FMW1HO4zU5lnm9ppcRjGkiu4hEpcPUir4l3lCUBZE3vbuux%0AkHJGPX4tpPp6ThSAg1o%3D%0A) Once enabled, eligible users will see the discovery options above. Users still need to install and set up the required apps and extensions themselves. diff --git a/content/support/8114491-get-started-with-claude.md b/content/support/8114491-get-started-with-claude.md index e202d1ba8..005afa9d2 100644 --- a/content/support/8114491-get-started-with-claude.md +++ b/content/support/8114491-get-started-with-claude.md @@ -36,7 +36,7 @@ You use **prompts** to communicate with Claude. The best approach is to speak to Type your prompt into the chat interface and click the submit button to start a conversation with Claude. You can click the "+" button in the lower left or type "/" to view additional options and commands: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1916208578/2cf2ea52f1f884084b57983a8805/image.png?expires=1784741400&signature=badc2770b1913e1a4b5c0cb3437422828ef9f1b4b99f2f63ae57b1c82c735bd4&req=dSkmEMt%2BlYRYUfMW1HO4zV2J7SvNsIaF9crMELaMZPzOh8jTefNTyHM3QvT7%0AcVEjx9oQjlzlQhuSufM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1916208578/2cf2ea52f1f884084b57983a8805/image.png?expires=1784781000&signature=509652a8fad513f00178b3004369b134b5895ddaf6152d73b695c953c011e753&req=dSkmEMt%2BlYRYUfMW1HO4zV2J7SvNvIaB9crMELaMZPyBa2OydAIIViiqDmUL%0Ag1idQM3XqOFUpToEEc8%3D%0A) --- diff --git a/content/support/8230524-how-can-i-delete-or-rename-a-conversation.md b/content/support/8230524-how-can-i-delete-or-rename-a-conversation.md index 8e0c72662..d3b691b4b 100644 --- a/content/support/8230524-how-can-i-delete-or-rename-a-conversation.md +++ b/content/support/8230524-how-can-i-delete-or-rename-a-conversation.md @@ -12,7 +12,7 @@ To delete or rename an individual conversation: 3. Select either "Delete" or "Rename" from the options that appear: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1621955348/4844057e0f0847b580b95bc01625/Screenshot+2025-07-15+at+11_43_18%E2%80%AFAM.png?expires=1784741400&signature=759c828bbd107830dc80cef076efedc84e4d82ec5d803e606be143f3e32270d1&req=dSYlF8B7mIJbUfMW1HO4zVBo5OfwaYFet5RK2C3E1TcrM864eBTuHu2Q8jKy%0A4LxNIC7eOkUerc4PH5c%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1621955348/4844057e0f0847b580b95bc01625/Screenshot+2025-07-15+at+11_43_18%E2%80%AFAM.png?expires=1784781000&signature=46c15a0a2bc1c6614b420c94dbbb376ae24ebf47bac4e1c9caa71585288c3f6c&req=dSYlF8B7mIJbUfMW1HO4zVBo5OfwZYFat5RK2C3E1Tf6Xdj%2Fe9DBhKUMurPf%0AEagWxYvdcC9i1LSI%2F34%3D%0A) ## Deleting conversations in bulk diff --git a/content/support/8287232-verify-your-phone-number.md b/content/support/8287232-verify-your-phone-number.md index 7bdaa7290..47e35f198 100644 --- a/content/support/8287232-verify-your-phone-number.md +++ b/content/support/8287232-verify-your-phone-number.md @@ -2,7 +2,7 @@ When you first create a Claude account, you’ll be asked to enter your phone number from a **[supported location](https://support.claude.com/en/articles/8461763-where-can-i-access-claude)** to receive a verification code via text message: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893173143/de034a2e7d9a6ae1f703cf867afd/image.png?expires=1784741400&signature=ed78d39136eb4d0c5e553aa3f0c88daf27d5bcd45aa721a6e4948eb4c5d9ea6b&req=dSguFch5noBbWvMW1HO4zVIf8JRk2Ct%2BoTnI%2BoMZk7dpjGHEvOJUrDAQjR1r%0AMOQIhgXwcSsXa15wfMY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893173143/de034a2e7d9a6ae1f703cf867afd/image.png?expires=1784781000&signature=fa61b0ea6c5479a7fbaac7b80d47c95bcecb893da65c39e56a8753373a56a6d0&req=dSguFch5noBbWvMW1HO4zVIf8JRk1Ct6oTnI%2BoMZk7eKOmHCSy%2Bqp6rfFGde%0AfFCqyi9lCLZ3csFG620%3D%0A) Once you receive the text message with the code, type it into the box and click “Verify code.” This will complete the verification and account creation process and allow you to start chatting with Claude. diff --git a/content/support/8325618-paid-plan-billing-faqs.md b/content/support/8325618-paid-plan-billing-faqs.md index 14f115a8e..1a896f0d5 100644 --- a/content/support/8325618-paid-plan-billing-faqs.md +++ b/content/support/8325618-paid-plan-billing-faqs.md @@ -50,7 +50,7 @@ There's no separate option to remove a card, and updating to a new card replaces If you want to use a name other than the one tied to your payment method, check the "Use a different name on invoices" box when adding or updating your payment method in **[Settings > Billing](https://claude.ai/settings/billing)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922141785/666191101c11030b05f03a668a74/image.png?expires=1784741400&signature=42c2441f9a0442031aa570959bdbc8c5af190ca6797bd553436bff1722855b0d&req=dSklFMh6nIZXXPMW1HO4zVXW8GmsbzLIQoNvNFTb5ceAGWLwLZsHANEhJg4K%0AaKWHnY9zQ0rJVim9dhY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922141785/666191101c11030b05f03a668a74/image.png?expires=1784781000&signature=0c1b2ed8e5ac4e7b3fbad0602296fcbe909dd1a059b2b7b0c00ba90aae71eac2&req=dSklFMh6nIZXXPMW1HO4zVXW8GmsYzLMQoNvNFTb5cfogPsxjSyrSOl4tJF5%0ALI0dip4JBbTLQsS8q7A%3D%0A) ## How can I edit a paid invoice? diff --git a/content/support/8606378-how-do-i-use-the-workbench.md b/content/support/8606378-how-do-i-use-the-workbench.md index bc3de15f4..7ad7aef64 100644 --- a/content/support/8606378-how-do-i-use-the-workbench.md +++ b/content/support/8606378-how-do-i-use-the-workbench.md @@ -68,15 +68,15 @@ Code examples in our documentation include an "Open in Workbench" option, which Workbench (legacy) allows you to create and test prompts within your Claude Console account. You can enter your prompt into the "Human" dialogue box and click "Run" to test Claude's output. Click on the + icon in the upper left to create a new prompt, or click on the bulleted list icon to see prompts you've tested in the past: -![](https://downloads.intercomcdn.com/i/o/888021849/31a22a0dc4d1fc4b605cc8ee/Screenshot+2023-11-19+at+4.21.51+PM.png?expires=1784741400&signature=30ad6d2eed2f2a623cea17ffbf5064ce0d795a7f334d7d4e746b1a4a49482532&req=fCgvFst%2FlYVWFb4f3HP0gKWhcDwI00JbOkmmaOsi7IC3nFGeLprAjXmDjkGI%0Aye2EEFn1Ydx5g2fQBg%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/888021849/31a22a0dc4d1fc4b605cc8ee/Screenshot+2023-11-19+at+4.21.51+PM.png?expires=1784781000&signature=6a0aa590313489962e58ad4ddca04063b21d381d735832b0528d8605cc04b9d5&req=fCgvFst%2FlYVWFb4f3HP0gKWhcDwE00ZbOkmmaOsi7IAFd6EUPYtWYOVuteVs%0AA0tTS65BLyiDj8OZ%2BA%3D%3D%0A) Workbench (legacy) also allows you to configure several settings when prompting Claude. You can click on the slider icon to review your model settings. This allows you to select the model, temperature, and max tokens to sample: -![](https://downloads.intercomcdn.com/i/o/888023061/61e26396355f6f6cd506d7e4/Screenshot+2023-11-19+at+4.09.28+PM.png?expires=1784741400&signature=42e8ac52dfa9d45e7d4604d1ede8f8ddc6ecc631986ddcc5a64ebf3a2995f4f5&req=fCgvFst9nYdeFb4f3HP0gN55XdXUOIC3DUq7%2BRvcmSOS6Sps%2FChy2mklM9N4%0ACPJFfhKAbHQTCDnNLg%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/888023061/61e26396355f6f6cd506d7e4/Screenshot+2023-11-19+at+4.09.28+PM.png?expires=1784781000&signature=6e7af6905ede76ea8fd426368a70de6c5d911924db42b7dd8f991610bb36f6d5&req=fCgvFst9nYdeFb4f3HP0gN55XdXYOIS3DUq7%2BRvcmSNDbCGq7auM1JKRDrfD%0ARORXYWRLaK3qBPfXlg%3D%3D%0A) After crafting your prompt, click on the "Get code" button to generate a sample using our Python and Typescript SDKs: -![](https://downloads.intercomcdn.com/i/o/888023545/b12afe07f16f079daff7587d/Screenshot+2023-11-19+at+4.28.27+PM.png?expires=1784741400&signature=804f418a3af1738a14607fa703cb4fee15103df434258eed64ebe6847eda4f46&req=fCgvFst9mIVaFb4f3HP0gEZTsD%2Ba4%2BDrRWixPJbjiQeWNgsM9yqmWT8AYalz%0AyFIdupqDjaOTpJ43hw%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/888023545/b12afe07f16f079daff7587d/Screenshot+2023-11-19+at+4.28.27+PM.png?expires=1784781000&signature=c3a181d603fcd9440ee424fb85a7647e4ce21d82941fefbfca7bce648d1f552e&req=fCgvFst9mIVaFb4f3HP0gEZTsD%2BW4%2BTrRWixPJbjiQc7oXbQ3ifdcvMCqSsk%0A28CxXw83Ys7zL0vnCA%3D%3D%0A) ## How can I access my previous work and prompt history in Workbench (legacy)? @@ -88,7 +88,7 @@ You can access your previous Workbench prompts on your Console account by follow 3. Click the "List prompts" button on the upper left corner of the page, next to the "+" button to create a new prompt: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1945992985/45a8969fb6cec956bd44fb5c4ba7/CleanShot+2026-01-15+at+12_07_22%402x.png?expires=1784741400&signature=babbaa4dcbb9566eb29b113e6857746f306ce89426d93fc82c94c18c7b526de2&req=dSkjE8B3n4hXXPMW1HO4zQQ9sFUOM3K8TyGSpkcb8MXKS%2BsGZxzs79gF3P9a%0AxFc1%2FIYu%2FKYVHXbwrUk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1945992985/45a8969fb6cec956bd44fb5c4ba7/CleanShot+2026-01-15+at+12_07_22%402x.png?expires=1784781000&signature=857266215eb8b2658b56a3829bb1842ec41db6f65e6c65878d9b5a3b24389c9a&req=dSkjE8B3n4hXXPMW1HO4zQQ9sFUOP3K4TyGSpkcb8MVjFrHvGs1lBhUMZCKu%0AWEmW49czaZHn%2BluYfQs%3D%0A) 4. A list of your previously-saved prompts will appear. diff --git a/content/support/8887527-customizing-your-appearance-settings.md b/content/support/8887527-customizing-your-appearance-settings.md index 2d337b3e0..935b1e683 100644 --- a/content/support/8887527-customizing-your-appearance-settings.md +++ b/content/support/8887527-customizing-your-appearance-settings.md @@ -8,7 +8,7 @@ 3. Select from Light, Match System, and Dark under **Color mode**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260417/d478c757c7115ad58a12026d4caf/AD_4nXc__Qop4X9hknWGfGj_y_DCpLutLruhxIclJIfir0ilsgNMg7X8ksIVnqk1Oce5FKlGIOYu9CKbVsu8DqD7iIY2aC0ZfXMyFTeAdNq-Cao2mXcj_WUpNF0kM2HoYR_dEx6N_cuJow?expires=1784741400&signature=830aab8a5caa0c215a1529ae1a83b24cccc8c5972bc91e2209492f4bb4e6a061&req=dSYjHst4nYVeXvMW1HO4zc2jJ6Y6hIrgSBkgeTglJrqTlfiAiw9hd22BSlbJ%0A6NZpo27zMJv9%2FUbAYTE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260417/d478c757c7115ad58a12026d4caf/AD_4nXc__Qop4X9hknWGfGj_y_DCpLutLruhxIclJIfir0ilsgNMg7X8ksIVnqk1Oce5FKlGIOYu9CKbVsu8DqD7iIY2aC0ZfXMyFTeAdNq-Cao2mXcj_WUpNF0kM2HoYR_dEx6N_cuJow?expires=1784781000&signature=f54e4714c876f00a3f844a29265dd3d1163d45982bf28cadf205cccef444b438&req=dSYjHst4nYVeXvMW1HO4zc2jJ6Y6iIrkSBkgeTglJrrVhKtq1eiuEaGfGwBD%0AmDptIOGjkYKbKr5zCBU%3D%0A) ## How to change your font @@ -16,10 +16,10 @@ 2. Select from Default, Match System, and Dyslexic Friendly. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260416/7fc0803d44d8de40f8e6636b2eb6/AD_4nXf0UEDa1i2QmqlQtoB5BgpQ-FfZVzss_7wMVQdvkmEDSfoTxixnG0GSxC6qrOs21HdkXH-I2Yn_GHDAf8yjd6FJtoh9FadALozvIErFp9r8LychDGLPb7OpN1CN4PRcgVAYNCre?expires=1784741400&signature=07ed4485c9b03bab9e40248b8c6633d760830e33c71ed9c5a97ebf50f9fe2e3e&req=dSYjHst4nYVeX%2FMW1HO4zc8962TiWXA4QtNFlF5%2FHEcruOD4zwDWDkckvWPi%0AkCyvL6XJ4dJ8JE1DqdQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260416/7fc0803d44d8de40f8e6636b2eb6/AD_4nXf0UEDa1i2QmqlQtoB5BgpQ-FfZVzss_7wMVQdvkmEDSfoTxixnG0GSxC6qrOs21HdkXH-I2Yn_GHDAf8yjd6FJtoh9FadALozvIErFp9r8LychDGLPb7OpN1CN4PRcgVAYNCre?expires=1784781000&signature=54d7347672b54276732213544f6bf6a8d2a7969d4e1ebe138a8b724e31d4c597&req=dSYjHst4nYVeX%2FMW1HO4zc8962TiVXA8QtNFlF5%2FHEep4pYowzoY%2BSm8qyaF%0AOKZSJ4ZVvD6XFksJPx0%3D%0A) ## Can I disable the sidebar? It's not currently possible to completely disable the sidebar. You can click the button on the top right of the sidebar to open or close it. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1941108004/5217903737ddd9bb62fe5d7a904c/CleanShot+2026-01-14+at+09_12_58.png?expires=1784741400&signature=9795909e18e6b5d68ba2f135bf4229f518f7d6a3ec5f6dfad49d001c1bc0a39c&req=dSkjF8h%2BlYFfXfMW1HO4zUS%2BB1vxXXrrylfYa7uDb9klTvpyQhoA8QWf4XLk%0ADTRELGxGus4C3QCKi58%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1941108004/5217903737ddd9bb62fe5d7a904c/CleanShot+2026-01-14+at+09_12_58.png?expires=1784781000&signature=d050861b5a951bc7940ce882ac7839e49a6dda45df4e59f34e3c5ebb61070d68&req=dSkjF8h%2BlYFfXfMW1HO4zUS%2BB1vxUXrvylfYa7uDb9nD1Hpc3FXydO%2FIevwG%0A0ykqQn6M2nHuxgplGIo%3D%0A) \ No newline at end of file diff --git a/content/support/9028421-how-can-i-delete-my-claude-account.md b/content/support/9028421-how-can-i-delete-my-claude-account.md index d48b0cc97..776725143 100644 --- a/content/support/9028421-how-can-i-delete-my-claude-account.md +++ b/content/support/9028421-how-can-i-delete-my-claude-account.md @@ -2,7 +2,7 @@ Once you are logged in, click your initials or name in the lower left corner and select "Settings." Navigate to **[Settings > Account](https://claude.ai/settings/account)** and click the "Delete account" button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2274267534/e7064e2657b1bd20031ba40da11c/CleanShot+2026-04-14+at+09_48_08.png?expires=1784741400&signature=e47e0599bd98f18905ad3f03e7afbdf2d35a9c101cfeb8eae5298212738c314d&req=diIgEst4moRcXfMW1HO4zeqzlXgJIoD4oVDupr7i4THaigdGRgprhq9DhISa%0AWfqZIFh7WK1ciAjQ9vc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2274267534/e7064e2657b1bd20031ba40da11c/CleanShot+2026-04-14+at+09_48_08.png?expires=1784781000&signature=8942ab18d9a507680a8c0928e056eab5b7452456c4d99c368e6dc5e1949cf37c&req=diIgEst4moRcXfMW1HO4zeqzlXgJLoD8oVDupr7i4TFWAstakYQ8GQ%2BfjhVg%0AtH2%2F0%2BFMpMNJCVUfjHw%3D%0A) ## Considerations for paid Claude accounts @@ -20,4 +20,4 @@ If you have multiple accounts associated with the same email address, you'll nee There are some scenarios where you will need to **[contact our team](https://support.claude.com/en/articles/9015913-how-to-get-support)** to delete your account. If this is the case, it will be noted in your account: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584796811/331afc5dc61eec6f72786155b782/Screenshot+2025-06-23+at+1_54_23%E2%80%AFPM.png?expires=1784741400&signature=cc65236e285c963ac142a68e8c943e5e32bbf83db2ba1da159994d88447398d1&req=dSUvEs53m4leWPMW1HO4zXW0qxEMH4tfVOsMorzl%2B%2FRla%2BXg9SCv3P0b4OV2%0A1x1phLIKP9%2FipTFlQeA%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584796811/331afc5dc61eec6f72786155b782/Screenshot+2025-06-23+at+1_54_23%E2%80%AFPM.png?expires=1784781000&signature=00526c29aaf9f145b7a72df575ff60015e1bd8e8d608cb9ce328c8aecc5a7fae&req=dSUvEs53m4leWPMW1HO4zXW0qxEME4tbVOsMorzl%2B%2FTlWUdhvIMxCYa4LuN8%0Al75%2F3C4Vr7kRjIFqx0w%3D%0A) \ No newline at end of file diff --git a/content/support/9519177-how-can-i-create-and-manage-projects.md b/content/support/9519177-how-can-i-create-and-manage-projects.md index 8975677e7..44dd5f0b6 100644 --- a/content/support/9519177-how-can-i-create-and-manage-projects.md +++ b/content/support/9519177-how-can-i-create-and-manage-projects.md @@ -90,7 +90,7 @@ Starring a project allows for quick access from your projects and chats list, vi 3. Select "Star" from the menu that appears. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584571648/2a3c5e2ea9f13a61365e02cb3d54/Screenshot+2025-06-23+at+11_19_50%E2%80%AFAM.png?expires=1784741400&signature=7acf960ca52839319431a2c506ed0596f61f3884f0a692b1f63179e20adf3001&req=dSUvEsx5nIdbUfMW1HO4zYgMo0CM41pf9NE33p2Jnb9TqrntoVpvVgnWcncR%0AanXtuI9MCW2WdBOaLag%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584571648/2a3c5e2ea9f13a61365e02cb3d54/Screenshot+2025-06-23+at+11_19_50%E2%80%AFAM.png?expires=1784781000&signature=9c1213e07b1c1e3e594232ab4c460c5082485f342d65541cc8b5363b0617c7a9&req=dSUvEsx5nIdbUfMW1HO4zYgMo0CM71pb9NE33p2Jnb8yyN2r6tS89rCS1b7f%0ABbFLfwvzyqVAL%2BQyrmk%3D%0A) ### From the project @@ -100,7 +100,7 @@ Starring a project allows for quick access from your projects and chats list, vi 3. The project will now appear in your starred items in the left side panel of your account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584571995/a5c91a7ee55606f5006e9c023696/Screenshot+2025-06-23+at+11_20_28%E2%80%AFAM.png?expires=1784741400&signature=efcdfc5563329c14e9e3d2785ad9ed6a0554e42dc8e2f97a32aac6b2146a7ef9&req=dSUvEsx5nIhWXPMW1HO4zZOc0Idpz3DjOGS2ma2coPzi8C6vrq9m5%2Ba0lDuD%0AjRYj0pyIUupD1t7%2BdAw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584571995/a5c91a7ee55606f5006e9c023696/Screenshot+2025-06-23+at+11_20_28%E2%80%AFAM.png?expires=1784781000&signature=75411c8e6ba522f019702ee2e65a416d50834df2ffc465087d068a6ca7724db0&req=dSUvEsx5nIhWXPMW1HO4zZOc0Idpw3DnOGS2ma2coPw0sQ9nt%2FoKJu0KoWeW%0As4L7ymXNJCDxg4XLKPU%3D%0A) --- @@ -108,19 +108,19 @@ Starring a project allows for quick access from your projects and chats list, vi You can move a standalone chat into a project by clicking on the dropdown arrow next to the chat name, then “Add to project”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190248/0f19c8de18b494a27be252fdfaff/d4e7a5c5-25f5-4623-862b-c593d2dc0b39?expires=1784741400&signature=b04c7cd310955f16eddd6c00ba107523b3c65ff0db3e1b5e85f0c94d346c00bf&req=dScvEsh3nYNbUfMW1HO4zQABaWVrTqERBSXNVFXQ%2FVEjaUrlp7dGnZNx90Kf%0ASgR9gVQGKfyMcJRZDrs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190248/0f19c8de18b494a27be252fdfaff/d4e7a5c5-25f5-4623-862b-c593d2dc0b39?expires=1784781000&signature=5401ba39cc22126f7a3ddb57b8351c88c104f1d6163def40de625bb50a8ec96b&req=dScvEsh3nYNbUfMW1HO4zQABaWVrQqEVBSXNVFXQ%2FVHdlOVvf1D4gD8ZHggb%0AYYGMFoDdE1VdDHSo%2B3I%3D%0A) Browse or search for the correct project in the **Move chat** modal that appears, then click on it to move the chat. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190951/34dc256ccd4c0cf74976f31062e6/55365cf2-059d-41b2-ac95-4b00c4389a76?expires=1784741400&signature=589bc6e5a457ac3d92a0bf92f33edb1f3da2f90d42e4a49bc3e973e14618697b&req=dScvEsh3nYhaWPMW1HO4zSMECiS3zwgFgYbpTjViBxDf1UHU4LvZFS9Acdvy%0AbZknFDPkdK8i%2BDHh%2BPU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784190951/34dc256ccd4c0cf74976f31062e6/55365cf2-059d-41b2-ac95-4b00c4389a76?expires=1784781000&signature=730d96473854444b57b09421f3885600effcfdf5026ca5488af5ada6a120c8ba&req=dScvEsh3nYhaWPMW1HO4zSMECiS3wwgBgYbpTjViBxBL8G4HHyf5p5EV0gBD%0AO6OcmB%2B6e43PYqLXKL0%3D%0A) You can also remove chats from projects, or move them between projects, using the same dropdown menu within the chat: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784185682/8625eac15b9fa452f148a6c47250/c53a1bc4-a991-4684-a789-5447ed789d35?expires=1784741400&signature=ad2b328766680732c9cbbaf534c91541b46e9a213a78fe5b90dc9a62224cc0c5&req=dScvEsh2mIdXW%2FMW1HO4zb6DuPMrCkQOS2r1%2FGRlqOTAOVYNXARqwkXknFxA%0AUG%2FsA61cW%2FjROeHhZxI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784185682/8625eac15b9fa452f148a6c47250/c53a1bc4-a991-4684-a789-5447ed789d35?expires=1784781000&signature=e8741021f3dd2ffa9ac08bbd2ace2321584e9c7fdbf7e2194f38e83445ce4adb&req=dScvEsh2mIdXW%2FMW1HO4zb6DuPMrBkQKS2r1%2FGRlqOTRJjLsKqmoKjHVv1NL%0AK3Jdn35izC3zY%2FlYdZk%3D%0A) You can move chats into projects in bulk from **[Your chat history page](https://claude.ai/recents)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784185685/bb960063204592db277a4ba62d8d/ebbf5c69-da79-4e56-9d87-f2a97a22fe67?expires=1784741400&signature=4bda010eaedabdabfce745e44e853ae3838b730ef58cebfab030759f1a792001&req=dScvEsh2mIdXXPMW1HO4zbParUhO7funuQSB0Ebsw9ccRJ%2F%2FMJBKOwBW54bR%0ABxqG0t0HrngIlAuPF5o%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784185685/bb960063204592db277a4ba62d8d/ebbf5c69-da79-4e56-9d87-f2a97a22fe67?expires=1784781000&signature=1ba109c16fa99736b5038056c65297f6cc43fc216cc77f6b0e13755127dae32c&req=dScvEsh2mIdXXPMW1HO4zbParUhO4fujuQSB0Ebsw9eBfpSYuGQoYIIbY9yU%0AxzNeQ6%2FSDdyNKRKs2m4%3D%0A) Select the chats you want to move, then click the icon next to the number of selected chats to move them into your project. @@ -174,7 +174,7 @@ There are two ways to make archived project active again: 3. Select "Unarchive" from the menu that appears. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784203118/6490446438392ddbe9fd523f0d81/Screenshot-2B2025-07-09-2Bat-2B11_38_30-E2-80-AFAM.png?expires=1784741400&signature=110564c634dbdc87c2831ef474f1c28f79058894b35bc23365963990dd36e62f&req=dScvEst%2BnoBeUfMW1HO4zeHswThgvy1KSqvQQeeJTp%2B2d5TtGhrgPAM69mWC%0Az2Dh%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784203118/6490446438392ddbe9fd523f0d81/Screenshot-2B2025-07-09-2Bat-2B11_38_30-E2-80-AFAM.png?expires=1784781000&signature=50439b1dcc0426e535ea4d91b18d2f9b9589de763d629c57cad2e099a1924397&req=dScvEst%2BnoBeUfMW1HO4zeHswThgsy1OSqvQQeeJTp9IkTd1LdW2bFBFvUQ4%0ARtDl%0A) ### From the project @@ -184,7 +184,7 @@ There are two ways to make archived project active again: 3. Confirm that you want to unarchive the project. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584543869/87d1308b507e2f62827757ec0b61/Screenshot+2025-06-23+at+10_59_50%E2%80%AFAM.png?expires=1784741400&signature=a94b07e93b4f87b6fc38c73f8cd1141c477a36a7f9e8fb254c64335cb79c2a7c&req=dSUvEsx6nolZUPMW1HO4zVDg%2FdgMS65l%2BOxOx8zCzkaDih83%2FjaNUuyxzNBR%0AHnVCdJUY4xtmsmn95Ns%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584543869/87d1308b507e2f62827757ec0b61/Screenshot+2025-06-23+at+10_59_50%E2%80%AFAM.png?expires=1784781000&signature=0d0c65c4454d27aac55ab9c79b24b003c1f83f4c6b4c296be94494ad6bcbc91a&req=dSUvEsx6nolZUPMW1HO4zVDg%2FdgMR65h%2BOxOx8zCzkY7Qw4e4F%2F0t2y%2FbsE8%0Aq7%2Bh%2Fj44puYeDSX68wM%3D%0A) --- @@ -202,7 +202,7 @@ There are two ways to make archived project active again: 4. Confirm deletion in the pop-up by clicking "Yes, delete." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784203814/66200261afca3b2d6533a0ec8de9/Screenshot%2B2025-07-09%2Bat%2B11_34_02-E2-80-AFAM.png?expires=1784741400&signature=8251d068f520373267c3fc97f7cdadd36375402c354cc05561df0f062da6424c&req=dScvEst%2BnoleXfMW1HO4zUvE4tPINih%2BgwQJrerRpXcJx384gpnFetWyBhsf%0A0YDJWO8JF4N7of0oygg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1784203814/66200261afca3b2d6533a0ec8de9/Screenshot%2B2025-07-09%2Bat%2B11_34_02-E2-80-AFAM.png?expires=1784781000&signature=de0fb988ae00f07f8d958b74183f22ca035b96f92ea2fc35236800a4a5b15285&req=dScvEst%2BnoleXfMW1HO4zUvE4tPIOih6gwQJrerRpXdUtfdd50uQd6Axcql5%0AHfqzUgdnL3Rn1n195%2FE%3D%0A) ### From the project @@ -214,4 +214,4 @@ There are two ways to make archived project active again: 4. Confirm deletion in the pop-up by clicking "Yes, delete." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611821522/4a3423380f3cf55e2f1540387743/Screenshot+2025-07-09+at+11_34_52%E2%80%AFAM.png?expires=1784741400&signature=625bb9f52f4d8aacc390915821dc11d7ebd3d2fd2fdfa0b28e7e83e0c9eb8142&req=dSYmF8F8nIRdW%2FMW1HO4zdEk%2BZgNDwxOH0VF4IAuZvjUwwIRT0r4gdFk8Yz8%0AKx3aMTSfzu5HGxD3O6A%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611821522/4a3423380f3cf55e2f1540387743/Screenshot+2025-07-09+at+11_34_52%E2%80%AFAM.png?expires=1784781000&signature=0ccf03f868bd522337ce7c61c3bf8f02f9baf4a52e3ee6bbfe02b3d91cbd9747&req=dSYmF8F8nIRdW%2FMW1HO4zdEk%2BZgNAwxKH0VF4IAuZvhQV%2BI8wAoKBnB9WQjs%0AN%2Bka0WJ%2F78xvOm7%2Be3Q%3D%0A) \ No newline at end of file diff --git a/content/support/9519189-manage-project-visibility-and-sharing.md b/content/support/9519189-manage-project-visibility-and-sharing.md index 789b1422b..87ef62291 100644 --- a/content/support/9519189-manage-project-visibility-and-sharing.md +++ b/content/support/9519189-manage-project-visibility-and-sharing.md @@ -10,7 +10,7 @@ When creating a project on a Team or Enterprise plan, you can choose between two - **Private:** Only invited members can view and use the project. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370991/2b6b16e5deff094e073a5b4bb0ea/63197103-24c0-41e5-aebd-9b8f431837bb?expires=1784741400&signature=e7f9504ac3f7f7a31d7fed3a6f8e620036f2f008f04522d19e39c121fd8f375a&req=dScjFsp5nYhWWPMW1HO4zd3a2VgjII%2BjHK95%2FTFaPylchF7z0T%2Fmpzy2N%2BVF%0A30snqcv5GVMN8pNy2mE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370991/2b6b16e5deff094e073a5b4bb0ea/63197103-24c0-41e5-aebd-9b8f431837bb?expires=1784781000&signature=c9fa42f0015276eef2a2dc5200e8e6540ef15fce38f038e1d67b4494a8dd45a9&req=dScjFsp5nYhWWPMW1HO4zd3a2VgjLI%2BnHK95%2FTFaPyk5RzTs8ZJzPcEEJPvG%0ASJ6b%2FDbIy3Kh19te5Ec%3D%0A) ## What are public projects? @@ -20,11 +20,11 @@ If you choose to share a project with the rest of your organization upon creatio Yes, you can switch the visibility of a project you created as public to private at any time by opening the project and clicking the “Share” button to the right of the project name: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370987/5d5db997e6b42e627ffa62fddf75/4823906b-9535-4a19-b89e-a1003f1e6e68?expires=1784741400&signature=c61917ff4bfe8f0fd8acfe8b772a700b58f13bf7452bf544273ea9293e328070&req=dScjFsp5nYhXXvMW1HO4zUiDoi3whQctE8Kp5wh0MSCfI9WxHw4d8U%2BFH77j%0Af67RE3Wj9Fs6w1U%2BnGo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370987/5d5db997e6b42e627ffa62fddf75/4823906b-9535-4a19-b89e-a1003f1e6e68?expires=1784781000&signature=f48007ce6705ac43c2de0e353182a10a8c55b18f1d3a430dd6ea39da601af05e&req=dScjFsp5nYhXXvMW1HO4zUiDoi3wiQcpE8Kp5wh0MSAKuVDTEslTSAhlcE3R%0AZFY92EZ5gCz7jLBvmqY%3D%0A) Click “Everyone at [your organization]” under **General access** and select “Only people invited” to change the project from public to private: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370988/386407facbf3e73d2f5538623a18/69d8ffcd-e1ca-470f-a219-5b88704e41f2?expires=1784741400&signature=71a77feb43b0ed4d5a920fbb54421935c4d53f5d16402dea1ea1a29b5b2cdfe2&req=dScjFsp5nYhXUfMW1HO4zckCIfZlZiOgl3XeGelDRW3EgeMTlqMGUMlTMDQQ%0AHA%2BXrcuZ%2B7iIswJX4jw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370988/386407facbf3e73d2f5538623a18/69d8ffcd-e1ca-470f-a219-5b88704e41f2?expires=1784781000&signature=a8d4902f29fa3b49635e616da1c918b5253958059137289956466e21c0d3b082&req=dScjFsp5nYhXUfMW1HO4zckCIfZlaiOkl3XeGelDRW3P%2BXFqRCQDc8UDWNwN%0ApF7I9zUtgWSosnInx08%3D%0A) ## What are private projects? @@ -34,11 +34,11 @@ Choosing “Only people invited” keeps your project private so that you are th Yes, you can switch the visibility of a project you created as private to public at any time by opening the project and clicking the “Share” button to the right of the project name: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370989/f829dcd8bdd88e944322f678323f/9d25eff1-6df3-40be-82eb-ba7fe09187e8?expires=1784741400&signature=92b791f7c9347a09a2dfeb013f62afd3ff7c76686ad184c4d8aa96f7a8842197&req=dScjFsp5nYhXUPMW1HO4zaSEGlebTrkJ2JrJefVtywm9XVLZfJ3vpI9lL%2BRM%0AWt3%2BGUoD4a0gWqISy8I%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370989/f829dcd8bdd88e944322f678323f/9d25eff1-6df3-40be-82eb-ba7fe09187e8?expires=1784781000&signature=a8c10d8dd26f4d78066e26d0c2cdfc4cb30cf73ba860948aba43ab645e95710c&req=dScjFsp5nYhXUPMW1HO4zaSEGlebQrkN2JrJefVtywmLbEpTdeB8E%2BitRkbP%0A54PUhhLOBuHvdAFFc14%3D%0A) Click “Only people invited” under General access and select “Everyone at [your organization]” to change the project from private to public: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370990/d173fbc6f030780d30c6d7b8e204/7e47b9d1-89fe-4607-8b5b-f7b06e7ad0d6?expires=1784741400&signature=b849e53488eaabd2c5ca888bffffb7f1089e20872ac63aa47848021476411f29&req=dScjFsp5nYhWWfMW1HO4zT7Q08y8uQ0SAmYRPrgMBZnJIQywmNfTkE1oqaNo%0A%2BeYH%2FgZNTwh5ixATWZU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370990/d173fbc6f030780d30c6d7b8e204/7e47b9d1-89fe-4607-8b5b-f7b06e7ad0d6?expires=1784781000&signature=8bb4a3cce6c982868fd0c8ae68cecff23862012fd6de0e14a1db95a9c05ab675&req=dScjFsp5nYhWWfMW1HO4zT7Q08y8tQ0WAmYRPrgMBZl1Lsy9xoVJWUcs3Fj1%0AkEn5LyJESoF4QkiIhcU%3D%0A) ## Add and remove member access to private projects @@ -70,7 +70,7 @@ This will share the project and knowledge base with the member, but your chats w You can add multiple users at once by copying and pasting a list of email addresses into the **Invite by email** field after clicking “Share”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370992/bf398ea46d3f66fe8212d09606e4/ec04a13f-4d56-43cd-9f23-0cb5933af75b?expires=1784741400&signature=8726f60d6ef3743dda72a294c172fda1c73af71e136357d1ff9feb0cf363867a&req=dScjFsp5nYhWW%2FMW1HO4zb8C13nTSgG33jdyj4AFq6an0lgVrcUgn2SZzVvX%0AVTXyNnkL2FGX7Xt9KJg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370992/bf398ea46d3f66fe8212d09606e4/ec04a13f-4d56-43cd-9f23-0cb5933af75b?expires=1784781000&signature=7f351155a8de2a9d6739776586d67c009b86300944381aa76eda92ce1a46b01c&req=dScjFsp5nYhWW%2FMW1HO4zb8C13nTRgGz3jdyj4AFq6YwAo778KjKgq%2FI9Ucv%0AwGBGMdrcmiIOy5%2FwRzI%3D%0A) ### Email notifications diff --git a/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md b/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md index 697a7b981..88a584b62 100644 --- a/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md +++ b/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md @@ -8,7 +8,7 @@ The Claude Console provides detailed cost and usage reporting to help you effect Users with access to these reports can click into them on the left navigation menu on the Console: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584654217/db0a977417e38e43639f060d96e0/image.png?expires=1784741400&signature=7b0c26c024f1a974459aecad99d8f57a6ca0d00f0baa644e4e94c87e8816da3d&req=dSUvEs97mYNeXvMW1HO4zYCWiSAfhceeuqqBX2puyxS1GoLewRgJ%2FFzqee1H%0APTkb9yQalidYQKoRTDo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584654217/db0a977417e38e43639f060d96e0/image.png?expires=1784781000&signature=e221f76b063ff3914df8f0a4fb6d028bb33db90b7fc2fc86c421559e3d3c9611&req=dSUvEs97mYNeXvMW1HO4zYCWiSAficeauqqBX2puyxSoC0PIRvoSiGo2SXx8%0A4Na3BbYld46z2dUVqkk%3D%0A) --- @@ -46,9 +46,9 @@ The [Usage page](https://platform.claude.com/usage) offers a detailed breakdown 6. Use the export button to download a CSV of the displayed data. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584664321/59b50eba0b61e0789f7055fcf9f4/image+%285%29.png?expires=1784741400&signature=debcabcc3702ae93c4f201845138ec3f43b8908491e84703e07958ebc895a23d&req=dSUvEs94mYJdWPMW1HO4zQwER3ctJY5iqMITUZbanFA1jl%2FZmKGAjaq1wh32%0A6niPqH85aeRkDuE9Ln0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584664321/59b50eba0b61e0789f7055fcf9f4/image+%285%29.png?expires=1784781000&signature=f0c012a4cf5fe21d5d4053a99df864a75159b4f471ab55e6e631f10d6ebdfc9c&req=dSUvEs94mYJdWPMW1HO4zQwER3ctKY5mqMITUZbanFBQYIYNprM1REGFXiz5%0AoIpHwb1wEg9Ik4C1liA%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584693386/aed472efe163abcbc14fa32f3699/rate+limited+requests.png?expires=1784741400&signature=30a9c658965232088bf821d7e99276cce337aca5b69a3c9f5dabb001979f71fe&req=dSUvEs93noJXX%2FMW1HO4zRxEwW9K4lBo21D6pckxWMbGVkOeS2W89PBISNJr%0A1XW4uXXbc1AZAuiQLNE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584693386/aed472efe163abcbc14fa32f3699/rate+limited+requests.png?expires=1784781000&signature=24d744ea6bc2d718623600d4402900b78af7297f74bd5fdc41c926b12527f169&req=dSUvEs93noJXX%2FMW1HO4zRxEwW9K7lBs21D6pckxWMYPkEFHilWxqJKzbmEY%0A98Yz2JAQY8LtLJHu1f0%3D%0A) ### Rate Limit Use @@ -88,6 +88,6 @@ The [Cost page](https://platform.claude.com/cost) helps you understand your spen 5. Use the export button to download a CSV of the cost data. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584679401/4d0bc8ed08625e1adee414e77030/CleanShot+2025-06-23+at+08_54_40%402x.png?expires=1784741400&signature=618d3b647eab1d8c247c80ec1588b772c33fd2364fb0bd33c13a762eadd8352b&req=dSUvEs95lIVfWPMW1HO4zUR%2Bh5jEV9FlCyIF5nuUsbzpOn6bTKrbTyeLFeFE%0AsQiQiqcmP%2FJlmNzFHoE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584679401/4d0bc8ed08625e1adee414e77030/CleanShot+2025-06-23+at+08_54_40%402x.png?expires=1784781000&signature=c3a02e95304d2d8062c5beecc13e89a1e1fef666e99bd7c2ad03250599f5bac2&req=dSUvEs95lIVfWPMW1HO4zUR%2Bh5jEW9FhCyIF5nuUsby4J%2Bb9k7aL60sR%2FAh%2F%0A4ltzm%2BMjBmDdgl6bjRw%3D%0A) **Note**: Currently, it's not possible to break down usage or cost by individual users. \ No newline at end of file diff --git a/content/support/9927533-disable-public-projects-for-your-organization.md b/content/support/9927533-disable-public-projects-for-your-organization.md index 58184d7f8..c8cde33fd 100644 --- a/content/support/9927533-disable-public-projects-for-your-organization.md +++ b/content/support/9927533-disable-public-projects-for-your-organization.md @@ -10,7 +10,7 @@ Follow these steps: 2. Find **Public projects** and toggle it off -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053902291/8c39d1a79dedc97411eed54dec5c/CleanShot+2026-02-11+at+11_25_34%402x.png?expires=1784741400&signature=9c93b9b7e2798ff885ab8fc2197c935f85b316fb86de34c0eb5d274a562d80e1&req=diAiFcB%2Bn4NWWPMW1HO4zfGib2OjbwFbYabJlVJ9VPySv1Qh%2FnvgTBoKWssl%0AH8LalsGt39rHD%2BIZVWk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053902291/8c39d1a79dedc97411eed54dec5c/CleanShot+2026-02-11+at+11_25_34%402x.png?expires=1784781000&signature=9df9db981ba9427157edf7c724735fb164f1006599104657c1c06844737b1f43&req=diAiFcB%2Bn4NWWPMW1HO4zfGib2OjYwFfYabJlVJ9VPx4sl48wbHszSRDJcml%0AdjRqp2VCd5mfNlRW4P4%3D%0A) ## How does disabling public projects work?