Skip to main content
The autogen_ext package provides model clients, integrations, and extensions for AutoGen.

Model Clients

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 completion
Returns: CreateResult
async generator
Stream chat completion chunks
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
Client for Anthropic Claude models.
str
required
Model name (e.g., “claude-3-5-sonnet-20241022”, “claude-3-opus-20240229”)
str
required
Anthropic API key
int
Maximum tokens in response (required for Anthropic)
float | None
Sampling temperature
Client for local Ollama models.
str
required
Ollama model name
str
Ollama server URL (default: “http://localhost:11434”)
float | None
Sampling temperature
Client using Semantic Kernel integration.
Kernel
required
Semantic Kernel instance
str
required
Service identifier in the kernel
Client for llama.cpp models.
str
required
Path to GGUF model file
int
Context window size
int
Number of layers to offload to GPU
Client that replays recorded responses for testing.
List[str]
required
Pre-recorded responses to replay in order

Model Configuration

Configuration dataclass for OpenAI clients.
Configuration for Azure OpenAI clients.

Caching

Wrapper that caches model responses.
ChatCompletionClient
required
Underlying model client to cache
str
Directory for cache storage (default: “.autogen_cache”)
int | None
Seed for cache key generation

Code Execution

Execute code in Docker containers.
str
Docker image to use (default: “python:3.11-slim”)
int
Execution timeout in seconds
str
Working directory in container
Execute code locally (use with caution).
int
Execution timeout in seconds
str
Working directory for execution

Tools & Extensions

Tool for web searching.
Tools for file operations.

Memory Extensions

Vector-based semantic memory.
Redis-backed persistent memory.

Runtimes & Deployment

Distributed runtime using gRPC.
Cloud-based runtime for distributed agents.

Utilities

Rate limiting for API calls.
Count tokens for cost estimation.

Configuration Models

All model clients support declarative configuration through the component system:

See Also