microsoft / microsoft/agent-framework
Declarative CustomerSupport: how should a host uniformly render UserMessage from output?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 2.3k
- Avg merge
- 2d 45m
- Merged PRs (30d)
- 358
Description
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.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 UserMessage in this pattern, given the constraint above. Thanks.
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.
Research direction
Start with declarative-agents/workflow-samples/CustomerSupport.yaml, especially the escalate_agent output block and its autoSend, responseObject, and messages properties. Compare the matching Python and .NET Customer Support samples, then trace how the host receives action output. Done means the intended uniform way to surface UserMessage is documented or the missing output capability is clearly specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100