Microsoft.AutoGen.Core namespace provides the foundational components for building distributed, event-driven multi-agent systems in .NET.
Agent Classes
BaseAgent
BaseAgent
Abstract base class for all agents in the AutoGen system.
AgentId
required
Unique identifier for the agent instance
IAgentRuntime
required
Runtime environment for message passing
string
required
Description of the agent’s capabilities
ILogger<BaseAgent>?
Optional logger instance
Properties
AgentId
Gets the unique identifier of the agent
AgentMetadata
Gets metadata associated with the agent
IAgentRuntime
Gets the runtime environment
Methods
ValueTask<object?>
ValueTask<object?>
Send a message to another agent
ValueTask
Publish a message to a topic
ValueTask
Called when the agent is being closed
Contracts & Interfaces
IAgent
IAgent
IHostableAgent
IHostableAgent
IAgentRuntime
IAgentRuntime
Defines the runtime environment for agents.
Methods
ValueTask<object?>
ValueTask
IHandle<T>
IHandle<T>
Identity & Types
AgentId
AgentId
AgentType
AgentType
TopicId
TopicId
AgentMetadata
AgentMetadata
Metadata about an agent.
AgentProxy
AgentProxy
Proxy for remote agent communication.
Messaging
Subscriptions
TypeSubscription
TypeSubscription
TypePrefixSubscription
TypePrefixSubscription
Subscribe to messages matching a type prefix.
TypeSubscriptionAttribute
TypeSubscriptionAttribute
Attribute for declarative subscriptions.
State Management
Application Host
Exceptions
CantHandleException
CantHandleException
Thrown when an agent cannot handle a message.
UndeliverableException
UndeliverableException
Thrown when a message cannot be delivered.
Utilities
ReflectionHelper
ReflectionHelper
Utilities for agent reflection and discovery.
HandlerInvoker
HandlerInvoker
Invokes message handlers dynamically.
Telemetry
ActivitySource
ActivitySource
OpenTelemetry integration.
See Also
- Microsoft.AutoGen.Agents - Pre-built agent implementations
- Microsoft.AutoGen.Extensions - Extensions and integrations