Choose Default (default) for simple tasks. This style uses a streamlined, tool-centric reasoning mode. The LLM decides which tool to use, how to use it, and when to respond. It works best for linear logic, such as retrieving a report or checking a ticket, because the agent orchestrates tool calls dynamically.Use this style for:
Single-step or lightly sequential tasks
Scenarios that need flexibility
Tasks that involve multiple tools without strict sequencing
Behavior
Tool Compatibility
Example use cases
Prompts the LLM to: - Identify which tool or collaborator to invoke - Determine inputs - Decide whether to call more tools or finalize a response
Continues prompting until it gathers enough context for an answer
Choose ReAct (react) for complex or ambiguous problems where each outcome influences the next step. This style uses an iterative loop: Think → Act → Observe. It supports reasoning, validation, and interactive confirmation. Inspired by the ReAct methodology, it surfaces the agent’s chain of thought.A ReAct agent breaks tasks into smaller steps, reasons through each, takes action, and adjusts based on what it learns. It might ask you for confirmation before continuing.Use this style for:
Exploratory or research-intensive tasks
Scenarios requiring iterative validation
Tasks with unclear or evolving requirements
Situations where transparent reasoning matters
Behavior
Tool Compatibility
Example use cases
Think: Assess the request and choose the right tool, collaborator, or reasoning step
Act: Execute the tool or collaborator
Observe: Evaluate the outcome and adjust reasoning
Repeat until the goal is achieved
Knowledge-intensive tools
Data-intensive tools
Collaborator agents
Generate or refactor code
Answer complex questions by searching and synthesizing information
Choose Plan-Act (planner) for structured workflows. The agent creates a plan first, listing tasks and tools, then executes each step in order. It can replan if conditions change. This style works well for multi-step processes and gives you transparency.
By default, the planner style summarizes tasks planned and executed unless you define a custom output.Use this style for:
Multi-step workflows
Business processes needing transparency and traceability
Automations involving multiple domains or collaborator agents
Behavior
Tool Compatibility
Example use cases
Create a structured plan before taking action
List all tasks, tools, and collaborator agents in the plan
Execute each step in sequence
Adjust the plan if conditions change
Provide a summary of tasks completed or a custom output if defined
To customize the output, define either structured_output or custom_join_tool:
Note:structured_output and custom_join_tool are mutually exclusive. Use one, not both.
Copy
Ask AI
spec_version: v1style: plannerstructured_output: {type: "object", additionalProperties: false, properties: {}} # if no custom_join_tool is provided, provide a structured outputname: customer_care_agentllm: watsonx/meta-llama/llama-3-2-90b-vision-instructdescription: | You are an agent who specializes in customer care for a large healthcare institution. You should be compassionate to the user. ...collaborators: - service_now_agenttools: - search_healthcare_providers - get_healthcare_benefits - get_my_claims
The structured_output defines the schema for the agent’s response.The custom_join_tool is a Python tool that formats the output. For example:
custom_join_tool.py
Copy
Ask AI
from typing import Dict, List, Anyfrom ibm_watsonx_orchestrate.agent_builder.tools import tool, ToolPermissionfrom ibm_watsonx_orchestrate.agent_builder.tools.types import PythonToolKind@tool(permission=ToolPermission.READ_ONLY, kind=PythonToolKind.JOIN_TOOL)def format_task_results(original_query: str, task_results: Dict[str, Any], messages: List[Dict[str, Any]]) -> str: """ Format the results from various tasks executed by a planner agent into a cohesive response. Args: original_query (str): The initial query submitted by the user. task_results (Dict[str, Any]): A dictionary containing the outcomes of each task executed within the agent's plan. messages (List[Dict[str, Any]]): The history of messages in the current conversation. Returns: str: A formatted string containing the consolidated results. """ # Create a summary header output = f"## Results for: {original_query}\n\n" # Add each task result in a structured format for task_name, result in task_results.items(): output += f"### {task_name}\n" # Handle different result types appropriately if isinstance(result, dict): # Pretty format dictionaries output += "```json\n" output += json.dumps(result, indent=2) output += "\n```\n\n" elif isinstance(result, list): # Format lists as bullet points output += "\n".join([f"- {item}" for item in result]) output += "\n\n" else: # Plain text for other types output += f"{result}\n\n" # Add a summary section output += "## Summary\n" output += f"Completed {len(task_results)} tasks related to your query about {original_query.lower()}.\n" return output