에이전트 업데이트
POST/v1/agents/{agent_id}
에이전트 업데이트
Parameters
Returns
에이전트 업데이트
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$client = new Client(apiKey: 'my-anthropic-api-key');
$betaManagedAgentsAgent = $client->beta->agents->update(
'agent_011CZkYpogX7uDKUyvBTophP',
description: 'updated',
mcpServers: [
[
'name' => 'example-mcp',
'type' => 'url',
'url' => 'https://example-server.modelcontextprotocol.io/sse',
],
],
metadata: ['foo' => 'string'],
model: [
'id' => BetaManagedAgentsModel::CLAUDE_OPUS_5,
'effort' => 'low',
'inferenceGeo' => 'inference_geo',
'speed' => 'standard',
],
multiagent: [
'agents' => ['agent_011CZkYqphY8vELVzwCUpqiQ', ['type' => 'self']],
'type' => 'coordinator',
],
name: 'name',
skills: [['skillID' => 'xlsx', 'type' => 'anthropic', '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.',
tools: [
[
'type' => 'agent_toolset_20260401',
'configs' => [
[
'name' => 'bash',
'enabled' => true,
'permissionPolicy' => ['type' => 'always_allow'],
'type' => 'bash',
],
],
'defaultConfig' => [
'enabled' => true, 'permissionPolicy' => ['type' => 'always_allow']
],
],
],
version: 1,
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);
var_dump($betaManagedAgentsAgent);Response 200
{
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"description": "A general-purpose starter agent.",
"mcp_servers": [
{
"name": "example-mcp",
"type": "url",
"url": "https://example-server.modelcontextprotocol.io/sse"
}
],
"metadata": {
"foo": "bar"
},
"model": {
"id": "claude-opus-5",
"effort": {
"type": "low"
},
"inference_geo": "inference_geo",
"speed": "standard"
},
"multiagent": {
"agents": [
{
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"type": "agent",
"version": 1
}
],
"type": "coordinator"
},
"name": "My First Agent",
"skills": [
{
"skill_id": "xlsx",
"type": "anthropic",
"version": "1"
},
{
"skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
"type": "custom",
"version": "2"
}
],
"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.",
"tools": [
{
"configs": [
{
"enabled": true,
"name": "bash",
"permission_policy": {
"type": "always_allow"
},
"type": "bash"
}
],
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"type": "agent_toolset_20260401"
}
],
"type": "agent",
"updated_at": "2026-03-15T10:00:00Z",
"version": 1
}Returns Examples
Response 200
{
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"description": "A general-purpose starter agent.",
"mcp_servers": [
{
"name": "example-mcp",
"type": "url",
"url": "https://example-server.modelcontextprotocol.io/sse"
}
],
"metadata": {
"foo": "bar"
},
"model": {
"id": "claude-opus-5",
"effort": {
"type": "low"
},
"inference_geo": "inference_geo",
"speed": "standard"
},
"multiagent": {
"agents": [
{
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"type": "agent",
"version": 1
}
],
"type": "coordinator"
},
"name": "My First Agent",
"skills": [
{
"skill_id": "xlsx",
"type": "anthropic",
"version": "1"
},
{
"skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
"type": "custom",
"version": "2"
}
],
"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.",
"tools": [
{
"configs": [
{
"enabled": true,
"name": "bash",
"permission_policy": {
"type": "always_allow"
},
"type": "bash"
}
],
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"type": "agent_toolset_20260401"
}
],
"type": "agent",
"updated_at": "2026-03-15T10:00:00Z",
"version": 1
}