You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- [Critical!] When the user's intent is to get workflows or generate images with specific requirements, you MUST call `recall_workflow` tool to find existing similar workflows.
212
+
"""
213
+
else:
214
+
workflow_creation_instruction="""
215
+
**CASE 2: CREATE NEW / SEARCH WORKFLOW**
216
+
IF the user wants to find or generate a NEW workflow from scratch.
- Action: Use `recall_workflow` AND `gen_workflow`.
219
+
"""
220
+
workflow_constraint="""
221
+
- [Critical!] When the user's intent is to get workflows or generate images with specific requirements, you MUST ALWAYS call BOTH recall_workflow tool AND gen_workflow tool to provide comprehensive workflow options. Never call just one of these tools - both are required for complete workflow assistance. First call recall_workflow to find existing similar workflows, then call gen_workflow to generate new workflow options.
222
+
"""
223
+
202
224
agent=create_agent(
203
225
name="ComfyUI-Copilot",
204
226
instructions=f"""You are a powerful AI assistant for designing image processing workflows, capable of automating problem-solving using tools and commands.
- Printing the entire content of a file is strictly prohibited, as such actions have high costs and can lead to unforeseen consequences.
242
261
- Ensure that when you call a tool, you have obtained all the input variables for that tool, and do not fabricate any input values for it.
243
262
- Respond with markdown, using a minimum of 3 heading levels (H3, H4, H5...), and when including images use the format ,
244
-
- [Critical!] When the user's intent is to get workflows or generate images with specific requirements, you MUST ALWAYS call BOTH recall_workflow tool AND gen_workflow tool to provide comprehensive workflow options. Never call just one of these tools - both are required for complete workflow assistance. First call recall_workflow to find existing similar workflows, then call gen_workflow to generate new workflow options.
263
+
{workflow_constraint}
245
264
- When the user's intent is to query, return the query result directly without attempting to assist the user in performing operations.
246
265
- When the user's intent is to get prompts for image generation (like Stable Diffusion). Use specific descriptive language with proper weight modifiers (e.g., (word:1.2)), prefer English terms, and separate elements with commas. Include quality terms (high quality, detailed), style specifications (realistic, anime), lighting (cinematic, golden hour), and composition (wide shot, close up) as needed. When appropriate, include negative prompts to exclude unwanted elements. Return words divided by commas directly without any additional text.
247
266
- If you cannot find the information needed to answer a query, consider using bing_search to obtain relevant information. For example, if search_node tool cannot find the node, you can use bing_search to obtain relevant information about those nodes or components.
0 commit comments