POST /openapi/memorylake/api/v3/agents/{id}/versions
version 字段会自动推进到新创建的版本。
所需权限:
agent:version_create路径参数
string
必填
Agent 标识符
请求体
所有字段都是可选的。仅提供的字段会覆盖上一版本。string
此版本使用的模型
array
更新后的能力标识符列表
object
array
string
更新后的系统提示词
object
更新后的模型特定设置
object
更新后的运行时绑定配置
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v3/agents/agt_r8k2m1n3/versions' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-4o",
"capabilities": ["tool_use", "memory_read", "memory_write"],
"policies": {
"max_turns": 25,
"max_tool_calls": 15
},
"skills": [
{
"skill_id": "skl_kb_search",
"skill_version": 3
}
],
"model_settings": {
"temperature": 0.5,
"max_tokens": 8192
}
}'
响应
object
显示 Agent 版本对象
显示 Agent 版本对象
integer
新创建版本的版本号
string
此版本使用的模型
array
能力标识符列表
object
array
string
父 Agent 标识符
string
此版本使用的系统提示词
object
此版本的模型特定设置
object
此版本的运行时绑定配置
string
版本创建时间戳
{
"success": true,
"data": {
"version": 4,
"model": "gpt-4o",
"capabilities": ["tool_use", "memory_read", "memory_write"],
"policies": {
"max_turns": 25,
"max_tool_calls": 15,
"allow_tools": ["search_kb", "create_ticket"],
"deny_tools": [],
"subagent_timeout": 300,
"subagent_max_concurrency": 3
},
"output": {
"mode": "text",
"json_schema": null
},
"subagents": [
{
"name": "ticket-creator",
"mode": "delegate",
"context": "Create support tickets from conversation context",
"inherit_tools": false
}
],
"skills": [
{
"skill_id": "skl_kb_search",
"skill_version": 3
}
],
"agent_id": "agt_r8k2m1n3",
"system_prompt": "You are a helpful support assistant. Use the knowledge base to answer questions accurately.",
"model_settings": {
"temperature": 0.5,
"max_tokens": 8192
},
"runtime_bindings": {
"knowledge_base": "kb_prod_docs"
},
"created_at": "2025-05-15T10:00:00Z"
}
}