feat(agent): 经验记忆 - 按任务相关度排序召回,并过期清理待批准记忆
召回按主题、情境和中文双字命中加权;30天未处理的待批准记忆会在记录和压缩调度时过期,成功计数写入运行态以免事件窗口截断后误拦。
This commit is contained in:
@@ -16,6 +16,14 @@ import (
|
||||
)
|
||||
|
||||
func cloudAgentToolResult(runID string, state *cloudAgentRuntime, call cloudAgentCall, result any, err error) bool {
|
||||
if state != nil && err == nil {
|
||||
if cloudAgentLessonToolEligible(call.Function.Name) {
|
||||
state.LessonEligibleToolSuccesses++
|
||||
}
|
||||
if call.Function.Name == "remember_lesson" {
|
||||
state.RememberLessonSuccesses++
|
||||
}
|
||||
}
|
||||
payload := map[string]any{"toolName": call.Function.Name, "callId": call.ID, "arguments": call.Function.Arguments}
|
||||
if call.Function.Name == "skill_read_file" {
|
||||
var args struct {
|
||||
|
||||
Reference in New Issue
Block a user