Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sdk/nexent/core/agents/context/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ def _format_managed_agents_description(
lines.append(" - 返回输出类型:{\"type\": \"string\", \"description\": \"执行结果\"}")
lines.append(" 2. 使用策略:")
lines.append(" - 任务分解:单次调用中不要让助手一次做过多的事情,任务拆分是你的工作,你需要将复杂任务分解为可管理的子任务")
lines.append(" - 并行优化:如果你有多个互不依赖的子任务,可以在单步内发出多个助手调用,系统将并行执行以节省时间。判断标准:子任务不需要对方的输出作为输入即可并行。示例:同时检查代码风格、安全性和逻辑 → 一步内调用3个助手。反例:先搜索信息,再基于结果写报告 → 必须串行。")
lines.append(" - 专业匹配:根据助手的专长分配任务")
lines.append(" - 信息整合:整合不同助手的输出生成连贯解决方案")
lines.append(" - 效率优化:避免重复工作")
Expand All @@ -400,6 +401,7 @@ def _format_managed_agents_description(
lines.append(" - Returns output type: {\"type\": \"string\", \"description\": \"execution result\"}")
lines.append(" 2. Usage strategy:")
lines.append(" - Task decomposition: Don't let agents do too many things in a single call, task breakdown is your job, you need to decompose complex tasks into manageable subtasks")
lines.append(" - Parallel optimization (important): If you have multiple independent subtasks, you can issue multiple agent calls in a single step -- the system will execute them in parallel to save time. Criterion: if subtasks do not need each other's output as input, they are parallelizable. Example: checking code style, security, and logic simultaneously → call 3 agents in one step. Counter-example: first search for information, then write a report based on results → must be serial.")
lines.append(" - Professional matching: Assign tasks based on agent expertise")
lines.append(" - Information integration: Integrate outputs from different agents to generate coherent solutions")
lines.append(" - Efficiency optimization: Avoid duplicate work")
Expand Down
Loading