Skip to content

Multi-agent Systems (MASs)

Multi-agent systems (MASs) are teams of agents that collaborate to achieve a shared objective. Instead of having one agent handle everything, MASs allow you to split responsibilities across multiple agents and define how they work together.

The orchestration logic—which agents run, in what order, and how decisions are made—is defined at the MAS level. The MAS uses LLM intelligence to reason through this flow using system instructions, handoffs, and agent capabilities. MASs have the following parameters that you can configure:

  • Name - The name of the MAS. It is used to identify the MAS in the dashboard.
  • Type - The type of the MAS. It is used to determine the tools and context available to the agents in the MAS and also the type of final output of a MAS is determined by the type. Once a MAS is created, the type cannot be changed.
  • Entry Agent - Every MAS must define one entry agent. That is, the agent who is the starting point of the execution.
  • System Instructions - Optional high-level guidance to steer the overall behavior of the MAS. This applies to all agents in the MAS.
  • Type Specific Settings - These settings are specific to the type of the MAS.

The tools and context available to agents and the final output of a MAS depend on the type of MAS they belong to. The following are the types of MASs, you can find more details including context variables, tools, type specific settings and output structure about each type in the following guides:

  • Storefront MASs -Used to power chatbot conversations on your storefront.
  • Email MASs - Handle and respond to customer emails.

Other types like content or insights are coming soon.


MASs are categorized by purpose:

  • Conversational MASs
    Return text-based responses to user messages (e.g., storefront or email MASs). Conversations are visible in the Inbox.
  • Background MASs
    Perform tasks like scheduling content, data analysis, or summarization in the background. They don’t directly interact with customers.

There are two different types of things that can be inferred as the output of a MAS:

  • Text-based output - This is the output of the final agent (the last working agent in a run) in a MAS. Final output type is pre-determined by the type of the MAS.
  • Tool executions - These are the side effect created by tool executions not only by the final agent but all the agents in a run.

Let’s say we have a Storefront MAS. What your customer see in the chatbot as a response is the text-based output of the final agent. However, let’s sat they asked to cancel an order and Orders Agent run cancel_order tool to cancel the order. Execution of this tool is also a part of the output of the MAS since it contribures to the expected achievement of the MAS.

Notice that the agent executing a tool may not be the final agent in the MAS. For example, Orders Agent may run cancel_order tool to cancel an order and then hand off to Refund Agent to refund the order. In this case, the Refund Agent is the final agent in the run and the output of the MAS is the text-based output of the Refund Agent.


The orchestration of agents within a MAS is configured together with MAS level and Agent level settings. These include:

  • entryAgent (MAS level) Every MAS must define one entry agent. That is, the agent who is the starting point of the execution.

  • handoffs (Agent level)
    Defined inside individual agents to control how they delegate tasks.

Long store short, the MAS starts with the entry agent and then delegates to other agents based on the handoffs until there is no more handoffs. In the meantime, the total of tools executed and output generated by the final agent is the output of the MAS.