Repository navigation
树形消息记录工程 #11894
Replies: 4 comments 1 reply
|
Thanks for writing this up in such detail. A tree-shaped message history with child tasks, summaries on completion and interrupt reports that return focus to the parent is close to what #10473 explores (an agent folding an investigation down to its conclusion). We have no plan to restructure the transcript itself, and you are right that it needs evidence first. If you try it in another harness and have measurements (task success, token cost, how often the parent needed detail the summary dropped), please add them to #10473. |
带上下文的并行任务当前agent可以派发子任务,和skill。但他们都是上下文隔离的。 宿主完全可以拼接出多个上下文,并把他们的当前任务拼接上下文,便可并发执行任务。 类似这样的上下文可以把多个任务并发。可以极大的增加任务速度。 虽然输入token比缓存token昂贵。但是如果缓存的token完全无用,那么缓存token的参与可能反而导致更昂贵的总费用。 带任务图的任务尽管不提倡ai在开始节点前创建大量子节点。但如果他确实有详细的图规划, 以及任何一个非图注册的状态完成,返回给父任务。 若执行结果为A(失败),那么是一个未注册的状态。 异步的用户互动一些工具对当前任务没有影响。他们应该积压,给用户在空闲时段决断。不应该阻塞任务。
|
|
Thanks, this follow-up is concrete: running several sub-tasks against the same parent context (each told which part of the plan it owns) is a different thing from today's isolated sub-agents. In our design a worker's starting context is already its own decision (a context request, separate from the task, the capability grant and the schedule), so the open questions are the ones you point at: cost (the shared prefix is cached, the per-task tail is not), how results come back to the parent, and who guards conflicting writes when several workers act on one tree. We have no plan or date for it; we will keep your two posts next to #10473 as input when we look at delegation again, and measurements from your own runs would be the most useful thing to add there. |
|
我认为的上下文应该长这样 同时,隔离上下文的孤立节点应该也可用。 还可以在小说任务中,可以像斗蛐蛐,多个ai玩狼人杀那样。 是否隔离上下文,能访问什么工具,是否需要系统提示树。都应该在这个创建子任务里面可选。 |
Uh oh!
There was an error while loading. Please reload this page.
一个工作内容,对应的是一个任务。
ai的聊天记录并没有硬性的需要拼接,他可以接受任意的消息数组,因此,没有硬性必要一定要拼接消息记录为线性。
为了更好的利用上下文,应该将消息记录管理为树状图模式。
在目标切换,生成子目标,转移话题等时候,应该切换分支,如同git管理那样。
目前没有先例,也不能证明必要性,也没有详细规范。因此请社区成员先在dsh进行尝试。
消息记录工程应该考虑以下几点:
子任务
任务摘要
每一个当前执行的任务中,应该可见当前节点的消息记录。
但对于其他节点,应该只可见创建,和结算。
例如,确认api,可能需要读取readme,读取仓库源码。进行边缘测试。
在确认api行为后,这些所有的确认消息都不需要在其他节点中可见。
任务中断
任务除了汇报完成,进行完成的摘要报告。还应该有不可继续,失败报告,和需要更多支持的中断报告。
无论成功失败都应当把任务焦点回到上一级,查看任务报告并继续决定。
例如,如果失败,可能要切换其他日志库,
例如,中断,可能是消耗资源过大,例如日志启动时间过长。需要上级确认需要继续走这条路。例如别无他法,或执意如此。
又例如,测试时间过长,用户插入消息。那么中断当前的接入日志任务,返回上级,创建新的子任务:减少测试项目耗时。
连续失败
如果一个任务形成了失败的长链
宿主应该检测到,返回任务上一级,要求进行计划。例如
子任务的子工作空间
在创建子任务时可以限制他们的写入路径。
这样在并发子任务时,每一个工作空间作为一个读写锁,可以让他们更少的进行阻塞等待
子任务的共同工具调用
在子任务执行完编码后可能需要进行测试。
那么可以避免一个写完就测试,然后另一个又要测一次。
创建并发子任务时,父节点还可以创建一个写好的tool,防止他们自行拼写测试。
这个工具同时还有Barrier的作用。运行中的子任务都因调用此工具而等待时,才进行调用。
跨界点的消息记录查看
例如现在的压缩上下文后,仍然有tool可以查看原始消息。
如果一个节点内运行中需要更多信息,可以使用这个工具查看其他节点的具体消息。
使用树管理时,子ai的消息上下文也不应对用户进行隐藏了。
他们也应该作为一个节点,可以被查看途中消息。
All reactions