Skip to content

Commit 9a85f00

Browse files
Add agent_description for Analysis participants so Coordinator can route by capability
The Coordinator's valid_participants block was a bullet list of names only, so the LLM had no per-agent capability signal. Combined with a Coordinator prompt that names 'Chief Architect' frequently across phases 0/1/4/5/6, the model latched onto Chief Architect repeatedly and the conversation looped on the same agent. This change populates agent_description on every Analysis participant (Chief Architect, AKS Expert, and the platform experts in platform_registry.json) and renders each description into the Coordinator's valid_participants list. The descriptions are also passed through AgentBuilder.create_agent_by_agentinfo's existing description= argument, so the framework's Agent.description field is no longer always None. Scope: Analysis step only. design/yaml/documentation orchestrators are left for a follow-up after this change is validated in production. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0da531f commit 9a85f00

2 files changed

Lines changed: 40 additions & 8 deletions

File tree

src/processor/src/steps/analysis/orchestration/analysis_orchestrator.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,13 @@ async def prepare_agent_infos(self) -> list[AgentInfo]:
157157
prompt_path = agent_dir / "agents" / prompt_file
158158
instruction = self.read_prompt_file(str(prompt_path))
159159

160+
expert_description = expert.get("description")
161+
if not isinstance(expert_description, str) or not expert_description.strip():
162+
expert_description = None
163+
160164
expert_info = AgentInfo(
161165
agent_name=agent_name,
166+
agent_description=expert_description,
162167
agent_instruction=instruction,
163168
tools=self.mcp_tools,
164169
)
@@ -172,6 +177,12 @@ async def prepare_agent_infos(self) -> list[AgentInfo]:
172177
aks_instruction = self.read_prompt_file(agent_dir / "agents/prompt_aks.txt")
173178
aks_agent_info = AgentInfo(
174179
agent_name="AKS Expert",
180+
agent_description=(
181+
"Tool-free reviewer for Azure AKS migration readiness. Reviews the "
182+
"latest Evidence Pack and produces SIGN-OFF: PASS/FAIL on AKS-side "
183+
"concerns. Select only after the Chief Architect has posted an Evidence "
184+
"Pack; required reviewer when present."
185+
),
175186
agent_instruction=aks_instruction,
176187
tools=self.mcp_tools,
177188
)
@@ -188,6 +199,13 @@ async def prepare_agent_infos(self) -> list[AgentInfo]:
188199

189200
chief_architect_agent_info = AgentInfo(
190201
agent_name="Chief Architect",
202+
agent_description=(
203+
"Lead orchestrator of the analysis and the ONLY participant with blob "
204+
"tools. Performs all file I/O (listing, reading, writing "
205+
"analysis_result.md) and authors / refreshes the Evidence Pack. Select "
206+
"to run hard-termination triage, to do or redo any file work, or to "
207+
"post a fresh Evidence Pack after reviewers ask for one."
208+
),
191209
agent_instruction=architect_instruction,
192210
tools=self.mcp_tools,
193211
)
@@ -208,10 +226,18 @@ async def prepare_agent_infos(self) -> list[AgentInfo]:
208226
tools=self.mcp_tools[2], # Blob IO tool only
209227
)
210228

211-
# Render coordinator prompt with the current participant list.
229+
# Render coordinator prompt with the current participant list. Include each
230+
# participant's description so the Coordinator can route by capability rather
231+
# than only by name (a name-only list biases the LLM toward whichever name
232+
# appears most often elsewhere in the prompt, e.g. "Chief Architect").
212233
participant_names = [ai.agent_name for ai in agent_infos]
213234
valid_participants_block = "\n".join([
214-
f'- "{name}"' for name in participant_names
235+
(
236+
f'- "{ai.agent_name}": {ai.agent_description}'
237+
if ai.agent_description
238+
else f'- "{ai.agent_name}"'
239+
)
240+
for ai in agent_infos
215241
])
216242
coordinator_agent_info.render(
217243
**self.task_param.model_dump(),

src/processor/src/steps/analysis/orchestration/platform_registry.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"agent_name": "EKS Expert",
77
"prompt_file": "prompt_eks.txt",
88
"category": "managed_cloud",
9-
"signals": ["eks.amazonaws.com", "aws", "arn:aws", "kops", "eksctl"]
9+
"signals": ["eks.amazonaws.com", "aws", "arn:aws", "kops", "eksctl"],
10+
"description": "Tool-free reviewer specialized in Amazon EKS (AWS) source-side concerns. Provides EKS-specific analysis of the Evidence Pack and produces SIGN-OFF: PASS/FAIL. Select only after the Chief Architect has posted an Evidence Pack; required only if the source platform is EKS."
1011
},
1112
{
1213
"id": "gke",
@@ -19,7 +20,8 @@
1920
"anthos",
2021
"gcr.io",
2122
"artifactregistry"
22-
]
23+
],
24+
"description": "Tool-free reviewer specialized in Google GKE source-side concerns. Provides GKE-specific analysis of the Evidence Pack and produces SIGN-OFF: PASS/FAIL. Select only after the Chief Architect has posted an Evidence Pack; required only if the source platform is GKE."
2325
},
2426
{
2527
"id": "openshift",
@@ -32,21 +34,24 @@
3234
"ocp",
3335
"security.openshift.io",
3436
"config.openshift.io"
35-
]
37+
],
38+
"description": "Tool-free reviewer for Red Hat OpenShift (OCP) source-side concerns. Reviews the Evidence Pack and produces SIGN-OFF: PASS/FAIL. Select only after the Chief Architect has posted an Evidence Pack; required only if the source platform is OpenShift."
3639
},
3740
{
3841
"id": "rancher",
3942
"agent_name": "Rancher Expert",
4043
"prompt_file": "prompt_rancher.txt",
4144
"category": "enterprise_distro",
42-
"signals": ["cattle.io", "rancher", "rke", "rke2", "k3s"]
45+
"signals": ["cattle.io", "rancher", "rke", "rke2", "k3s"],
46+
"description": "Tool-free reviewer for Rancher / RKE / RKE2 / K3s source-side concerns. Reviews the Evidence Pack and produces SIGN-OFF: PASS/FAIL. Select only after the Chief Architect has posted an Evidence Pack; required only if the source platform is Rancher."
4347
},
4448
{
4549
"id": "tanzu",
4650
"agent_name": "Tanzu Expert",
4751
"prompt_file": "prompt_tanzu.txt",
4852
"category": "enterprise_distro",
49-
"signals": ["tanzu", "vmware", "tkg", "tkgs", "pinniped", "antrea"]
53+
"signals": ["tanzu", "vmware", "tkg", "tkgs", "pinniped", "antrea"],
54+
"description": "Tool-free reviewer for VMware Tanzu (TKG / TKGS) source-side concerns. Reviews the Evidence Pack and produces SIGN-OFF: PASS/FAIL. Select only after the Chief Architect has posted an Evidence Pack; required only if the source platform is Tanzu."
5055
},
5156
{
5257
"id": "onprem",
@@ -70,7 +75,8 @@
7075
"ceph",
7176
"nfs",
7277
"f5"
73-
]
78+
],
79+
"description": "Tool-free reviewer for self-managed / on-premises Kubernetes (kubeadm, k3s, Talos, bare-metal, vSphere) source-side concerns. Reviews the Evidence Pack and produces SIGN-OFF: PASS/FAIL. Select only after the Chief Architect has posted an Evidence Pack; required only if the source platform is on-prem."
7480
}
7581
]
7682
}

0 commit comments

Comments
 (0)