Skip to main content

Parameters

ParameterTypeDefaultDescription
functionCallable-The function to wrap
schemaFunctionSchema-Schema information for the function
configOptional[ToolConfig]NoneTool configuration

Functions

execute

Execute the tool function. Parameters:
  • *args (Any): Positional arguments
  • **kwargs (Any): Keyword arguments
Returns:
  • Any: The result of the function execution


title: AgentTool sidebarTitle: AgentTool

Parameters

ParameterTypeDefaultDescription
agentAny-The agent instance to wrap

Functions

_sanitize_name

Sanitize name for use as method name. Parameters:
  • name (str): The name to sanitize
Returns:
  • str: Sanitized name in snake_case

execute

Execute the agent with the given request. Parameters:
  • request (str): The task or question to delegate to the agent
  • **kwargs (Any): Additional keyword arguments
Returns:
  • Any: The result from the agent execution


title: MethodTool sidebarTitle: MethodTool

Parameters

ParameterTypeDefaultDescription
instanceAny-The instance containing the method
methodCallable-The method to wrap
schemaFunctionSchema-Schema information for the method
configOptional[ToolConfig]NoneTool configuration

Functions

execute

Execute the method. Parameters:
  • *args (Any): Positional arguments
  • **kwargs (Any): Keyword arguments
Returns:
  • Any: The result of the method execution
I