yao/agent/robot/executor/standard/learning.go
Max 41e0544aba Refactor Executor Architecture and Update Documentation
- Introduced multiple executor modes (Standard, DryRun, Sandbox) to accommodate various use cases, enhancing flexibility in execution strategies.
- Updated DESIGN.md to reflect the new executor modes and their respective use cases, including detailed descriptions and configuration examples.
- Revised TECHNICAL.md to outline the new executor package structure, emphasizing the modular design for future enhancements.
- Enhanced the TODO.md to track the progress of executor mode implementations and related tasks.
- Removed outdated executor stub files and tests, streamlining the codebase for improved maintainability.
- Updated integration tests to utilize the new DryRun executor, ensuring comprehensive coverage of execution scenarios without real agent calls.
2026-01-16 15:27:46 +08:00

32 lines
788 B
Go

package standard
import (
robottypes "github.com/yaoapp/yao/agent/robot/types"
)
// RunLearning executes P5: Learning phase
// Extracts learnings and saves to knowledge base
//
// Input:
// - Execution summary (all phases)
//
// Output:
// - LearningEntry list with extracted knowledge
//
// Learning Types:
// - LearnExecution: Execution patterns
// - LearnTask: Task-specific insights
// - LearnError: Error patterns for improvement
//
// TODO: Implement real learning extraction
func (e *Executor) RunLearning(ctx *robottypes.Context, exec *robottypes.Execution, _ interface{}) error {
e.simulateStreamDelay()
exec.Learning = []robottypes.LearningEntry{
{
Type: robottypes.LearnExecution,
Content: "Completed daily tasks successfully",
},
}
return nil
}