watsonx OrchestratePreview

Parallel Agent Execution

Let a team of AI agents work on different parts of a request at the same time, then get one combined answer.

Overview

Parallel Agent Execution

Some requests are really several separate jobs. Onboarding a new customer, for example, means checking identity, assessing credit risk, running compliance checks and opening an account.

A coordinator agent splits the request into tasks and hands each one to a specialist agent. Tasks that don't depend on each other run at the same time. The coordinator then combines the results into one answer.

!
Preview limitation: Parallel Agent Execution works only in the embedded chat with woAPI: "v2completions". See how to set it up.
1

Plan

The coordinator lists the tasks and what depends on what.

2

Run together

Specialists work on their tasks at the same time.

3

Combine

The coordinator writes one clear answer from all the results.

Benefits

Why use it?

✓

A clear plan first

See the tasks and their order before any work starts.

⚡

Faster answers

Independent tasks run together instead of in a queue.

⇢

Tasks wait for what they need

A task that needs another's result starts only when it's ready. In employee onboarding, HR creates the employee ID first; Finance and IT then use it.

+

The plan can grow

A specialist can add a new task while it works. It is scheduled and run for you.

◔

Live progress

Your app can show which agents have started and finished.

↻

Automatic retries

A task that fails is retried before the run gives up.

It also doesn't change how you call the agent. You turn it on with one setting on the coordinator.

!
Not available yet: after the specialists finish, the coordinator does not review the results and add more tasks. New tasks can only be added by specialists while they are working.
Before you start

Get access

This is a preview feature, turned on per instance. Your IBM contact will add you to a preview instance and send you:

  • the instance URL
  • an API key

1. Install the CLI

You need the Orchestrate command-line tool. See Installing the ADK for requirements. Parallel Agent Execution requires ADK version 2.19.0, so install that version:

pip install --upgrade ibm-watsonx-orchestrate==2.19.0

2. Connect to your instance

Replace the values in angle brackets. More detail is in Initiating your environment and the CLI reference.

orchestrate env add -n my-preview \
  -u https://api.<region>.watson-orchestrate.ibm.com/instances/<instance-id> \
  --type mcsp

orchestrate env activate my-preview --api-key <YOUR_API_KEY>
!
Keep your API key private. Don't share it in documents, chats or source control.
About 10 minutes

Quick start

Build a coordinator with two specialists. For background, see Building agents and Importing agents.

  1. Create the specialist agents

    A specialist is a normal agent with its own tools. Save this as risk_agent.yaml, then create a similar compliance_agent.yaml.

    risk_agent.yaml
    spec_version: v1
    kind: native
    name: risk_agent
    description: Assesses credit and financial risk for an applicant.
    llm: watsonx-orchestrate/frontier
    style: react_intrinsic
    instructions: |
      You are the financial risk specialist.
      Check the applicant's credit profile and report the exact score.
      Keep your answer under 150 words.
    tools:
      - check_credit_profile

    To see which models you can use, run orchestrate models list. See also Choosing an LLM.

  2. Create the coordinator

    The important line is coordination: parallel.

    onboarding_coordinator.yaml
    spec_version: v1
    kind: native
    name: onboarding_coordinator
    description: Runs risk and compliance checks and gives one decision report.
    llm: watsonx-orchestrate/frontier
    style: react_intrinsic
    coordination: parallel
    instructions: |
      You plan the work; you do not do the checks yourself.
      Always create a plan with two tasks:
        1. risk_agent
        2. compliance_agent
      Neither task depends on the other. Include the applicant ID in each task.
    collaborators:
      - risk_agent
      - compliance_agent
  3. Import and deploy

    Import the specialists first, then the coordinator. Then deploy each agent to live.

    orchestrate agents import -f risk_agent.yaml
    orchestrate agents import -f compliance_agent.yaml
    orchestrate agents import -f onboarding_coordinator.yaml
    
    orchestrate agents deploy -n risk_agent
    orchestrate agents deploy -n compliance_agent
    orchestrate agents deploy -n onboarding_coordinator
  4. Ask a question

    Open the embedded chat for onboarding_coordinator (with woAPI: "v2completions") and send:

    Process application APP-1001 for Jane Doe. Assess credit risk and run compliance checks.

    Both specialists start together and finish on their own. You get one combined answer.

i
Specialists need tools. Tools are Python functions. Import one with orchestrate tools import -k python -f <file>.py; importing the same file again updates it. See Creating tools.
Ready-made sample

Example: customer onboarding and KYC

This sample runs four checks in one parallel step and produces one decision report. The coordinator is customer_onboarding_coordinator.

SpecialistWhat it does
identity_verification_agentChecks the ID document, face match and sanctions lists.
financial_risk_assessorChecks credit score, cash flow and risk tier.
compliance_audit_agentRuns anti-money-laundering and tax-status checks.
account_provisioning_agentOpens the account, issues a virtual card and sends a welcome message.

Try it live: open the chat button at the bottom right of this page and send this prompt. You can also copy it into your own agent.

Process onboarding application APP-KYC-9481 for Elena Rostova. Execute government ID and
biometric verification, assess credit and banking cash flow risk, perform regulatory AML
and FATCA compliance checks, and provision core accounts with instant virtual card.

You get a report with the decision, the identity, risk and compliance results, the new account details and next steps.

✓
The sample tools return sample data so you can see how it works. Replace them with calls to your own systems when you build for real.

Nine more samples are available: incident response, code review, travel planning, security triage, customer support, deal review, executive decisions, threat response and a multi-team program. Ask your IBM contact for the sample bundle.

Required for the preview

Chat with your agent

!
In the preview, Parallel Agent Execution works only in the embedded chat, and only with woAPI: "v2completions". Other chat options, such as the standard Orchestrate chat page, are not supported yet. To try your coordinator, add the embedded chat to a web page as shown below.
  1. Deploy your coordinator

    The coordinator and its specialists must be deployed to live. See step 3 in the Quick start.

  2. Get the embed script

    Run this command with the name of your coordinator agent:

    orchestrate channels webchat embed --agent-name=onboarding_coordinator

    The command prints a <script> block with the settings for your instance: orchestrationID, hostURL, agentId and agentEnvironmentId. You can also create the script from the Orchestrate user interface. See Embedded chat: getting started for this step, or Embedding the agent to web applications for the user interface route.

  3. Add woAPI: "v2completions"

    Add this one line to the settings in the script. Without it, you will not get parallel execution or progress messages.

    embed script
    window.wxOConfiguration = {
      orchestrationID: "...",
      hostURL: "...",
      rootElementID: "root",
      woAPI: "v2completions",
      chatOptions: {
        agentId: "...",
        agentEnvironmentId: "..."
      }
    };

    Keep the other values exactly as the command printed them. If the script has deploymentPlatform and crn lines, keep them only if you are embedding on IBM Cloud.

  4. Put the script on a web page

    Paste the script inside the <body> of your page, and add an element with the ID root. The page must start with <!DOCTYPE html>.

    index.html
    <!DOCTYPE html>
    <html>
      <body>
        <div id="root"></div>
        <!-- paste the embed script here -->
      </body>
    </html>
  5. Open the page and send a prompt

    Open the page in your browser and send the onboarding prompt from the example. The chat on this page is set up the same way, so you can try it here first.

i
Security. Embedded chat has security turned on by default, and your instance may need keys set up before the chat starts. See Embedded chat: getting started. Ask your IBM contact if the preview instance is already set up.
For app builders

Show progress in your app

Call the coordinator the same way you call any agent. If you stream the response, you also receive progress messages that you can show to users.

Watch the specialists start and finish together in the chat. If the video doesn't play, download it (.mov, about 23 MB).

The messages arrive in this order:

  • thread.parallel.event · parallel.agent.started
    A specialist has started. Includes the agent name and task.
  • thread.parallel.event · parallel.agent.completed
    A specialist has finished, with a short result summary.
  • thread.parallel.event · parallel.run.state
    The run is writing the final answer, then is complete.
  • thread.message.completed
    The final combined answer is ready.
i
The details are in the parallel_event field. Progress messages are sent on a best-effort basis, so always use thread.message.completed for the final answer. If your app ignores progress messages, it still gets the final answer.

To see these messages in a chat window, use the embedded chat with woAPI: "v2completions". See Chat with your agent.

Best practices

Tips for good results

Do

  • Use it for several separate jobs that don't need each other.
  • Name the specialists in the coordinator's instructions and say how many tasks to create.
  • Include the key ID (applicant, ticket, order) in every task.
  • Keep specialist answers short and structured: a verdict, key numbers, a one-line summary.
  • Describe what the final report should look like.

Avoid

  • Splitting a job where each step needs the one before it. Use dependencies, or don't use parallel.
  • Assuming specialists can see each other's work. While running together, they can't.
  • Letting specialists ask questions. A running plan can't stop to ask for clarification, so tell them not to.
  • Vague specialist descriptions. The coordinator picks agents based on them.
Preview defaults

Limits in the preview

5
specialists running at once
20
tasks in one run
120s
to create the plan
120s
for each specialist
60s
to write the final answer
!
If the service restarts while a run is in progress, that run is not resumed. Send the request again. Settings and behavior may change before general availability.
Need a hand?

Troubleshooting

Select a problem to see what to try. For general issues, see Troubleshooting in the Orchestrate documentation.

Agents seem to run one after another
Check that the coordinator has coordination: parallel, import it again, and confirm the preview is turned on for your instance.
The coordinator answers without using specialists
In its instructions, say "always create a plan" and name the specialists and tasks.
The plan uses the wrong agent
Make sure each specialist is listed under collaborators and has a clear description.
Import fails with "An Unexpected Error Occurred"
Run the same import again. Also check that the model name appears in orchestrate models list.
A specialist times out
Give it a smaller job, or split the job between two specialists.
The chat shows no progress while it works
Progress messages are best-effort and appear only when you stream the response. The final answer always arrives in thread.message.completed.

More documentation: watsonx Orchestrate ADK documentation