microsoft / microsoft/agent-framework

DevUI Interface Breaks with Azure AI Agents

Open
#2,961 3 comments 0 reactions 1 assignee Claimed by @victordibia View on GitHub
devui question
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

When using Azure AI Agents with DevUI, the interface breaks during execution. The logs show:

> Response status: 200 Response headers: 'Content-Type': 'text/event-stream; charset=utf-8' ... [CANCELLATION] Execution cancelled via CancelledError for resp_9af4a376 [CANCELLATION] Stream cancelled for resp_9af4a376

The DevUI Events panel shows thousands of `output_text.delta` events (2629+ in my case), and then the execution gets cancelled.

Image

Image

Here is the code I am using:

```
from agent_framework import WorkflowBuilder
from agent_framework.azure import AzureAIAgentClient

from src.executors.document_ingestion import DocumentIngestionExecutor
from src.agents.requirements_extraction import create_requirements_extraction_agent

def create_workflow(
chat_client: AzureAIAgentClient,
as_agent: bool = True
):
"""

This workflow processes uploaded documents and extracts structured requirements.

Workflow Flow:
User Input → DocumentIngestion → RequirementsExtraction → User Output (JSON)

Args:
chat_client: Azure AI agent client for creating agents
as_agent: If True, returns workflow.as_agent() for compatibility with container mode

Returns:
Workflow or workflow agent depending on as_agent parameter
"""

# Step 1: Create the document ingestion executor
document_ingestion = DocumentIngestionExecutor()

# Step 2: Create the requirements extraction agent
requirements_extraction = create_requirements_extraction_agent(chat_client)

# Step 3: Build the workflow
workflow = (
WorkflowBuilder(
name="Workflow",
description="Extracts structured requirements from documents",
)
.set_start_executor(document_ingestion)
.add_edge(document_ingestion, requirements_extraction)
.build()
)

return workflow.as_agent() if as_agent else workflow
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.