We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9662dba commit 132912cCopy full SHA for 132912c
langgraph_supervisor/handoff.py
@@ -10,6 +10,7 @@
10
11
WHITESPACE_RE = re.compile(r"\s+")
12
METADATA_KEY_HANDOFF_DESTINATION = "__handoff_destination"
13
+METADATA_KEY_IS_HANDOFF_BACK = "__is_handoff_back"
14
15
16
def _normalize_agent_name(agent_name: str) -> str:
@@ -117,10 +118,12 @@ def create_handoff_back_messages(
117
118
content=f"Transferring back to {supervisor_name}",
119
tool_calls=tool_calls,
120
name=agent_name,
121
+ response_metadata={METADATA_KEY_IS_HANDOFF_BACK: True},
122
),
123
ToolMessage(
124
content=f"Successfully transferred back to {supervisor_name}",
125
name=tool_name,
126
tool_call_id=tool_call_id,
127
128
129
)
0 commit comments