Upgrade to agent_framework 1.0.0 — HandoffBuilder → WorkflowBuilder#1
Draft
JasonHaley wants to merge 1 commit into
Draft
Upgrade to agent_framework 1.0.0 — HandoffBuilder → WorkflowBuilder#1JasonHaley wants to merge 1 commit into
JasonHaley wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactor the application from the
HandoffBuilderorchestration pattern (event-streaming with pending requests) to the newWorkflowBuilderpattern (structured output with switch-case routing) to upgrade toagent_framework1.0.0.Key Changes Needed
Architecture Change
workflow.run(question)is independent and stateless — no more pending request/response loopsClassifier Agent Rewrite
ClassifyResult,ClassifiedQuery) for structured output@executorfunction (extract_category) to parse classifier JSON and route downstreamQueryBridgeexecutor class to convertClassifiedQuery→ plain string for specialist agentsresponse_formatto enforce structured JSON outputAPI Renames (all 9 specialist agents)
ChatAgentAgent@ai_function@toolagent_framework.azure.AzureOpenAIChatClientagent_framework.openai.OpenAIChatClientOpenAIChatOptionsAuth Model Change
DefaultAzureCredentialwith token provideropenai_api_keyfrom configazure_ad_token_providerinAzureOpenAIclientWorkflow Handlers
drain_events/handle_workflow_events(event-streaming) with simplehandle_workflow_result(result: WorkflowRunResult)main.py Rewrite
classifier → extract_category → [switch_case] → bridges → specialist agentsAgents Retained
Reference
Target codebase: https://github.com/AgentFrameworkDev/agent-framework-dev-day/tree/main/labs/python/lab3-agentic-rag/solution
Files to Modify
src/config/azure_config.pysrc/services/search_service.pysrc/agents/classifier_agent.py(major rewrite)src/agents/semantic_search_agent.pysrc/agents/yes_no_agent.pysrc/agents/count_agent.pysrc/agents/difference_agent.pysrc/agents/intersection_agent.pysrc/agents/multi_hop_agent.pysrc/agents/comparative_agent.pysrc/agents/ordinal_agent.pysrc/agents/superlative_agent.pysrc/agents/agent_factory.pysrc/agents/__init__.pysrc/workflows/workflow_handlers.pysrc/workflows/__init__.pysrc/main.py