Skip to content

Commit a8b70c1

Browse files
Add workflow orchestration
1 parent fd37730 commit a8b70c1

File tree

1 file changed

+66
-1
lines changed

1 file changed

+66
-1
lines changed

docs/ai/conceptual/agents.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,79 @@ Imagine you're launching a new feature on your business website. If it's a simpl
3434
- Testing
3535
- Deployment
3636

37-
## Agents + Workflows
37+
### Agents + Workflows
3838

3939
Workflows don’t require agents, but agents can supercharge them.
4040

4141
When agents are equipped with reasoning, tools, and context, they can optimize workflows.
4242

4343
This is the foundation of multi-agent systems, where agents collaborate within workflows to achieve complex goals.
4444

45+
### Workflow orchestration
46+
47+
Agentic workflows can be orchestrated in a variety of ways. The following are a few of the most common.
48+
49+
#### Sequential
50+
51+
Agents process tasks one after another, passing results forward.
52+
53+
```mermaid
54+
graph TD
55+
A[Agent A] --> B[Agent B]
56+
B --> C[Agent C]
57+
C --> D[Final Output]
58+
```
59+
60+
#### Concurrent
61+
62+
Agents work in parallel, each handling different aspects of the task.
63+
64+
```mermaid
65+
graph TD
66+
A[Task Input] --> B1[Agent A]
67+
A --> B2[Agent B]
68+
A --> B3[Agent C]
69+
B1 --> C[Aggregate Results]
70+
B2 --> C
71+
B3 --> C
72+
C --> D[Final Output]
73+
```
74+
75+
#### Handoff
76+
77+
Responsibility shifts from one agent to another based on conditions or outcomes.
78+
79+
```mermaid
80+
graph TD
81+
A[Start Task] --> B{Agent A Decision}
82+
B -- Success --> C[Agent A Continues]
83+
B -- Needs Help --> D[Agent B Takes Over]
84+
D --> E{Agent B Decision}
85+
E -- Escalate --> F[Agent C Takes Over]
86+
E -- Complete --> G[Agent B Completes Task]
87+
C --> H[Final Output]
88+
F --> H
89+
G --> H
90+
```
91+
92+
#### Group Chat
93+
94+
Agents collaborate in a shared conversation, exchanging insights in real-time.
95+
96+
```mermaid
97+
sequenceDiagram
98+
participant User
99+
participant AgentA
100+
participant AgentB
101+
participant AgentC
102+
103+
User->>GroupChat: Start Task Discussion
104+
AgentA->>GroupChat: Shares initial analysis
105+
AgentB->>GroupChat: Adds additional context
106+
AgentC->>GroupChat: Suggests strategy
107+
GroupChat->>User: Final Collaborative Output
108+
```
109+
45110
## How can I get started building agents in .NET?
46111

47112
The building blocks in Microsoft.Extensions.AI as well as Microsoft.Extensions.VectorData provide you with the foundations for agents by providing modular components for AI models, tools, and data.

0 commit comments

Comments
 (0)