# 您的首个 flow

> 创建您的第一个 flow，使用 templates 复用提示词，在 agents 工作时跟随并引导它们，并在最后下载 report。

**flow** 是 PentAGI 的一次运行：包含一个目标、根据您的消息创建的 [tasks](https://pentagi.com/zh-cn/docs/glossary/#task)，以及 [agents](https://pentagi.com/zh-cn/docs/glossary/#agent) 在此过程中执行的所有操作。

## [创建 flow](https://pentagi.com/zh-cn/docs/getting-started/first-flow/#create-a-flow)

![新建 flow 表单](https://pentagi.com/images/product/new-flow.webp)

1. 在侧边栏中打开 **Flows**，然后点击 **New Flow**。
2. 选择模式：

   * **Automation** — PentAGI 自主端到端地完成目标。
   * **Assistant** — 由您逐步引导的交互式对话。开启 **Use Agents** 可让 [assistant](https://pentagi.com/zh-cn/docs/glossary/#assistant) 将 [subtasks](https://pentagi.com/zh-cn/docs/glossary/#subtask) 委派给专用 agents。
3. 为此 [flow](https://pentagi.com/zh-cn/docs/glossary/#flow) 选择 LLM [provider](https://pentagi.com/zh-cn/docs/glossary/#provider)。
4. 用自然语言描述目标和目的。

良好的初始提示词应指明目标、评估类型、范围限制以及您期望的结果：

```text
Assess https://target.example for common web application vulnerabilities.
Focus on authentication, file handling, and injection issues. Stay within the
provided target only and summarize confirmed findings with reproduction steps.
```

> [!WARNING]
> 请仅测试您拥有或已获明确授权进行评估的系统。

## [使用 templates 复用提示词](https://pentagi.com/zh-cn/docs/getting-started/first-flow/#reuse-prompts-with-templates)

新建 flow 表单提供了一个 [template](https://pentagi.com/zh-cn/docs/glossary/#template) 选择器，可从 **Templates** 中已保存的 template 预填消息。Templates 为纯自然语言，无需特殊语法。

## [跟踪工作进展](https://pentagi.com/zh-cn/docs/getting-started/first-flow/#follow-the-work)

Flow 启动后，PentAGI 会立即打开 flow 页面：

* **Automation** 显示 agents 的消息和进度；**Assistant** 是使用相同 [tools](https://pentagi.com/zh-cn/docs/glossary/#tool) 的聊天界面；**Dashboard** 则按模型、[agent type](https://pentagi.com/zh-cn/docs/glossary/#agent-type) 和功能细分使用情况。
* **Tasks** 列出计划——包括 tasks、subtasks 及其状态。
* **Terminal** 实时流式展示来自 [sandbox](https://pentagi.com/zh-cn/docs/glossary/#sandbox) 的每条命令及其输出。
* **Agents**、**Searches** 和 **Vector Store** 分别显示任务委派、网络检索和 [memory](https://pentagi.com/zh-cn/docs/glossary/#memory) 查询情况。
* **Files** 存放上传文件、附加资源及从容器中提取的文件；**Screenshots** 保存 agents 打开页面的截图。

![运行中的 flow：左侧为 agent 消息，右侧为 tasks 和 subtasks 计划](https://pentagi.com/images/product/flow-tasks.webp)

![Terminal 标签页中来自 sandbox 的每条命令及其输出](https://pentagi.com/images/product/flow-terminal.webp)

## [引导运行中的 flow](https://pentagi.com/zh-cn/docs/getting-started/first-flow/#steer-a-running-flow)

打开同一 flow 的 **Assistant** 视图，即可查看其状态、停止当前 task、发送后续指令或调整剩余的规划 subtasks——无需重新启动此 flow。

## [获取 report](https://pentagi.com/zh-cn/docs/getting-started/first-flow/#get-the-report)

使用 flow 页面上的 **Report** 菜单，可在网页中打开 [report](https://pentagi.com/zh-cn/docs/glossary/#report)、复制 report，或以 Markdown 或 PDF 格式下载 report。

> [!NOTE]
> 建议从狭窄的目标和单一明确的目的开始。简短而专注的 flows 更易于审查，并有助于在运行更大规模的 flows 之前优化提示词。