Step 5 · Technical Director
The pattern: an orchestrator is an LlmAgent whose tools include other agents. It picks which team to call and writes the final answer itself.
The director's tools are the teams from steps 1 to 4, each wrapped in an AgentTool, plus three data tools:
# Delegation is driven by these descriptions: they are all the director knows about each team.
SCOUT = "Answers questions about ONE player or ONE team: form, minutes, goals, ratings, availability."
MATCH_PREP = "Writes Sunday's game plan: opponent analysis, then tactics, then an XI of available players."
SCOUTING_DEPT = "Full scouting report on Sunday's opponent: threats, weaknesses, cards and the referee."
TRIBUN = "Picks a final XI and has the home crowd stress-test it. Only when asked to pick or defend the XI."
# Try it live: uncomment these, ask the same questions again, and watch the routing go wrong.
# SCOUT = "Helps with football."
# SCOUTING_DEPT = "Also helps with football." tools=[
AgentTool(build_scout(description=SCOUT)),
AgentTool(build_match_prep(description=MATCH_PREP)),
AgentTool(build_scouting_department(description=SCOUTING_DEPT)),
AgentTool(build_tribun(description=TRIBUN)),
get_fixtures,
get_standings,
project_table,
],Three questions show the range. First: "Should we rest Salah for Freiburg on Thursday?"
The director called the scout and get_fixtures, then wrote (trimmed):
- 4 days of rest between Gaziantep FK and Freiburg (H, Nov 5).
- Verdict: A full benching on Sunday is unnecessary given the 4-day recovery window ahead of Thursday's match. … start Salah against Gaziantep FK and withdraw him around the 60-minute mark once the match is secured.
Then: "If we win 2-0, where do we stand?"
One project_table call, no team needed:
- Trabzonspor Position: Moves from 3rd to 1st
- Points: Increases from 19 to 22
- Goal Difference: Improves from +14 to +16
- Trabzonspor: 22 pts (+16 GD, 10 played)
- Galatasaray: 22 pts (+7 GD, 9 played)
And the big one: "Bizi pazara hazırla" ("get us ready for Sunday"). The director called scouting_department, then match_prep (seven agents in all), and answered in Turkish after 222 seconds:
Zafiyetler
- İkinci Yarı Savunma Düşüşü: Son 10 maçta 15 gol yediler (maç başına 1.50 gol; …). 15 golün 10'u (%67) ikinci yarıda yendi.
Forvet
- ST: Mohamed Salah (Lig sezonu: 9 maç, 8 gol, 3 asist, 8.01 FotMob reytingi; son 10 maç: 10 maç, 802 dakika, 8 gol, 5 asist)
"10 of their 15 goals conceded (67%) came in the second half", and Salah's league-season and last-10 numbers kept apart. Both lines come from a fix; more on that below.
Use it when questions vary and different questions need different specialists, and you want one voice to answer.
Avoid it when the route is always the same (use a workflow agent, it's cheaper and predictable) or when a single agent with a few more tools would do.
The gotchas: three of them, plus a lesson.
- Descriptions drive routing. The director never sees a team's instructions or code, only its name and
description. Uncomment the two vague descriptions in the file, ask the same questions, and watch it pick the wrong team. A good description says what the team does and when to use it. - One parent per agent. An ADK agent instance can have only one parent, so step 5 can't reuse step 1's
scoutobject. That's why every step exposes abuild_*()factory that returns fresh instances. AgentToolvssub_agents. Insub_agents, the director transfers the conversation: the team answers the user and the director is out of the loop. WithAgentTool, the director calls the team, gets its final answer back as a tool result, and stays in charge. For a briefing that combines teams, you wantAgentTool.
And a lesson from my first run. The scouts wrote "60% of goals conceded come in two windows, 46–60' and 76–90'". The director, summarising the summary, turned that into "60% come in the second half". Wrong: it's 10 of 15, so 67%. I didn't fix it with a sterner prompt but in the tool: get_team_trends now returns per-half totals, so nobody adds windows up. Give an orchestrator computed numbers to quote, not pieces to reassemble.