-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Task
Copy link
Labels
Description
Add Simplified sample showing basic executor-agent-executor chaining pattern in workflows
Description
developers learning the framework would benefit from an introductory example that focuses on the core concept of chaining the Executor and Agent components together.
Current State - What Exists
Samples with Executor-Agent Integration:
- Concurrent (Concurrent Execution)
• What it does: Fan-out/fan-in pattern with agents
• Workflow: StartExecutor → [Agent, Agent] → AggregationExecutor
• Focus: Parallel processing, not sequential chaining - WorkflowAsAnAgent (Agents)
• What it does: Encapsulates a workflow containing agents as an AIAgent
• Focus: Workflow-as-agent abstraction, and slight executor-agent integration but only for Fan-Out and Fan-In. - CustomAgentExecutors (Agents)
• What it does: Custom executors that manage agent instances internally
• Focus: Advanced executor patterns with embedded agent management (but decouple them from being seen in the workflow, executed "ad hoc") - 03_AgentsInWorkflows & 04_AgentWorkflowPatterns (Foundational)
• What they do: Agent-only workflows using AgentWorkflowBuilder
• Focus: Agent composition patterns (sequential, concurrent, handoffs, group chat)
The Gap - What's Missing
What's Missing in Current Samples?
The Core Gap: No sample demonstrates the fundamental pattern of sequential executor → agent → executor chaining with proper type handling and protocol management.
A foundational sample must show:
- The Type Mismatch Problem
• Executors naturally work with simple types (string, int, custom objects)
• Agents expect ChatMessage or List
• Gap: No sample explains this fundamental incompatibility - The Chat Protocol Requirements
• Agents use ChatProtocolExecutor internally
• They accumulate messages and require TurnToken to process
• Gap: No sample demonstrates: - The Adapter Pattern
• Need translator executors to bridge the gap:
• string → ChatMessage conversion
• Send TurnToken to trigger agent
• Extract data from ChatMessage responses
• Gap: No sample shows WHY adapters are necessary or HOW to implement them - Sequential Pipeline Pattern
• Gap: No sample demonstrates this complete flow - State Management Across Components
• Sharing data between executors using IWorkflowContext.QueueStateUpdateAsync
• Gap: No sample shows state coordination in mixed workflows - Workflow Builder Reuse
• Creating WorkflowBuilder once
• Calling .Build() for each execution to ensure clean state
• Gap: No sample demonstrates this best practice