# Agent profiles

> 角色即数据——每个 agent 包含提示词、模型预设及有序 tool 列表。

在 Enterprise 版中，[agent](https://pentagi.com/zh-cn/docs/glossary/#agent) 由 **profile** 定义：包括其角色、基础提示词、模型预设以及可使用的 [tools](https://pentagi.com/zh-cn/docs/glossary/#tool)。planner agent 会为每个 [subtask](https://pentagi.com/zh-cn/docs/glossary/#subtask) 选择合适的 profile，以确保执行的专家 agent 与工作相匹配。

## [内置 profiles](https://pentagi.com/zh-cn/docs/enterprise/agent-profiles/#built-in-profiles)

| 分组        | Profiles                                                                                                       |
| --------- | -------------------------------------------------------------------------------------------------------------- |
| 工作 agents | `universal`、`pentester`、`coder`、`installer`、`researcher`、`recon`                                               |
| 交互式       | `assistant`                                                                                                    |
| 流水线       | `planner`、`subagent_planner`、`generator`、`refiner`、`reporter`、`enricher`、`report_planner`、`composer`、`reviser` |

[Plugins](https://pentagi.com/zh-cn/docs/glossary/#plugin) 可以自带 profiles，您也可以在 **Settings → Agent Profiles** 中创建自定义 profiles——管理员可为所有用户创建，其他用户仅可为自己创建。

工作配置文件具有 **On**、**Default** 和 **Off** 开关：管理员设置 **Default for users**，每位用户可以在内置配置文件的 **My state** 下或自定义配置文件的 **My override** 下覆盖此设置。**Default** 遵循 `PROFILES_ENABLEMENT_MODE` — `auto`（默认值）将配置文件提供给 planner，而 `manual` 仅在切换为 **On** 时才提供该配置文件。如果没有启用任何工作配置文件，[task](https://pentagi.com/zh-cn/docs/glossary/#task) 会因错误而停止。

![设置中的 agent profiles](https://pentagi.com/images/product/ee-agent-profiles.webp)

## [规划器与执行监控器](https://pentagi.com/zh-cn/docs/enterprise/agent-profiles/#planner-and-execution-monitor)

在每个 subtask 开始之前，`planner` 会选择工作 profile、plugins 和一个简短的检查清单。它始终运行——Enterprise 没有 `AGENT_PLANNING_STEP_ENABLED`——使用 [flow](https://pentagi.com/zh-cn/docs/glossary/#flow) 的 [provider](https://pentagi.com/zh-cn/docs/glossary/#provider) 的 `adviser` 模型，并且在三次无效回答后会回退到 `universal`。

执行监控默认开启（`EXECUTION_MONITOR_ENABLED`）。当连续对同一工具调用 20 次（`EXECUTION_MONITOR_SAME_TOOL_LIMIT`）、自上次检查以来累计 40 次 [tool call](https://pentagi.com/zh-cn/docs/glossary/#tool-call)（`EXECUTION_MONITOR_TOTAL_TOOL_LIMIT`），或在 subtask 时间预算的一半和四分之三时，`simple_json` 模型会进行简短检查，以判断 agent 是否陷入停滞。仅在此情况下，adviser 才会审查 agent 的工作——适用于携带 `advice` tool 的 profile，且剩余预算时间至少为五分钟。

## [Sub-agents 与预算](https://pentagi.com/zh-cn/docs/enterprise/agent-profiles/#sub-agents-and-budgets)

工作 agents 可以在 subtask 内通过 `spawn_agent` 启动 [sub-agents](https://pentagi.com/zh-cn/docs/glossary/#sub-agent) 以并行工作，并通过 `agent_status`、`agent_wait` 和 `agent_log` 对其进行跟踪，以及通过 `agent_stop` 停止它们。从 task 传递至各 subtask 的时间预算、单 task subtasks 数量上限以及并发 sub-agents 数量上限，共同确保对委派的有效控制。您可以在启动 flow 时设置这些参数，同时选择摘要器所遵循的上下文预设——Compact、Balanced 或 Spacious。

新 flow 的默认值来自 `AGENT_TIME_BUDGET_SECONDS`（10800，每个 task 的 agent 工作时间为三小时）、`AGENT_MAX_SUBTASKS`（每个 task 15 个）、`AGENT_MAX_CONCURRENT_SUBAGENTS`（10）和 `SUMMARIZER_PRESET`。在运行中的 flow 上，您可以在 **Preferences** 下更改这些设置；更改将从下一个 task 开始生效。将 **Concurrent sub-agents** 设置为 **Disabled** 会从 flow 中的每个 agent（包括 [assistant](https://pentagi.com/zh-cn/docs/glossary/#assistant)）中移除 sub-agent 工具。