190 lines
6.8 KiB
Markdown
190 lines
6.8 KiB
Markdown
---
|
||
name: dynamic_team_management
|
||
description: 动态管理团队中的分析师Agent,包括创建、克隆、移除分析师,以及查看可用分析师类型。
|
||
version: 1.0.0
|
||
tools:
|
||
- create_analyst
|
||
- clone_analyst
|
||
- remove_analyst
|
||
- list_analyst_types
|
||
- get_analyst_info
|
||
- get_team_summary
|
||
---
|
||
|
||
# 动态团队管理
|
||
|
||
当你需要调整分析师团队组成时,使用这个技能。投资经理可以动态创建新的分析师、克隆现有分析师进行定制、或移除不再需要的分析师。
|
||
|
||
## 1) When to use
|
||
|
||
- 当前团队缺乏特定领域的分析能力(如期权、加密货币、ESG等)
|
||
- 需要多个相同类型但不同配置的分析师(如"激进型技术分析师"和"保守型技术分析师")
|
||
- 需要临时增加分析力量应对特殊市场环境
|
||
- 发现某个分析师配置不当,需要移除并重建
|
||
- 在团队讨论中发现需要新的分析视角
|
||
|
||
## 2) Required inputs
|
||
|
||
### 创建分析师 (create_analyst)
|
||
- **agent_id**: 唯一标识符(如 "options_specialist_01")
|
||
- **analyst_type**: 基础类型(如 "technical_analyst")或自定义标识
|
||
- **可选**: name, focus, description, soul_md, agents_md, model_name
|
||
|
||
### 克隆分析师 (clone_analyst)
|
||
- **source_id**: 源分析师ID(如 "technical_analyst")
|
||
- **new_id**: 新分析师ID(如 "crypto_technical_01")
|
||
- **可选**: name, focus_additions, description_override, model_name
|
||
|
||
### 移除分析师 (remove_analyst)
|
||
- **agent_id**: 要移除的分析师ID
|
||
|
||
## 3) Decision procedure
|
||
|
||
1. **评估当前团队能力缺口**
|
||
- 查看当前活跃的分析师列表
|
||
- 识别缺失的分析视角或专业领域
|
||
|
||
2. **选择创建策略**
|
||
- 基于现有类型创建:指定analyst_type,提供自定义配置
|
||
- 完全自定义:提供完整的persona定义
|
||
- 克隆并修改:从现有分析师复制并应用覆盖
|
||
|
||
3. **配置分析师**
|
||
- 设置唯一agent_id
|
||
- 定义显示名称和关注点
|
||
- 可选:提供自定义SOUL.md内容以精确定义行为
|
||
|
||
4. **验证创建结果**
|
||
- 检查返回的success状态
|
||
- 确认新分析师已加入活跃列表
|
||
|
||
## 4) Tool call policy
|
||
|
||
- **create_analyst**: 用于创建全新的分析师实例
|
||
- 必须提供唯一的agent_id
|
||
- 基于预定义类型时,analyst_type必须在可用类型列表中,或提供完整自定义配置
|
||
- 工具调用失败时,检查agent_id是否已存在
|
||
|
||
- **clone_analyst**: 用于基于现有分析师创建变体
|
||
- 适用于:创建专注于特定行业的分析师(如从technical_analyst克隆crypto_technical)
|
||
- 新实例继承源配置,应用指定的覆盖
|
||
|
||
- **remove_analyst**: 用于移除动态创建的分析师
|
||
- 只能移除通过本技能创建的分析师
|
||
- 系统预定义分析师(fundamentals_analyst等)不可移除
|
||
|
||
- **list_analyst_types**: 用于查看所有可用分析师类型
|
||
- 返回预定义类型 + 运行时注册类型
|
||
|
||
- **get_analyst_info**: 用于查看特定分析师的详细配置
|
||
|
||
- **get_team_summary**: 用于查看团队整体构成
|
||
|
||
## 5) Output schema
|
||
|
||
### create_analyst / clone_analyst 输出
|
||
```json
|
||
{
|
||
"success": true,
|
||
"agent_id": "options_specialist_01",
|
||
"message": "Created runtime analyst 'options_specialist_01' (technical_analyst).",
|
||
"analyst_type": "technical_analyst"
|
||
}
|
||
```
|
||
|
||
### remove_analyst 输出
|
||
```json
|
||
{
|
||
"success": true,
|
||
"agent_id": "options_specialist_01",
|
||
"message": "Removed runtime analyst 'options_specialist_01'."
|
||
}
|
||
```
|
||
|
||
### list_analyst_types 输出
|
||
```json
|
||
[
|
||
{
|
||
"type_id": "fundamentals_analyst",
|
||
"name": "Fundamentals Analyst",
|
||
"description": "...",
|
||
"is_builtin": true,
|
||
"source": "constants"
|
||
}
|
||
]
|
||
```
|
||
|
||
## 6) Failure fallback
|
||
|
||
- **agent_id已存在**: 返回错误,提示选择新的agent_id或使用clone_analyst基于现有创建变体
|
||
- **analyst_type未知**: 提示使用list_analyst_types查看可用类型,或提供完整的自定义persona
|
||
- **创建失败**: 检查系统日志,可能原因包括:模型配置错误、工作空间权限问题
|
||
- **移除失败**: 确认分析师是通过动态创建(系统预定义分析师不可移除)
|
||
|
||
## 重要约定
|
||
|
||
### Agent ID 命名规则
|
||
|
||
为了使新创建的分析师能够正常工作,**agent_id 必须以 `_analyst` 结尾**。这是系统识别分析师类型并分配相应工具的关键约定。
|
||
|
||
- ✅ **正确**: `options_specialist_analyst`, `crypto_technical_analyst`
|
||
- ❌ **错误**: `options_specialist`, `crypto_expert`
|
||
|
||
如果不遵循此约定,分析师将无法获得分析工具组(基本面、技术、情绪、估值等工具)。
|
||
|
||
### 全新自定义类型 vs 基于现有类型
|
||
|
||
**基于现有类型**(推荐用于快速创建):
|
||
- 使用 `analyst_type: "technical_analyst"` 等预定义类型
|
||
- 可以覆盖 persona、SOUL.md 等配置
|
||
- 工具组根据 `analyst_type` 自动选择
|
||
|
||
**全新自定义类型**(用于完全自定义):
|
||
- 设置 `analyst_type` 为自定义标识(如 `"custom"`)或任意字符串
|
||
- 必须提供完整的 `persona` 定义
|
||
- 建议提供 `soul_md` 精确定义行为
|
||
- **agent_id 必须仍然以 `_analyst` 结尾**
|
||
|
||
## 最佳实践
|
||
|
||
1. **命名约定**: 使用描述性agent_id,如 `industry_tech_analyst` 而非 `analyst_01`,**必须以 `_analyst` 结尾**
|
||
2. **版本控制**: 克隆分析师时,在new_id中包含版本信息,如 `technical_v2_crypto_analyst`
|
||
3. **文档记录**: 创建自定义分析师时,提供详细的description,便于后续理解和维护
|
||
4. **资源管理**: 定期使用get_team_summary检查团队规模,移除不再需要的分析师
|
||
|
||
## 示例场景
|
||
|
||
### 场景1: 添加加密货币分析师
|
||
```
|
||
创建一个新的分析师,专注于加密货币技术分析:
|
||
- agent_id: "crypto_technical_01"
|
||
- analyst_type: "technical_analyst"
|
||
- name: "加密货币技术分析师"
|
||
- focus: ["链上数据分析", "DeFi协议", "加密货币技术指标"]
|
||
```
|
||
|
||
### 场景2: 克隆并定制
|
||
```
|
||
基于technical_analyst创建一个更激进的版本:
|
||
- source_id: "technical_analyst"
|
||
- new_id: "technical_aggressive_01"
|
||
- name: "激进技术分析师"
|
||
- focus_additions: ["高波动交易", "突破策略"]
|
||
- description_override: "专注于高风险高回报的技术策略..."
|
||
```
|
||
|
||
### 场景3: 创建全新自定义类型(期权专家)
|
||
```
|
||
创建一个完全自定义的期权分析师(注意agent_id以_analyst结尾):
|
||
- agent_id: "options_strategist_analyst"
|
||
- analyst_type: "custom" # 使用非预定义类型
|
||
- name: "期权策略分析师"
|
||
- focus: ["期权定价", "希腊字母", "波动率曲面"]
|
||
- soul_md: "# 角色定义\n你是期权策略专家,专注于..."
|
||
```
|
||
|
||
**说明**:
|
||
- 即使 `analyst_type` 是 "custom"(不在预定义类型中),只要提供完整的 `persona` 和 `soul_md`,系统就能创建功能完整的分析师
|
||
- `agent_id` 必须以 `_analyst` 结尾才能获得分析工具
|
||
- 模型使用全局默认,或通过 `model_name` 参数指定
|