Skip to main content
Back to how-to guides Use this pattern when customers bundle several tasks in one message, such as “check my balance, pay my bill, and update my address”. The MULTI_INTENT: section tells the agent how to detect those requests and in what order to handle them, so it does not drop the secondary ones.

Concept

MULTI_INTENT: is a top-level section on an AGENT: or a SUPERVISOR:. Multi-intent handling is on by default. You add the section to change how the requests are handled. Three layers set the values. The agent section wins over the project runtime configuration, and the project configuration wins over the platform defaults. Three sources can find several requests in one message. A supervisor with ROLE: router does not make several routing calls in one turn. It routes one request at a time. The platform rates how the requests relate as independent, dependent, or ambiguous. The auto strategy and the parallel strategy use this rating.

Minimal working example

This supervisor uses the default strategy, primary_queue. It handles the first request now and queues the others. The specialists are short stand-ins.
Every property in MULTI_INTENT: is optional. The values above are the defaults. Send “Check my balance and pay my bill.” The supervisor routes to Balance_Agent first. When that specialist finishes its answer, the same reply ends with an offer for the second request, such as “Next: pay my bill. Would you like me to help with that?”. The customer accepts or declines.

How it works

  1. A source in the table above finds two or more requests.
  2. For the classifier and for flow branches, the platform drops requests below confidence_threshold and keeps at most max_intents.
  3. The platform picks a strategy. The auto and parallel strategies adjust it by the relationship rating. The table below shows the result.
  4. The platform dispatches the requests with that strategy.
A HANDOFF entry without HISTORY gives each specialist the full conversation history. A project-level coordination default can change this value.

MULTI_INTENT properties

An invalid value fails compilation. For example, strategy: fanout reports MULTI_INTENT_INVALID_STRATEGY, and max_intents: 11 reports MULTI_INTENT_INVALID_MAX_INTENTS. The compiler ignores an unknown key without a message.

Project-level settings

These settings exist only in the project runtime configuration. Set them in the Runtime Config tab of the Studio project settings, or through the runtime configuration API. Do not write these keys in an agent MULTI_INTENT: section. governed_tasks, offer_policy, child_task_view, manage_safeguard, and offer_resolver fail with error E465. The compiler ignores completion_signal and list_other_requests in an agent section without a message.

Strategy reference

primary_queue (default)

The platform handles the first request now and queues the rest. After the primary specialist gives a finished answer, the reply ends with an offer for the next queued request. The customer can accept or decline. The platform asks before it runs any queued request. The platform drops a queued request after queue_max_age_ms.

sequential

The platform runs the requests one at a time, in order. Each request gets the earlier results as context. Use it when a later request depends on an earlier one, such as confirming identity before paying a bill.
  • A specialist that needs an answer from the customer pauses the plan. The customer’s reply goes to that specialist, and the plan resumes after it.
  • A failed request does not stop the plan. The reply reports the failure.
  • If every request fails, the customer sees a fixed message asking to try again or to ask for one request at a time.

parallel

The platform sends the requests to specialists at the same time and merges the answers into one reply. Use it only for a supervisor whose specialists answer without asking the customer questions. A specialist that must ask a question loses its branch in a fan-out. A DELEGATE child cannot wait for customer input at all, so use a RETURN: true handoff for a specialist that needs answers from the customer.
The platform lowers parallel to a safer strategy when the requests are dependent or ambiguous. See What the platform runs.

disambiguate

The platform lists the requests and asks which to handle first. The customer replies with the option number, the exact option text, a button, or a plain-language answer when a classifier is available. The customer can also reply “pause”, “resume”, or “cancel”. The other options stay in the queue as offers. The platform asks before it runs any of them.

auto

The platform decides from the relationship rating. auto never fans out. Write strategy: parallel when you want fan-out.

What the platform runs

For several routing calls in one turn, the rating comes from unknown_relationship_strategy. The default parallel rates them independent. So strategy: auto with the default runs sequential, and strategy: auto with unknown_relationship_strategy: disambiguate asks the customer.

Common variations

Flow agent with two matching branches

A flow agent detects several requests when two or more ON_INPUT branches on the current step match the same message. This agent asks which request to handle first.
Send “Please fix my bill and also check the shipment.” The agent lists “1. billing” and “2. shipping”. Reply “2” to run the shipping step.

Customize the prompts

Set the prompts in the MESSAGES: block. Add this block to a supervisor that uses disambiguate.
The platform default for multi_intent_disambiguate_option is {{index}}. {{choice}}. The text {{index}}. {{intent}} (confidence: {{confidence}}) was the earlier default. The platform treats that exact text as unset and uses the current default. Write a different option text to override the default.

Verification

  1. Validate the supervisor and every target agent together.
  2. Send “Check my balance and pay my bill.” Expect the first specialist to answer, and an offer for the second request in the same reply.
  3. Accept the offer. Expect the second specialist to answer.
  4. Send one request. Expect normal routing with no offer.
  5. For disambiguate, expect a numbered list. Reply with a number and expect that request to run.
  6. For sequential, expect both answers, in order, in one reply.
In the trace, check these events.
  • multi_intent_plan_built is a decision event. It shows strategy, declaredStrategy, relationship, and targets.
  • multi_intent_queued and multi_intent_queue_seeded show the queued requests for primary_queue.
  • multi_intent_queue_surfaced shows the offer. multi_intent_queue_accepted and multi_intent_queue_declined show the reply.
  • multi_intent_queue_retired with reasonCode queued_intent_expired shows a dropped request.
  • multi_intent_disambiguate_choice shows the option the customer chose.
  • multi_intent_sequential_executed and multi_intent_parallel_executed are decision events for those strategies.

Production readiness checklist

  • Every route has an owner, a distinct condition, and a short SUMMARY.
  • A RETURN: true specialist finishes its task, so the next request can start.
  • Every route used in a multi-request plan passes its WHEN and ENABLED_WHEN. The platform drops a route that fails.
  • queue_max_age_ms fits the length of a normal session.
  • For parallel, every specialist answers without asking the customer a question.
  • For sequential, a specialist that needs input can pause the plan, and your test covers it.
  • For auto, tests cover the independent, dependent, and ambiguous cases.
  • MESSAGES: text matches your brand voice.
  • Tests cover a single request, a message below confidence_threshold, a declined offer, and an expired offer.

Common mistakes

Troubleshooting