Update an agent
Edit the agent spec or widen an existing GitHub workspace from read to write access; the change hot-syncs the owning daemon’s replica and rides the next register/launch. A managed memory binding without a home keeps the current one. Switching the home from daemon to control-plane is accepted and flags a migration the owning daemon completes; the reverse is refused with 409 unless force is set, and then drops every memory file and change-log record the Control Plane holds for the agent. An agent placed on a group or the managed pool cannot name the daemon home, nor can an agent in assistant mode: turning assistant mode on switches a daemon home to control-plane in the same write and flags the migration, and while it is on the memory must stay managed and the forced return is refused with 409. A new execution is checked against the strategies the placement reports and refused with 409 when it cannot run there; it reaches only sessions created afterwards. repositorySelector names the Decision provider and model the per-session repository selector asks, must answer Choice questions (400 otherwise), and null clears it (409 while any repository authorization or installation grant is marked decision). liveSecrets merges key by key like secrets (an object { value, description? } sets one, null deletes it): a live secret is fetched by the agent’s own shell when a command needs it, never placed in its environment, and saving one restarts nothing; a name already used by an environment variable or secret of the agent or its organization answers 409.
授权
bearerAuth 位置: header
路径参数
请求主体
application/json
TypeScript 定义
在 TypeScript 中使用 request body 类型。
响应主体
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/orgs/string/agents/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "orgId": "string", "name": "string", "displayName": "string", "builtin": true, "icon": { "kind": "runtime" }, "iconUrl": "string", "description": "string", "runtime": "string", "model": "string", "modelProvider": "anthropic", "reasoningEffort": "string", "outputMode": "string", "showFooter": true, "showStatusBar": true, "fastMode": true, "permissionMode": "string", "chatActions": "talk", "pause": true, "env": { "property1": "string", "property2": "string" }, "secretKeys": [ "string" ], "liveSecrets": [ { "name": "string", "description": "string" } ], "organizationVariables": [ { "key": "string", "value": "string" } ], "organizationSecretKeys": [ "string" ], "mcpServers": [ "string" ], "skills": [ "string" ], "managedSkills": [ "c4df27e1-6f4c-41ef-86f9-baccc4a06930" ], "decisionIds": [ "e744da2d-8f5c-4e11-a126-0c6194d4b80a" ], "modelSelection": { "decisionId": "caa985ad-f12f-4ef1-943f-c1812738ec7a", "rules": [ { "runtime": "string", "model": "string", "effort": "string", "permissionMode": "string", "fastMode": true, "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } } } ], "steps": [ { "decisionId": "caa985ad-f12f-4ef1-943f-c1812738ec7a", "rules": [ { "runtime": "string", "model": "string", "effort": "string", "permissionMode": "string", "fastMode": true, "when": { "type": "choice", "thresholds": { "property1": 0, "property2": 0 } } } ], "id": "string" } ] }, "coordinatorModel": { "runtime": "string", "model": "string", "effort": "string", "fastMode": true }, "repositorySelector": { "providerId": "string", "model": "string" }, "memory": { "provider": "managed", "autoDistill": true, "dreaming": { "enabled": true, "sessionWindow": 1, "schedule": "string", "timezone": "string", "instructions": "string", "mineSkills": true, "autoAdopt": true }, "scope": "agent", "home": "daemon", "homeMigration": "pending" }, "assistantMode": { "enabled": true, "timezone": "string", "instructions": "string", "limits": { "maxConcurrentSubsessions": 1, "dailyCheckBudget": 1, "permissionWaitHours": 1 } }, "status": "string", "placementKind": "daemon", "daemonId": "string", "daemonName": "string", "setId": "string", "placementReady": true, "ahpWebchat": true, "holderDaemonId": "string", "workspace": { "mode": "scratch" }, "workspaceRepoId": "string", "capabilities": [ "string" ], "createdAt": "string", "createdBy": "string", "lastModifiedAt": "string", "lastModifiedBy": "string", "visibility": "org", "sharedWith": [ "string" ], "canEdit": true, "canManageSharing": true, "callPolicy": "all", "allowedCallerAgentIds": [ "string" ], "outboundPolicy": "all", "allowedTargetAgentIds": [ "string" ], "introduceOnJoin": true, "newConversationMode": "auto", "githubAppId": "string", "computerUse": { "enabled": false, "computers": [], "managed": { "mode": "ephemeral" } }, "execution": "string", "strategies": { "property1": { "available": true }, "property2": { "available": true } }, "hookKinds": [ "webhook" ]}