Skip to main content
POST
创建 A2A 智能体

限制说明

使用说明

  • instructions 为必填项;已弃用的 description 字段仍保留以兼容旧客户端,若两者同时传入则必须与 instructions 完全一致。
  • card_url 必须是 host 非空的绝对 http/https URL(可达性由执行环境验证,此处不检查);auth_type 仅接受 noneapi_keybearer
  • environment_kind 仅接受空字符串(自动)或 byoccloud 将被拒绝。byoc 需要 environment_id,且该 Runner 对调用者可见。
  • 创建到某个团队(team_id > 0)需要调用者真实属于该团队;只有账户 owner/admin 可以在账户级(team_id=0)创建。
  • 每次调用都会记录到账户审计日志。

授权

app_key
string
query
必填

App key issued from the Flashduty console. Required on every public API call. Keep it secret — it grants the same access as the owning account.

请求体

application/json

新建 A2A 智能体的注册参数。

agent_name
string
必填

智能体显示名称。

Maximum string length: 128
instructions
string
必填

远程智能体的自然语言指令。必填 —— 已弃用的 description 字段仍保留以兼容旧客户端,若两者同时传入则必须与 instructions 完全一致。

Maximum string length: 2000
card_url
string
必填

远程智能体卡片的 URL。必须是 host 非空的绝对 httphttps URL;可达性由执行环境在运行时验证,创建时不检查。

auth_type
string

访问远程智能体的认证类型:noneapi_keybearer

auth_config
object

认证配置键值对,如 API Key 或 Bearer Token。敏感键(api_keytokenclient_secret)的值在返回时会被挖码。

streaming
boolean

远程智能体是否支持流式响应。

team_id
integer<int64>

团队范围:0 = 账户级;>0 = 团队。在账户级创建需要 owner/admin 角色;创建到某个团队需要真实属于该团队。

environment_kind
enum<string>

执行环境绑定。省略或传空字符串表示自动路由;byoc 将智能体固定到 environment_id 指定的 Runner。不接受 cloud —— 已配置的 A2A 智能体需要持久 Runner,而非一次性云沙箱。

可用选项:
,
byoc
environment_id
string

BYOC Runner ID。当 environment_kind=byoc 时必填;该 Runner 必须属于账户或调用者所属的团队。

auth_mode
string

认证模式:shared(默认)所有用户共享一份凭证;per_user_secret 需要 secret_schema.header_nameper_user_oauth 为每个用户单独进行 OAuth。

secret_schema
string

JSON 编码的密钥 schema,例如 {"header_name":"X-Api-Key"}auth_mode=per_user_secret 时必填。

oauth_metadata
string

JSON 编码的 OAuth 元数据;由 per_user_oauth 模式的 OAuth 发现流程填充。

allow_insecure_oauth_http
boolean

允许该智能体使用非回环的 HTTP OAuth 发现/元数据端点,而非强制 HTTPS。默认为 false。

allow_insecure_tls_skip_verify
boolean

连接到该智能体端点时跳过 TLS 证书验证(自签/私有证书)。默认为 false。

响应

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
必填

Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.

示例:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

注册 A2A 智能体的结果。