> For the complete documentation index, see [llms.txt](https://docs.amesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amesa.com/tutorials/material-fusion/build-a-multi-agent-system.md).

# Build a Multi-Agent System

After building and training your first agent, you are ready to orchestrate agents together into a multi-agent system.

## Orchestrate Agents

For this use case, every agent in your multi-agent system will have the same goal, to maximize quality. What differentiates the agents from each other is that each will practice in and master a separate scenario.

<figure><img src="/files/zLSXjoHaRXuR14I5dfW9" alt=""><figcaption></figcaption></figure>

There are six scenarios, so you will need six separate agents. Drag the Maximize Quality goal into the agent system six times. Then select a different scenario for each of the six agents. This is what will allow them to learn to specialize differently and develop the unique skills they need.

A supervisor agent called an orchestrator will choose the appropriate agent to take control based on the environmental conditions in the simulator or real system. This orchestration method is called the Strategy Pattern because it allows the system to use different control strategies at different times depending on the need.

## Configure Orchestrators

The orchestrator is the green diamond above the purple agents. When you drag more than one skill in parallel into the Agent Orchestration Studio, an orchestrator automatically appears.

Orchestrators can be learned or programmed. Programmed orchestrators that use deterministic logic to select the right agent need to be created in code and published to the Agent Orchestration Studio. Learned orchestrators can be configured with goals, just like any other agent. In this case, you should configure the orchestrator with the same goal as the other agents: maximize quality.

Orchestrators can also choose agents in either a fixed or a variable order. In this case, the orchestrator should be a variable-order orchestrator that chooses whichever skill is correct in the moment, without regard for sequence.

## Train Your Multi-Agent System

Once you have all your agents and your orchestrator configured, click Start Training to train your multi-agent system. You now have more agents, so you need more training cycles to distribute among them. Try training for 140 training cycles, with 20 each for each agent and 20 for the orchestrator.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amesa.com/tutorials/material-fusion/build-a-multi-agent-system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
