curl --request POST \
--url 'https://api.flashcat.cloud/safari/a2a-agent/create?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "deploy-bot",
"instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
"card_url": "https://agents.example.com/deploy-bot/card",
"auth_type": "bearer",
"streaming": true,
"team_id": 0,
"environment_kind": "byoc",
"environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m"
}
'import requests
url = "https://api.flashcat.cloud/safari/a2a-agent/create?app_key="
payload = {
"agent_name": "deploy-bot",
"instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
"card_url": "https://agents.example.com/deploy-bot/card",
"auth_type": "bearer",
"streaming": True,
"team_id": 0,
"environment_kind": "byoc",
"environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
agent_name: 'deploy-bot',
instructions: 'Inspect deployment pipelines and propose rollbacks when a canary fails health checks.',
card_url: 'https://agents.example.com/deploy-bot/card',
auth_type: 'bearer',
streaming: true,
team_id: 0,
environment_kind: 'byoc',
environment_id: 'env_8s7Hn2kLpQ3xYbVc4Wd2m'
})
};
fetch('https://api.flashcat.cloud/safari/a2a-agent/create?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/safari/a2a-agent/create?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_name' => 'deploy-bot',
'instructions' => 'Inspect deployment pipelines and propose rollbacks when a canary fails health checks.',
'card_url' => 'https://agents.example.com/deploy-bot/card',
'auth_type' => 'bearer',
'streaming' => true,
'team_id' => 0,
'environment_kind' => 'byoc',
'environment_id' => 'env_8s7Hn2kLpQ3xYbVc4Wd2m'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/safari/a2a-agent/create?app_key="
payload := strings.NewReader("{\n \"agent_name\": \"deploy-bot\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks when a canary fails health checks.\",\n \"card_url\": \"https://agents.example.com/deploy-bot/card\",\n \"auth_type\": \"bearer\",\n \"streaming\": true,\n \"team_id\": 0,\n \"environment_kind\": \"byoc\",\n \"environment_id\": \"env_8s7Hn2kLpQ3xYbVc4Wd2m\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/safari/a2a-agent/create?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"agent_name\": \"deploy-bot\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks when a canary fails health checks.\",\n \"card_url\": \"https://agents.example.com/deploy-bot/card\",\n \"auth_type\": \"bearer\",\n \"streaming\": true,\n \"team_id\": 0,\n \"environment_kind\": \"byoc\",\n \"environment_id\": \"env_8s7Hn2kLpQ3xYbVc4Wd2m\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/a2a-agent/create?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_name\": \"deploy-bot\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks when a canary fails health checks.\",\n \"card_url\": \"https://agents.example.com/deploy-bot/card\",\n \"auth_type\": \"bearer\",\n \"streaming\": true,\n \"team_id\": 0,\n \"environment_kind\": \"byoc\",\n \"environment_id\": \"env_8s7Hn2kLpQ3xYbVc4Wd2m\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}创建 A2A 智能体
通过智能体卡片 URL 注册新的 A2A 远程智能体。
curl --request POST \
--url 'https://api.flashcat.cloud/safari/a2a-agent/create?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"agent_name": "deploy-bot",
"instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
"card_url": "https://agents.example.com/deploy-bot/card",
"auth_type": "bearer",
"streaming": true,
"team_id": 0,
"environment_kind": "byoc",
"environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m"
}
'import requests
url = "https://api.flashcat.cloud/safari/a2a-agent/create?app_key="
payload = {
"agent_name": "deploy-bot",
"instructions": "Inspect deployment pipelines and propose rollbacks when a canary fails health checks.",
"card_url": "https://agents.example.com/deploy-bot/card",
"auth_type": "bearer",
"streaming": True,
"team_id": 0,
"environment_kind": "byoc",
"environment_id": "env_8s7Hn2kLpQ3xYbVc4Wd2m"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
agent_name: 'deploy-bot',
instructions: 'Inspect deployment pipelines and propose rollbacks when a canary fails health checks.',
card_url: 'https://agents.example.com/deploy-bot/card',
auth_type: 'bearer',
streaming: true,
team_id: 0,
environment_kind: 'byoc',
environment_id: 'env_8s7Hn2kLpQ3xYbVc4Wd2m'
})
};
fetch('https://api.flashcat.cloud/safari/a2a-agent/create?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/safari/a2a-agent/create?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_name' => 'deploy-bot',
'instructions' => 'Inspect deployment pipelines and propose rollbacks when a canary fails health checks.',
'card_url' => 'https://agents.example.com/deploy-bot/card',
'auth_type' => 'bearer',
'streaming' => true,
'team_id' => 0,
'environment_kind' => 'byoc',
'environment_id' => 'env_8s7Hn2kLpQ3xYbVc4Wd2m'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/safari/a2a-agent/create?app_key="
payload := strings.NewReader("{\n \"agent_name\": \"deploy-bot\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks when a canary fails health checks.\",\n \"card_url\": \"https://agents.example.com/deploy-bot/card\",\n \"auth_type\": \"bearer\",\n \"streaming\": true,\n \"team_id\": 0,\n \"environment_kind\": \"byoc\",\n \"environment_id\": \"env_8s7Hn2kLpQ3xYbVc4Wd2m\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/safari/a2a-agent/create?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"agent_name\": \"deploy-bot\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks when a canary fails health checks.\",\n \"card_url\": \"https://agents.example.com/deploy-bot/card\",\n \"auth_type\": \"bearer\",\n \"streaming\": true,\n \"team_id\": 0,\n \"environment_kind\": \"byoc\",\n \"environment_id\": \"env_8s7Hn2kLpQ3xYbVc4Wd2m\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/a2a-agent/create?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_name\": \"deploy-bot\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks when a canary fails health checks.\",\n \"card_url\": \"https://agents.example.com/deploy-bot/card\",\n \"auth_type\": \"bearer\",\n \"streaming\": true,\n \"team_id\": 0,\n \"environment_kind\": \"byoc\",\n \"environment_id\": \"env_8s7Hn2kLpQ3xYbVc4Wd2m\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D"
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个 app_key 300 次/分钟;20 次/秒 |
| 权限要求 | Agent 管理(ai-sre) |
使用说明
instructions为必填项;已弃用的description字段仍保留以兼容旧客户端,若两者同时传入则必须与instructions完全一致。card_url必须是 host 非空的绝对http/httpsURL(可达性由执行环境验证,此处不检查);auth_type仅接受none、api_key或bearer。environment_kind仅接受空字符串(自动)或byoc;cloud将被拒绝。byoc需要environment_id,且该 Runner 对调用者可见。- 创建到某个团队(
team_id > 0)需要调用者真实属于该团队;只有账户 owner/admin 可以在账户级(team_id=0)创建。 - 每次调用都会记录到账户审计日志。
授权
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.
请求体
新建 A2A 智能体的注册参数。
智能体显示名称。
128远程智能体的自然语言指令。必填 —— 已弃用的 description 字段仍保留以兼容旧客户端,若两者同时传入则必须与 instructions 完全一致。
2000远程智能体卡片的 URL。必须是 host 非空的绝对 http 或 https URL;可达性由执行环境在运行时验证,创建时不检查。
访问远程智能体的认证类型:none、api_key 或 bearer。
认证配置键值对,如 API Key 或 Bearer Token。敏感键(api_key、token、client_secret)的值在返回时会被挖码。
Show child attributes
Show child attributes
远程智能体是否支持流式响应。
团队范围:0 = 账户级;>0 = 团队。在账户级创建需要 owner/admin 角色;创建到某个团队需要真实属于该团队。
执行环境绑定。省略或传空字符串表示自动路由;byoc 将智能体固定到 environment_id 指定的 Runner。不接受 cloud —— 已配置的 A2A 智能体需要持久 Runner,而非一次性云沙箱。
, byoc BYOC Runner ID。当 environment_kind=byoc 时必填;该 Runner 必须属于账户或调用者所属的团队。
认证模式:shared(默认)所有用户共享一份凭证;per_user_secret 需要 secret_schema.header_name;per_user_oauth 为每个用户单独进行 OAuth。
JSON 编码的密钥 schema,例如 {"header_name":"X-Api-Key"};auth_mode=per_user_secret 时必填。
JSON 编码的 OAuth 元数据;由 per_user_oauth 模式的 OAuth 发现流程填充。
允许该智能体使用非回环的 HTTP OAuth 发现/元数据端点,而非强制 HTTPS。默认为 false。
连接到该智能体端点时跳过 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.
Unique ID for this request. Mirrored in the Flashcat-Request-Id header. Include it when reporting issues.
"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
Error payload inside the response envelope. Present only on non-2xx responses.
Show child attributes
Show child attributes
注册 A2A 智能体的结果。
Show child attributes
Show child attributes
此页面对您有帮助吗?