Quick Start
Migrate from ToolRegistry AutoGen methods to AutoGenAdapter for better architecture separation.How It Works
The migration involves moving from ToolRegistry AutoGen methods to the dedicated AutoGenAdapter class.Configuration Options
Both approaches support the same configuration patterns for AutoGen tool integration.| Option | Type | Default | Description |
|---|---|---|---|
tool_name | str | Required | Name identifier for the tool |
adapter_function | Callable | Required | Tool implementation function |
registry_instance | ToolRegistry | None | Optional registry instance |
builtin_adapters | bool | False | Whether to include builtin adapters |
What Changed
| Method | Status | Replacement |
|---|---|---|
register_autogen_adapter(tool_type_name, adapter) | Available | Use AutoGenAdapter from praisonai.framework_adapters |
get_autogen_adapter(tool_type_name) | Available | Use AutoGenAdapter from praisonai.framework_adapters |
list_autogen_adapters() | Available | Use AutoGenAdapter from praisonai.framework_adapters |
register_builtin_autogen_adapters() | Available | Use AutoGenAdapter from praisonai.framework_adapters |
Common Patterns
Tool Registration
Listing Available Tools
Builtin Registration
Best Practices
Keep legacy code working
Keep legacy code working
Existing ToolRegistry AutoGen code continues to work without changes:
Use AutoGenAdapter for new projects
Use AutoGenAdapter for new projects
For new code, prefer the AutoGenAdapter class for better separation:
Migrate incrementally
Migrate incrementally
Gradually move from ToolRegistry AutoGen methods to AutoGenAdapter:
Test both approaches
Test both approaches
Ensure compatibility by testing both legacy and recommended patterns:
Related
Framework Availability
Framework detection and availability checking
Thread Safety
Thread-safe tool registry operations

