From 36cd49d956b91da019ddc36f1d63eb5507a76d78 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 15 Jun 2026 21:35:27 +0200 Subject: [PATCH] Refine usage guidelines and descriptions for core agent workflows --- backend/agent/workflows/builtins.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/agent/workflows/builtins.py b/backend/agent/workflows/builtins.py index 191102a..793b291 100644 --- a/backend/agent/workflows/builtins.py +++ b/backend/agent/workflows/builtins.py @@ -237,14 +237,14 @@ RESEARCH = graph( ) BUILTIN_WORKFLOWS = [ - {"slug": "input-output", "name": "Input -> Output", "description": "Normal Heimgeist chat with optional compatibility context.", "routing_description": "Use for ordinary conversation, writing, reasoning, or stable knowledge. Do not use for weather, news, latest/current information, or other up-to-date facts.", "routing_examples": ["Explain this concept", "Draft a reply"], "estimated_cost_class": "low", "required_capabilities": ["chat"], "graph": DIRECT}, - {"slug": "knowledge-answer", "name": "Knowledge Answer", "description": "Answer from a selected local knowledge database.", "routing_description": "Use when the user asks about information in the selected local database.", "routing_examples": ["What do my notes say about this?"], "estimated_cost_class": "medium", "required_capabilities": ["rag"], "graph": KNOWLEDGE}, - {"slug": "web-answer", "name": "Web Answer", "description": "Search, fetch, rank, and answer from current web sources.", "routing_description": "Use for straightforward current lookups, including weather today, news today, political news today, latest facts, and explicit requests to search the web.", "routing_examples": ["What happened today?", "What's the weather in Iran today?"], "estimated_cost_class": "medium", "required_capabilities": ["web"], "graph": web_graph()}, + {"slug": "input-output", "name": "Input -> Output", "description": "Normal Heimgeist chat with optional compatibility context.", "routing_description": "Choose only when the assistant can answer from the current conversation, general model knowledge, writing skill, reasoning, or stable non-current facts. Do not choose this workflow for any request that depends on fresh external facts, including weather, forecasts, news, politics today, latest/current/recent events, prices, schedules, live status, or follow-up questions that inherit one of those current topics from earlier messages.", "routing_examples": ["Explain this concept", "Draft a reply", "Rewrite this paragraph", "What do you mean by that?"], "estimated_cost_class": "low", "required_capabilities": ["chat"], "graph": DIRECT}, + {"slug": "knowledge-answer", "name": "Knowledge Answer", "description": "Answer from a selected local knowledge database.", "routing_description": "Choose when the user asks about information in the selected local database and does not need fresh web information. If the selected database should be compared with today's/latest/current web facts, choose a web-capable knowledge workflow instead.", "routing_examples": ["What do my notes say about this?", "Summarize the selected database entry"], "estimated_cost_class": "medium", "required_capabilities": ["rag"], "graph": KNOWLEDGE}, + {"slug": "web-answer", "name": "Web Answer", "description": "Search, fetch, rank, and answer from current web sources.", "routing_description": "Choose for straightforward questions that need current or external web evidence. This includes weather and forecasts, news, political news, recent/latest/current facts, online lookup questions, and short follow-ups that inherit a current web topic from the previous turn. For follow-ups, resolve the implied topic before creating web_search_query; for example after 'weather in Iran today', 'and what is the news politically?' means 'Iran political news today'. Prefer this over Research when one search-and-answer pass should be enough.", "routing_examples": ["What's the weather in Iran today?", "What happened in Iran today?", "And what's the news politically?", "Latest political news about Iran"], "estimated_cost_class": "medium", "required_capabilities": ["web"], "graph": web_graph()}, {"slug": "vision-answer", "name": "Vision Answer", "description": "Analyze attachments and answer with a vision model.", "routing_description": "Use when image or document attachments must be analyzed.", "routing_examples": ["What is shown in this image?"], "estimated_cost_class": "medium", "required_capabilities": ["vision"], "graph": VISION}, - {"slug": "knowledge-web-answer", "name": "Knowledge + Web Answer", "description": "Combine local knowledge and current web evidence.", "routing_description": "Use when both the selected database and current web information are relevant.", "routing_examples": ["Compare my notes with the latest information"], "estimated_cost_class": "high", "required_capabilities": ["rag", "web"], "graph": KNOWLEDGE_WEB}, + {"slug": "knowledge-web-answer", "name": "Knowledge + Web Answer", "description": "Combine local knowledge and current web evidence.", "routing_description": "Choose when the selected local database is relevant but the request also needs current web evidence, such as comparing notes to latest information or answering a current follow-up while a knowledge database is enabled.", "routing_examples": ["Compare my notes with the latest information", "Check my saved source against today's news"], "estimated_cost_class": "high", "required_capabilities": ["rag", "web"], "graph": KNOWLEDGE_WEB}, {"slug": "remember-this", "name": "Remember This", "description": "Save a selected chat message to knowledge.", "routing_description": "Use only when the user explicitly asks to remember or save a chat message.", "routing_examples": ["Remember this answer"], "estimated_cost_class": "low", "required_capabilities": ["knowledge_write"], "graph": REMEMBER}, {"slug": "save-source", "name": "Save Source", "description": "Save a website snapshot to knowledge.", "routing_description": "Use when the user explicitly asks to save a URL as a knowledge source.", "routing_examples": ["Save this website to my database"], "estimated_cost_class": "low", "required_capabilities": ["web", "knowledge_write"], "graph": SAVE_SOURCE}, - {"slug": "research", "name": "Research", "description": "Bounded two-round evidence research with source validation.", "routing_description": "Use for explicit deeper investigation, comparing sources, disputed claims, broad research, or multi-step synthesis. Do not use for simple weather/news/current lookup questions.", "routing_examples": ["Research the competing explanations and cite sources"], "estimated_cost_class": "high", "required_capabilities": ["web", "chat"], "graph": RESEARCH}, + {"slug": "research", "name": "Research", "description": "Bounded two-round evidence research with source validation.", "routing_description": "Choose for explicit deeper investigation: compare multiple sources, resolve conflicting claims, build a broad evidence summary, perform multi-step synthesis, or answer when the user asks to research/analyze in depth. Do not choose this for simple current lookups such as weather today, latest headlines, or a straightforward political-news follow-up; choose Web Answer for those.", "routing_examples": ["Research the competing explanations and cite sources", "Compare the strongest evidence for both claims", "Investigate this topic in depth"], "estimated_cost_class": "high", "required_capabilities": ["web", "chat"], "graph": RESEARCH}, ]