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

One read of Claude Developer Platformapi-20261021T163725Z

121 pages moved out of 808 read.

Pages moved 121 significant first
Pages read 808 in this capture
Captured 16:37 UTC
Corpus hash 8d3bd0be75f5 corpus-hash

What this read moved

51-75 of 121, page 3 of 5

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

build-with-claude/search-results Changed · +30 / -48 lines

from line 320
320320 }
321321 
322322 // Build up the conversation in a list, starting with the user's question
323 List<MessageParam> messages = [new() { Role = Role.User, Content = "How do I configure the timeout settings?" }];
323 List<MessageParam> messages = [new UserMessageParam { Content = "How do I configure the timeout settings?" }];
324324 
325325 // Create a message with the tool
326326 var response = await client.Messages.Create(new()
from line 342
342342 var toolResults = SearchKnowledgeBase(query);
343343 
344344 // Append Claude's turn, then the tool result, to the running conversation
345 messages.Add(new() { Role = Role.Assistant, Content = response.Content.Select(contentBlock => new ContentBlockParam(contentBlock.Json)).ToList() });
346 messages.Add(new()
345 messages.Add(new AssistantMessageParam { Content = response.Content.Select(contentBlock => new ContentBlockParam(contentBlock.Json)).ToList() });
346 messages.Add(new UserMessageParam
347347 {
348 Role = Role.User,
349 Content = new MessageParamContent(
348 Content = new MessageContentParam(
350349 [new ContentBlockParam(new ToolResultBlockParam() { ToolUseID = toolUse.ID, Content = new ToolResultBlockParamContent(toolResults) })]
351350 ),
352351 });
from line 493
494493 
495494 // Build up the conversation in a list, starting with the user's question
496495 List<MessageParam> messages = new ArrayList<>();
497 messages.add(MessageParam.builder()
498 .role(MessageParam.Role.USER)
499 .content("How do I configure the timeout settings?")
500 .build());
496 messages.add(MessageParam.ofUser("How do I configure the timeout settings?"));
501497 
502498 MessageCreateParams params = MessageCreateParams.builder()
503499 .model(Model.CLAUDE_OPUS_5)
from line 522
526522 // Rebuilding only the tool_use block would drop any other content blocks Claude
527523 // returned (e.g. leading text when the tool call is not forced) — append the
528524 // full turn, as the other language tabs do.
529 messages.add(MessageParam.builder()
530 .role(MessageParam.Role.ASSISTANT)
531 .contentOfBlockParams(
532 response.content().stream()
533 .map(block -> block.toParam())
534 .toList()
525 messages.add(response.toParam());
526 messages.add(MessageParam.ofUserOfContentBlockParams(List.of(
527 ContentBlockParam.ofToolResult(
528 ToolResultBlockParam.builder()
529 .toolUseId(toolUse.id())
530 .contentOfBlocks(toolResult)
531 .build()
535532 )
536 .build());
537 messages.add(MessageParam.builder()
538 .role(MessageParam.Role.USER)
539 .contentOfBlockParams(List.of(
540 ContentBlockParam.ofToolResult(
541 ToolResultBlockParam.builder()
542 .toolUseId(toolUse.id())
543 .contentOfBlocks(toolResult)
544 .build()
545 )
546 ))
547 .build());
533 )));
548534 
549535 // Send the tool result back
550536 MessageCreateParams finalParams = MessageCreateParams.builder()
from line 961
975961 MaxTokens = 1024,
976962 Messages =
977963 [
978 new()
964 new UserMessageParam
979965 {
980 Role = Role.User,
981 Content = new MessageParamContent(
966 Content = new MessageContentParam(
982967 [
983968 new ContentBlockParam(new SearchResultBlockParam
984969 {
from line 1036
10511036 MessageCreateParams params = MessageCreateParams.builder()
10521037 .model(Model.CLAUDE_OPUS_5_5)
10531038 .maxTokens(1024L)
1054 .addUserMessageOfBlockParams(List.of(
1039 .addUserMessageOfContentBlockParams(List.of(
10551040 ContentBlockParam.ofSearchResult(
10561041 SearchResultBlockParam.builder()
10571042 .source("https://docs.company.com/api-reference")
from line 1624
16391624 ],
16401625 Messages =
16411626 [
1642 new()
1627 new UserMessageParam
16431628 {
1644 Role = Role.User,
1645 Content = new MessageParamContent(
1629 Content = new MessageContentParam(
16461630 [
16471631 new ContentBlockParam(new SearchResultBlockParam
16481632 {
from line 1638
16541638 new ContentBlockParam(new TextBlockParam { Text = "What does Acme Dashboard do, and what plans is it available on?" }),
16551639 ]),
16561640 },
1657 new()
1641 new AssistantMessageParam
16581642 {
1659 Role = Role.Assistant,
1660 Content = new MessageParamContent(
1643 Content = new MessageContentParam(
16611644 [
16621645 new ContentBlockParam(new TextBlockParam { Text = "Let me check the pricing information." }),
16631646 new ContentBlockParam(new ToolUseBlockParam
from line 1654
16711654 }),
16721655 ]),
16731656 },
1674 new()
1657 new UserMessageParam
16751658 {
1676 Role = Role.User,
1677 Content = new MessageParamContent(
1659 Content = new MessageContentParam(
16781660 [
16791661 new ContentBlockParam(new ToolResultBlockParam()
16801662 {
from line 1777
17951777 .model(Model.CLAUDE_OPUS_5_5)
17961778 .maxTokens(1024L)
17971779 .addTool(knowledgeBaseTool)
1798 .addUserMessageOfBlockParams(List.of(
1780 .addUserMessageOfContentBlockParams(List.of(
17991781 ContentBlockParam.ofSearchResult(SearchResultBlockParam.builder()
18001782 .source("https://docs.company.com/overview")
18011783 .title("Product Overview")
from line 1790
18081790 .text("What does Acme Dashboard do, and what plans is it available on?")
18091791 .build())
18101792 ))
1811 .addAssistantMessageOfBlockParams(List.of(
1793 .addAssistantMessageOfContentBlockParams(List.of(
18121794 ContentBlockParam.ofText(TextBlockParam.builder()
18131795 .text("Let me check the pricing information.")
18141796 .build()),
from line 1800
18181800 .input(JsonValue.from(Map.of("query", "Acme Dashboard pricing plans")))
18191801 .build())
18201802 ))
1821 .addUserMessageOfBlockParams(List.of(
1803 .addUserMessageOfContentBlockParams(List.of(
18221804 ContentBlockParam.ofToolResult(ToolResultBlockParam.builder()
18231805 .toolUseId("toolu_01A09q90qw90lq917835lq9")
18241806 .contentOfBlocks(List.of(

build-with-claude/skills-guide Changed · +16 / -21 lines

from line 184
184184 },
185185 ],
186186 },
187 Messages = [new() { Role = Role.User, Content = "Create a presentation about renewable energy" }],
187 Messages = [new UserMessageParam { Content = "Create a presentation about renewable energy" }],
188188 Tools = [new CodeExecutionTool20250825()],
189189 };
190190 
from line 432
432432 },
433433 ],
434434 },
435 Messages = [new() { Role = Role.User, Content = "Create an Excel file with a simple budget spreadsheet" }],
435 Messages = [new UserMessageParam { Content = "Create an Excel file with a simple budget spreadsheet" }],
436436 Tools = [new CodeExecutionTool20250825()],
437437 };
438438 
from line 977
977977 },
978978 ],
979979 },
980 Messages = [new() { Role = Role.User, Content = "Create a sample sales dataset and analyze it" }],
980 Messages = [new UserMessageParam { Content = "Create a sample sales dataset and analyze it" }],
981981 Tools = [new CodeExecutionTool20250825()],
982982 };
983983 
from line 1009
10091009 },
10101010 Messages =
10111011 [
1012 new() { Role = Role.User, Content = "Create a sample sales dataset and analyze it" },
1013 new() { Role = Role.Assistant, Content = assistantText },
1014 new() { Role = Role.User, Content = "What was the total revenue?" },
1012 new UserMessageParam { Content = "Create a sample sales dataset and analyze it" },
1013 new AssistantMessageParam { Content = assistantText },
1014 new UserMessageParam { Content = "What was the total revenue?" },
10151015 ],
10161016 Tools = [new CodeExecutionTool20250825()],
10171017 };
from line 1343
13431343 
13441344 List<MessageParam> messages =
13451345 [
1346 new() { Role = Role.User, Content = "Generate and process a large sample dataset" },
1346 new UserMessageParam { Content = "Generate and process a large sample dataset" },
13471347 ];
13481348 
13491349 var maxRetries = 10;
from line 1398
13981398 var assistantContent = JsonSerializer.SerializeToElement(
13991399 response.Content.Select(block => block.Json).ToArray()
14001400 );
1401 messages.Add(new() { Role = Role.Assistant, Content = new MessageParamContent(assistantContent) });
1401 messages.Add(new AssistantMessageParam { Content = new MessageContentParam(assistantContent) });
14021402 }
14031403 ```
14041404 
from line 1478
14781478 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
14791479 
14801480 List<MessageParam> messages = new ArrayList<>();
1481 messages.add(
1482 MessageParam.builder()
1483 .role(MessageParam.Role.USER)
1484 .content("Generate and process a large sample dataset")
1485 .build()
1486 );
1481 messages.add(MessageParam.ofUser("Generate and process a large sample dataset"));
14871482 int maxRetries = 10;
14881483 
14891484 Message response = client.messages().create(
from line 1788
17931788 },
17941789 ],
17951790 },
1796 Messages = [new() { Role = Role.User, Content = "Analyze sales data and create a presentation" }],
1791 Messages = [new UserMessageParam { Content = "Analyze sales data and create a presentation" }],
17971792 Tools = [new CodeExecutionTool20250825()],
17981793 };
17991794 
from line 2817
28222817 },
28232818 ],
28242819 },
2825 Messages = [new() { Role = Role.User, Content = "Use updated Skill" }],
2820 Messages = [new UserMessageParam { Content = "Use updated Skill" }],
28262821 Tools = [new CodeExecutionTool20250825()],
28272822 };
28282823 
from line 2841
28462841 },
28472842 ],
28482843 },
2849 Messages = [new() { Role = Role.User, Content = "Use latest Skill version" }],
2844 Messages = [new UserMessageParam { Content = "Use latest Skill version" }],
28502845 Tools = [new CodeExecutionTool20250825()],
28512846 };
28522847 
from line 3401
34063401 },
34073402 ],
34083403 },
3409 Messages = [new() { Role = Role.User, Content = "Build a DCF valuation model for a SaaS company" }],
3404 Messages = [new UserMessageParam { Content = "Build a DCF valuation model for a SaaS company" }],
34103405 Tools = [new CodeExecutionTool20250825()],
34113406 };
34123407 
from line 4029
40344029 },
40354030 ],
40364031 },
4037 Messages = [new() { Role = Role.User, Content = "Analyze sales data" }],
4032 Messages = [new UserMessageParam { Content = "Analyze sales data" }],
40384033 Tools = [new CodeExecutionTool20250825()],
40394034 };
40404035 
from line 4059
40644059 },
40654060 ],
40664061 },
4067 Messages = [new() { Role = Role.User, Content = "Create a presentation" }],
4062 Messages = [new UserMessageParam { Content = "Create a presentation" }],
40684063 Tools = [new CodeExecutionTool20250825()],
40694064 };
40704065 
from line 4349
43544349 },
43554350 ],
43564351 },
4357 Messages = [new() { Role = Role.User, Content = "Process data" }],
4352 Messages = [new UserMessageParam { Content = "Process data" }],
43584353 Tools = [new CodeExecutionTool20250825()],
43594354 };
43604355 

build-with-claude/streaming Changed · +6 / -8 lines

from line 51
5151 {
5252 Model = Model.ClaudeOpus5_5,
5353 MaxTokens = 1024,
54 Messages = [new() { Role = Role.User, Content = "Hello" }]
54 Messages = [new UserMessageParam { Content = "Hello" }]
5555 };
5656 
5757 await foreach (var msg in client.Messages.CreateStreaming(parameters))
from line 191
191191 {
192192 Model = Model.ClaudeOpus5_5,
193193 MaxTokens = 128000,
194 Messages = [new() { Role = Role.User, Content = "Write a detailed analysis..." }]
194 Messages = [new UserMessageParam { Content = "Write a detailed analysis..." }]
195195 };
196196 
197197 // To handle events as they arrive as well, pass a MessageContentAggregator to CollectAsync() instead.
from line 446
446446 {
447447 Model = Model.ClaudeOpus5_5,
448448 MaxTokens = 256,
449 Messages = [new() { Role = Role.User, Content = "Hello" }]
449 Messages = [new UserMessageParam { Content = "Hello" }]
450450 };
451451 
452452 await foreach (var msg in client.Messages.CreateStreaming(parameters))
from line 720
720720 }),
721721 ],
722722 ToolChoice = new ToolChoiceAny(),
723 Messages = [
724 new() { Role = Role.User, Content = "What is the weather like in San Francisco?" }
725 ]
723 Messages = [new UserMessageParam { Content = "What is the weather like in San Francisco?" }]
726724 };
727725 
728726 await foreach (var msg in client.Messages.CreateStreaming(parameters))
from line 1054
10561054 Model = Model.ClaudeOpus5_5,
10571055 MaxTokens = 20000,
10581056 Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized },
1059 Messages = [new() { Role = Role.User, Content = "What is the greatest common divisor of 1071 and 462?" }]
1057 Messages = [new UserMessageParam { Content = "What is the greatest common divisor of 1071 and 462?" }]
10601058 };
10611059 
10621060 await foreach (var msg in client.Messages.CreateStreaming(parameters))
from line 1287
12891287 Model = Model.ClaudeOpus5_5,
12901288 MaxTokens = 1024,
12911289 Tools = [new ToolUnion(new WebSearchTool20250305() { MaxUses = 5 })],
1292 Messages = [new() { Role = Role.User, Content = "What is the weather like in New York City today?" }]
1290 Messages = [new UserMessageParam { Content = "What is the weather like in New York City today?" }]
12931291 };
12941292 
12951293 await foreach (var msg in client.Messages.CreateStreaming(parameters))

build-with-claude/structured-outputs Changed · +6 / -8 lines

from line 260
260260 {
261261 Model = Model.ClaudeOpus5_5,
262262 MaxTokens = 1024,
263 Messages = [new() {
264 Role = Role.User,
263 Messages = [new UserMessageParam {
265264 Content = "Extract the key information from this email: "
266265 + "John Smith ([email protected]) is interested in our Enterprise plan "
267266 + "and wants to schedule a demo for next Tuesday at 2pm."
from line 940
941940 {
942941 Model = Model.ClaudeOpus5_5,
943942 MaxTokens = 1024,
944 Messages = [new() {
945 Role = Role.User,
943 Messages = [new UserMessageParam {
946944 Content = "Extract the key information from this email: "
947945 + "John Smith ([email protected]) is interested in our Enterprise plan "
948946 + "and wants to schedule a demo for next Tuesday at 2pm."
from line 1349
13511349 },
13521350 },
13531351 },
1354 Messages = [new() { Role = Role.User, Content = $"Extract invoice data from: {invoiceText}" }]
1352 Messages = [new UserMessageParam { Content = $"Extract invoice data from: {invoiceText}" }]
13551353 };
13561354 
13571355 var message = await client.Messages.Create(parameters);
from line 1651
16531651 {
16541652 Model = Model.ClaudeOpus5_5,
16551653 MaxTokens = 1024,
1656 Messages = [new() { Role = Role.User, Content = $"Classify this feedback: {feedbackText}" }],
1654 Messages = [new UserMessageParam { Content = $"Classify this feedback: {feedbackText}" }],
16571655 OutputConfig = new OutputConfig
16581656 {
16591657 Format = new JsonOutputFormat
from line 1937
19391937 {
19401938 Model = Model.ClaudeOpus5_5,
19411939 MaxTokens = 1024,
1942 Messages = [new() { Role = Role.User, Content = "Process this request: ..." }],
1940 Messages = [new UserMessageParam { Content = "Process this request: ..." }],
19431941 OutputConfig = new OutputConfig
19441942 {
19451943 Format = new JsonOutputFormat
from line 2355
23572355 {
23582356 Model = Model.ClaudeOpus5_5,
23592357 MaxTokens = 1024,
2360 Messages = [new() { Role = Role.User, Content = "Help me plan a trip to Paris departing May 15, 2026" }],
2358 Messages = [new UserMessageParam { Content = "Help me plan a trip to Paris departing May 15, 2026" }],
23612359 // JSON outputs: structured response format
23622360 OutputConfig = new OutputConfig
23632361 {

build-with-claude/thinking Changed · +4 / -12 lines

from line 166
166166 MaxTokens = 16000,
167167 Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized },
168168 Messages = [
169 new() {
170 Role = Role.User,
171 Content = "What is the greatest common divisor of 1071 and 462?"
172 }
169 new UserMessageParam { Content = "What is the greatest common divisor of 1071 and 462?" }
173170 ]
174171 };
175172 
from line 381
384381 Model = Model.ClaudeSonnet5,
385382 MaxTokens = 4096,
386383 Thinking = new ThinkingConfigDisabled(),
387 Messages = [
388 new() {
389 Role = Role.User,
390 Content = "Summarize this article in one sentence."
391 }
392 ]
384 Messages = [new UserMessageParam { Content = "Summarize this article in one sentence." }]
393385 };
394386 
395387 var message = await client.Messages.Create(parameters);
from line 634
642634 Model = Model.ClaudeOpus5_5,
643635 MaxTokens = 16000,
644636 Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized },
645 Messages = [new() { Role = Role.User, Content = "What is the greatest common divisor of 1071 and 462?" }]
637 Messages = [new UserMessageParam { Content = "What is the greatest common divisor of 1071 and 462?" }]
646638 };
647639 
648640 await foreach (var rawEvent in client.Messages.CreateStreaming(parameters))
from line 641
649641 {
650642 if (rawEvent.TryPickContentBlockStart(out var start))
651643 {
652 Console.WriteLine($"\nStarting {start.ContentBlock.Type} block...");
644 Console.WriteLine($"\nStarting {start.ContentBlock.Type.Raw()} block...");
653645 }
654646 else if (rawEvent.TryPickContentBlockDelta(out var delta))
655647 {

build-with-claude/thinking-steering-and-cost Changed · +21 / -39 lines

from line 316
316316 Thinking = new ThinkingConfigAdaptive(),
317317 Messages =
318318 [
319 new()
319 new UserMessageParam
320320 {
321 Role = Role.User,
322 Content = new MessageParamContent(new List<ContentBlockParam>
321 Content = new List<ContentBlockParam>
323322 {
324323 new ContentBlockParam(new TextBlockParam()
325324 {
from line 329
330329 {
331330 Text = "Analyze the tone of this passage."
332331 }),
333 })
332 }
334333 }
335334 ]
336335 };
from line 345
346345 Thinking = new ThinkingConfigAdaptive(),
347346 Messages =
348347 [
349 new()
348 new UserMessageParam
350349 {
351 Role = Role.User,
352 Content = new MessageParamContent(new List<ContentBlockParam>
350 Content = new List<ContentBlockParam>
353351 {
354352 new ContentBlockParam(new TextBlockParam()
355353 {
from line 358
360358 {
361359 Text = "Analyze the tone of this passage."
362360 }),
363 })
361 }
364362 },
365 new()
363 new AssistantMessageParam
366364 {
367 Role = Role.Assistant,
368365 Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
369366 },
370 new()
371 {
372 Role = Role.User,
373 Content = "Analyze the characters in this passage."
374 }
367 new UserMessageParam { Content = "Analyze the characters in this passage." }
375368 ]
376369 };
377370 
from line 383
390383 },
391384 Messages =
392385 [
393 new()
386 new UserMessageParam
394387 {
395 Role = Role.User,
396 Content = new MessageParamContent(new List<ContentBlockParam>
388 Content = new List<ContentBlockParam>
397389 {
398390 new ContentBlockParam(new TextBlockParam()
399391 {
from line 396
404396 {
405397 Text = "Analyze the tone of this passage."
406398 }),
407 })
399 }
408400 },
409 new()
401 new AssistantMessageParam
410402 {
411 Role = Role.Assistant,
412403 Content = response1.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
413404 },
414 new()
405 new UserMessageParam { Content = "Analyze the characters in this passage." },
406 new AssistantMessageParam
415407 {
416 Role = Role.User,
417 Content = "Analyze the characters in this passage."
418 },
419 new()
420 {
421 Role = Role.Assistant,
422408 Content = response2.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
423409 },
424 new()
425 {
426 Role = Role.User,
427 Content = "Analyze the setting in this passage."
428 }
410 new UserMessageParam { Content = "Analyze the setting in this passage." }
429411 ]
430412 };
431413 
from line 522
540522 .model(Model.CLAUDE_OPUS_5_5)
541523 .maxTokens(16000L)
542524 .thinking(ThinkingConfigAdaptive.builder().build())
543 .addUserMessageOfBlockParams(List.of(
525 .addUserMessageOfContentBlockParams(List.of(
544526 ContentBlockParam.ofText(TextBlockParam.builder()
545527 .text(largeText)
546528 .cacheControl(CacheControlEphemeral.builder().build())
from line 542
560542 .model(Model.CLAUDE_OPUS_5_5)
561543 .maxTokens(16000L)
562544 .thinking(ThinkingConfigAdaptive.builder().build())
563 .addUserMessageOfBlockParams(List.of(
545 .addUserMessageOfContentBlockParams(List.of(
564546 ContentBlockParam.ofText(TextBlockParam.builder()
565547 .text(largeText)
566548 .cacheControl(CacheControlEphemeral.builder().build())
from line 551
569551 .text("Analyze the tone of this passage.")
570552 .build())
571553 ))
572 .addAssistantMessageOfBlockParams(response1.content().stream()
554 .addAssistantMessageOfContentBlockParams(response1.content().stream()
573555 .map(block -> block.toParam())
574556 .collect(Collectors.toList()))
575557 .addUserMessage("Analyze the characters in this passage.")
from line 569
587569 .outputConfig(OutputConfig.builder()
588570 .effort(OutputConfig.Effort.LOW)
589571 .build())
590 .addUserMessageOfBlockParams(List.of(
572 .addUserMessageOfContentBlockParams(List.of(
591573 ContentBlockParam.ofText(TextBlockParam.builder()
592574 .text(largeText)
593575 .cacheControl(CacheControlEphemeral.builder().build())
from line 578
596578 .text("Analyze the tone of this passage.")
597579 .build())
598580 ))
599 .addAssistantMessageOfBlockParams(response1.content().stream()
581 .addAssistantMessageOfContentBlockParams(response1.content().stream()
600582 .map(block -> block.toParam())
601583 .collect(Collectors.toList()))
602584 .addUserMessage("Analyze the characters in this passage.")
603 .addAssistantMessageOfBlockParams(response2.content().stream()
585 .addAssistantMessageOfContentBlockParams(response2.content().stream()
604586 .map(block -> block.toParam())
605587 .collect(Collectors.toList()))
606588 .addUserMessage("Analyze the setting in this passage.")

build-with-claude/thinking-tool-workflows Changed · +7 / -9 lines

from line 153
153153 MaxTokens = 16000,
154154 Thinking = new ThinkingConfigAdaptive(),
155155 Tools = [weatherTool],
156 Messages = [new() { Role = Role.User, Content = "What's the weather in Paris?" }]
156 Messages = [new UserMessageParam { Content = "What's the weather in Paris?" }]
157157 };
158158 
159159 var message = await client.Messages.Create(parameters);
from line 459
459459 MaxTokens = 16000,
460460 Thinking = new ThinkingConfigAdaptive(),
461461 Tools = [weatherTool],
462 Messages = [
463 new() { Role = Role.User, Content = "What's the weather in Paris?" }
464 ]
462 Messages = [new UserMessageParam { Content = "What's the weather in Paris?" }]
465463 };
466464 
467465 var response = await client.Messages.Create(parameters);
from line 485
487485 Thinking = new ThinkingConfigAdaptive(),
488486 Tools = [weatherTool],
489487 Messages = [
490 new() { Role = Role.User, Content = "What's the weather in Paris?" },
488 new UserMessageParam { Content = "What's the weather in Paris?" },
491489 // response.Content includes the thinking blocks; passing them back is required
492 new() { Role = Role.Assistant, Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList() },
493 new() { Role = Role.User, Content = new MessageParamContent(new List<ContentBlockParam>
490 new AssistantMessageParam { Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList() },
491 new UserMessageParam { Content = new List<ContentBlockParam>
494492 {
495493 new ContentBlockParam(new ToolResultBlockParam()
496494 {
from line 495
497495 ToolUseID = toolUseBlock?.ID ?? "",
498496 Content = $"Current temperature: {weatherData.temperature}°F"
499497 })
500 })}
498 }}
501499 ]
502500 };
503501 
from line 615
617615 .addTool(weatherTool)
618616 .addUserMessage("What's the weather in Paris?")
619617 .addMessage(response)
620 .addUserMessageOfBlockParams(List.of(
618 .addUserMessageOfContentBlockParams(List.of(
621619 ContentBlockParam.ofToolResult(
622620 ToolResultBlockParam.builder()
623621 .toolUseId(toolUseBlock.id())

build-with-claude/token-counting Changed · +20 / -28 lines

from line 109
109109 {
110110 Model = Model.ClaudeOpus5_5,
111111 System = "You are a scientist",
112 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }]
112 Messages = [new UserMessageParam { Content = "Hello, Claude" }]
113113 };
114114 
115115 var response = await client.Messages.CountTokens(parameters);
from line 332
332332 },
333333 }),
334334 ],
335 Messages = [new() { Role = Role.User, Content = "What's the weather like in San Francisco?" }]
335 Messages = [new UserMessageParam { Content = "What's the weather like in San Francisco?" }]
336336 };
337337 
338338 var count = await client.Messages.CountTokens(parameters);
from line 606
606606 Model = Model.ClaudeOpus5_5,
607607 Messages =
608608 [
609 new()
609 new UserMessageParam
610610 {
611 Role = Role.User,
612 Content = new MessageParamContent(new List<ContentBlockParam>
611 Content = new List<ContentBlockParam>
613612 {
614613 new ContentBlockParam(new ImageBlockParam(
615614 new ImageBlockParamSource(new Base64ImageSource()
from line 618
619618 })
620619 )),
621620 new ContentBlockParam(new TextBlockParam("Describe this image")),
622 }),
621 },
623622 }
624623 ]
625624 };
from line 702
703702 
704703 MessageCountTokensParams params = MessageCountTokensParams.builder()
705704 .model(Model.CLAUDE_OPUS_5_5)
706 .addUserMessageOfBlockParams(List.of(imageBlock, textBlock))
705 .addUserMessageOfContentBlockParams(List.of(imageBlock, textBlock))
707706 .build();
708707 
709708 MessageTokensCount count = client.messages().countTokens(params);
from line 932
933932 Thinking = new ThinkingConfigAdaptive(),
934933 Messages =
935934 [
936 new()
935 new UserMessageParam
937936 {
938 Role = Role.User,
939937 Content = "Are there an infinite number of prime numbers such that n mod 4 == 3?"
940938 },
941 new()
939 new AssistantMessageParam
942940 {
943 Role = Role.Assistant,
944 Content = new MessageParamContent(new List<ContentBlockParam>
941 Content = new List<ContentBlockParam>
945942 {
946943 new ContentBlockParam(new ThinkingBlockParam()
947944 {
from line 946
949946 Signature = "EuYBCkQYAiJAgCs1le6/Pol5Z4/JMomVOouGrWdhYNsH3ukzUECbB6iWrSQtsQuRHJID6lWV...",
950947 }),
951948 new ContentBlockParam(new TextBlockParam("Yes, there are infinitely many prime numbers p such that p mod 4 = 3...")),
952 }),
949 },
953950 },
954 new()
955 {
956 Role = Role.User,
957 Content = "Can you write a formal proof?"
958 }
951 new UserMessageParam { Content = "Can you write a formal proof?" }
959952 ]
960953 };
961954 
from line 1017
10241017 .model(Model.CLAUDE_OPUS_5_5)
10251018 .thinking(ThinkingConfigAdaptive.builder().build())
10261019 .addUserMessage("Are there an infinite number of prime numbers such that n mod 4 == 3?")
1027 .addAssistantMessageOfBlockParams(assistantBlocks)
1020 .addAssistantMessageOfContentBlockParams(assistantBlocks)
10281021 .addUserMessage("Can you write a formal proof?")
10291022 .build();
10301023 
from line 1237
12441237 Model = Model.ClaudeOpus5_5,
12451238 Messages =
12461239 [
1247 new()
1240 new UserMessageParam
12481241 {
1249 Role = Role.User,
1250 Content = new MessageParamContent(new List<ContentBlockParam>
1242 Content = new List<ContentBlockParam>
12511243 {
12521244 new ContentBlockParam(new DocumentBlockParam(
12531245 new DocumentBlockParamSource(new Base64PdfSource()
from line 1248
12561248 })
12571249 )),
12581250 new ContentBlockParam(new TextBlockParam("Please summarize this document.")),
1259 }),
1251 },
12601252 }
12611253 ]
12621254 };
from line 1308
13161308 
13171309 MessageCountTokensParams params = MessageCountTokensParams.builder()
13181310 .model(Model.CLAUDE_OPUS_5_5)
1319 .addUserMessageOfBlockParams(List.of(documentBlock, textBlock))
1311 .addUserMessageOfContentBlockParams(List.of(documentBlock, textBlock))
13201312 .build();
13211313 
13221314 MessageTokensCount count = client.messages().countTokens(params);

build-with-claude/vision Changed · +20 / -24 lines

from line 158
158158 MaxTokens = 1024,
159159 Messages =
160160 [
161 new()
161 new UserMessageParam
162162 {
163 Role = Role.User,
164 Content = new MessageParamContent(new List<ContentBlockParam>
163 Content = new List<ContentBlockParam>
165164 {
166165 new ContentBlockParam(new ImageBlockParam(
167166 new ImageBlockParamSource(new Base64ImageSource()
from line 170
171170 })
172171 )),
173172 new ContentBlockParam(new TextBlockParam("Describe this image.")),
174 }),
173 },
175174 }
176175 ]
177176 });
from line 224
225224 MessageCreateParams.builder()
226225 .model(Model.CLAUDE_OPUS_5_5)
227226 .maxTokens(1024)
228 .addUserMessageOfBlockParams(contentBlockParams)
227 .addUserMessageOfContentBlockParams(contentBlockParams)
229228 .build()
230229 );
231230 
from line 404
405404 MaxTokens = 1024,
406405 Messages =
407406 [
408 new()
407 new UserMessageParam
409408 {
410 Role = Role.User,
411 Content = new MessageParamContent(new List<ContentBlockParam>
409 Content = new List<ContentBlockParam>
412410 {
413411 new ContentBlockParam(new ImageBlockParam(
414412 new ImageBlockParamSource(new UrlImageSource()
from line 415
417415 })
418416 )),
419417 new ContentBlockParam(new TextBlockParam("Describe this image.")),
420 }),
418 },
421419 }
422420 ]
423421 });
from line 466
468466 MessageCreateParams.builder()
469467 .model(Model.CLAUDE_OPUS_5_5)
470468 .maxTokens(1024)
471 .addUserMessageOfBlockParams(contentBlockParams)
469 .addUserMessageOfContentBlockParams(contentBlockParams)
472470 .build()
473471 );
474472 System.out.println(message);
from line 689
691689 MaxTokens = 1024,
692690 Messages =
693691 [
694 new()
692 new UserMessageParam
695693 {
696 Role = Role.User,
697 Content = new MessageParamContent(new List<ContentBlockParam>
694 Content = new List<ContentBlockParam>
698695 {
699696 new ContentBlockParam(new ImageBlockParam(
700697 new ImageBlockParamSource(new FileImageSource(fileUpload.ID))
701698 )),
702699 new ContentBlockParam(new TextBlockParam("Describe this image.")),
703 }),
700 },
704701 }
705702 ]
706703 });
from line 770
773770 MessageCreateParams params = MessageCreateParams.builder()
774771 .model(Model.CLAUDE_OPUS_5_5)
775772 .maxTokens(1024)
776 .addUserMessageOfBlockParams(
773 .addUserMessageOfContentBlockParams(
777774 List.of(
778775 ContentBlockParam.ofImage(imageParam),
779776 ContentBlockParam.ofText(
from line 1028
10311028 MaxTokens = 1024,
10321029 Messages =
10331030 [
1034 new()
1031 new UserMessageParam
10351032 {
1036 Role = Role.User,
1037 Content = new MessageParamContent(new List<ContentBlockParam>
1033 Content = new List<ContentBlockParam>
10381034 {
10391035 new ContentBlockParam(new TextBlockParam("Image 1:")),
10401036 new ContentBlockParam(new ImageBlockParam(
from line 1049
10531049 })
10541050 )),
10551051 new ContentBlockParam(new TextBlockParam("How are these images different?")),
1056 }),
1052 },
10571053 }
10581054 ]
10591055 });
from line 1123
11271123 MessageCreateParams.builder()
11281124 .model(Model.CLAUDE_OPUS_5_5)
11291125 .maxTokens(1024)
1130 .addUserMessageOfBlockParams(contentBlockParams)
1126 .addUserMessageOfContentBlockParams(contentBlockParams)
11311127 .build()
11321128 );
11331129 

build-with-claude/working-with-messages Changed · +16 / -18 lines

from line 73
7373 {
7474 Model = Model.ClaudeOpus5_5,
7575 MaxTokens = 1024,
76 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }]
76 Messages = [new UserMessageParam { Content = "Hello, Claude" }]
7777 };
7878 var message = await client.Messages.Create(parameters);
7979 Console.WriteLine(message);
from line 225
225225 MaxTokens = 1024,
226226 Messages =
227227 [
228 new() { Role = Role.User, Content = "Hello, Claude" },
229 new() { Role = Role.Assistant, Content = "Hello!" },
230 new() { Role = Role.User, Content = "Can you describe LLMs to me?" }
228 new UserMessageParam { Content = "Hello, Claude" },
229 new AssistantMessageParam { Content = "Hello!" },
230 new UserMessageParam { Content = "Can you describe LLMs to me?" }
231231 ]
232232 };
233233 
from line 406
406406 Model = Model.ClaudeSonnet4_5,
407407 MaxTokens = 1,
408408 Messages = [
409 new() { Role = Role.User, Content = "What is latin for Ant? (A) Apoidea, (B) Rhopalocera, (C) Formicidae" },
410 new() { Role = Role.Assistant, Content = "The answer is (" }
409 new UserMessageParam { Content = "What is latin for Ant? (A) Apoidea, (B) Rhopalocera, (C) Formicidae" },
410 new AssistantMessageParam { Content = "The answer is (" }
411411 ]
412412 };
413413 
from line 721
721721 MaxTokens = 1024,
722722 Messages =
723723 [
724 new()
724 new UserMessageParam
725725 {
726 Role = Role.User,
727 Content = new MessageParamContent(new List<ContentBlockParam>
726 Content = new List<ContentBlockParam>
728727 {
729728 new ContentBlockParam(new ImageBlockParam(
730729 new ImageBlockParamSource(new Base64ImageSource()
from line 733
734733 })
735734 )),
736735 new ContentBlockParam(new TextBlockParam("What is in the above image?")),
737 }),
736 },
738737 }
739738 ]
740739 };
from line 748
749748 MaxTokens = 1024,
750749 Messages =
751750 [
752 new()
751 new UserMessageParam
753752 {
754 Role = Role.User,
755 Content = new MessageParamContent(new List<ContentBlockParam>
753 Content = new List<ContentBlockParam>
756754 {
757755 new ContentBlockParam(new ImageBlockParam(
758756 new ImageBlockParamSource(new UrlImageSource()
from line 759
761759 })
762760 )),
763761 new ContentBlockParam(new TextBlockParam("What is in the above image?")),
764 }),
762 },
765763 }
766764 ]
767765 };
from line 855
857855 MessageCreateParams.builder()
858856 .model(Model.CLAUDE_OPUS_5_5)
859857 .maxTokens(1024L)
860 .addUserMessageOfBlockParams(base64Content)
858 .addUserMessageOfContentBlockParams(base64Content)
861859 .build());
862860 System.out.println(message);
863861 
from line 877
879877 MessageCreateParams.builder()
880878 .model(Model.CLAUDE_OPUS_5_5)
881879 .maxTokens(1024L)
882 .addUserMessageOfBlockParams(urlContent)
880 .addUserMessageOfContentBlockParams(urlContent)
883881 .build());
884882 System.out.println(messageFromUrl);
885883 ```

cli-sdks-libraries/overview Changed · +7 / -7 lines

from line 59
5959| Tool | Latest version | Package |
6060| ---------- | -------------- | ----------------------------------------------------------------------------------------------------- |
6161| ant CLI | `1.44.0` | [`github.com/anthropics/anthropic-cli`](https://github.com/anthropics/anthropic-cli/releases) |
62| Python | `1.17.0` | [`anthropic`](https://pypi.org/project/anthropic/) |
63| TypeScript | `0.137.0` | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) |
64| C# | `12.60.0` | [`Anthropic`](https://www.nuget.org/packages/Anthropic) |
65| Go | `1.84.0` | [`github.com/anthropics/anthropic-sdk-go`](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go) |
66| Java | `2.75.0` | [`com.anthropic:anthropic-java`](https://central.sonatype.com/artifact/com.anthropic/anthropic-java) |
67| PHP | `0.61.0` | [`anthropic-ai/sdk`](https://packagist.org/packages/anthropic-ai/sdk) |
68| Ruby | `1.82.0` | [`anthropic`](https://rubygems.org/gems/anthropic) |
62| Python | `2.0.0` | [`anthropic`](https://pypi.org/project/anthropic/) |
63| TypeScript | `1.0.0` | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) |
64| C# | `13.0.0` | [`Anthropic`](https://www.nuget.org/packages/Anthropic) |
65| Go | `2.0.0` | [`github.com/anthropics/anthropic-sdk-go`](https://pkg.go.dev/github.com/anthropics/anthropic-sdk-go) |
66| Java | `3.0.0` | [`com.anthropic:anthropic-java`](https://central.sonatype.com/artifact/com.anthropic/anthropic-java) |
67| PHP | `1.0.0` | [`anthropic-ai/sdk`](https://packagist.org/packages/anthropic-ai/sdk) |
68| Ruby | `2.0.0` | [`anthropic`](https://rubygems.org/gems/anthropic) |
6969 
7070The same versions are available as JSON at `https://platform.claude.com/docs/sdk-versions.json`.
7171 

cli-sdks-libraries/sdks/csharp Changed · +2 / -16 lines

from line 38
3838MessageCreateParams parameters = new()
3939{
4040 MaxTokens = 1024,
41 Messages =
42 [
43 new()
44 {
45 Role = Role.User,
46 Content = "Hello, Claude",
47 },
48 ],
41 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
4942 Model = Model.ClaudeOpus5_5,
5043};
5144 
from line 123
130123MessageCreateParams parameters = new()
131124{
132125 MaxTokens = 1024,
133 Messages =
134 [
135 new()
136 {
137 Role = Role.User,
138 Content = "Hello, Claude",
139 },
140 ],
126 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
141127 Model = Model.ClaudeOpus5_5,
142128};
143129 

cli-sdks-libraries/sdks/java Changed · +4 / -4 lines

from line 15
1515<Tabs>
1616 <Tab title="Gradle">
1717 ```kotlin
18 implementation("com.anthropic:anthropic-java:2.75.0")
18 implementation("com.anthropic:anthropic-java:3.0.0")
1919 ```
2020 </Tab>
2121 
from line 24
2424 <dependency>
2525 <groupId>com.anthropic</groupId>
2626 <artifactId>anthropic-java</artifactId>
27 <version>2.75.0</version>
27 <version>3.0.0</version>
2828 </dependency>
2929 ```
3030 </Tab>
from line 403
403403 .flatMap(contentBlock -> contentBlock.toolUse().stream())
404404 .forEach(toolUseBlock -> createParamsBuilder
405405 // Add a message indicating that the tool use was requested.
406 .addAssistantMessageOfBetaContentBlockParams(
406 .addAssistantMessageOfContentBlockParams(
407407 List.of(BetaContentBlockParam.ofToolUse(BetaToolUseBlockParam.builder()
408408 .name(toolUseBlock.name())
409409 .id(toolUseBlock.id())
from line 410
410410 .input(toolUseBlock._input())
411411 .build())))
412412 // Add a message with the result of the requested tool use.
413 .addUserMessageOfBetaContentBlockParams(
413 .addUserMessageOfContentBlockParams(
414414 List.of(BetaContentBlockParam.ofToolResult(BetaToolResultBlockParam.builder()
415415 .toolUseId(toolUseBlock.id())
416416 .contentAsJson(callTool(toolUseBlock))

get-started Changed · +3 / -4 lines

from line 290
290290 MaxTokens = 1000,
291291 Messages =
292292 [
293 new()
293 new UserMessageParam
294294 {
295 Role = Role.User,
296295 Content = "What should I search for to find the latest developments in renewable energy?",
297296 },
298297 ],
from line 435
436435 }
437436 
438437 dependencies {
439 implementation("com.anthropic:anthropic-java:2.75.0")
438 implementation("com.anthropic:anthropic-java:3.0.0")
440439 }
441440 
442441 application {
from line 461
462461 <dependency>
463462 <groupId>com.anthropic</groupId>
464463 <artifactId>anthropic-java</artifactId>
465 <version>2.75.0</version>
464 <version>3.0.0</version>
466465 </dependency>
467466 </dependencies>
468467 </project>

manage-claude/opentelemetry/sdk Changed · +4 / -4 lines

from line 84
8484 
8585 <CodeGroup exclude="shell, python, typescript, csharp, go, php, ruby">
8686 ```kotlin Gradle
87 implementation("com.anthropic:anthropic-java:2.75.0")
87 implementation("com.anthropic:anthropic-java:3.0.0")
8888 ```
8989 
9090 ```xml Maven
from line 91
9191 <dependency>
9292 <groupId>com.anthropic</groupId>
9393 <artifactId>anthropic-java</artifactId>
94 <version>2.75.0</version>
94 <version>3.0.0</version>
9595 </dependency>
9696 ```
9797 </CodeGroup>
from line 203
203203 {
204204 Model = Model.ClaudeOpus5_5,
205205 MaxTokens = 1024,
206 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }],
206 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
207207 });
208208 Console.WriteLine(message);
209209 ```
from line 437
437437 {
438438 Model = Model.ClaudeOpus5_5,
439439 MaxTokens = 1024,
440 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }],
440 Messages = [new UserMessageParam { Content = "Hello, Claude" }],
441441 });
442442 ```
443443 

manage-claude/rate-limits-api Changed · +20 / -7 lines

from line 71
7171 await foreach (var entry in rateLimits.Paginate())
7272 {
7373 var models = entry.Models is null ? "" : $" ({string.Join(", ", entry.Models)})";
74 Console.WriteLine($"{entry.Group.Type.GetString()}{models}");
74 Console.WriteLine($"{entry.Group.Type.Raw()}{models}");
7575 foreach (var limit in entry.Limits)
7676 {
7777 Console.WriteLine($" {limit.Type}: {limit.Value}");
from line 208
208208 await foreach (var entry in rateLimits.Paginate())
209209 {
210210 var models = entry.Models is null ? "" : $" ({string.Join(", ", entry.Models)})";
211 Console.WriteLine($"{entry.Group.Type.GetString()}{models}");
211 Console.WriteLine($"{entry.Group.Type.Raw()}{models}");
212212 foreach (var limit in entry.Limits)
213213 {
214214 Console.WriteLine($" {limit.Type}: {limit.Value}");
from line 286
286286{
287287 "data": [
288288 {
289 "id": "rlt_01NwFawrTvAijwqn8AjKVBPS",
289290 "type": "rate_limit",
290291 "group_type": "model_group",
291292 "group": {
from line 302
301302 ]
302303 },
303304 {
305 "id": "rlt_016qriyigbdebqkzhMujdHkX",
304306 "type": "rate_limit",
305307 "group_type": "model_group",
306308 "group": {
from line 324
322324 ]
323325 },
324326 {
327 "id": "rlt_01EyY8kq14eviKJPgepbgBH4",
325328 "type": "rate_limit",
326329 "group_type": "batch",
327330 "group": { "type": "batch", "id": "rlg_01Wn3pBz6kCg9vHtQ7mLxD5a" },
from line 390
387390 await foreach (var entry in rateLimits.Paginate())
388391 {
389392 var models = entry.Models is null ? "" : $" ({string.Join(", ", entry.Models)})";
390 Console.WriteLine($"{entry.Group.Type.GetString()}{models}");
393 Console.WriteLine($"{entry.Group.Type.Raw()}{models}");
391394 foreach (var limit in entry.Limits)
392395 {
393396 Console.WriteLine($" {limit.Type}: {limit.Value}");
from line 548
545548 await foreach (var entry in rateLimits.Paginate())
546549 {
547550 var models = entry.Models is null ? "" : $" ({string.Join(", ", entry.Models)})";
548 Console.WriteLine($"{entry.Group.Type.GetString()}{models}");
551 Console.WriteLine($"{entry.Group.Type.Raw()}{models}");
549552 foreach (var limit in entry.Limits)
550553 {
551554 Console.WriteLine($" {limit.Type}: {limit.Value}");
from line 634
631634{
632635 "data": [
633636 {
637 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
638 "rate_limit_id": "rlt_01NwFawrTvAijwqn8AjKVBPS",
634639 "type": "workspace_rate_limit",
635640 "group_type": "model_group",
636641 "group": {
from line 660
655660 ]
656661 },
657662 {
663 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
664 "rate_limit_id": "rlt_016qriyigbdebqkzhMujdHkX",
658665 "type": "workspace_rate_limit",
659666 "group_type": "model_group",
660667 "group": {
from line 760
753760 await foreach (var entry in rateLimits.Paginate())
754761 {
755762 var models = entry.Models is null ? "" : $" ({string.Join(", ", entry.Models)})";
756 Console.WriteLine($"{entry.Group.Type.GetString()}{models}");
763 Console.WriteLine($"{entry.Group.Type.Raw()}{models}");
757764 foreach (var limit in entry.Limits)
758765 {
759 Console.WriteLine($" {limit.Type}: {limit.Value} ({limit.Source.Type.GetString()})");
766 Console.WriteLine($" {limit.Type}: {limit.Value} ({limit.Source.Type.Raw()})");
760767 }
761768 }
762769 ```
from line 857
850857{
851858 "data": [
852859 {
860 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
861 "rate_limit_id": "rlt_01NwFawrTvAijwqn8AjKVBPS",
853862 "type": "workspace_rate_limit",
854863 "group_type": "model_group",
855864 "group": {
from line 889
880889 ]
881890 },
882891 {
892 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
893 "rate_limit_id": "rlt_016qriyigbdebqkzhMujdHkX",
883894 "type": "workspace_rate_limit",
884895 "group_type": "model_group",
885896 "group": {
from line 927
916927 ]
917928 },
918929 {
930 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
931 "rate_limit_id": "rlt_01EyY8kq14eviKJPgepbgBH4",
919932 "type": "workspace_rate_limit",
920933 "group_type": "batch",
921934 "group": { "type": "batch", "id": "rlg_01Wn3pBz6kCg9vHtQ7mLxD5a" },
from line 1001
9881001 await foreach (var entry in rateLimits.Paginate())
9891002 {
9901003 var models = entry.Models is null ? "" : $" ({string.Join(", ", entry.Models)})";
991 Console.WriteLine($"{entry.Group.Type.GetString()}{models}");
1004 Console.WriteLine($"{entry.Group.Type.Raw()}{models}");
9921005 foreach (var limit in entry.Limits)
9931006 {
9941007 Console.WriteLine($" {limit.Type}: {limit.Value}");

managed-agents/agent-setup Changed · +3 / -15 lines

from line 98
9898 Name = "Coding Assistant",
9999 Model = BetaManagedAgentsModel.ClaudeOpus5_5,
100100 System = "You are a helpful coding agent.",
101 Tools =
102 [
103 new BetaManagedAgentsAgentToolset20260401Params
104 {
105 Type = "agent_toolset_20260401",
106 },
107 ],
101 Tools = [new BetaManagedAgentsAgentToolset20260401Params()],
108102 });
109103 ```
110104 
from line 126
132126 .name("Coding Assistant")
133127 .model(BetaManagedAgentsModel.CLAUDE_OPUS_5_5)
134128 .system("You are a helpful coding agent.")
135 .addTool(
136 BetaManagedAgentsAgentToolset20260401Params.builder()
137 .type(BetaManagedAgentsAgentToolset20260401Params.Type.AGENT_TOOLSET_20260401)
138 .build()
139 )
129 .addTool(BetaManagedAgentsAgentToolset20260401Params.builder().build())
140130 .build()
141131 );
142132 ```
from line 137
147137 model: 'claude-opus-5-5',
148138 system: 'You are a helpful coding agent.',
149139 tools: [
150 BetaManagedAgentsAgentToolset20260401Params::with(
151 type: 'agent_toolset_20260401',
152 ),
140 BetaManagedAgentsAgentToolset20260401Params::with(),
153141 ],
154142 );
155143 ```

managed-agents/define-outcomes Changed · +3 / -12 lines

from line 400
400400 [
401401 new BetaManagedAgentsUserDefineOutcomeEventParams
402402 {
403 Type = BetaManagedAgentsUserDefineOutcomeEventParamsType.UserDefineOutcome,
404403 Description = "Build a DCF model for Costco in .xlsx",
405 Rubric = new BetaManagedAgentsTextRubricParams
406 {
407 Type = BetaManagedAgentsTextRubricParamsType.Text,
408 Content = Rubric,
409 },
410 // or: Rubric = new BetaManagedAgentsFileRubricParams
411 // { Type = BetaManagedAgentsFileRubricParamsType.File, FileID = rubric.ID },
404 Rubric = new BetaManagedAgentsTextRubricParams { Content = Rubric },
405 // or: Rubric = new BetaManagedAgentsFileRubricParams { FileID = rubric.ID },
412406 MaxIterations = 5, // optional; default 3, max 20
413407 },
414408 ],
from line 459
465459 session.id(),
466460 EventSendParams.builder()
467461 .addEvent(BetaManagedAgentsUserDefineOutcomeEventParams.builder()
468 .type(BetaManagedAgentsUserDefineOutcomeEventParams.Type.USER_DEFINE_OUTCOME)
469462 .description("Build a DCF model for Costco in .xlsx")
470463 .rubric(BetaManagedAgentsTextRubricParams.builder()
471 .type(BetaManagedAgentsTextRubricParams.Type.TEXT)
472464 .content(RUBRIC)
473465 .build())
474 // or: .rubric(BetaManagedAgentsFileRubricParams.builder()
475 // .type(BetaManagedAgentsFileRubricParams.Type.FILE).fileId(rubric.id()).build())
466 // or: .rubric(BetaManagedAgentsFileRubricParams.builder().fileId(rubric.id()).build())
476467 .maxIterations(5) // optional; default 3, max 20
477468 .build())
478469 .build());

managed-agents/dreams Changed · +5 / -17 lines

from line 87
8787 {
8888 Inputs =
8989 [
90 new BetaDreamMemoryStoreInput
91 {
92 Type = BetaDreamMemoryStoreInputType.MemoryStore,
93 MemoryStoreID = storeID,
94 },
95 new BetaDreamSessionsInput
96 {
97 Type = BetaDreamSessionsInputType.Sessions,
98 SessionIds = [sessionA, sessionB],
99 },
90 new BetaDreamMemoryStoreInput { MemoryStoreID = storeID },
91 new BetaDreamSessionsInput { SessionIds = [sessionA, sessionB] },
10092 ],
10193 Model = "claude-opus-5-5",
10294 Instructions = "Focus on coding-style preferences; ignore one-off debugging notes.",
from line 344
352344 ```
353345 
354346 ```csharp C#
355 var output = dream.Outputs.FirstOrDefault(entry => entry.Type == "memory_store");
347 var output = dream.Outputs.FirstOrDefault(entry => entry.Type.GetString() == "memory_store");
356348 if (output is { MemoryStoreID: var outputStoreID })
357349 {
358350 await client.Beta.Sessions.Create(new()
from line 353
361353 EnvironmentID = environmentID,
362354 Resources =
363355 [
364 new BetaManagedAgentsMemoryStoreResourceParam
365 {
366 Type = BetaManagedAgentsMemoryStoreResourceParamType.MemoryStore,
367 MemoryStoreID = outputStoreID,
368 },
356 new BetaManagedAgentsMemoryStoreResourceParam { MemoryStoreID = outputStoreID },
369357 ],
370358 });
371359 }
from line 388
400388 
401389 ```java Java
402390 var output = dream.outputs().stream()
403 .filter(entry -> entry.type().equals(BetaDreamOutput.Type.MEMORY_STORE))
391 .filter(entry -> entry._type().equals(JsonValue.from("memory_store")))
404392 .findFirst();
405393 if (output.isPresent()) {
406394 var outputStoreId = output.get().memoryStoreId();

managed-agents/event-deltas Changed · +3 / -9 lines

from line 248
248248 [
249249 new BetaManagedAgentsUserMessageEventParams
250250 {
251 Type = BetaManagedAgentsUserMessageEventParamsType.UserMessage,
252251 Content =
253252 [
254 new BetaManagedAgentsTextBlock
255 {
256 Type = BetaManagedAgentsTextBlockType.Text,
257 Text = "Write a haiku about event streams.",
258 },
253 new BetaManagedAgentsTextBlock { Text = "Write a haiku about event streams." },
259254 ],
260255 },
261256 ],
from line 270
275270 // so other preview types (including ones added later) are skipped.
276271 if (start.Event.TryPickAgentMessage(out var preview))
277272 {
278 Console.WriteLine($"event_start {preview.Type.Raw()} {preview.ID}");
273 Console.WriteLine($"event_start {preview.Type.GetString()} {preview.ID}");
279274 }
280275 }
281276 else if (streamEvent.TryPickDeltaEvent(out var delta))
from line 380
385380 session.id(),
386381 EventSendParams.builder()
387382 .addEvent(BetaManagedAgentsUserMessageEventParams.builder()
388 .type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
389383 .addTextContent("Describe the repo in one sentence.")
390384 .build())
391385 .build()
from line 392
398392 case EVENT_START -> {
399393 if (event.asEventStart().event().isAgentMessage()) {
400394 var preview = event.asEventStart().event().asAgentMessage();
401 IO.println("event_start " + preview.type().asString() + " " + preview.id());
395 IO.println("event_start " + preview._type() + " " + preview.id());
402396 }
403397 }
404398 case EVENT_DELTA -> {

managed-agents/events-and-streaming Changed · +6 / -43 lines

from line 109
109109 [
110110 new BetaManagedAgentsUserMessageEventParams
111111 {
112 Type = BetaManagedAgentsUserMessageEventParamsType.UserMessage,
113 Content =
114 [
115 new BetaManagedAgentsTextBlock
116 {
117 Type = BetaManagedAgentsTextBlockType.Text,
118 Text = "Summarize the repo README",
119 },
120 ],
112 Content = [new BetaManagedAgentsTextBlock { Text = "Summarize the repo README" }],
121113 },
122114 ],
123115 });
from line 186
194186 session.id(),
195187 EventSendParams.builder()
196188 .addEvent(BetaManagedAgentsUserMessageEventParams.builder()
197 .type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
198189 .addTextContent("Summarize the repo README")
199190 .build())
200191 .build()
from line 572
581572 [
582573 new BetaManagedAgentsUserMessageEventParams
583574 {
584 Type = BetaManagedAgentsUserMessageEventParamsType.UserMessage,
585575 Content =
586576 [
587577 new BetaManagedAgentsTextBlock
588578 {
589 Type = BetaManagedAgentsTextBlockType.Text,
590579 Text = "Analyze the performance of the sort function in utils.py",
591580 },
592581 ],
from line 607
618607 session.id(),
619608 EventSendParams.builder()
620609 .addEvent(BetaManagedAgentsUserMessageEventParams.builder()
621 .type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
622610 .addTextContent("Analyze the performance of the sort function in utils.py")
623611 .build())
624612 .build());
from line 760
772760 [
773761 new BetaManagedAgentsUserCustomToolResultEventParams
774762 {
775 Type = BetaManagedAgentsUserCustomToolResultEventParamsType.UserCustomToolResult,
776763 CustomToolUseID = toolUse.ID,
777 Content =
778 [
779 new BetaManagedAgentsTextBlock
780 {
781 Type = BetaManagedAgentsTextBlockType.Text,
782 Text = result,
783 },
784 ],
764 Content = [new BetaManagedAgentsTextBlock { Text = result }],
785765 },
786766 ],
787767 });
from line 827
847827 session.id(),
848828 EventSendParams.builder()
849829 .addEvent(BetaManagedAgentsUserCustomToolResultEventParams.builder()
850 .type(BetaManagedAgentsUserCustomToolResultEventParams.Type.USER_CUSTOM_TOOL_RESULT)
851830 .customToolUseId(toolUse.id())
852831 .addTextContent(result)
853832 .build())
from line 980
1001980 [
1002981 new BetaManagedAgentsUserToolConfirmationEventParams
1003982 {
1004 Type = BetaManagedAgentsUserToolConfirmationEventParamsType.UserToolConfirmation,
1005983 ToolUseID = eventId,
1006984 Result = BetaManagedAgentsUserToolConfirmationEventParamsResult.Allow,
1007985 },
from line 1042
10641042 session.id(),
10651043 EventSendParams.builder()
10661044 .addEvent(BetaManagedAgentsUserToolConfirmationEventParams.builder()
1067 .type(BetaManagedAgentsUserToolConfirmationEventParams.Type.USER_TOOL_CONFIRMATION)
10681045 .toolUseId(toolUseId)
10691046 .result(BetaManagedAgentsUserToolConfirmationEventParams.Result.ALLOW)
10701047 .build())
from line 1184
12071184 [
12081185 new BetaManagedAgentsUserMessageEventParams
12091186 {
1210 Type = BetaManagedAgentsUserMessageEventParamsType.UserMessage,
12111187 Content =
12121188 [
12131189 new BetaManagedAgentsTextBlock
12141190 {
1215 Type = BetaManagedAgentsTextBlockType.Text,
12161191 Text = "Now run the tests against the changes you made earlier.",
12171192 },
12181193 ],
from line 1223
12481223 session.id(),
12491224 EventSendParams.builder()
12501225 .addEvent(BetaManagedAgentsUserMessageEventParams.builder()
1251 .type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
12521226 .addTextContent("Now run the tests against the changes you made earlier.")
12531227 .build())
12541228 .build());
from line 1355
13811355 {
13821356 Events =
13831357 [
1384 new BetaManagedAgentsUserInterruptEventParams
1385 {
1386 Type = BetaManagedAgentsUserInterruptEventParamsType.UserInterrupt,
1387 },
1358 new BetaManagedAgentsUserInterruptEventParams(),
13881359 new BetaManagedAgentsUserMessageEventParams
13891360 {
1390 Type = BetaManagedAgentsUserMessageEventParamsType.UserMessage,
13911361 Content =
13921362 [
13931363 new BetaManagedAgentsTextBlock
13941364 {
1395 Type = BetaManagedAgentsTextBlockType.Text,
13961365 Text = "Instead, focus on fixing the bug in line 42.",
13971366 },
13981367 ],
from line 1403
14341403 client.beta().sessions().events().send(
14351404 session.id(),
14361405 EventSendParams.builder()
1437 .addEvent(BetaManagedAgentsUserInterruptEventParams.builder()
1438 .type(BetaManagedAgentsUserInterruptEventParams.Type.USER_INTERRUPT)
1439 .build())
1406 .addEvent(BetaManagedAgentsUserInterruptEventParams.builder().build())
14401407 .addEvent(BetaManagedAgentsUserMessageEventParams.builder()
1441 .type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
14421408 .addTextContent("Instead, focus on fixing the bug in line 42.")
14431409 .build())
14441410 .build());
from line 1597
16311597 .build());
16321598 for (var event : events.data()) {
16331599 event.agentToolUse().ifPresent(toolUse ->
1634 IO.println("[" + toolUse.type() + "] " + toolUse.processedAt()));
1600 IO.println("[" + toolUse._type() + "] " + toolUse.processedAt()));
16351601 event.agentToolResult().ifPresent(toolResult ->
1636 IO.println("[" + toolResult.type() + "] " + toolResult.processedAt()));
1602 IO.println("[" + toolResult._type() + "] " + toolResult.processedAt()));
16371603 }
16381604 ```
16391605 
from line 1698
17321698 [
17331699 new BetaManagedAgentsSystemMessageEventParams
17341700 {
1735 Type = BetaManagedAgentsSystemMessageEventParamsType.SystemMessage,
17361701 Content =
17371702 [
17381703 new BetaManagedAgentsSystemContentBlock
17391704 {
1740 Type = BetaManagedAgentsSystemContentBlockType.Text,
17411705 Text = "The user's current timezone is America/New_York.",
17421706 },
17431707 ],
from line 1731
17671731 session.id(),
17681732 EventSendParams.builder()
17691733 .addEvent(BetaManagedAgentsSystemMessageEventParams.builder()
1770 .type(BetaManagedAgentsSystemMessageEventParams.Type.SYSTEM_MESSAGE)
17711734 .addTextContent("The user's current timezone is America/New_York.")
17721735 .build())
17731736 .build());

managed-agents/files Changed · +9 / -16 lines

from line 159
159159 [
160160 new BetaManagedAgentsFileResourceParams
161161 {
162 Type = "file",
163162 FileID = file.ID,
164163 MountPath = "/data.csv",
165164 },
from line 192
193192 .environmentId(environment.id())
194193 .addResource(
195194 BetaManagedAgentsFileResourceParams.builder()
196 .type(BetaManagedAgentsFileResourceParams.Type.FILE)
197195 .fileId(file.id())
198196 .mountPath("/data.csv")
199197 .build()
from line 206
208206 environmentID: $environment->id,
209207 resources: [
210208 BetaManagedAgentsFileResourceParams::with(
211 type: 'file',
212209 fileID: $file->id,
213210 mountPath: '/data.csv',
214211 ),
from line 304
307304 
308305 var resources = new[]
309306 {
310 new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_abc123", MountPath = "/data.csv" },
311 new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_def456", MountPath = "/config.json" },
312 new BetaManagedAgentsFileResourceParams { Type = BetaManagedAgentsFileResourceParamsType.File, FileID = "file_ghi789", MountPath = "/src/main.py" },
307 new BetaManagedAgentsFileResourceParams { FileID = "file_abc123", MountPath = "/data.csv" },
308 new BetaManagedAgentsFileResourceParams { FileID = "file_def456", MountPath = "/config.json" },
309 new BetaManagedAgentsFileResourceParams { FileID = "file_ghi789", MountPath = "/src/main.py" },
313310 };
314311 ```
315312 
from line 324
327324 
328325 var resources = List.of(
329326 BetaManagedAgentsFileResourceParams.builder()
330 .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_abc123").mountPath("/data.csv").build(),
327 .fileId("file_abc123").mountPath("/data.csv").build(),
331328 BetaManagedAgentsFileResourceParams.builder()
332 .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_def456").mountPath("/config.json").build(),
329 .fileId("file_def456").mountPath("/config.json").build(),
333330 BetaManagedAgentsFileResourceParams.builder()
334 .type(BetaManagedAgentsFileResourceParams.Type.FILE).fileId("file_ghi789").mountPath("/src/main.py").build()
331 .fileId("file_ghi789").mountPath("/src/main.py").build()
335332 );
336333 ```
337334 
from line 398
401398 ```csharp C#
402399 var resource = await client.Beta.Sessions.Resources.Add(session.ID, new()
403400 {
404 Type = "file",
405401 FileID = file.ID,
406402 });
407403 Console.WriteLine(resource.ID); // "sesrsc_01ABC..."
from line 422
426422 ResourceAddParams.builder()
427423 .betaManagedAgentsFileResourceParams(
428424 BetaManagedAgentsFileResourceParams.builder()
429 .type(BetaManagedAgentsFileResourceParams.Type.FILE)
430425 .fileId(file.id())
431426 .build()
432427 )
from line 433
438433 ```php PHP
439434 $resource = $client->beta->sessions->resources->add(
440435 $session->id,
441 type: 'file',
442436 fileID: $file->id,
443437 );
444438 echo "{$resource->id}\n"; // "sesrsc_01ABC..."
from line 496
502496 var listed = await client.Beta.Sessions.Resources.List(session.ID);
503497 await foreach (var entry in listed.Paginate())
504498 {
505 var type = entry.Match<string>(repo => repo.Type, fileRes => fileRes.Type, memoryStore => memoryStore.Type);
506 Console.WriteLine($"{entry.ID} {type}");
499 Console.WriteLine($"{entry.ID} {entry.Type.Raw()}");
507500 }
508501 
509502 await client.Beta.Sessions.Resources.Delete(resource.ID, new() { SessionID = session.ID });
from line 524
531524 switch (entry.type().value()) {
532525 case FILE -> {
533526 var fileResource = entry.asFile();
534 IO.println(fileResource.id() + " " + fileResource.type());
527 IO.println(fileResource.id() + " " + fileResource._type());
535528 }
536529 case GITHUB_REPOSITORY -> {
537530 var repoResource = entry.asGitHubRepository();
538 IO.println(repoResource.id() + " " + repoResource.type());
531 IO.println(repoResource.id() + " " + repoResource._type());
539532 }
540533 }
541534 }

managed-agents/github Changed · +4 / -25 lines

from line 123
123123 System = "You are a code review assistant with access to GitHub.",
124124 McpServers =
125125 [
126 new() { Type = "url", Name = "github", Url = "https://api.githubcopilot.com/mcp/" },
126 new() { Name = "github", Url = "https://api.githubcopilot.com/mcp/" },
127127 ],
128128 Tools =
129129 [
130 new BetaManagedAgentsAgentToolset20260401Params
131 {
132 Type = "agent_toolset_20260401",
133 },
134 new BetaManagedAgentsMcpToolsetParams
135 {
136 Type = "mcp_toolset",
137 McpServerName = "github",
138 },
130 new BetaManagedAgentsAgentToolset20260401Params(),
131 new BetaManagedAgentsMcpToolsetParams { McpServerName = "github" },
139132 ],
140133 });
141134 ```
from line 172
179172 .model(BetaManagedAgentsModel.CLAUDE_OPUS_5_5)
180173 .system("You are a code review assistant with access to GitHub.")
181174 .addMcpServer(BetaManagedAgentsUrlMcpServerParams.builder()
182 .type(BetaManagedAgentsUrlMcpServerParams.Type.URL)
183175 .name("github")
184176 .url("https://api.githubcopilot.com/mcp/")
185177 .build())
186 .addTool(BetaManagedAgentsAgentToolset20260401Params.builder()
187 .type(BetaManagedAgentsAgentToolset20260401Params.Type.AGENT_TOOLSET_20260401)
188 .build())
178 .addTool(BetaManagedAgentsAgentToolset20260401Params.builder().build())
189179 .addTool(BetaManagedAgentsMcpToolsetParams.builder()
190 .type(BetaManagedAgentsMcpToolsetParams.Type.MCP_TOOLSET)
191180 .mcpServerName("github")
192181 .build())
193182 .build());
from line 303
314303 [
315304 new BetaManagedAgentsGitHubRepositoryResourceParams
316305 {
317 Type = "github_repository",
318306 Url = "https://github.com/org/repo",
319307 MountPath = "/workspace/repo",
320308 AuthorizationToken = "ghp_your_github_token",
from line 336
348336 .agent(agent.id())
349337 .environmentId(environment.id())
350338 .addResource(BetaManagedAgentsGitHubRepositoryResourceParams.builder()
351 .type(BetaManagedAgentsGitHubRepositoryResourceParams.Type.GITHUB_REPOSITORY)
352339 .url("https://github.com/org/repo")
353340 .mountPath("/workspace/repo")
354341 .authorizationToken("ghp_your_github_token")
from line 489
502489 [
503490 new()
504491 {
505 Type = "github_repository",
506492 Url = "https://github.com/org/frontend",
507493 MountPath = "/workspace/frontend",
508494 AuthorizationToken = "ghp_your_github_token",
from line 495
509495 },
510496 new()
511497 {
512 Type = "github_repository",
513498 Url = "https://github.com/org/backend",
514499 MountPath = "/workspace/backend",
515500 AuthorizationToken = "ghp_your_github_token",
from line 526
541526 ```java Java
542527 var resources = List.of(
543528 BetaManagedAgentsGitHubRepositoryResourceParams.builder()
544 .type(BetaManagedAgentsGitHubRepositoryResourceParams.Type.GITHUB_REPOSITORY)
545529 .url("https://github.com/org/frontend")
546530 .mountPath("/workspace/frontend")
547531 .authorizationToken("ghp_your_github_token")
548532 .build(),
549533 BetaManagedAgentsGitHubRepositoryResourceParams.builder()
550 .type(BetaManagedAgentsGitHubRepositoryResourceParams.Type.GITHUB_REPOSITORY)
551534 .url("https://github.com/org/backend")
552535 .mountPath("/workspace/backend")
553536 .authorizationToken("ghp_your_github_token")
from line 789
806789 [
807790 new BetaManagedAgentsUserMessageEventParams
808791 {
809 Type = "user.message",
810792 Content =
811793 [
812794 new BetaManagedAgentsTextBlock
813795 {
814 Type = "text",
815796 Text = "Fix the type error in src/utils.ts, commit it to a new branch, and push it.",
816797 },
817798 ],
from line 827
846827 ```java Java
847828 client.beta().sessions().events().send(session.id(), EventSendParams.builder()
848829 .addEvent(BetaManagedAgentsUserMessageEventParams.builder()
849 .type(BetaManagedAgentsUserMessageEventParams.Type.USER_MESSAGE)
850830 .addContent(BetaManagedAgentsTextBlock.builder()
851 .type(BetaManagedAgentsTextBlock.Type.TEXT)
852831 .text("Fix the type error in src/utils.ts, commit it to a new branch, and push it.")
853832 .build())
854833 .build())

managed-agents/mcp-connector Changed · +5 / -18 lines

from line 115
115115 Model = BetaManagedAgentsModel.ClaudeOpus5_5,
116116 McpServers =
117117 [
118 new() { Type = "url", Name = "github", Url = "https://api.githubcopilot.com/mcp/" },
118 new() { Name = "github", Url = "https://api.githubcopilot.com/mcp/" },
119119 ],
120120 Tools =
121121 [
122 new BetaManagedAgentsAgentToolset20260401Params
123 {
124 Type = "agent_toolset_20260401",
125 },
126 new BetaManagedAgentsMcpToolsetParams { Type = "mcp_toolset", McpServerName = "github" },
122 new BetaManagedAgentsAgentToolset20260401Params(),
123 new BetaManagedAgentsMcpToolsetParams { McpServerName = "github" },
127124 ],
128125 });
129126 ```
from line 162
165162 .model(BetaManagedAgentsModel.CLAUDE_OPUS_5_5)
166163 .addMcpServer(
167164 BetaManagedAgentsUrlMcpServerParams.builder()
168 .type(BetaManagedAgentsUrlMcpServerParams.Type.URL)
169165 .name("github")
170166 .url("https://api.githubcopilot.com/mcp/")
171167 .build()
172168 )
169 .addTool(BetaManagedAgentsAgentToolset20260401Params.builder().build())
173170 .addTool(
174 BetaManagedAgentsAgentToolset20260401Params.builder()
175 .type(BetaManagedAgentsAgentToolset20260401Params.Type.AGENT_TOOLSET_20260401)
176 .build()
177 )
178 .addTool(
179171 BetaManagedAgentsMcpToolsetParams.builder()
180 .type(BetaManagedAgentsMcpToolsetParams.Type.MCP_TOOLSET)
181172 .mcpServerName("github")
182173 .build()
183174 )
from line 182
191182 model: 'claude-opus-5-5',
192183 mcpServers: [
193184 BetaManagedAgentsURLMCPServerParams::with(
194 type: 'url',
195185 name: 'github',
196186 url: 'https://api.githubcopilot.com/mcp/',
197187 ),
198188 ],
199189 tools: [
200 BetaManagedAgentsAgentToolset20260401Params::with(
201 type: 'agent_toolset_20260401',
202 ),
190 BetaManagedAgentsAgentToolset20260401Params::with(),
203191 BetaManagedAgentsMCPToolsetParams::with(
204 type: 'mcp_toolset',
205192 mcpServerName: 'github',
206193 ),
207194 ],

managed-agents/memory Changed · +1 / -8 lines

from line 289
289289 [
290290 new BetaManagedAgentsMemoryStoreResourceParam
291291 {
292 Type = "memory_store",
293292 MemoryStoreID = store.ID,
294293 Access = "read_write",
295294 Instructions = "User preferences and project context. Check before starting any task.",
from line 324
325324 .environmentId(environment.id())
326325 .addResource(
327326 BetaManagedAgentsMemoryStoreResourceParam.builder()
328 .type(BetaManagedAgentsMemoryStoreResourceParam.Type.MEMORY_STORE)
329327 .memoryStoreId(store.id())
330328 .access(BetaManagedAgentsMemoryStoreResourceParam.Access.READ_WRITE)
331329 .instructions("User preferences and project context. Check before starting any task.")
from line 779
781779 {
782780 MemoryStoreID = store.ID,
783781 Content = "CORRECTED: Always use 2-space indentation.",
784 Precondition = new BetaManagedAgentsPrecondition
785 {
786 Type = "content_sha256",
787 ContentSha256 = mem.ContentSha256,
788 },
782 Precondition = new BetaManagedAgentsPrecondition { ContentSha256 = mem.ContentSha256 },
789783 });
790784 ```
791785 
from line 805
811805 .content("CORRECTED: Always use 2-space indentation.")
812806 .precondition(
813807 BetaManagedAgentsPrecondition.builder()
814 .type(BetaManagedAgentsPrecondition.Type.CONTENT_SHA256)
815808 .contentSha256(mem.contentSha256())
816809 .build()
817810 )
Feedback