Skip to main content
This experiment explores a Multi-Agent architecture where specialized AI agents work together under the guidance of a central supervisor. The supervisor acts as an intelligent coordinator, managing communication between agents and strategically delegating tasks based on each agent’s expertise and the specific requirements of the problem at hand. In this experiment, you’ll create a multi-agent system powered by LangGraph with two agents — a research and a math expert. The web search agent is using Tavily, visit their website to get an API key.

Start the FlexAI endpoints

Create the FlexAI secret that contains your HF token in order to access the inference models:
Export your Tavily API key:
Start the FlexAI endpoint of the LLM:
Store the returned Inference Endpoint API KEY and Endpoint URL:
You’ll notice the last export line uses the jq tool to extract the value of endpointUrl from the JSON output of the inspect command. If you don’t have it already, you can get jq from its official website: https://jqlang.org/

Setup

1

Navigate to the experiment directory

2

Install the required dependencies

3

Run the application

4

Interact with the Multi-Agent System

When prompted, enter your question. The system will automatically route it to the appropriate agents (research and math experts).Research + Math Question:
Expected Output:

Code

requirements.txt

main.py

agents/supervisor.py

agents/math.py

agents/web_search.py

⚡ Deploy this on FlexAI

Any model, NVIDIA or AMD, live in under 60 seconds. No code changes, no infra management, hardware-agnostic.

Get started →Talk to us