Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rysweet-unsubscribe-and-agent-tests-4744 #4920

Draft
wants to merge 114 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
5f4d1dd
wip
rysweet Dec 17, 2024
56e47cf
wip working on grpcgateway
rysweet Dec 17, 2024
0ac819c
worker changes
rysweet Dec 17, 2024
dfc62d4
wip
rysweet Dec 17, 2024
70d488c
proto updates
rysweet Dec 18, 2024
22946a0
registry grain cleanup
rysweet Dec 18, 2024
43ed890
core services build
rysweet Dec 19, 2024
98e517d
Adding AgentTests and host builder cleanup
rysweet Dec 20, 2024
ac7bde8
fixing what the tests found
rysweet Dec 20, 2024
5ee0db8
EventTypes->AgentMetadata
rysweet Dec 20, 2024
bd66642
initialize test
rysweet Dec 20, 2024
94ddacb
more fixes along the way
rysweet Dec 20, 2024
e3db41e
improve the error for uninitialized agents
rysweet Dec 20, 2024
c7cf200
move message extensions and update AgentWorker
rysweet Dec 20, 2024
e42123c
getting it all to build
rysweet Dec 22, 2024
823019d
start mustnt wait
rysweet Dec 22, 2024
b501d25
add unsubscribe
rysweet Dec 22, 2024
83f5fc0
adding tests for agentstate
rysweet Dec 22, 2024
acaf3d3
publish and receive test
rysweet Dec 22, 2024
1d6e443
Improving the subscription tests timing
rysweet Jan 7, 2025
4649d90
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 7, 2025
7d4308f
tests pass now
rysweet Jan 7, 2025
2e1d24f
rename some wierd methods
rysweet Jan 7, 2025
b69bbb5
remove unused.
rysweet Jan 7, 2025
1d58323
adding test project for grpc core
rysweet Jan 7, 2025
bf907aa
update AddGrpcAgentWorker
rysweet Jan 7, 2025
a2e6ca0
starting to fix the grpcagentworker and gateway
rysweet Jan 8, 2025
9fc15f3
format
rysweet Jan 8, 2025
d69a7da
format
rysweet Jan 8, 2025
ad94502
format
rysweet Jan 8, 2025
54bf9fc
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 8, 2025
11558c2
seems like there was a typo
rysweet Jan 8, 2025
c3de0ad
interim - trying to fix DI error
rysweet Jan 10, 2025
5ecf4a5
attempting fix
rysweet Jan 14, 2025
3f29976
ok, resolve the startup errors finally
rysweet Jan 14, 2025
7aee5c9
format
rysweet Jan 14, 2025
632e934
set Dev env for tests
rysweet Jan 15, 2025
0d9bf51
checkpoint
rysweet Jan 15, 2025
1e06db2
cleanup
rysweet Jan 15, 2025
1809b62
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 16, 2025
6ae6067
stashy
rysweet Jan 17, 2025
84115cb
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 17, 2025
6215c5d
remove failed experiment
rysweet Jan 17, 2025
7093034
back AgentsApp off of ASPNET
rysweet Jan 17, 2025
5b297fb
back off of aspnet
rysweet Jan 17, 2025
0d1e124
fixing HelloAgent so that it works with GRPC as well now
rysweet Jan 18, 2025
3fdd78e
cleanup trying to get grpc to work
rysweet Jan 18, 2025
9cf866a
host changes broke this
rysweet Jan 18, 2025
fef95b7
error handling for registeragenttyperesponse
rysweet Jan 18, 2025
6053f92
error handling for subscriptionresponse
rysweet Jan 18, 2025
6824bb3
updating publish message with topics
rysweet Jan 19, 2025
0abb6a3
Orleans runtime logs to error only
rysweet Jan 19, 2025
3aa7838
add log message on new connection
rysweet Jan 19, 2025
00d9caf
improve log message
rysweet Jan 19, 2025
518ad15
improve log message
rysweet Jan 19, 2025
b6915ac
consistent updates to Hello Samples
rysweet Jan 19, 2025
281bff2
setup dotnet 8 version
rysweet Jan 19, 2025
5f133a8
interim commit - expanding the range of publishmessage available
rysweet Jan 20, 2025
05e141a
fix interface in Ihandleconsole and cleanup in HelloAIAgent
rysweet Jan 20, 2025
8bdffec
format
rysweet Jan 20, 2025
5180dee
rename files
rysweet Jan 20, 2025
e26cd1d
add surrogate for Subscription type
rysweet Jan 20, 2025
9c7d2bd
Update dotnet/samples/Hello/HelloAgentState/Program.cs
rysweet Jan 21, 2025
d411001
revert dumb copilot change
rysweet Jan 21, 2025
d39dee6
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 21, 2025
76678e8
remove unnecessary inserted using
rysweet Jan 21, 2025
cafb799
use primary constructor
rysweet Jan 21, 2025
ccfd0cc
turning up the logging
rysweet Jan 21, 2025
740047f
add client logging
rysweet Jan 21, 2025
efb8fbb
propogate cancellation
rysweet Jan 21, 2025
270cc4b
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 21, 2025
954aad2
fix mixup in topic
rysweet Jan 21, 2025
eaab0cd
undo unexpected change
rysweet Jan 21, 2025
ae81b19
need to Connect() the worker process
rysweet Jan 21, 2025
17618c0
TryGetValue instead of index
rysweet Jan 21, 2025
6c8bcb0
remove incorrect test, fix some null values, ensure subject/source is…
rysweet Jan 21, 2025
9f78691
format
rysweet Jan 21, 2025
bfaf6f1
keep alive ping scenarios always
rysweet Jan 21, 2025
8109d33
package name was wrong
rysweet Jan 21, 2025
e226496
accidentally changed uv.lock
rysweet Jan 21, 2025
f1d868f
cleanup delivery logic
rysweet Jan 21, 2025
73373e0
separate grpc tests to different ports, clean up start() and stop()
bassmang Jan 21, 2025
32652f8
Merge branch 'rysweet-4745-bring-over-the-tests-from-pr-4405' of gith…
bassmang Jan 21, 2025
702cc13
ensure its initialized
rysweet Jan 21, 2025
61bf048
trying to avoid null
rysweet Jan 21, 2025
043ceee
reducing multiple delivery
rysweet Jan 21, 2025
8b65de9
trying to reduce the number of deliveries
rysweet Jan 21, 2025
4689ecc
fix open channel test
rysweet Jan 22, 2025
ad70e5d
update silobuilder test cluster
rysweet Jan 22, 2025
dd1e45a
cleanup open channel with cancellation
rysweet Jan 22, 2025
cdea420
continue test cleanup
rysweet Jan 22, 2025
474a616
remove unused
rysweet Jan 22, 2025
97f24f1
cleaning up dispatch and impoving test reliability
rysweet Jan 22, 2025
045dcbb
format
rysweet Jan 22, 2025
6a84623
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 22, 2025
b1cc820
re-add missing project
rysweet Jan 22, 2025
47ad205
running gen-proto
rysweet Jan 22, 2025
f5b5c28
reverse build and format
bassmang Jan 22, 2025
6e85ace
revert
bassmang Jan 22, 2025
5263e3a
print out restore paths
bassmang Jan 22, 2025
a0e086b
print paths
bassmang Jan 22, 2025
742b44e
add using in .csproj
LittleLittleCloud Jan 22, 2025
ab1ea02
fix build error
LittleLittleCloud Jan 22, 2025
5676b6b
fix build error
LittleLittleCloud Jan 22, 2025
6df60dc
partial move
bassmang Jan 22, 2025
9a975ae
part 2 move
bassmang Jan 22, 2025
8871b65
partial move agenthost
bassmang Jan 22, 2025
80b9fe2
full move agenthost
bassmang Jan 22, 2025
5d43a27
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
bassmang Jan 22, 2025
89988f1
revert ls in restore
bassmang Jan 22, 2025
a9891c0
fix case in program.cs
bassmang Jan 22, 2025
6ee2d09
add alternate settings so that we can debug without painful timeouts …
rysweet Jan 22, 2025
9934896
update topic id so that the xlang messages flow to the dotnet agent i…
rysweet Jan 22, 2025
fef5750
Merge branch 'main' into rysweet-4744-bring-over-the-tests-from-pr-4405
rysweet Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 40 additions & 29 deletions dotnet/AutoGen.sln
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.WebAPI.Sample", "sa
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DevTeam", "DevTeam", "{05B9C173-6441-4DCA-9AC4-E897EF75F331}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.AgentHost", "samples\dev-team\DevTeam.AgentHost\DevTeam.AgentHost.csproj", "{462A357B-7BB9-4927-A9FD-4FB7675898E9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Agents", "samples\dev-team\DevTeam.Agents\DevTeam.Agents.csproj", "{83BBB833-A2F0-4A4D-BA1B-8229FC9BCD4F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.AppHost", "samples\dev-team\DevTeam.AppHost\DevTeam.AppHost.csproj", "{63280C12-3BE3-4C4E-805E-584CDC6BC1F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Backend", "samples\dev-team\DevTeam.Backend\DevTeam.Backend.csproj", "{EDA3EF83-FC7F-4BCF-945D-B893620EE4B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevTeam.Shared", "samples\dev-team\DevTeam.Shared\DevTeam.Shared.csproj", "{01F5D7C3-41EB-409C-9B77-A945C07FA7E8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hello", "Hello", "{7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hello.AppHost", "samples\Hello\Hello.AppHost\Hello.AppHost.csproj", "{09A373A0-8169-409F-8C37-3FBC1654B122}"
Expand All @@ -126,8 +120,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloAgentState", "samples\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Extensions.Aspire", "src\Microsoft.AutoGen\Extensions\Aspire\Microsoft.AutoGen.Extensions.Aspire.csproj", "{65059914-5527-4A00-9308-9FAF23D5E85A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Agents.Tests", "test\Microsoft.AutoGen.Agents.Tests\Microsoft.AutoGen.Agents.Tests.csproj", "{394FDAF8-74F9-4977-94A5-3371737EB774}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Integration.Tests", "test\Microsoft.AutoGen.Integration.Tests\Microsoft.AutoGen.Integration.Tests.csproj", "{D04C6153-8EAF-4E54-9852-52CEC1BE8D31}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloAgent.AppHost", "test\Microsoft.AutoGen.Integration.Tests.AppHosts\HelloAgent.AppHost\HelloAgent.AppHost.csproj", "{99D7766B-076F-4E6F-A8D2-3DF1DAFA2599}"
Expand All @@ -140,7 +132,17 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Runtime.G
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents", "src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj", "{3892C83E-7F5D-41DF-A88C-4854EAD38856}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Autogen.AgentHost", "src\Microsoft.AutoGen\AgentHost\Microsoft.Autogen.AgentHost.csproj", "{4CB42139-DEE4-40B9-AA81-1E4CCAA2F338}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.AgentHost", "src\Microsoft.AutoGen\AgentHost\Microsoft.AutoGen.AgentHost.csproj", "{4CB42139-DEE4-40B9-AA81-1E4CCAA2F338}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Runtime.Grpc.Tests", "test\Microsoft.AutoGen.Runtime.Grpc.Tests\Microsoft.AutoGen.Runtime.Grpc.Tests.csproj", "{0E7983BB-2602-421E-8B37-332E52870A10}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Core.Tests", "test\Microsoft.AutoGen.Core.Tests\Microsoft.AutoGen.Core.Tests.csproj", "{EAFFE339-26CB-4019-991D-BCCE8E7D33A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DevTeam.ServiceDefaults", "samples\dev-team\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csproj", "{599E1971-1DA9-453F-A7A8-42510BBC95C2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Core.Grpc.Tests", "test\Microsoft.AutoGen.Core.Grpc.Tests\Microsoft.AutoGen.Core.Grpc.Tests.csproj", "{33A28A4B-123B-4416-9631-0F759B8D6172}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Tests.Shared", "test\Microsoft.AutoGen.Tests.Shared\Microsoft.AutoGen.Tests.Shared.csproj", "{58AD8E1D-83BD-4950-A324-1A20677D78D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -296,14 +298,6 @@ Global
{4385AFCF-AB4A-49B2-BEBA-D33C950E1EE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4385AFCF-AB4A-49B2-BEBA-D33C950E1EE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4385AFCF-AB4A-49B2-BEBA-D33C950E1EE6}.Release|Any CPU.Build.0 = Release|Any CPU
{462A357B-7BB9-4927-A9FD-4FB7675898E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{462A357B-7BB9-4927-A9FD-4FB7675898E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{462A357B-7BB9-4927-A9FD-4FB7675898E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{462A357B-7BB9-4927-A9FD-4FB7675898E9}.Release|Any CPU.Build.0 = Release|Any CPU
{83BBB833-A2F0-4A4D-BA1B-8229FC9BCD4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83BBB833-A2F0-4A4D-BA1B-8229FC9BCD4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83BBB833-A2F0-4A4D-BA1B-8229FC9BCD4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83BBB833-A2F0-4A4D-BA1B-8229FC9BCD4F}.Release|Any CPU.Build.0 = Release|Any CPU
{63280C12-3BE3-4C4E-805E-584CDC6BC1F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63280C12-3BE3-4C4E-805E-584CDC6BC1F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63280C12-3BE3-4C4E-805E-584CDC6BC1F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -312,10 +306,6 @@ Global
{EDA3EF83-FC7F-4BCF-945D-B893620EE4B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDA3EF83-FC7F-4BCF-945D-B893620EE4B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDA3EF83-FC7F-4BCF-945D-B893620EE4B1}.Release|Any CPU.Build.0 = Release|Any CPU
{01F5D7C3-41EB-409C-9B77-A945C07FA7E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01F5D7C3-41EB-409C-9B77-A945C07FA7E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01F5D7C3-41EB-409C-9B77-A945C07FA7E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01F5D7C3-41EB-409C-9B77-A945C07FA7E8}.Release|Any CPU.Build.0 = Release|Any CPU
{09A373A0-8169-409F-8C37-3FBC1654B122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09A373A0-8169-409F-8C37-3FBC1654B122}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09A373A0-8169-409F-8C37-3FBC1654B122}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -340,10 +330,6 @@ Global
{65059914-5527-4A00-9308-9FAF23D5E85A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65059914-5527-4A00-9308-9FAF23D5E85A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65059914-5527-4A00-9308-9FAF23D5E85A}.Release|Any CPU.Build.0 = Release|Any CPU
{394FDAF8-74F9-4977-94A5-3371737EB774}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{394FDAF8-74F9-4977-94A5-3371737EB774}.Debug|Any CPU.Build.0 = Debug|Any CPU
{394FDAF8-74F9-4977-94A5-3371737EB774}.Release|Any CPU.ActiveCfg = Release|Any CPU
{394FDAF8-74F9-4977-94A5-3371737EB774}.Release|Any CPU.Build.0 = Release|Any CPU
{D04C6153-8EAF-4E54-9852-52CEC1BE8D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D04C6153-8EAF-4E54-9852-52CEC1BE8D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D04C6153-8EAF-4E54-9852-52CEC1BE8D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -372,6 +358,30 @@ Global
{4CB42139-DEE4-40B9-AA81-1E4CCAA2F338}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CB42139-DEE4-40B9-AA81-1E4CCAA2F338}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CB42139-DEE4-40B9-AA81-1E4CCAA2F338}.Release|Any CPU.Build.0 = Release|Any CPU
{0E7983BB-2602-421E-8B37-332E52870A10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E7983BB-2602-421E-8B37-332E52870A10}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E7983BB-2602-421E-8B37-332E52870A10}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E7983BB-2602-421E-8B37-332E52870A10}.Release|Any CPU.Build.0 = Release|Any CPU
{14F90F79-580E-454D-BA7A-ED6D9723020D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14F90F79-580E-454D-BA7A-ED6D9723020D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14F90F79-580E-454D-BA7A-ED6D9723020D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14F90F79-580E-454D-BA7A-ED6D9723020D}.Release|Any CPU.Build.0 = Release|Any CPU
{EAFFE339-26CB-4019-991D-BCCE8E7D33A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAFFE339-26CB-4019-991D-BCCE8E7D33A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAFFE339-26CB-4019-991D-BCCE8E7D33A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAFFE339-26CB-4019-991D-BCCE8E7D33A1}.Release|Any CPU.Build.0 = Release|Any CPU
{599E1971-1DA9-453F-A7A8-42510BBC95C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{599E1971-1DA9-453F-A7A8-42510BBC95C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{599E1971-1DA9-453F-A7A8-42510BBC95C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{599E1971-1DA9-453F-A7A8-42510BBC95C2}.Release|Any CPU.Build.0 = Release|Any CPU
{33A28A4B-123B-4416-9631-0F759B8D6172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33A28A4B-123B-4416-9631-0F759B8D6172}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33A28A4B-123B-4416-9631-0F759B8D6172}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33A28A4B-123B-4416-9631-0F759B8D6172}.Release|Any CPU.Build.0 = Release|Any CPU
{58AD8E1D-83BD-4950-A324-1A20677D78D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58AD8E1D-83BD-4950-A324-1A20677D78D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58AD8E1D-83BD-4950-A324-1A20677D78D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58AD8E1D-83BD-4950-A324-1A20677D78D9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -417,26 +427,27 @@ Global
{CB8824F5-9475-451F-87E8-F2AEF2490A12} = {668726B9-77BC-45CF-B576-0F0773BF1615}
{4385AFCF-AB4A-49B2-BEBA-D33C950E1EE6} = {668726B9-77BC-45CF-B576-0F0773BF1615}
{05B9C173-6441-4DCA-9AC4-E897EF75F331} = {686480D7-8FEC-4ED3-9C5D-CEBE1057A7ED}
{462A357B-7BB9-4927-A9FD-4FB7675898E9} = {05B9C173-6441-4DCA-9AC4-E897EF75F331}
{83BBB833-A2F0-4A4D-BA1B-8229FC9BCD4F} = {05B9C173-6441-4DCA-9AC4-E897EF75F331}
{63280C12-3BE3-4C4E-805E-584CDC6BC1F5} = {05B9C173-6441-4DCA-9AC4-E897EF75F331}
{EDA3EF83-FC7F-4BCF-945D-B893620EE4B1} = {05B9C173-6441-4DCA-9AC4-E897EF75F331}
{01F5D7C3-41EB-409C-9B77-A945C07FA7E8} = {05B9C173-6441-4DCA-9AC4-E897EF75F331}
{7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45} = {686480D7-8FEC-4ED3-9C5D-CEBE1057A7ED}
{09A373A0-8169-409F-8C37-3FBC1654B122} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
{A20B9894-F352-4338-872A-F215A241D43D} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
{8F7560CF-EEBB-4333-A69F-838CA40FD85D} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
{97550E87-48C6-4EBF-85E1-413ABAE9DBFD} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{64EF61E7-00A6-4E5E-9808-62E10993A0E5} = {7EB336C2-7C0A-4BC8-80C6-A3173AB8DC45}
{65059914-5527-4A00-9308-9FAF23D5E85A} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{394FDAF8-74F9-4977-94A5-3371737EB774} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
{D04C6153-8EAF-4E54-9852-52CEC1BE8D31} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
{99D7766B-076F-4E6F-A8D2-3DF1DAFA2599} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
{7F60934B-3E59-48D0-B26D-04A39FEC13EF} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{9653676C-147D-4CBE-BB53-A30FD3634F4C} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{8457B68C-CC86-4A3F-8559-C1AE199EC366} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{3892C83E-7F5D-41DF-A88C-4854EAD38856} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{4CB42139-DEE4-40B9-AA81-1E4CCAA2F338} = {18BF8DD7-0585-48BF-8F97-AD333080CE06}
{0E7983BB-2602-421E-8B37-332E52870A10} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
{EAFFE339-26CB-4019-991D-BCCE8E7D33A1} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
{599E1971-1DA9-453F-A7A8-42510BBC95C2} = {05B9C173-6441-4DCA-9AC4-E897EF75F331}
{33A28A4B-123B-4416-9631-0F759B8D6172} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
{58AD8E1D-83BD-4950-A324-1A20677D78D9} = {F823671B-3ECA-4AE6-86DA-25E920D3FE64}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {93384647-528D-46C8-922C-8DB36A382F0B}
Expand Down
3 changes: 2 additions & 1 deletion dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.4.0" />
<PackageVersion Include="Microsoft.AspNetCore.App" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.11" />
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageVersion Include="Microsoft.Extensions.AI" Version="$(MicrosoftExtensionsAIVersion)" />
Expand Down Expand Up @@ -83,6 +84,7 @@
<PackageVersion Include="Microsoft.Orleans.Server" Version="$(MicrosoftOrleans)" />
<PackageVersion Include="Microsoft.Orleans.Streaming" Version="$(MicrosoftOrleans)" />
<PackageVersion Include="Microsoft.Orleans.Streaming.EventHubs" Version="$(MicrosoftOrleans)" />
<PackageVersion Include="Microsoft.Orleans.TestingHost" Version="9.0.1" />
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.29.0" />
<PackageVersion Include="Microsoft.SemanticKernel.Agents.Core" Version="$(MicrosoftSemanticKernelExperimentalVersion)" />
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.AzureOpenAI" Version="1.29.0" />
Expand Down Expand Up @@ -125,7 +127,6 @@
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="Microsoft.PowerShell.SDK" Version="7.4.5" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.11" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion dotnet/samples/Hello/Hello.AppHost/Hello.AppHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../../../src/Microsoft.AutoGen/AgentHost/Microsoft.Autogen.AgentHost.csproj" />
<ProjectReference Include="../../../src/Microsoft.AutoGen/AgentHost/Microsoft.AutoGen.AgentHost.csproj" />
<ProjectReference Include="..\HelloAgent\HelloAgent.csproj" />
</ItemGroup>
</Project>
5 changes: 3 additions & 2 deletions dotnet/samples/Hello/Hello.AppHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
using Microsoft.Extensions.Hosting;

var builder = DistributedApplication.CreateBuilder(args);
var backend = builder.AddProject<Projects.Microsoft_Autogen_AgentHost>("backend").WithExternalHttpEndpoints();
var backend = builder.AddProject<Projects.Microsoft_AutoGen_AgentHost>("backend").WithExternalHttpEndpoints();
var client = builder.AddProject<Projects.HelloAgent>("HelloAgentsDotNET")
.WithReference(backend)
.WithEnvironment("AGENT_HOST", backend.GetEndpoint("https"))
.WithEnvironment("STAY_ALIVE_ON_GOODBYE", "true")
.WaitFor(backend);
#pragma warning disable ASPIREHOSTINGPYTHON001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
// xlang is over http for now - in prod use TLS between containers
builder.AddPythonApp("HelloAgentsPython", "../../../../python/samples/core_xlang_hello_python_agent", "hello_python_agent.py", "../../.venv").WithReference(backend)
builder.AddPythonApp("HelloAgentsPython", "../../../../python/samples/core_xlang_hello_python_agent", "hello_python_agent.py", "../../.venv")
.WithReference(backend)
.WithEnvironment("AGENT_HOST", backend.GetEndpoint("http"))
.WithEnvironment("STAY_ALIVE_ON_GOODBYE", "true")
.WithEnvironment("GRPC_DNS_RESOLVER", "native")
Expand Down
6 changes: 2 additions & 4 deletions dotnet/samples/Hello/HelloAIAgents/HelloAIAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
namespace Hello;
[TopicSubscription("agents")]
public class HelloAIAgent(
IAgentWorker worker,
[FromKeyedServices("EventTypes")] EventTypes typeRegistry,
[FromKeyedServices("AgentsMetadata")] AgentsMetadata typeRegistry,
IHostApplicationLifetime hostApplicationLifetime,
IChatClient client) : HelloAgent(
worker,
typeRegistry,
hostApplicationLifetime),
IHandle<NewMessageReceived>
{
// This Handle supercedes the one in the base class
public new async Task Handle(NewMessageReceived item)
public new async Task Handle(NewMessageReceived item, CancellationToken cancellationToken = default)
{
var prompt = "Please write a limerick greeting someone with the name " + item.Message;
var response = await client.CompleteAsync(prompt);
Expand Down
1 change: 1 addition & 0 deletions dotnet/samples/Hello/HelloAIAgents/HelloAIAgents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../../../src/Microsoft.AutoGen/Core.Grpc/Microsoft.AutoGen.Core.Grpc.csproj" />
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Contracts\Microsoft.AutoGen.Contracts.csproj" />
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Core\Microsoft.AutoGen.Core.csproj" />
Expand Down
19 changes: 9 additions & 10 deletions dotnet/samples/Hello/HelloAIAgents/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,30 @@
}
builder.Configuration["ConectionStrings:HelloAIAgents"] = Environment.GetEnvironmentVariable("AZURE_OPENAI_CONNECTION_STRING");
builder.AddChatCompletionService("HelloAIAgents");
var agentTypes = new AgentTypes(new Dictionary<string, Type>
var _ = new AgentTypes(new Dictionary<string, Type>
{
{ "HelloAIAgents", typeof(HelloAIAgent) }
});
var app = await AgentsApp.PublishMessageAsync("HelloAgents", new NewMessageReceived
var local = true;
if (Environment.GetEnvironmentVariable("AGENT_HOST") != null) { local = false; }
var app = await Microsoft.AutoGen.Core.Grpc.AgentsApp.PublishMessageAsync("HelloAgents", new NewMessageReceived
{
Message = "World"
}, builder, agentTypes, local: true);

}, local: local).ConfigureAwait(false);
await app.WaitForShutdownAsync();

namespace Hello
{
[TopicSubscription("agents")]
[TopicSubscription("HelloAgents")]
public class HelloAgent(
IAgentWorker worker,
[FromKeyedServices("EventTypes")] EventTypes typeRegistry,
[FromKeyedServices("AgentsMetadata")] AgentsMetadata typeRegistry,
IHostApplicationLifetime hostApplicationLifetime) : ConsoleAgent(
worker,
typeRegistry),
ISayHello,
IHandle<NewMessageReceived>,
IHandle<ConversationClosed>
{
public async Task Handle(NewMessageReceived item)
public async Task Handle(NewMessageReceived item, CancellationToken cancellationToken = default)
{
var response = await SayHello(item.Message).ConfigureAwait(false);
var evt = new Output
Expand All @@ -57,7 +56,7 @@ public async Task Handle(NewMessageReceived item)
};
await PublishMessageAsync(goodbye).ConfigureAwait(false);
}
public async Task Handle(ConversationClosed item)
public async Task Handle(ConversationClosed item, CancellationToken cancellationToken = default)
{
var goodbye = $"********************* {item.UserId} said {item.UserMessage} ************************";
var evt = new Output
Expand Down
Loading
Loading