Question
In the declarative Customer Support sample, escalate_agent uses structured output (IsComplete + UserMessage) together with externalLoop and autoSend: true. We want the end user to see UserMessage (natural language), not the raw JSON.
Our host must render user-facing text uniformly from the action output. It cannot special-case individual agents or field names (UserMessage vs Reply vs ClarificationQuestion, etc.).
What is the intended way to do that in this sample?
Sample
declarative-agents/workflow-samples/CustomerSupport.yaml (escalate_agent):
- kind: InvokeAzureAgent
id: escalate_agent
conversationId: =Local.EscalationConversationId
agent:
name: TicketEscalationAgent
input:
arguments:
TicketId: =Local.TicketParameters.TicketId
IssueDescription: =Local.ServiceParameters.IssueDescription
ResolutionSummary: =Local.ResolutionSteps
externalLoop:
when: =Not(Local.EscalationParameters.IsComplete)
output:
autoSend: true
responseObject: Local.EscalationParameters
The agent is constrained to a JSON schema like:
class EscalationResponse(BaseModel):
IsComplete: bool
UserMessage: str
(See the matching Python / .NET Customer Support samples.)
What we observe
responseObject: Local.EscalationParameters correctly parses the JSON for workflow state / when.
autoSend: true yields the agent's raw text, which is the whole JSON object when response_format is set.
output appears to only support autoSend (bool), responseObject, and messages. There is no output property that identifies which field is the user-visible message.
We would like to hear from maintainers how a host is supposed to surface UserMessage in this pattern, given the constraint above. Thanks.
Question
In the declarative Customer Support sample,
escalate_agentuses structured output (IsComplete+UserMessage) together withexternalLoopandautoSend: true. We want the end user to seeUserMessage(natural language), not the raw JSON.Our host must render user-facing text uniformly from the action
output. It cannot special-case individual agents or field names (UserMessagevsReplyvsClarificationQuestion, etc.).What is the intended way to do that in this sample?
Sample
declarative-agents/workflow-samples/CustomerSupport.yaml(escalate_agent):The agent is constrained to a JSON schema like:
(See the matching Python / .NET Customer Support samples.)
What we observe
responseObject: Local.EscalationParameterscorrectly parses the JSON for workflow state /when.autoSend: trueyields the agent's raw text, which is the whole JSON object whenresponse_formatis set.outputappears to only supportautoSend(bool),responseObject, andmessages. There is nooutputproperty that identifies which field is the user-visible message.We would like to hear from maintainers how a host is supposed to surface
UserMessagein this pattern, given the constraint above. Thanks.