> For AI agents: the complete documentation index is available at https://docs.reelway.ai/llms.txt, the full documentation bundle is available at https://docs.reelway.ai/llms-full.txt.

# 工作流模板

工作流模板是**带参数的工作流定义**,让同一结构以不同输入复用。Reelway 当前的模板能力由[直接工具执行](https://docs.reelway.ai/api-reference/tool-execution.md)中的 `compose_workflow_template` 托管工具提供:输入创意简报与参数意图,返回参数化的工作流模板定义与示例计划;持久化由调用方完成(存入你的数据库,或经[回放记录](https://docs.reelway.ai/api-reference/replay.md)归档)。

预览托管工具为占位实现;服务端模板 CRUD 未提供
## 组合模板

```bash
curl --fail-with-body https://rcn.reelway.ai/v1/creative-agent/tools/execute \
  -H "api-key: $REELWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "compose_workflow_template",
    "arguments": {
      "brief": "为任意商品生成一段 6 秒展示视频",
      "parameters": ["product_name", "tone", "duration_seconds"]
    }
  }'
```

响应 `data` 含参数化模板定义与示例计划。把模板中的参数替换为实际值后,以 `POST /v1/creative-agent/workflows` 提交执行(见[创意工作流](https://docs.reelway.ai/api-reference/workflows.md))。

## 服务端模板存储(规划中)

规划中
Sogni 提供的 `POST /v1/creative-agent/workflows/templates` 等服务端模板 CRUD 端点,Reelway **尚未提供**;模板定义当前由调用方持久化。需要服务端存储时,可用[回放记录](https://docs.reelway.ai/api-reference/replay.md)把模板 JSON 归档在账户命名空间下。

## 另见

- [创意工作流](https://docs.reelway.ai/api-reference/workflows.md) —— 模板的执行载体
- [直接工具执行](https://docs.reelway.ai/api-reference/tool-execution.md) —— `compose_workflow` / `compose_workflow_template` 工具参考
- [Intelligence · 工作流模板](https://docs.reelway.ai/intelligence/workflow-templates.md) —— 面向构建者的使用指南
