Skip to content

Commit aa4e334

Browse files
committed
Merged main.
2 parents e3b7fd5 + 317d5d0 commit aa4e334

File tree

96 files changed

+3030
-1322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3030
-1322
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ public class HelloAgent(
195195
{
196196
Message = response
197197
}.ToCloudEvent(this.AgentId.Key);
198-
await PublishEvent(evt).ConfigureAwait(false);
198+
await PublishEventAsync(evt).ConfigureAwait(false);
199199
var goodbye = new ConversationClosed
200200
{
201201
UserId = this.AgentId.Key,
202202
UserMessage = "Goodbye"
203203
}.ToCloudEvent(this.AgentId.Key);
204-
await PublishEvent(goodbye).ConfigureAwait(false);
204+
await PublishEventAsync(goodbye).ConfigureAwait(false);
205205
}
206206
public async Task Handle(ConversationClosed item)
207207
{
@@ -210,7 +210,7 @@ public class HelloAgent(
210210
{
211211
Message = goodbye
212212
}.ToCloudEvent(this.AgentId.Key);
213-
await PublishEvent(evt).ConfigureAwait(false);
213+
await PublishEventAsync(evt).ConfigureAwait(false);
214214
await Task.Delay(60000);
215215
await App.ShutdownAsync();
216216
}
File renamed without changes.

docs/design/05 - Services.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AutoGen Services
2+
3+
## Overview
4+
5+
Each AutoGen agent system has one or more Agent Workers and a set of services for managing/supporting the agents. The services and workers can all be hosted in the same process or in a distributed system. When in the same process communication and event delivery is in-memory. When distributed, workers communicate with the service over gRPC. In all cases, events are packaged as CloudEvents. There are multiple options for the backend services:
6+
7+
- In-Memory: the Agent Workers and Services are all hosted in the same process and communicate over in-memory channels. Available for python and .NET.
8+
- Python only: Agent workers communicate with a python hosted service that implements an in-memory message bus and agent registry.
9+
- Micrososft Orleans: a distributed actor system that can host the services and workers, enables distributed state with persistent storage, can leverage multiple event bus types, and cross-language agent communication.
10+
- *Roadmap: support for other languages distributed systems such as dapr or Akka.*
11+
12+
The Services in the system include:
13+
14+
- Worker: Hosts the Agents and is a client to the Gateway
15+
- Gateway:
16+
-- RPC gateway for the other services APIs
17+
-- Provides an RPC bridge between the workers and the Event Bus
18+
-- Message Session state (track message queues/delivery)
19+
- Registry: keeps track of the {agents:agent types}:{Subscription/Topics} in the system and which events they can handle
20+
-- *Roadmap: add lookup api in gateway*
21+
- AgentState: persistent state for agents
22+
- Routing: delivers events to agents based on their subscriptions+topics
23+
-- *Roadmap: add subscription management APIs*
24+
- *Roadmap: Management APIs for the Agent System*
25+
- *Roadmap: Scheduling: manages placement of agents*
26+
- *Roadmap: Discovery: allows discovery of agents and services*

dotnet/AutoGen.sln

+14-21
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Abstracti
8484
EndProject
8585
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Extensions.SemanticKernel", "src\Microsoft.AutoGen\Extensions\SemanticKernel\Microsoft.AutoGen.Extensions.SemanticKernel.csproj", "{952827D4-8D4C-4327-AE4D-E8D25811EF35}"
8686
EndProject
87-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Runtime", "src\Microsoft.AutoGen\Runtime\Microsoft.AutoGen.Runtime.csproj", "{A905E29A-7110-497F-ADC5-2CE2A148FEA0}"
88-
EndProject
89-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.ServiceDefaults", "src\Microsoft.AutoGen\ServiceDefaults\Microsoft.AutoGen.ServiceDefaults.csproj", "{D7E9D90B-5595-4E72-A90A-6DE20D9AB7AE}"
90-
EndProject
9187
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AgentChat", "AgentChat", "{668726B9-77BC-45CF-B576-0F0773BF1615}"
9288
EndProject
9389
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Anthropic.Samples", "samples\AutoGen.Anthropic.Samples\AutoGen.Anthropic.Samples.csproj", "{84020C4A-933A-4693-9889-1B99304A7D76}"
@@ -128,12 +124,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgent", "samples\Hello
128124
EndProject
129125
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIModelClientHostingExtensions", "src\Microsoft.AutoGen\Extensions\AIModelClientHostingExtensions\AIModelClientHostingExtensions.csproj", "{97550E87-48C6-4EBF-85E1-413ABAE9DBFD}"
130126
EndProject
131-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Agents.Tests", "Microsoft.AutoGen.Agents.Tests\Microsoft.AutoGen.Agents.Tests.csproj", "{CF4C92BD-28AE-4B8F-B173-601004AEC9BF}"
132-
EndProject
133127
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{686480D7-8FEC-4ED3-9C5D-CEBE1057A7ED}"
134128
EndProject
135129
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgentState", "samples\Hello\HelloAgentState\HelloAgentState.csproj", "{64EF61E7-00A6-4E5E-9808-62E10993A0E5}"
136130
EndProject
131+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.ServiceDefaults", "src\Microsoft.AutoGen\Extensions\ServiceDefaults\Microsoft.AutoGen.ServiceDefaults.csproj", "{65059914-5527-4A00-9308-9FAF23D5E85A}"
132+
EndProject
133+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Tests", "test\Microsoft.AutoGen.Agents.Tests\Microsoft.AutoGen.Agents.Tests.csproj", "{394FDAF8-74F9-4977-94A5-3371737EB774}"
134+
EndProject
137135
Global
138136
GlobalSection(SolutionConfigurationPlatforms) = preSolution
139137
Debug|Any CPU = Debug|Any CPU
@@ -264,14 +262,6 @@ Global
264262
{952827D4-8D4C-4327-AE4D-E8D25811EF35}.Debug|Any CPU.Build.0 = Debug|Any CPU
265263
{952827D4-8D4C-4327-AE4D-E8D25811EF35}.Release|Any CPU.ActiveCfg = Release|Any CPU
266264
{952827D4-8D4C-4327-AE4D-E8D25811EF35}.Release|Any CPU.Build.0 = Release|Any CPU
267-
{A905E29A-7110-497F-ADC5-2CE2A148FEA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
268-
{A905E29A-7110-497F-ADC5-2CE2A148FEA0}.Debug|Any CPU.Build.0 = Debug|Any CPU
269-
{A905E29A-7110-497F-ADC5-2CE2A148FEA0}.Release|Any CPU.ActiveCfg = Release|Any CPU
270-
{A905E29A-7110-497F-ADC5-2CE2A148FEA0}.Release|Any CPU.Build.0 = Release|Any CPU
271-
{D7E9D90B-5595-4E72-A90A-6DE20D9AB7AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
272-
{D7E9D90B-5595-4E72-A90A-6DE20D9AB7AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
273-
{D7E9D90B-5595-4E72-A90A-6DE20D9AB7AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
274-
{D7E9D90B-5595-4E72-A90A-6DE20D9AB7AE}.Release|Any CPU.Build.0 = Release|Any CPU
275265
{84020C4A-933A-4693-9889-1B99304A7D76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
276266
{84020C4A-933A-4693-9889-1B99304A7D76}.Debug|Any CPU.Build.0 = Debug|Any CPU
277267
{84020C4A-933A-4693-9889-1B99304A7D76}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -340,14 +330,18 @@ Global
340330
{97550E87-48C6-4EBF-85E1-413ABAE9DBFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
341331
{97550E87-48C6-4EBF-85E1-413ABAE9DBFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
342332
{97550E87-48C6-4EBF-85E1-413ABAE9DBFD}.Release|Any CPU.Build.0 = Release|Any CPU
343-
{CF4C92BD-28AE-4B8F-B173-601004AEC9BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
344-
{CF4C92BD-28AE-4B8F-B173-601004AEC9BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
345-
{CF4C92BD-28AE-4B8F-B173-601004AEC9BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
346-
{CF4C92BD-28AE-4B8F-B173-601004AEC9BF}.Release|Any CPU.Build.0 = Release|Any CPU
347333
{64EF61E7-00A6-4E5E-9808-62E10993A0E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
348334
{64EF61E7-00A6-4E5E-9808-62E10993A0E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
349335
{64EF61E7-00A6-4E5E-9808-62E10993A0E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
350336
{64EF61E7-00A6-4E5E-9808-62E10993A0E5}.Release|Any CPU.Build.0 = Release|Any CPU
337+
{65059914-5527-4A00-9308-9FAF23D5E85A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
338+
{65059914-5527-4A00-9308-9FAF23D5E85A}.Debug|Any CPU.Build.0 = Debug|Any CPU
339+
{65059914-5527-4A00-9308-9FAF23D5E85A}.Release|Any CPU.ActiveCfg = Release|Any CPU
340+
{65059914-5527-4A00-9308-9FAF23D5E85A}.Release|Any CPU.Build.0 = Release|Any CPU
341+
{394FDAF8-74F9-4977-94A5-3371737EB774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
342+
{394FDAF8-74F9-4977-94A5-3371737EB774}.Debug|Any CPU.Build.0 = Debug|Any CPU
343+
{394FDAF8-74F9-4977-94A5-3371737EB774}.Release|Any CPU.ActiveCfg = Release|Any CPU
344+
{394FDAF8-74F9-4977-94A5-3371737EB774}.Release|Any CPU.Build.0 = Release|Any CPU
351345
EndGlobalSection
352346
GlobalSection(SolutionProperties) = preSolution
353347
HideSolutionNode = FALSE
@@ -385,8 +379,6 @@ Global
385379
{FD87BD33-4616-460B-AC85-A412BA08BB78} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
386380
{E0C991D9-0DB8-471C-ADC9-5FB16E2A0106} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
387381
{952827D4-8D4C-4327-AE4D-E8D25811EF35} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
388-
{A905E29A-7110-497F-ADC5-2CE2A148FEA0} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
389-
{D7E9D90B-5595-4E72-A90A-6DE20D9AB7AE} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
390382
{668726B9-77BC-45CF-B576-0F0773BF1615} = {686480D7-8FEC-4ED3-9C5D-CEBE1057A7ED}
391383
{84020C4A-933A-4693-9889-1B99304A7D76} = {668726B9-77BC-45CF-B576-0F0773BF1615}
392384
{5777515F-4053-42F9-AF2B-95D8D0F5384A} = {668726B9-77BC-45CF-B576-0F0773BF1615}
@@ -407,8 +399,9 @@ Global
407399
{A20B9894-F352-4338-872A-F215A241D43D} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
408400
{8F7560CF-EEBB-4333-A69F-838CA40FD85D} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
409401
{97550E87-48C6-4EBF-85E1-413ABAE9DBFD} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
410-
{CF4C92BD-28AE-4B8F-B173-601004AEC9BF} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
411402
{64EF61E7-00A6-4E5E-9808-62E10993A0E5} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
403+
{65059914-5527-4A00-9308-9FAF23D5E85A} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
404+
{394FDAF8-74F9-4977-94A5-3371737EB774} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
412405
EndGlobalSection
413406
GlobalSection(ExtensibilityGlobals) = postSolution
414407
SolutionGuid = {93384647-528D-46C8-922C-8DB36A382F0B}

dotnet/Directory.Packages.props

+6
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,17 @@
6363
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
6464
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="8.2.1" />
6565
<PackageVersion Include="Microsoft.Orleans.Clustering.Cosmos" Version="8.2.0" />
66+
<PackageVersion Include="Microsoft.Orleans.CodeGenerator" Version="8.2.0">
67+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
68+
<PrivateAssets>all</PrivateAssets>
69+
</PackageVersion>
70+
<PackageVersion Include="Microsoft.Orleans.Core.Abstractions" Version="8.2.0" />
6671
<PackageVersion Include="Microsoft.Orleans.Persistence.Cosmos" Version="8.2.0" />
6772
<PackageVersion Include="Microsoft.Orleans.Reminders" Version="8.2.0" />
6873
<PackageVersion Include="Microsoft.Orleans.Reminders.Cosmos" Version="8.2.0" />
6974
<PackageVersion Include="Microsoft.Orleans.Runtime" Version="8.2.0" />
7075
<PackageVersion Include="Microsoft.Orleans.Sdk" Version="8.2.0" />
76+
<PackageVersion Include="Microsoft.Orleans.Serialization" Version="8.2.0" />
7177
<PackageVersion Include="Microsoft.Orleans.Serialization.Protobuf" Version="8.2.0" />
7278
<PackageVersion Include="Microsoft.Orleans.Server" Version="8.2.0" />
7379
<PackageVersion Include="Microsoft.Orleans.Streaming" Version="8.2.0" />

dotnet/samples/Hello/Backend/Backend.csproj

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<ItemGroup>
3+
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
4+
</ItemGroup>
25
<PropertyGroup>
36
<OutputType>Exe</OutputType>
47
<TargetFramework>net8.0</TargetFramework>
58
<ImplicitUsings>enable</ImplicitUsings>
69
<Nullable>enable</Nullable>
710
</PropertyGroup>
811

9-
<ItemGroup>
10-
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Runtime\Microsoft.AutoGen.Runtime.csproj" />
11-
</ItemGroup>
12-
1312
<ItemGroup>
1413
<PackageReference Include="Microsoft.Extensions.Hosting" />
1514
</ItemGroup>
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Program.cs
33

4-
var app = await Microsoft.AutoGen.Runtime.Host.StartAsync(local: true);
4+
using Microsoft.Extensions.Hosting;
5+
6+
var app = await Microsoft.AutoGen.Agents.Host.StartAsync(local: false, useGrpc: true);
57
await app.WaitForShutdownAsync();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Warning",
5+
"Microsoft": "Warning",
6+
"Microsoft.Orleans": "Warning"
7+
}
8+
}
9+
}

dotnet/samples/Hello/HelloAIAgents/HelloAIAgent.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
namespace Hello;
99
[TopicSubscription("HelloAgents")]
1010
public class HelloAIAgent(
11-
IAgentContext context,
11+
IAgentRuntime context,
1212
[FromKeyedServices("EventTypes")] EventTypes typeRegistry,
13+
IHostApplicationLifetime hostApplicationLifetime,
1314
IChatClient client) : HelloAgent(
1415
context,
15-
typeRegistry),
16+
typeRegistry,
17+
hostApplicationLifetime),
1618
IHandle<NewMessageReceived>
1719
{
1820
// This Handle supercedes the one in the base class

dotnet/samples/Hello/HelloAIAgents/HelloAIAgents.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<ItemGroup>
1414
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
1515
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
16-
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Runtime\Microsoft.AutoGen.Runtime.csproj" />
1716
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Extensions\AIModelClientHostingExtensions\AIModelClientHostingExtensions.csproj" />
1817
</ItemGroup>
1918
</Project>

dotnet/samples/Hello/HelloAIAgents/Program.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ namespace Hello
3232
{
3333
[TopicSubscription("HelloAgents")]
3434
public class HelloAgent(
35-
IAgentContext context,
36-
[FromKeyedServices("EventTypes")] EventTypes typeRegistry) : ConsoleAgent(
35+
IAgentRuntime context,
36+
[FromKeyedServices("EventTypes")] EventTypes typeRegistry,
37+
IHostApplicationLifetime hostApplicationLifetime) : ConsoleAgent(
3738
context,
3839
typeRegistry),
3940
ISayHello,
@@ -65,7 +66,7 @@ public async Task Handle(ConversationClosed item)
6566
await PublishMessageAsync(evt).ConfigureAwait(false);
6667
//sleep30 seconds
6768
await Task.Delay(30000).ConfigureAwait(false);
68-
await AgentsApp.ShutdownAsync().ConfigureAwait(false);
69+
hostApplicationLifetime.StopApplication();
6970

7071
}
7172
public async Task<string> SayHello(string ask)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Warning",
5+
"Microsoft": "Warning",
6+
"Microsoft.Orleans": "Warning"
7+
}
8+
}
9+
}

dotnet/samples/Hello/HelloAgent/HelloAgent.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
44
<TargetFramework>net8.0</TargetFramework>
@@ -14,6 +14,5 @@
1414
<ItemGroup>
1515
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
1616
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
17-
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Runtime\Microsoft.AutoGen.Runtime.csproj" />
1817
</ItemGroup>
1918
</Project>

dotnet/samples/Hello/HelloAgent/Program.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
using Microsoft.AutoGen.Abstractions;
55
using Microsoft.AutoGen.Agents;
6+
using Microsoft.Extensions.DependencyInjection;
7+
using Microsoft.Extensions.Hosting;
68

79
// step 1: create in-memory agent runtime
810

@@ -16,17 +18,16 @@
1618
var app = await AgentsApp.PublishMessageAsync("HelloAgents", new NewMessageReceived
1719
{
1820
Message = "World"
19-
}, local: false);
21+
}, local: true);
2022

2123
await app.WaitForShutdownAsync();
2224

2325
namespace Hello
2426
{
2527
[TopicSubscription("HelloAgents")]
2628
public class HelloAgent(
27-
IAgentContext context,
28-
[FromKeyedServices("EventTypes")] EventTypes typeRegistry,
29-
IHostApplicationLifetime hostApplicationLifetime) : AgentBase(
29+
IAgentRuntime context, IHostApplicationLifetime hostApplicationLifetime,
30+
[FromKeyedServices("EventTypes")] EventTypes typeRegistry) : AgentBase(
3031
context,
3132
typeRegistry),
3233
ISayHello,

dotnet/samples/Hello/HelloAgent/README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ Flow Diagram:
2525
```mermaid
2626
%%{init: {'theme':'forest'}}%%
2727
graph LR;
28-
A[Main] --> |"PublishEvent(NewMessage('World'))"| B{"Handle(NewMessageReceived item)"}
29-
B --> |"PublishEvent(Output('***Hello, World***'))"| C[ConsoleAgent]
28+
A[Main] --> |"PublishEventAsync(NewMessage('World'))"| B{"Handle(NewMessageReceived item)"}
29+
B --> |"PublishEventAsync(Output('***Hello, World***'))"| C[ConsoleAgent]
3030
C --> D{"WriteConsole()"}
31-
B --> |"PublishEvent(ConversationClosed('Goodbye'))"| E{"Handle(ConversationClosed item)"}
32-
B --> |"PublishEvent(Output('***Goodbye***'))"| C
31+
B --> |"PublishEventAsync(ConversationClosed('Goodbye'))"| E{"Handle(ConversationClosed item)"}
32+
B --> |"PublishEventAsync(Output('***Goodbye***'))"| C
3333
E --> F{"Shutdown()"}
3434
3535
```
@@ -58,13 +58,13 @@ public class HelloAgent(
5858
{
5959
Message = response
6060
}.ToCloudEvent(this.AgentId.Key);
61-
await PublishEvent(evt).ConfigureAwait(false);
61+
await PublishEventAsync(evt).ConfigureAwait(false);
6262
var goodbye = new ConversationClosed
6363
{
6464
UserId = this.AgentId.Key,
6565
UserMessage = "Goodbye"
6666
}.ToCloudEvent(this.AgentId.Key);
67-
await PublishEvent(goodbye).ConfigureAwait(false);
67+
await PublishEventAsync(goodbye).ConfigureAwait(false);
6868
}
6969
```
7070

@@ -109,7 +109,6 @@ message ReadmeRequested {
109109
}
110110
```
111111

112-
113112
```xml
114113
<ItemGroup>
115114
<PackageReference Include="Google.Protobuf" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Warning",
5+
"Microsoft": "Warning",
6+
"Microsoft.Orleans": "Warning"
7+
}
8+
}
9+
}

dotnet/samples/Hello/HelloAgentState/HelloAgentState.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
<ItemGroup>
1515
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
1616
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
17-
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Runtime\Microsoft.AutoGen.Runtime.csproj" />
1817
</ItemGroup>
1918
</Project>

0 commit comments

Comments
 (0)