diff --git a/agent/templates/user_interaction.json b/agent/templates/user_interaction.json new file mode 100644 index 000000000..4a1451bed --- /dev/null +++ b/agent/templates/user_interaction.json @@ -0,0 +1,519 @@ +{ + "id": 27, + "title": { + "en": "Interacting with the Agent", + "zh": "用户与 Agent 交互" + }, + "description": { + "en": "During the Agent’s execution, users can actively intervene and interact with the Agent to adjust or guide its output, ensuring the final result aligns with their intentions.", + "zh": "在 Agent 的运行过程中,用户可以随时介入,与 Agent 进行交互,以调整或引导生成结果,使最终输出更符合预期。" + }, + "canvas_type": "Agent", + "dsl": { + "components": { + "Agent:LargeFliesMelt": { + "downstream": [ + "UserFillUp:GoldBroomsRelate" + ], + "obj": { + "component_name": "Agent", + "params": { + "cite": true, + "delay_after_error": 1, + "description": "", + "exception_default_value": "", + "exception_goto": [], + "exception_method": "", + "frequencyPenaltyEnabled": false, + "frequency_penalty": 0.7, + "llm_id": "qwen-turbo@Tongyi-Qianwen", + "maxTokensEnabled": false, + "max_retries": 3, + "max_rounds": 1, + "max_tokens": 256, + "mcp": [], + "message_history_window_size": 12, + "outputs": { + "content": { + "type": "string", + "value": "" + }, + "structured": {} + }, + "presencePenaltyEnabled": false, + "presence_penalty": 0.4, + "prompts": [ + { + "content": "User query:{sys.query}", + "role": "user" + } + ], + "sys_prompt": "\nYou are the Planning Agent in a multi-agent RAG workflow.\nYour sole job is to design a crisp, executable Search Plan for the next agent. Do not search or answer the user’s question.\n\n\nUnderstand the user’s task and decompose it into evidence-seeking steps.\nProduce high-quality queries and retrieval settings tailored to the task type (fact lookup, multi-hop reasoning, comparison, statistics, how-to, etc.).\nIdentify missing information that would materially change the plan (≤3 concise questions).\nOptimize for source trustworthiness, diversity, and recency; define stopping criteria to avoid over-searching.\nAnswer in 150 words.\n", + "temperature": 0.1, + "temperatureEnabled": false, + "tools": [], + "topPEnabled": false, + "top_p": 0.3, + "user_prompt": "", + "visual_files_var": "" + } + }, + "upstream": [ + "begin" + ] + }, + "Agent:TangyWordsType": { + "downstream": [ + "Message:FreshWallsStudy" + ], + "obj": { + "component_name": "Agent", + "params": { + "cite": true, + "delay_after_error": 1, + "description": "", + "exception_default_value": "", + "exception_goto": [], + "exception_method": "", + "frequencyPenaltyEnabled": false, + "frequency_penalty": 0.7, + "llm_id": "qwen-turbo@Tongyi-Qianwen", + "maxTokensEnabled": false, + "max_retries": 3, + "max_rounds": 1, + "max_tokens": 256, + "mcp": [], + "message_history_window_size": 12, + "outputs": { + "content": { + "type": "string", + "value": "" + }, + "structured": {} + }, + "presencePenaltyEnabled": false, + "presence_penalty": 0.4, + "prompts": [ + { + "content": "Search Plan: {Agent:LargeFliesMelt@content}\n\n\n\nAwait Response feedback:{UserFillUp:GoldBroomsRelate@instructions}\n", + "role": "user" + } + ], + "sys_prompt": "\nYou are the Search Agent.\nYour job is to execute the approved Search Plan, integrate the Await Response feedback, retrieve evidence, and produce a well-grounded answer.\n\n\nTranslate the plan + feedback into concrete searches.\nCollect diverse, trustworthy, and recent evidence meeting the plan’s evidence bar.\nSynthesize a concise answer; include citations next to claims they support.\nIf evidence is insufficient or conflicting, clearly state limitations and propose next steps.\n\n \nRetrieval: You must use Retrieval to do the search.\n \n", + "temperature": 0.1, + "temperatureEnabled": false, + "tools": [ + { + "component_name": "Retrieval", + "name": "Retrieval", + "params": { + "cross_languages": [], + "description": "", + "empty_response": "", + "kb_ids": [], + "keywords_similarity_weight": 0.7, + "outputs": { + "formalized_content": { + "type": "string", + "value": "" + }, + "json": { + "type": "Array", + "value": [] + } + }, + "rerank_id": "", + "similarity_threshold": 0.2, + "toc_enhance": false, + "top_k": 1024, + "top_n": 8, + "use_kg": false + } + } + ], + "topPEnabled": false, + "top_p": 0.3, + "user_prompt": "", + "visual_files_var": "" + } + }, + "upstream": [ + "UserFillUp:GoldBroomsRelate" + ] + }, + "Message:FreshWallsStudy": { + "downstream": [], + "obj": { + "component_name": "Message", + "params": { + "content": [ + "{Agent:TangyWordsType@content}" + ] + } + }, + "upstream": [ + "Agent:TangyWordsType" + ] + }, + "UserFillUp:GoldBroomsRelate": { + "downstream": [ + "Agent:TangyWordsType" + ], + "obj": { + "component_name": "UserFillUp", + "params": { + "enable_tips": true, + "inputs": { + "instructions": { + "name": "instructions", + "optional": false, + "options": [], + "type": "paragraph" + } + }, + "outputs": { + "instructions": { + "name": "instructions", + "optional": false, + "options": [], + "type": "paragraph" + } + }, + "tips": "Here is my search plan:\n{Agent:LargeFliesMelt@content}\nAre you okay with it?" + } + }, + "upstream": [ + "Agent:LargeFliesMelt" + ] + }, + "begin": { + "downstream": [ + "Agent:LargeFliesMelt" + ], + "obj": { + "component_name": "Begin", + "params": {} + }, + "upstream": [] + } + }, + "globals": { + "sys.conversation_turns": 0, + "sys.files": [], + "sys.query": "", + "sys.user_id": "" + }, + "graph": { + "edges": [ + { + "data": { + "isHovered": false + }, + "id": "xy-edge__beginstart-Agent:LargeFliesMeltend", + "source": "begin", + "sourceHandle": "start", + "target": "Agent:LargeFliesMelt", + "targetHandle": "end" + }, + { + "data": { + "isHovered": false + }, + "id": "xy-edge__Agent:LargeFliesMeltstart-UserFillUp:GoldBroomsRelateend", + "source": "Agent:LargeFliesMelt", + "sourceHandle": "start", + "target": "UserFillUp:GoldBroomsRelate", + "targetHandle": "end" + }, + { + "data": { + "isHovered": false + }, + "id": "xy-edge__UserFillUp:GoldBroomsRelatestart-Agent:TangyWordsTypeend", + "source": "UserFillUp:GoldBroomsRelate", + "sourceHandle": "start", + "target": "Agent:TangyWordsType", + "targetHandle": "end" + }, + { + "id": "xy-edge__Agent:TangyWordsTypetool-Tool:NastyBatsGoend", + "source": "Agent:TangyWordsType", + "sourceHandle": "tool", + "target": "Tool:NastyBatsGo", + "targetHandle": "end" + }, + { + "id": "xy-edge__Agent:TangyWordsTypestart-Message:FreshWallsStudyend", + "source": "Agent:TangyWordsType", + "sourceHandle": "start", + "target": "Message:FreshWallsStudy", + "targetHandle": "end" + } + ], + "nodes": [ + { + "data": { + "label": "Begin", + "name": "begin" + }, + "dragging": false, + "id": "begin", + "measured": { + "height": 50, + "width": 200 + }, + "position": { + "x": 154.9008789064451, + "y": 119.51001744285344 + }, + "selected": false, + "sourcePosition": "left", + "targetPosition": "right", + "type": "beginNode" + }, + { + "data": { + "form": { + "cite": true, + "delay_after_error": 1, + "description": "", + "exception_default_value": "", + "exception_goto": [], + "exception_method": "", + "frequencyPenaltyEnabled": false, + "frequency_penalty": 0.7, + "llm_id": "qwen-turbo@Tongyi-Qianwen", + "maxTokensEnabled": false, + "max_retries": 3, + "max_rounds": 1, + "max_tokens": 256, + "mcp": [], + "message_history_window_size": 12, + "outputs": { + "content": { + "type": "string", + "value": "" + }, + "structured": {} + }, + "presencePenaltyEnabled": false, + "presence_penalty": 0.4, + "prompts": [ + { + "content": "User query:{sys.query}", + "role": "user" + } + ], + "sys_prompt": "\nYou are the Planning Agent in a multi-agent RAG workflow.\nYour sole job is to design a crisp, executable Search Plan for the next agent. Do not search or answer the user’s question.\n\n\nUnderstand the user’s task and decompose it into evidence-seeking steps.\nProduce high-quality queries and retrieval settings tailored to the task type (fact lookup, multi-hop reasoning, comparison, statistics, how-to, etc.).\nIdentify missing information that would materially change the plan (≤3 concise questions).\nOptimize for source trustworthiness, diversity, and recency; define stopping criteria to avoid over-searching.\nAnswer in 150 words.\n", + "temperature": 0.1, + "temperatureEnabled": false, + "tools": [], + "topPEnabled": false, + "top_p": 0.3, + "user_prompt": "", + "visual_files_var": "" + }, + "label": "Agent", + "name": "Planning Agent" + }, + "dragging": false, + "id": "Agent:LargeFliesMelt", + "measured": { + "height": 90, + "width": 200 + }, + "position": { + "x": 443.96309330796714, + "y": 104.61370811205677 + }, + "selected": false, + "sourcePosition": "right", + "targetPosition": "left", + "type": "agentNode" + }, + { + "data": { + "form": { + "enable_tips": true, + "inputs": { + "instructions": { + "name": "instructions", + "optional": false, + "options": [], + "type": "paragraph" + } + }, + "outputs": { + "instructions": { + "name": "instructions", + "optional": false, + "options": [], + "type": "paragraph" + } + }, + "tips": "Here is my search plan:\n{Agent:LargeFliesMelt@content}\nAre you okay with it?" + }, + "label": "UserFillUp", + "name": "Await Response" + }, + "dragging": false, + "id": "UserFillUp:GoldBroomsRelate", + "measured": { + "height": 50, + "width": 200 + }, + "position": { + "x": 683.3409492927474, + "y": 116.76274137645598 + }, + "selected": false, + "sourcePosition": "right", + "targetPosition": "left", + "type": "ragNode" + }, + { + "data": { + "form": { + "cite": true, + "delay_after_error": 1, + "description": "", + "exception_default_value": "", + "exception_goto": [], + "exception_method": "", + "frequencyPenaltyEnabled": false, + "frequency_penalty": 0.7, + "llm_id": "qwen-turbo@Tongyi-Qianwen", + "maxTokensEnabled": false, + "max_retries": 3, + "max_rounds": 1, + "max_tokens": 256, + "mcp": [], + "message_history_window_size": 12, + "outputs": { + "content": { + "type": "string", + "value": "" + }, + "structured": {} + }, + "presencePenaltyEnabled": false, + "presence_penalty": 0.4, + "prompts": [ + { + "content": "Search Plan: {Agent:LargeFliesMelt@content}\n\n\n\nAwait Response feedback:{UserFillUp:GoldBroomsRelate@instructions}\n", + "role": "user" + } + ], + "sys_prompt": "\nYou are the Search Agent.\nYour job is to execute the approved Search Plan, integrate the Await Response feedback, retrieve evidence, and produce a well-grounded answer.\n\n\nTranslate the plan + feedback into concrete searches.\nCollect diverse, trustworthy, and recent evidence meeting the plan’s evidence bar.\nSynthesize a concise answer; include citations next to claims they support.\nIf evidence is insufficient or conflicting, clearly state limitations and propose next steps.\n\n \nRetrieval: You must use Retrieval to do the search.\n \n", + "temperature": 0.1, + "temperatureEnabled": false, + "tools": [ + { + "component_name": "Retrieval", + "name": "Retrieval", + "params": { + "cross_languages": [], + "description": "", + "empty_response": "", + "kb_ids": [], + "keywords_similarity_weight": 0.7, + "outputs": { + "formalized_content": { + "type": "string", + "value": "" + }, + "json": { + "type": "Array", + "value": [] + } + }, + "rerank_id": "", + "similarity_threshold": 0.2, + "toc_enhance": false, + "top_k": 1024, + "top_n": 8, + "use_kg": false + } + } + ], + "topPEnabled": false, + "top_p": 0.3, + "user_prompt": "", + "visual_files_var": "" + }, + "label": "Agent", + "name": "Search Agent" + }, + "dragging": false, + "id": "Agent:TangyWordsType", + "measured": { + "height": 90, + "width": 200 + }, + "position": { + "x": 944.6411255659472, + "y": 99.84499066368488 + }, + "selected": true, + "sourcePosition": "right", + "targetPosition": "left", + "type": "agentNode" + }, + { + "data": { + "form": { + "description": "This is an agent for a specific task.", + "user_prompt": "This is the order you need to send to the agent." + }, + "label": "Tool", + "name": "flow.tool_0" + }, + "id": "Tool:NastyBatsGo", + "measured": { + "height": 50, + "width": 200 + }, + "position": { + "x": 862.6411255659472, + "y": 239.84499066368488 + }, + "sourcePosition": "right", + "targetPosition": "left", + "type": "toolNode" + }, + { + "data": { + "form": { + "content": [ + "{Agent:TangyWordsType@content}" + ] + }, + "label": "Message", + "name": "Message" + }, + "dragging": false, + "id": "Message:FreshWallsStudy", + "measured": { + "height": 50, + "width": 200 + }, + "position": { + "x": 1216.7057997987163, + "y": 120.48541298149814 + }, + "selected": false, + "sourcePosition": "right", + "targetPosition": "left", + "type": "messageNode" + } + ] + }, + "history": [], + "messages": [], + "path": [], + "retrieval": [], + "variables": {} + }, + "avatar": + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1FSURBVHgBzVppcFRVFv7e672TTjrprGTrkI1tgFjiAI4TmgEGcEFgVFAHxr2mLFe0cKxyBOeHljVjwVDqzDhVTqksOlOiuCBrCwk7hCAkLAGy70kn3eklvb03571e8rrTCQGi5em6ecu9fe85557znXNuh0EUHTGb5/Ast4TnmXsB3oifBTFVxEsVy7PrZ5lM9RE9oZvTZrPeAe51Gvh85ABGMuonJh6Ra9Mzw2KDm2PXm0ymPoS6ReZ5n5n6p4f45QOsj0ihEXxwdGg9Pta3Ax2R98ErH+wIzMFjFFTlhcwkCMEKT4qE+Nc5np8e5Aa8MAf94UNtmE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