智能体
归档智能体
通过 OMA API 归档智能体。
POST
/
v1
/
agents
/
{agent_id}
/
archive
归档智能体
curl --request POST \
--url http://localhost:38080/v1/agents/{agent_id}/archive \
--header 'X-Api-Key: <api-key>'import requests
url = "http://localhost:38080/v1/agents/{agent_id}/archive"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('http://localhost:38080/v1/agents/{agent_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/agents/{agent_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"description": "通用入门智能体。",
"mcp_servers": [
{
"name": "example-mcp",
"type": "url",
"url": "https://example-server.modelcontextprotocol.io/sse"
}
],
"metadata": {
"foo": "bar"
},
"model": {
"id": "claude-sonnet-4-6",
"effort": {
"type": "low"
},
"inference_geo": "inference_geo",
"speed": "standard"
},
"multiagent": {
"agents": [
{
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"type": "agent",
"version": 1
}
],
"type": "coordinator"
},
"name": "我的第一个智能体",
"skills": [
{
"skill_id": "xlsx",
"type": "anthropic",
"version": "1"
},
{
"skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
"type": "custom",
"version": "2"
}
],
"system": "你是一个通用智能体,可以研究问题、编写代码、运行命令并使用已连接的工具,端到端地完成用户任务。",
"tools": [
{
"configs": [
{
"enabled": true,
"name": "bash",
"permission_policy": {
"type": "always_allow"
}
}
],
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"type": "agent_toolset_20260401"
}
],
"type": "agent",
"updated_at": "2026-03-15T10:00:00Z",
"version": 1
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}每个请求都必须发送
?beta=true。授权
omaApiKeyomaBearer
OMA 工作区 API 密钥。
路径参数
智能体标识符。
查询参数
为此接口启用 Beta API 合同,必须为 true。
可用选项:
true 响应
请求成功。
托管智能体的 agent。
示例:
"agent_011CZkYpogX7uDKUyvBTophP"
智能体的归档时间。未归档时为 null。
示例:
null
RFC 3339 格式的时间戳
示例:
"2026-03-15T10:00:00Z"
示例:
"一个通用入门智能体。"
Show child attributes
Show child attributes
示例:
[
{
"type": "url",
"name": "example-mcp",
"url": "https://example-server.modelcontextprotocol.io/sse"
}
]
Show child attributes
Show child attributes
示例:
{ "foo": "bar" }
模型标识符和配置。
Show child attributes
Show child attributes
示例:
{
"id": "claude-sonnet-4-6",
"effort": { "type": "low" },
"inference_geo": "inference_geo",
"speed": "standard"
}
多智能体编排配置。当智能体为单线程时为 null。
Show child attributes
Show child attributes
示例:
{
"agents": [
{
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"type": "agent",
"version": 1
}
],
"type": "coordinator"
}
示例:
"我的第一个智能体"
API 响应中返回的已解析技能。
- Option 1
- Option 2
Show child attributes
Show child attributes
示例:
{
"type": "anthropic",
"skill_id": "xlsx",
"version": "1"
}
示例:
[
{
"type": "anthropic",
"skill_id": "xlsx",
"version": "1"
},
{
"type": "custom",
"skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
"version": "2"
}
]
示例:
"你是一个通用智能体,可以研究问题、编写代码、运行命令并使用已连接的工具,端到端地完成用户任务。"
API 响应中返回的工具配置的联合类型。
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
示例:
[
{
"configs": [
{
"enabled": true,
"name": "bash",
"permission_policy": { "type": "always_allow" }
}
],
"default_config": {
"enabled": true,
"permission_policy": { "type": "always_ask" }
},
"type": "agent_toolset_20260401"
}
]
可用选项:
agent 示例:
"agent"
RFC 3339 格式的时间戳
示例:
"2026-03-15T10:00:00Z"
智能体的当前版本。从 1 开始,每次修改智能体时递增。
示例:
1
此页面对您有帮助吗?
⌘I
归档智能体
curl --request POST \
--url http://localhost:38080/v1/agents/{agent_id}/archive \
--header 'X-Api-Key: <api-key>'import requests
url = "http://localhost:38080/v1/agents/{agent_id}/archive"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('http://localhost:38080/v1/agents/{agent_id}/archive', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:38080/v1/agents/{agent_id}/archive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"description": "通用入门智能体。",
"mcp_servers": [
{
"name": "example-mcp",
"type": "url",
"url": "https://example-server.modelcontextprotocol.io/sse"
}
],
"metadata": {
"foo": "bar"
},
"model": {
"id": "claude-sonnet-4-6",
"effort": {
"type": "low"
},
"inference_geo": "inference_geo",
"speed": "standard"
},
"multiagent": {
"agents": [
{
"id": "agent_011CZkYqphY8vELVzwCUpqiQ",
"type": "agent",
"version": 1
}
],
"type": "coordinator"
},
"name": "我的第一个智能体",
"skills": [
{
"skill_id": "xlsx",
"type": "anthropic",
"version": "1"
},
{
"skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
"type": "custom",
"version": "2"
}
],
"system": "你是一个通用智能体,可以研究问题、编写代码、运行命令并使用已连接的工具,端到端地完成用户任务。",
"tools": [
{
"configs": [
{
"enabled": true,
"name": "bash",
"permission_policy": {
"type": "always_allow"
}
}
],
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"type": "agent_toolset_20260401"
}
],
"type": "agent",
"updated_at": "2026-03-15T10:00:00Z",
"version": 1
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}{
"error": {
"message": "Invalid request",
"type": "invalid_request_error"
},
"request_id": "<string>",
"type": "error"
}