Skip to main content
Extensions, integrations, and deployment options for AutoGen .NET applications.

Microsoft.Extensions.AI Integration

Microsoft.Extensions.AI chat client interface.
GetResponseAsync
Task<ChatResponse>
Generate a chat completion
messages
IList<ChatMessage>
required
Conversation messages
options
ChatOptions?
Generation options (temperature, max tokens, etc.)
cancellationToken
CancellationToken
Cancellation token
GetStreamingResponseAsync
IAsyncEnumerable<ChatResponseUpdate>
Stream chat completion updates
Configuration for chat completions.
Temperature
float?
Sampling temperature (0.0 to 2.0)
MaxTokens
int?
Maximum tokens in response
TopP
float?
Nucleus sampling parameter
FrequencyPenalty
float?
Frequency penalty (-2.0 to 2.0)
PresencePenalty
float?
Presence penalty (-2.0 to 2.0)
StopSequences
IList<string>?
Stop sequences
ModelId
string?
Override model identifier
Message in a conversation.
Role
ChatRole
required
Message role (System, User, Assistant, Tool)
Content
string
required
Message content

Semantic Kernel Integration

Integration with Semantic Kernel.
Configuration for Qdrant vector database.
Endpoint
string
required
Qdrant server endpoint
ApiKey
string?
API key for authentication
CollectionName
string
required
Collection name for vectors
VectorSize
int
required
Dimension of embedding vectors

Microsoft.Extensions.AI (MEAI)

Hosting extensions for Microsoft.Extensions.AI.
Configuration for AI clients.
Endpoint
string
required
API endpoint URL
ApiKey
string
required
API key for authentication
DefaultModel
string
required
Default model identifier
Timeout
TimeSpan
Request timeout
MaxRetries
int
Maximum retry attempts
Extension methods for adding chat completion services.

Aspire Integration

.NET Aspire integration for cloud-native deployment.
AddAutoGenRuntime
method
Add AutoGen runtime to the application model
name
string
required
Runtime service name
WithReplicas
method
Configure number of runtime replicas
count
int
required
Number of replicas

gRPC Runtime

Distributed runtime using gRPC for inter-process communication.
Gateway service for gRPC-based agent communication.
Extension methods for agent runtime.

Orleans Integration

Microsoft Orleans integration for distributed agents.
Orleans grain for agent registry.

Serialization

Protocol Buffers serialization for messages.
CloudEvents format support.

Example: Complete gRPC Setup

See Also