agent-setup changedmanaged-agents/agent-setup
Recorded here
Lines+102added
Lines−4removed
From line
469
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits24to this page, all time
The whole hunk
from line 469, old and new numbered
/
from line 469
469469
470470The 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:
471471
472<CodeGroup exclude="shell:CLI, python, typescript, csharp, go, java, php, ruby">
472<CodeGroup>
473473 ```bash cURL
474474 updated_agent=$(curl -fsSL "https://api.anthropic.com/v1/agents/$AGENT_ID" \
475475 -H "x-api-key: $ANTHROPIC_API_KEY" \
from line 482
482482
483483 echo "New version: $(jq -r '.version' <<< "$updated_agent")"
484484 ```
485
486 ```bash CLI
487 ant beta:agents update \
488 --agent-id "$AGENT_ID" \
489 --description "Writes and reviews code."
490 ```
491
492 ```python Python
493 unconditional_agent = client.beta.agents.update(
494 agent.id,
495 description="Writes and reviews code.",
496 )
497
498 print(f"New version: {unconditional_agent.version}")
499 ```
500
501 ```typescript TypeScript
502 const unconditionalAgent = await client.beta.agents.update(agent.id, {
503 description: "Writes and reviews code.",
504 });
505
506 console.log(`New version: ${unconditionalAgent.version}`);
507 ```
508
509 ```csharp C#
510 var unconditionalAgent = await client.Beta.Agents.Update(agent.ID, new()
511 {
512 Description = "Writes and reviews code.",
513 });
514
515 Console.WriteLine($"New version: {unconditionalAgent.Version}");
516 ```
517
518 ```go Go
519 unconditionalAgent, err := client.Beta.Agents.Update(ctx, agent.ID, anthropic.BetaAgentUpdateParams{
520 Description: anthropic.String("Writes and reviews code."),
521 })
522 if err != nil {
523 panic(err)
524 }
525
526 fmt.Printf("New version: %d\n", unconditionalAgent.Version)
527 ```
528
529 ```java Java
530 var unconditionalAgent = client.beta().agents().update(
531 agent.id(),
532 AgentUpdateParams.builder()
533 .description("Writes and reviews code.")
534 .build()
535 );
536
537 IO.println("New version: " + unconditionalAgent.version());
538 ```
539
540 ```php PHP
541 $unconditionalAgent = $client->beta->agents->update(
542 $agent->id,
543 description: 'Writes and reviews code.',
544 );
545
546 echo "New version: {$unconditionalAgent->version}\n";
547 ```
548
549 ```ruby Ruby
550 unconditional_agent = client.beta.agents.update(
551 agent.id,
552 description: "Writes and reviews code."
553 )
554
555 puts "New version: #{unconditional_agent.version}"
556 ```
485557</CodeGroup>
486558
487559### Update semantics
from line 576
504576
505577The following update clears the description, deletes the `team` key from `metadata` (java, php; csharp, go: `Metadata`), and sets `workflows` (java, php; csharp, go: `Workflows`) to `null`, which turns dynamic workflows on:
506578
507<CodeGroup exclude="shell:CLI">
579<CodeGroup defaultLanguage="CLI">
508580 ```bash cURL
509581 cleared_agent=$(curl -fsSL "https://api.anthropic.com/v1/agents/$AGENT_ID" \
510582 -H "x-api-key: $ANTHROPIC_API_KEY" \
from line 592
520592 echo "Description: $(jq -r '.description' <<< "$cleared_agent")"
521593 ```
522594
595 <CodeGroupItem>
596 ```bash CLI
597 ant apply code-reviewer.md
598 ```
599
600 <File filename="code-reviewer.md">
601 ```markdown
602 ---
603 name: Code Reviewer
604 model: claude-opus-5-5
605 tools:
606 - type: agent_toolset_20260401
607 metadata:
608 owner: docs
609 multiagent:
610 type: multiagent_20261001
611 workflows: null
612 ---
613
614 You are a helpful coding agent.
615 ```
616 </File>
617
618 The file no longer has `description` or the `team` key, so `ant apply` sends `null` for them. Deleting a setting inside `multiagent` keeps its stored value, so the file sets `workflows` to `null`.
619 </CodeGroupItem>
620
523621 ```python Python
524622 cleared_agent = client.beta.agents.update(
525623 agent.id,
from line 779
681779
682780 ```php PHP
683781 foreach ($client->beta->agents->versions->list($agent->id)->pagingEachItem() as $version) {
684 echo "Version {$version->version}: {$version->updatedAt->format(DateTimeInterface::ATOM)}\n";
782 echo "Version {$version->version}: {$version->updatedAt->format(\DateTimeInterface::ATOM)}\n";
685783 }
686784 ```
687785
from line 840
742840 ```php PHP
743841 $archived = $client->beta->agents->archive($agent->id);
744842
745 echo "Archived at: {$archived->archivedAt->format(DateTimeInterface::ATOM)}\n";
843 echo "Archived at: {$archived->archivedAt->format(\DateTimeInterface::ATOM)}\n";
746844 ```
747845
748846 ```ruby Ruby
No line in this hunk matches that.