autogen_ext package provides model clients, integrations, and extensions for AutoGen.
Model Clients
OpenAIChatCompletionClient
OpenAIChatCompletionClient
Client for OpenAI chat completion models.
str
required
Model identifier (e.g., “gpt-4o”, “gpt-4-turbo”, “gpt-3.5-turbo”)
str | None
OpenAI API key (defaults to OPENAI_API_KEY env var)
str | None
Custom API base URL
float | None
Sampling temperature (0.0 to 2.0)
int | None
Maximum tokens in response
float | None
Nucleus sampling parameter
float | None
Request timeout in seconds
str | None
OpenAI organization ID
Methods
async method
Generate a chat completionReturns:
CreateResultasync generator
Stream chat completion chunks
AzureOpenAIChatCompletionClient
AzureOpenAIChatCompletionClient
Client for Azure OpenAI Service.
str
required
Model identifier
str
required
Azure OpenAI resource endpoint
str | None
Azure OpenAI API key (or use Azure AD auth)
str
required
Azure OpenAI API version
str
required
Deployment name in Azure
str | None
Azure Active Directory token
Callable | None
Function to provide Azure AD tokens
AnthropicChatCompletionClient
AnthropicChatCompletionClient
OllamaChatCompletionClient
OllamaChatCompletionClient
Client for local Ollama models.
str
required
Ollama model name
str
Ollama server URL (default: “http://localhost:11434”)
float | None
Sampling temperature
SemanticKernelChatCompletionClient
SemanticKernelChatCompletionClient
LlamaCppChatCompletionClient
LlamaCppChatCompletionClient
ReplayChatCompletionClient
ReplayChatCompletionClient
Client that replays recorded responses for testing.
List[str]
required
Pre-recorded responses to replay in order
Model Configuration
OpenAIClientConfiguration
OpenAIClientConfiguration
Configuration dataclass for OpenAI clients.
AzureOpenAIClientConfiguration
AzureOpenAIClientConfiguration
Configuration for Azure OpenAI clients.
Caching
Code Execution
DockerCommandLineCodeExecutor
DockerCommandLineCodeExecutor
Tools & Extensions
WebSearchTool
WebSearchTool
Tool for web searching.
FileTools
FileTools
Tools for file operations.
Memory Extensions
VectorMemory
VectorMemory
Vector-based semantic memory.
RedisMemory
RedisMemory
Redis-backed persistent memory.
Runtimes & Deployment
GrpcAgentRuntime
GrpcAgentRuntime
Distributed runtime using gRPC.
CloudRuntime
CloudRuntime
Cloud-based runtime for distributed agents.
Utilities
RateLimiter
RateLimiter
Rate limiting for API calls.
TokenCounter
TokenCounter
Count tokens for cost estimation.
Configuration Models
All model clients support declarative configuration through the component system:See Also
- autogen_core - Core runtime and messaging
- autogen_agentchat - High-level agent framework