Skip to content

Bug: Agent responses lose structured JSON metadata in multi-agent orchestration (MAF 1.x.x) #5785

@giles17

Description

@giles17

Bug Report

Summary

Agent responses are sometimes returned in the wrong format. Instead of including both the main text and additional structured data at the end, the system occasionally returns only plain text. This issue appears when handling certain types of interactions and leads to inconsistent output compared to earlier versions, where formatting was always correct and consistent. For details are captured by the Expected Behaviour and Actual Behaviour sections

Steps to Reproduce

Providing exact steps to reproduce this issue is challenging without access to our internal repository and implementation details. The behaviour depends on a specific multi-agent setup, orchestration logic, and prompt configurations that are not publicly available.

Additionally, there have been significant architectural and behavioural changes between the pre-release and the current released version of Microsoft Agent Framework (MAF), which may contribute to the issue.

Expected Behaviour

Observed in:

Package Version
agent-framework-azure-ai 1.0.0b251204
agent-framework-core 1.0.0b251204

All responses should consistently follow the defined output format, regardless of how the request is handled. Each response must include a plaintext answer followed by the required structured JSON metadata appended at the end.

Image

The use of different agents or interaction types should not affect or alter this formatting.
Correct behaviour:
Image

Actual Behaviour in MAF 1.x.x

When making requests to the agent through the orchestrator, we expect a plaintext response, with JSON metadata appended at the end of the output.

Image

However, when the request is handled by the conversation agent, other sub-agents begin to ignore the output format defined in their prompts. Instead, they start mimicking the first response format, producing only a simple plaintext answer without the expected JSON metadata.

Image

Environment

  • OS: Windows 11, WSL with Ubuntu 24.04
  • IDE: VS Code 1.116.0

Impact

Medium (workaround exists)

Possible Fix (Optional)

The workaround is to use structured output: https://learn.microsoft.com/en-us/agent-framework/agents/structured-outputs

Reproducibility

Always

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions