Python: Add support for the MagenticWorkflowBuilder (#496)

* magentic happy path - wip

* Support workflow high-level magentic builder API. Add tests and samples.

* Add sample docstring

* Addressing PR feedback round 1

* Fix mypy errors

* Callback improvements

* Rename to MagenticBuilder

* Improvements

* Emit function calling deltas

* PR feedback 2

* Clean up sample
This commit is contained in:
Evan Mattson
2025-08-28 14:39:48 +09:00
committed by GitHub
Unverified
parent 738866f4fe
commit 529341f58b
8 changed files with 2716 additions and 5 deletions
@@ -22,6 +22,13 @@ _IMPORTS = [
"AgentRunStreamingEvent",
"handler",
"AgentExecutor",
"MagenticAgentDeltaEvent",
"MagenticCallbackEvent",
"MagenticCallbackMode",
"MagenticAgentMessageEvent",
"MagenticFinalResultEvent",
"MagenticManagerBase",
"MagenticOrchestratorMessageEvent",
"AgentExecutorRequest",
"AgentExecutorResponse",
"RequestInfoExecutor",
@@ -40,6 +47,12 @@ _IMPORTS = [
"SubWorkflowResponse",
"WorkflowExecutor",
"intercepts_request",
"MagenticBuilder",
"PlanReviewDecision",
"PlanReviewReply",
"PlanReviewRequest",
"RequestInfoEvent",
"StandardMagenticManager",
]
@@ -15,10 +15,19 @@ from agent_framework_workflow import (
ExecutorInvokeEvent,
FileCheckpointStorage,
InMemoryCheckpointStorage,
MagenticBuilder,
MagenticCallbackEvent,
MagenticCallbackMode,
MagenticPlanReviewDecision,
MagenticPlanReviewReply,
MagenticPlanReviewRequest,
MagenticProgressLedger,
MagenticProgressLedgerItem,
RequestInfoEvent,
RequestInfoExecutor,
RequestInfoMessage,
RequestResponse,
StandardMagenticManager,
SubWorkflowRequestInfo,
SubWorkflowResponse,
Workflow,
@@ -51,10 +60,20 @@ __all__ = [
"ExecutorInvokeEvent",
"FileCheckpointStorage",
"InMemoryCheckpointStorage",
"MagenticBuilder",
"MagenticCallbackEvent",
"MagenticCallbackMode",
"MagenticPlanReviewDecision",
"MagenticPlanReviewReply",
"MagenticPlanReviewRequest",
"MagenticProgressLedger",
"MagenticProgressLedgerItem",
"RequestInfoEvent",
"RequestInfoEvent",
"RequestInfoExecutor",
"RequestInfoMessage",
"RequestResponse",
"StandardMagenticManager",
"SubWorkflowRequestInfo",
"SubWorkflowResponse",
"Workflow",