更新 A2A 智能体
curl --request POST \
--url 'https://api.flashcat.cloud/safari/a2a-agent/update?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
"instructions": "Inspect deployment pipelines and propose rollbacks."
}
'import requests
url = "https://api.flashcat.cloud/safari/a2a-agent/update?app_key="
payload = {
"agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
"instructions": "Inspect deployment pipelines and propose rollbacks."
}
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_id: 'a2a_6mWqZ2pK9nLcR3tY8uVb4D',
instructions: 'Inspect deployment pipelines and propose rollbacks.'
})
};
fetch('https://api.flashcat.cloud/safari/a2a-agent/update?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/update?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_id' => 'a2a_6mWqZ2pK9nLcR3tY8uVb4D',
'instructions' => 'Inspect deployment pipelines and propose rollbacks.'
]),
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/update?app_key="
payload := strings.NewReader("{\n \"agent_id\": \"a2a_6mWqZ2pK9nLcR3tY8uVb4D\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks.\"\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/update?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"a2a_6mWqZ2pK9nLcR3tY8uVb4D\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/a2a-agent/update?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_id\": \"a2a_6mWqZ2pK9nLcR3tY8uVb4D\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks.\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"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 智能体
更新 A2A 智能体
对 A2A 智能体执行部分更新;省略字段表示不变。
POST
/
safari
/
a2a-agent
/
update
更新 A2A 智能体
curl --request POST \
--url 'https://api.flashcat.cloud/safari/a2a-agent/update?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
"instructions": "Inspect deployment pipelines and propose rollbacks."
}
'import requests
url = "https://api.flashcat.cloud/safari/a2a-agent/update?app_key="
payload = {
"agent_id": "a2a_6mWqZ2pK9nLcR3tY8uVb4D",
"instructions": "Inspect deployment pipelines and propose rollbacks."
}
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_id: 'a2a_6mWqZ2pK9nLcR3tY8uVb4D',
instructions: 'Inspect deployment pipelines and propose rollbacks.'
})
};
fetch('https://api.flashcat.cloud/safari/a2a-agent/update?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/update?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_id' => 'a2a_6mWqZ2pK9nLcR3tY8uVb4D',
'instructions' => 'Inspect deployment pipelines and propose rollbacks.'
]),
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/update?app_key="
payload := strings.NewReader("{\n \"agent_id\": \"a2a_6mWqZ2pK9nLcR3tY8uVb4D\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks.\"\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/update?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"a2a_6mWqZ2pK9nLcR3tY8uVb4D\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/a2a-agent/update?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_id\": \"a2a_6mWqZ2pK9nLcR3tY8uVb4D\",\n \"instructions\": \"Inspect deployment pipelines and propose rollbacks.\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4"
}{
"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."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 300 次/分钟;20 次/秒 |
| 权限要求 | Agent 管理(ai-sre) |
使用说明
- 需要对智能体当前所属团队有编辑权限:账户级智能体(
team_id=0)仅账户 owner 或管理员可改;团队智能体仅该团队成员可改(owner/管理员也必须是该团队成员)。 - 改到其他团队(
team_id > 0)要求调用者属于目标团队;改为账户级(team_id=0)仅限账户 owner 或管理员。变更团队但未同时传environments时,现有 Runner 条目必须对调用者仍可选,否则更新被拒绝。 auth_config整体替换:未传入的键会被删除。对api_key、token、client_secret,回传详情接口返回的脱敏值会保留已存储的密钥,传空字符串则清除该密钥。- 传入
auth_mode时,secret_schema会被同一请求中的值覆盖(未传则置空)。auth_mode或card_url实际发生变化时会清空oauth_metadata,除非同时传入非空的oauth_metadata;只传空的oauth_metadata不会改动已存储的值。 - 修改
card_url会重新执行创建时的智能体卡片兼容性检查;修改agent_name会重新校验命名规则。 - 每次调用都会记录到账户审计日志。
授权
请求体
application/json
对 A2A 智能体执行部分更新。字段为 null 或省略时保持不变。
新的认证模式,省略表示不变。取值(凭据由谁提供):
shared(默认,空值等同):使用保存在智能体上的一份凭据(auth_type+auth_config),所有调用者共用。per_user_secret:每位用户各自保存密钥,放在secret_schema.header_name指定的请求头中发送。per_user_oauth:每位用户各自完成 OAuth 授权,首次使用时完成发现与客户端注册。
传入时,secret_schema 会被同一请求中的值覆盖。
可用选项:
shared, per_user_secret, per_user_oauth 响应
成功
所有 Flashduty 公开 API 共用的标准响应结构。成功时 data 为接口专属载荷且不含 error;失败时 error 存在而 data 缺失。request_id 始终存在,并会同步写入 Flashcat-Request-Id 响应头。
此页面对您有帮助吗?