Hey folks! I’m building a multi-agent system with LangGraph and running into duplicate responses when delegating between agents.
Architecture:
-
Main graph with 2 agents (orchestrator + specialist)
-
Both created with
langchain.agents.create_agent -
Orchestrator handles queries OR delegates to specialist
-
Graph:
START → orchestrator → [END or specialist] → END
The Problem:
When user asks for something the specialist handles:
-
Orchestrator calls handoff tool
-
Orchestrator generates response: “I’ll help you with that…”
-
Specialist ALSO generates response: “I’ll help you with that…”
-
User sees BOTH messages (duplicate)
What I’ve Tried:
Attempt 1 - Conditional edges:
-
Tool sets
active_workflowstate -
Conditional edge routes based on state
-
Result: Orchestrator still generates final response before routing
Attempt 2 - Command.goto:
@tool
def handoff_to_specialist(runtime: ToolRuntime) -> Command:
return Command(
goto="specialist",
graph=Command.PARENT,
update={"messages": state["messages"] + [transfer_message]}
)
- Result: Still seeing orchestrator’s response + specialist’s response
Question:
With create_agent, is there a way to suppress the orchestrator’s final response when Command.goto is used? Or is this a fundamental limitation where agents always generate responses after tool calls?
The goal: Only specialist’s response should reach the user, not orchestrator’s.
Any guidance appreciated!