Create an agent
Mint a new agent definition scoped to the caller’s org; the CP assigns its UUID. With ?connect=true, also provisions a daemon connect token and start command for onboarding; a request authenticated by an API key cannot use it. A managed memory binding is stored with its resolved home: an agent placed on a group or the managed pool keeps its memory in the Control Plane (an explicit daemon home there is refused with 409); anywhere else the given home or daemon. execution names the strategy sessions run in and is checked against the strategies the placement reports: one it does not offer, or offers but cannot run now, is refused with 409 and the reason. The legacy runInSandbox maps to host or the placement’s sandbox, and a request naming both must agree (400). repositorySelector names the Decision provider and model the per-session repository selector asks; one that does not answer Choice questions is refused with 400.
授权
bearerAuth 位置: header
路径参数
查询参数
请求主体
application/json
TypeScript 定义
在 TypeScript 中使用 request body 类型。
响应主体
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/orgs/string/agents" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "runtime": "string" }'{ "id": "string", "orgId": "string", "name": "string", "displayName": "string", "builtin": true, "icon": { "kind": "runtime" }, "iconUrl": "string", "description": "string", "runtime": "string", "model": "string", "reasoningEffort": "string", "outputMode": "string", "showFooter": true, "showStatusBar": true, "fastMode": true, "permissionMode": "string", "allowRuntimeChangesInChat": true, "pause": true, "env": { "property1": "string", "property2": "string" }, "secretKeys": [ "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" } ] }, "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" }, "status": "string", "placementKind": "daemon", "daemonId": "string", "daemonName": "string", "setId": "string", "placementReady": 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, "runInSandbox": true, "execution": "string", "strategies": { "property1": { "available": true }, "property2": { "available": true } }, "sandboxSupported": true, "sandboxRequired": true, "sandboxUnavailable": "string", "hookKinds": [ "webhook" ], "connect": { "daemonId": "string", "apiKey": "string", "displayTail": "string", "command": "string" }}