POST /api/v1/forward/templates
Template 定义创建 Session 时使用的默认 Agent 配置和 Session 默认配置。
请求头
请求体参数
嵌套配置对象
文件资源
files 是按 File ID 组织的 map。配置项内不要再写 file_id、id 或 resource_id。Forward 在创建 Session 时自动注入 mount_path。
tools 数组项
每个tools[] 项通过 type 选择结构。
内置工具名包括
Bash、Read、Write、Edit、Glob、Grep、WebFetch、WebSearch、DeliverArtifacts。
Tool config
tools[].configs[] 使用以下结构。
Permission policy
MCP servers
skills 数组项
示例请求
示例响应
HTTP 200 OK响应字段
错误
注意事项
- 创建时不要传
template_id,ID 由 Forward 生成。 files使用 file ID 作为 map key,配置项内不要重复写file_id、id或resource_id。- Forward 在创建 Session 时自动补充文件挂载路径。