adding ABANDON in multi-intent/intent-shift
This commit is contained in:
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -448,6 +448,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -605,6 +612,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -700,6 +708,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -448,6 +448,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -605,6 +612,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -700,6 +708,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -446,6 +446,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -603,6 +610,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -698,6 +706,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -448,6 +448,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -605,6 +612,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -700,6 +708,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -446,6 +446,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -603,6 +610,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -698,6 +706,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -446,6 +446,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -603,6 +610,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -698,6 +706,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -446,6 +446,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -603,6 +610,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -698,6 +706,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -39,6 +39,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -446,6 +446,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -603,6 +610,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -698,6 +706,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -42,6 +42,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -448,6 +448,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -605,6 +612,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -700,6 +708,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
@@ -43,6 +43,8 @@ class AgentState(TypedDict, total=False):
|
||||
agent_responses: list[dict[str, Any]]
|
||||
pending_topics: list[dict[str, Any]]
|
||||
handled_topics: list[dict[str, Any]]
|
||||
operation_results: dict[str, dict[str, Any]]
|
||||
multi_intent_plan: dict[str, Any]
|
||||
active_agent: str
|
||||
route_bypassed: bool
|
||||
continuity_signal: dict[str, Any]
|
||||
|
||||
@@ -448,6 +448,13 @@ class AgentWorkflow:
|
||||
if (decision.metadata or {}).get("multi_intent_plan")
|
||||
else list(state.get("pending_topics") or [])
|
||||
),
|
||||
# Durable correlation for the primary operation. route_decision
|
||||
# is replaced by state routing on confirmation/resume turns.
|
||||
"multi_intent_plan": (
|
||||
(decision.metadata or {}).get("multi_intent_plan")
|
||||
or state.get("multi_intent_plan")
|
||||
or {}
|
||||
),
|
||||
}
|
||||
|
||||
async def billing_agent(self, state):
|
||||
@@ -605,6 +612,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
"output_guardrails_already_applied": False,
|
||||
@@ -700,6 +708,7 @@ class AgentWorkflow:
|
||||
"pending_topics": drained.pending_topics,
|
||||
"handled_topics": drained.handled_topics,
|
||||
"agent_responses": drained.agent_responses,
|
||||
"operation_results": drained.operation_results,
|
||||
"mcp_results": drained.mcp_results,
|
||||
"rag_results": drained.rag_results,
|
||||
**drained.state_patch,
|
||||
|
||||
Reference in New Issue
Block a user