Add dynamic analyst runtime updates and deployment guides
This commit is contained in:
@@ -310,11 +310,12 @@ class EvoAgent(ToolGuardMixin, ReActAgent):
|
||||
)
|
||||
logger.debug("Registered workspace watch hook")
|
||||
|
||||
async def _reasoning(self, **kwargs) -> Msg:
|
||||
async def _reasoning(self, tool_choice: Optional[str] = None, **kwargs) -> Msg:
|
||||
"""Override reasoning to execute pre-reasoning hooks.
|
||||
|
||||
Args:
|
||||
**kwargs: Arguments for reasoning
|
||||
tool_choice: Optional tool choice for structured output
|
||||
**kwargs: Additional arguments for reasoning
|
||||
|
||||
Returns:
|
||||
Response message
|
||||
@@ -327,7 +328,7 @@ class EvoAgent(ToolGuardMixin, ReActAgent):
|
||||
)
|
||||
|
||||
# Call parent (which may be ToolGuardMixin's _reasoning)
|
||||
return await super()._reasoning(**kwargs)
|
||||
return await super()._reasoning(tool_choice=tool_choice, **kwargs)
|
||||
|
||||
def reload_runtime_assets(self, active_skill_dirs: Optional[List[Path]] = None) -> None:
|
||||
"""Reload toolkit and system prompt from current run assets.
|
||||
@@ -579,7 +580,7 @@ class EvoAgent(ToolGuardMixin, ReActAgent):
|
||||
return
|
||||
|
||||
try:
|
||||
self._messenger = AgentMessenger(agent_id=self.agent_id)
|
||||
self._messenger = AgentMessenger()
|
||||
self._task_delegator = TaskDelegator(agent=self)
|
||||
logger.debug(
|
||||
"Team infrastructure initialized for agent: %s",
|
||||
|
||||
@@ -312,12 +312,21 @@ class RunWorkspaceManager:
|
||||
"- 审阅分析以理解市场观点\n"
|
||||
"- 在做决策前先考虑风险警告\n"
|
||||
"- 评估当前投资组合持仓、现金与保证金占用\n"
|
||||
"- 在做最终决策前,先判断当前团队是否足以覆盖任务;如果覆盖不足,不要勉强给结论,先扩编团队\n"
|
||||
"- 当现有团队覆盖不足、观点分歧过大、或出现新的专业分析需求时,优先考虑动态创建合适的分析师,再继续讨论\n"
|
||||
"- 决策必须与整体投资目标和风险约束一致\n\n"
|
||||
"动态扩编触发条件:\n"
|
||||
"- 出现当前团队未覆盖的研究领域:期权、宏观、行业专项、事件驱动、监管冲击、加密资产、商品链、特殊市场结构\n"
|
||||
"- 关键 ticker 的结论依赖某种专业知识,但现有 analyst 无法提供直接证据链\n"
|
||||
"- 分析师之间存在明显冲突,且仅靠风险经理无法完成裁决\n"
|
||||
"- 你需要第二个同类型但不同风格的 analyst 来验证一个高风险假设\n\n"
|
||||
"决策类型:\n"
|
||||
'- `long`:看涨,建议买入\n'
|
||||
'- `short`:看跌,建议卖出或做空\n'
|
||||
'- `hold`:中性,维持当前持仓\n\n'
|
||||
"输出要求:\n"
|
||||
"- 触发扩编条件时,必须先使用动态团队工具创建分析师,并在继续决策前吸收其分析输入\n"
|
||||
"- 不允许口头声称“需要更多分析”但不实际调用创建工具\n"
|
||||
"- 使用 `make_decision` 工具记录每个股票的最终决策\n"
|
||||
"- 记录完成后给出投资逻辑总结\n"
|
||||
"- 最终总结必须使用简体中文\n"
|
||||
@@ -327,6 +336,10 @@ class RunWorkspaceManager:
|
||||
"- 在决定数量时考虑可用现金,不要超出现金允许范围\n"
|
||||
"- 考虑做空头寸的保证金要求\n"
|
||||
"- 仓位规模相对于组合总资产保持保守\n"
|
||||
"- 当任务涉及当前团队未覆盖的领域(如期权、宏观、行业专项、事件驱动、加密资产等)时,应优先创建或克隆对应分析师,而不是勉强用现有团队输出低质量结论\n"
|
||||
"- 当分析师之间长期存在高冲突且缺乏裁决信息时,应考虑增加一个补充视角的分析师\n"
|
||||
"- 如果你已经识别出覆盖缺口,却没有调用动态团队工具补齐团队,就不应直接输出高置信度交易决策\n"
|
||||
"- 对新创建分析师的输出必须纳入本轮决策依据,不能创建后忽略\n"
|
||||
"- 始终为决策提供清晰理由\n"
|
||||
"- 不要输出英文投资报告或英文结论\n"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user