microsoft / microsoft/agent-framework
Python: [Bug]: DevUI graph ignores HandoffBuilder .add_handoff() routing rules — shows all-to-all arrows
Open
@victordibia is already working on this.
Since Mar 2, 2026.
devui
python
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
Bug: DevUI graph visualization ignores .add_handoff() routing rules
When using HandoffBuilder with explicit .add_handoff() routing rules, the DevUI graph visualization shows arrows between all participants (fully connected) instead of only the configured handoff routes.
Repro
from agent_framework.orchestrations import HandoffBuilder
workflow = (
HandoffBuilder(
name="customer_support_handoff",
participants=[triage_agent, order_agent, return_agent, refund_agent],
termination_condition=lambda conversation: (
len(conversation) > 0 and "goodbye" in conversation[-1].text.lower()
),
)
.with_start_agent(triage_agent)
# Triage cannot route directly to refund_agent
.add_handoff(triage_agent, [order_agent, return_agent])
# Only return_agent can escalate to refund_agent
.add_handoff(return_agent, [refund_agent, triage_agent])
# All specialists can hand back to triage
.add_handoff(order_agent, [triage_agent])
.add_handoff(refund_agent, [triage_agent])
.with_autonomous_mode()
.build()
)
serve(entities=[workflow], port=8098, auto_open=True)
Expected
The graph should show only the 6 configured edges:
triage_agent→order_agenttriage_agent→return_agentreturn_agent→refund_agentreturn_agent→triage_agentorder_agent→triage_agentrefund_agent→triage_agent
Notably, there should be no arrow from triage_agent → refund_agent (the whole point of the routing rules).
Actual
DevUI draws arrows between all 4 agents in both directions (fully connected graph), ignoring the .add_handoff() constraints entirely.
Environment
- Python Agent Framework
1.0.0rc1 OpenAIChatClientwith GitHub Models- macOS / Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.