package agent import ( "context" "eino-test/internal/rag" "eino-test/internal/tools" "github.com/cloudwego/eino/adk" "github.com/cloudwego/eino/components/model" "github.com/cloudwego/eino/components/tool" "github.com/cloudwego/eino/compose" ) func NewOrganizerAgent(ctx context.Context, chatModel model.ToolCallingChatModel, pipeline *rag.RAGPipeline) adk.Agent { agent, _ := adk.NewChatModelAgent(ctx, &adk.ChatModelAgentConfig{ Name: "OrganizerAgent", Description: "Organizes notes with tags and discovers relationships between notes. Use for categorization and knowledge graph operations.", Instruction: `You are a knowledge organization expert. Your job is to help users categorize their notes and discover hidden connections. Use suggest_tags when the user wants to categorize or label a note. Use find_related when the user wants to discover notes related to a specific topic or note. Help users build a well-organized knowledge base with meaningful connections.`, Model: chatModel, ToolsConfig: adk.ToolsConfig{ ToolsNodeConfig: compose.ToolsNodeConfig{ Tools: []tool.BaseTool{ tools.NewSuggestTagsTool(pipeline, chatModel), tools.NewFindRelatedTool(pipeline), }, }, }, MaxIterations: 8, }) return agent }