跳转到主要内容
POST
/
safari
/
a2a-agent
/
create
创建 A2A 智能体
curl --request POST \
  --url 'https://api.flashcat.cloud/safari/a2a-agent/create?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_name": "Network Diagnostics Agent",
  "card_url": "https://agents.example.com/network-diag/.well-known/agent.json",
  "description": "Runs traceroute and BGP-path analysis for network incidents.",
  "auth_type": "bearer",
  "auth_config": {
    "token": "secret"
  },
  "streaming": true,
  "team_id": 0
}
'
{
  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
  "data": {
    "agent_id": "a2a_9d4c1f60b3a2"
  }
}

限制说明

项目说明
速率限制每个 app_key 1,000 次/分钟50 次/秒
权限要求无 —— 持有有效的 app_key 即可调用

使用说明

  • 创建时会拉取并校验 card_url 上的 agent card;若无法访问则返回 InvalidParameter。
  • 每次调用都会记入账户审计日志。

授权

app_key
string
query
必填

Flashduty 控制台「账户 → APP Keys」中签发的 app_key。调用任何公共 API 都需要它。

请求体

application/json

Configuration for a new A2A agent.

agent_name
string
必填

Display name of the agent.

Maximum string length: 128
card_url
string
必填

URL of the agent's published A2A agent card.

description
string

What this agent does and when to delegate to it.

auth_type
string

Authentication scheme used when calling the agent.

auth_config
object

Authentication parameters keyed by name.

streaming
boolean

Whether the agent supports streaming responses.

team_id
integer<int64>

Owning team for the new agent; 0 for account scope.

auth_mode
string

Credential model; defaults to shared.

secret_schema
string

JSON schema of the per-user secret; required when auth_mode is per_user_secret.

oauth_metadata
string

OAuth metadata JSON; reserved for OAuth-based auth.

响应

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

Identifier of the newly created A2A agent.