__init__.py
1 """ 2 Tool executors for running tools on different backends. 3 4 This package provides an abstraction layer that allows tools to run on: 5 - Local Python: Execute functions in the same process 6 7 The PythonToolLoader handles all Python tool loading patterns: 8 - Simple functions (module + function_name) 9 - DynamicTool classes (module + class_name) 10 - DynamicToolProvider classes (auto-discovery) 11 12 Usage: 13 from solace_agent_mesh.agent.tools.executors import ( 14 PythonToolLoader, 15 ExecutorBasedTool, 16 ) 17 18 # Load Python tools using the loader 19 loader = PythonToolLoader( 20 module="my_tools", 21 function_name="process_data" # or class_name for DynamicTool 22 ) 23 await loader.initialize(component, {}) 24 tools = loader.get_loaded_tools() 25 """ 26 27 from .base import ( 28 ToolExecutor, 29 ToolExecutionResult, 30 register_executor, 31 get_executor_class, 32 create_executor, 33 list_executor_types, 34 ) 35 36 from .unified_python_executor import PythonToolLoader 37 38 from .executor_tool import ( 39 ExecutorBasedTool, 40 ) 41 42 # Deprecated alias — use PythonToolLoader instead 43 UnifiedPythonExecutor = PythonToolLoader 44 45 __all__ = [ 46 # Base classes 47 "ToolExecutor", 48 "ToolExecutionResult", 49 # Registry functions 50 "register_executor", 51 "get_executor_class", 52 "create_executor", 53 "list_executor_types", 54 # Tool loader 55 "PythonToolLoader", 56 # Tool class 57 "ExecutorBasedTool", 58 # Deprecated aliases 59 "UnifiedPythonExecutor", 60 ]