Skip to main content
Agent styles define how the agent follows instructions and how it behaves. You can choose from three styles:
StyleHow It WorksBest For
Default (default)Uses LLM prompts to decide tools and actions dynamically.Simple, linear tasks needing flexibility.
ReAct (react)Iterative loop: ThinkActObserve. Adjusts based on outcomes.Complex, evolving tasks needing reasoning.
Plan-Act (planner)Creates a structured plan first, then executes step by step.Multi-step workflows needing transparency.
Note:
If you use groq/openai/gpt-oss-120b as the model, the agent ignores the specified style. Choose a different model to enable agent styles.

Default style

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
BehaviorTool CompatibilityExample 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
  • Python tools
  • OpenAPI tools
  • MCP tools
  • Extract information from a system or the web
  • Check the status of a task or ticket
  • Perform tasks with well-defined steps

ReAct style

Choose ReAct (react) for complex or ambiguous problems where each outcome influences the next step. This style uses an iterative loop: ThinkActObserve. 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
BehaviorTool CompatibilityExample 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
  • Handle support tickets with complex interactions

Plan-Act style

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
BehaviorTool CompatibilityExample 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
  • Python tools
  • OpenAPI tools
  • MCP tools
  • Collaborator agents
  • Create structured reports
  • Combine results from multiple tools
  • Draft contracts or compliance checklists

Customize the Response Output for Plan-Act

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.
spec_version: v1
style: planner
structured_output: {type: "object",   additionalProperties: false, properties: {}}  # if no custom_join_tool is provided, provide a structured output
name: customer_care_agent
llm: watsonx/meta-llama/llama-3-2-90b-vision-instruct
description: |
  You are an agent who specializes in customer care for a large healthcare institution. You should be compassionate
  to the user. ...
collaborators:
  - service_now_agent
tools:
  - 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
from typing import Dict, List, Any
from ibm_watsonx_orchestrate.agent_builder.tools import tool, ToolPermission
from 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