microsoft / microsoft/agent-framework

Declarative CustomerSupport: how should a host uniformly render UserMessage from output?

Open
#8,346 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.NET python triage
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.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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.