{
  "id":"4c95b44d-0e6d-499e-91b1-c8c07ae0d696",
  "name": "DeepSearch",
  "description": "Exhaustive multi-source research workflow. An Orchestrator Agent (Plan \u0026 Execute with Replanning) decomposes the research query into parallel workstreams and uses web search tools exhaustively to gather, compare, and synthesize information. Designed for tasks requiring depth and cross-source validation: travel planning, market analysis, competitive benchmarking, academic research.",
  "entryNode": "orchestrator",
  "version": 3,
  "updatedAt": "2026-05-17T12:49:41.6240611+00:00",
  "nodes": [
    {
      "id": "llm",
      "nodeType": "ai.llm.model.openai",
      "position": {
        "x": 275,
        "y": 534
      },
      "zIndex": 0,
      "inputs": {
        "credentials": "{{llm_credentials_id}}",
        "model": "",
        "temperature": 0.2,
        "max_tokens": 8000
      },
      "inputsMetadata": {},
      "metadata": {}
    },
    {
      "id": "search_tavily",
      "nodeType": "ai.tools.web.search.tavily",
      "position": {
        "x": 421,
        "y": 574
      },
      "zIndex": 0,
      "inputs": {
        "credentials": "{{tavily_credentials_id}}",
        "default_top_k": 8,
        "default_language": "",
        "rate_limit_profile": "medium"
      },
      "inputsMetadata": {},
      "metadata": {}
    },
    {
      "id": "search_searxng",
      "nodeType": "ai.tools.web.search.searxng",
      "position": {
        "x": 505,
        "y": 667
      },
      "zIndex": 0,
      "inputs": {
        "credentials": "{{searxng_credentials_id}}",
        "default_top_k": 8,
        "default_language": "",
        "rate_limit_profile": "medium"
      },
      "inputsMetadata": {},
      "metadata": {}
    },
    {
      "id": "calculator",
      "nodeType": "ai.tools.utils.calculator",
      "position": {
        "x": 616,
        "y": 760
      },
      "zIndex": 0,
      "inputs": {},
      "inputsMetadata": {},
      "metadata": {}
    },
    {
      "id": "deepsearch_policy",
      "nodeType": "ai.policies.layer",
      "position": {
        "x": 757,
        "y": 778
      },
      "zIndex": 0,
      "inputs": {
        "scope": "run",
        "priority": 10000,
        "conversation_require_explicit_alternatives_before_choice": "true",
        "conversation_disallow_premature_convergence": "true",
        "planning_require_decision_points_when_alternatives_exist": "true",
        "planning_require_unknowns_to_be_represented": "true"
      },
      "inputsMetadata": {},
      "metadata": {}
    },
    {
      "id": "orchestrator",
      "nodeType": "ai.node",
      "position": {
        "x": 460,
        "y": 300
      },
      "zIndex": 0,
      "inputs": {
        "agent_mode": "plan_and_execute",
        "system_prompt": "You are a deep research orchestrator. Your role is to produce EXHAUSTIVE, multi-source answers to complex research queries.\n\nYour mandate \u2014 unlike a standard Plan\u0026Execute agent:\n- EXHAUSTIVENESS is a first-class objective: gather data from multiple independent sources, not just the first result.\n- COMPARISON is required when alternatives exist: always compare options side by side (prices, specs, ratings, trade-offs).\n- CROSS-VALIDATION is mandatory: cross-reference at least 2\u20133 independent sources before treating a fact as established.\n- REPLANNING is expected: if the gathered data is insufficient or inconsistent, replan to gather more.\n\nSearch strategy:\n1. Start broad to map the landscape, then narrow to specific authoritative sources.\n2. For each comparison dimension (e.g., price, quality, availability), run dedicated targeted searches.\n3. Extract structured data: prices, dates, ratings, availability windows, constraints.\n4. Synthesize into a comprehensive, well-structured, cited answer with a clear recommendation.\n\nTool usage:\n- Use search_web_tavily for deep web search with full content extraction.\n- Use search_web_searxng for cross-source discovery and alternative results.\n- Use calculate_expression for budget calculations, comparisons, or cost estimations.\n- Run multiple parallel searches across different dimensions of the same query.\n\nOutput format:\n- Use sections, tables, and bullet points.\n- Cite sources for every key data point.\n- Always include a clear recommendation or conclusion.\n- Flag data gaps, caveats, or conflicting information explicitly.",
        "prompt": "{{input}}",
        "temperature": 0.2,
        "max_tokens": 6000,
        "max_iterations": 20,
        "plan_quality_threshold": 8.5,
        "response_quality_threshold": 7.0,
        "tool_choice_mode": "auto",
        "allow_parallel_tool_calls": true,
        "max_ready_tasks_per_batch": 6
      },
      "inputsMetadata": {},
      "metadata": {}
    }
  ],
  "connections": [
    {
      "from": "llm",
      "fromPort": "resource",
      "to": "orchestrator",
      "toPort": "llm_model"
    },
    {
      "from": "search_tavily",
      "fromPort": "resource",
      "to": "orchestrator",
      "toPort": "tools"
    },
    {
      "from": "search_searxng",
      "fromPort": "resource",
      "to": "orchestrator",
      "toPort": "tools"
    },
    {
      "from": "calculator",
      "fromPort": "resource",
      "to": "orchestrator",
      "toPort": "tools"
    },
    {
      "from": "deepsearch_policy",
      "fromPort": "resource",
      "to": "orchestrator",
      "toPort": "policies"
    }
  ],
  "metadata": {
    "version": "3.0.0",
    "epic": "EPIC-0401 / STORY-01.3",
    "status": "READY \u2014 v3: mode corrected to llmcompiler \u002B DeepSearch policies injected via ai.policies.layer node",
    "origin": "DeepSearch behaviors (exhaustiveness, alternatives, no premature convergence) are now injected explicitly via the deepsearch_policy node. The P\u0026E runtime itself is policy-neutral as of EPIC-0401.",
    "architecture": {
      "pattern": "Single orchestrator agent with exhaustive tool usage",
      "why_llmcompiler_not_replan": "LlmCompiler supports parallel task graph execution (multiple ready tasks per batch) and structured join. Replan mode is tool-failure-only and sequential \u2014 unsuitable for multi-source parallel DeepSearch.",
      "why_policy_node": "P\u0026E runtimes are policy-neutral. DeepSearch behaviors are opt-in via ai.policies.layer. Standard P\u0026E workflows connect no policy node and finalize on sufficient (not exhaustive) data.",
      "why_not_multi_agent": "Sub-agent delegation tools are not yet implemented in the runtime. This workflow uses a single Plan\u0026Execute agent that natively achieves depth through high plan_quality_threshold, multi-source parallel searches, and replanning on insufficient data. True multi-agent delegation (Orchestrator -\u003E SearchAgent -\u003E ComparisonAgent -\u003E SynthesisAgent) is tracked in EPIC-0401 as a future evolution once delegation tools exist.",
      "orchestrator_mode": "plan_and_execute",
      "replan_trigger": "DeepSearch replan is driven by both tool failure AND insufficient data depth. This is an explicit opt-in behavior delivered by the deepsearch_policy node, not by the runtime itself. The P\u0026E runtime is policy-neutral.",
      "plan_quality_threshold_rationale": "8.5 forces the planner to generate explicit parallel workstreams for each research dimension (flights, hotels, activities, budget) rather than collapsing them into vague umbrella tasks.",
      "max_ready_tasks_per_batch_rationale": "6 allows aggressive parallelism across search dimensions simultaneously."
    },
    "differentiatorVsStandardPlanExecute": [
      "plan_quality_threshold 8.5 vs configurable (typically 0-7) in standard P\u0026E",
      "max_iterations 20 vs 8-10 in standard P\u0026E",
      "allow_parallel_tool_calls true \u2014 maximizes concurrent search",
      "max_ready_tasks_per_batch 6 \u2014 more aggressive parallel workstream execution",
      "System prompt explicitly mandates exhaustiveness, comparison, and cross-validation",
      "Replan on insufficient data depth, not only on tool failure",
      "response_quality_threshold 7.0 ensures the final answer meets depth requirements before delivery"
    ],
    "templateVariables": {
      "{{llm_credentials_id}}": "Replace with the LLM provider credentials ID from your Agentivity workspace",
      "{{tavily_credentials_id}}": "Replace with the Tavily API credentials ID (optional \u2014 remove node and connection if not available)",
      "{{searxng_credentials_id}}": "Replace with the SearXNG credentials ID (optional \u2014 remove node and connection if not available)",
      "{{input}}": "The user input passed via POST /api/v1/runs { input: \"...\" }"
    },
    "useCases": [
      "Travel planning: find best flights, hotels, activities, build complete itinerary with budget breakdown",
      "Market analysis: gather competitor data, pricing, positioning from multiple sources",
      "Product benchmarking: compare specs, prices, reviews across multiple sources",
      "Academic research: cross-reference sources, extract key findings, synthesize",
      "Due diligence: exhaustive information gathering with source citation"
    ],
    "notSuitableFor": [
      "Simple Q\u0026A or conversational tasks -\u003E use ReAct",
      "Tasks with 3-8 clear steps and available tools -\u003E use Plan\u0026Execute standard",
      "Tasks without need for multi-source cross-validation -\u003E use Plan\u0026Execute standard"
    ],
    "references": [
      "Wang et al. 2023 \u2014 Plan-and-Solve Prompting",
      "Kim et al. 2023 \u2014 LLMCompiler (parallel task execution)",
      "Agentivity EPIC-0401 \u2014 DeepSearch Extraction",
      "AgentEngineV1ModeIds.PlanAndExecuteReplanExperiment = plan_and_execute",
      "AINode inputs: agent_mode, system_prompt, prompt, plan_quality_threshold, response_quality_threshold, max_iterations, max_ready_tasks_per_batch, allow_parallel_tool_calls"
    ],
    "editorViewport": {
      "x": 526.3823529411773,
      "y": -382.1764705882359,
      "zoom": 1.7205882352941178
    }
  },
  "dataTables": {},
  "annotations": []
}
