Run a broker and its specialist agents from one config file
Why it matters
In many agent frameworks the roster is written in code, with a class for each agent and a router that has a branch for each destination, so changing who the agents are means changing the program.1 Before an agent network goes near a system of record, ask where its roster and its rule for what needs a person’s approval are written down, and who reviews a change to either.
This network keeps the broker’s routing and synthesis prompts, the scenarios, the specialists and the risk rule in one XML file, and it builds its graph at load time from whatever the file declares, so a new agent is a new XML block and a new business is a new file.1 The orchestration runs for real against gpt-4o, while every specialist’s answer is written into the file in advance and no vendor API is called, which keeps each run repeatable and lets the tests exercise the real graph with no key.2
What you will do
The notebook builds the network for a fictional online travel agency from config/config_travel.xml, then runs the same graph as a management consulting firm.3
- Load the travel network and list its five specialists. Each one describes what it is good at in a line, and that description is all the broker sees when it decides whom to consult.1
- Ask for the general sentiment of recent guest reviews. In the saved run the broker consults only the guest experience specialist, which returns the reply written for it in the file, and the answer comes back with no approval needed.3
- Ask whether to match a competitor’s lower rates. The synthesis step scores its own answer against the file’s rule, which sends any change to prices or published content to a person, so the answer stops at the human gate.2 Approve it and the proposal comes back word for word,1 or decline it and the run reports the action as cancelled.4
- Load
config/config_agency.xmland ask where a post-merger integration can find synergies. The same graph now runs a consulting firm with five different specialists, and its gate fires on layoffs, restructuring and budget moves over $1M,2 as it does in the saved run, whose answer proposes a 10% headcount reduction.3 - Copy either config to start a network of your own. It needs the broker’s two prompts, a list of scenarios with keywords and the agents, each with a description and one canned reply per scenario, and nothing in the package has to change.4

Before you start
You need a free Google account and your own OpenAI API key, which you save in Colab’s secrets (the key icon in the left sidebar) under the name OPENAI_API_KEY. Each question makes two gpt-4o calls, one to route it and one to synthesize the answer, which costs a fraction of a cent, and the specialists cost nothing because their answers are written in advance.4 The notebook clones the repository and installs its own dependencies, so there is nothing else to set up.4 If you would rather spend nothing, the repository’s 19 checks run the real graph against a stub model from a clone, with Python 3.10 or newer and no key.4
Articles it puts into practice
What an enterprise AI control plane is turns orchestration and trust into questions to put to any vendor. The broker’s routing and its human gate show both at work in one small network you can read from end to end.
Found this useful? Follow me on LinkedIn for the next one.
Working on this? Connect and tell me what you are seeing.