Feature: 引擎侧注入轮次信息,减少 agent 查轮次的工具调用 #127
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题背景
在 debate workflow 中,agent 需要知道自己已经发言了几次,以便决定输出
speak还是final。当前的做法是在 role procedure 中写"统计你在辩论中已发言次数",但 agent 收到这条指令后需要自己摸索:
uwf step list或uwf thread read(经常用错 thread ID)实际观察(thread
06F9MEQSK51307XCB9YDZGVA0C):skill_viewterminal(echo)delegate_task("Count opponent speeches")terminal×3(thread read、thread list、step list)skill_view(uwf-usage)正方第5轮花了 7 个 turns、3 次 terminal 调用 才数清楚自己是第几次发言。
建议
方案 A:引擎侧注入轮次上下文(推荐)
在 agent 启动时,引擎注入结构化上下文:
Agent 直接从 prompt 读取
my_speech_count,零工具调用。方案 B:文档最佳实践(短期 workaround)
在
uwf prompt workflow-authoring中增加轮次统计最佳实践:我们已在 workflow 层面做了这个优化(给出具体 grep 命令),但引擎侧注入仍然是更优解。
优先级
P2 — 不影响功能正确性,但能显著减少 token 消耗和响应时间。