mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-19 15:01:52 +00:00

closes #3950 closes #3702 What this is doing: I am refactoring the services on the .NET runtime and attempting to clarify the naming and organization. I added this doc to help capture the naming and concepts. AgentRuntime / Worker should work similar to the python version and enables running the whole agent system in one process. For remote the system uses the versions of the services in the grpc folder. lots of other bug fixes/threading cleanup - passing cancellation token throughout Services update clarifies the naming and roles: Worker: Hosts the Agents and is a client to the Gateway Gateway: -- RPC gateway for the other services APIs -- Provides an RPC bridge between the workers and the Event Bus Registry: keeps track of the agents in the system and which events they can handle AgentState: persistent state for agents
16 lines
307 B
C#
16 lines
307 B
C#
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Program.cs
|
|
|
|
using Microsoft.AutoGen.Agents;
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.AddServiceDefaults();
|
|
builder.AddAgentService();
|
|
|
|
var app = builder.Build();
|
|
|
|
app.MapDefaultEndpoints();
|
|
app.MapAgentService();
|
|
|
|
app.Run();
|