version 字段会自动推进到新创建的版本。
所需权限:
agent:modify路径参数
string
必填
Agent 标识符
请求体
所有字段都是可选的。仅提供的字段会覆盖上一版本。string
此版本使用的模型
object
更新后的执行策略
object
更新后的输出配置
array
更新后的子 Agent 定义
string
更新后的系统提示词
object
更新后的模型特定设置
object
更新后的运行时绑定配置
响应
object
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v3/agents/agent-f8bf71ab17ed8eccad8c0e8ae708273f/versions' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-4o",
"capabilities": {"web_search": {"open_datasets": ["research/academic"]}},
"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
}
}'
{
"success": true,
"data": {
"version": 4,
"model": "gpt-4o",
"capabilities": {"web_search": {"max_results": 5, "search_depth": "basic", "chunks_per_source": 2, "open_datasets": ["research/academic"]}},
"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": "agent-f8bf71ab17ed8eccad8c0e8ae708273f",
"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"
}
}
使用更新的配置创建 Agent 的新版本
curl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v3/agents/agent-f8bf71ab17ed8eccad8c0e8ae708273f/versions' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-4o",
"capabilities": {"web_search": {"open_datasets": ["research/academic"]}},
"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
}
}'
{
"success": true,
"data": {
"version": 4,
"model": "gpt-4o",
"capabilities": {"web_search": {"max_results": 5, "search_depth": "basic", "chunks_per_source": 2, "open_datasets": ["research/academic"]}},
"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": "agent-f8bf71ab17ed8eccad8c0e8ae708273f",
"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"
}
}
POST /openapi/memorylake/api/v3/agents/{id}/versions
version 字段会自动推进到新创建的版本。
agent:modifycurl -X POST 'https://app.memorylake.ai/openapi/memorylake/api/v3/agents/agent-f8bf71ab17ed8eccad8c0e8ae708273f/versions' \
-H 'Authorization: Bearer sk_xxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-4o",
"capabilities": {"web_search": {"open_datasets": ["research/academic"]}},
"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
}
}'
显示 Agent 版本对象
{
"success": true,
"data": {
"version": 4,
"model": "gpt-4o",
"capabilities": {"web_search": {"max_results": 5, "search_depth": "basic", "chunks_per_source": 2, "open_datasets": ["research/academic"]}},
"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": "agent-f8bf71ab17ed8eccad8c0e8ae708273f",
"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"
}
}