def _setup_tools(roulette_agent, tools, llm_model):
    """Set up the tools for the agent."""
    the_wrapped_tools = []

    # First check for ComputerUse tools compatibility
    if "ComputerUse.*" in tools:
        if not has_capability(llm_model, "computer_use"):
            return {
                "status_code": 405,
                "detail": f"ComputerUse tools are not supported by the model {llm_model}. Please use a model that supports computer_use capability."
            }

    # Set up function tools
    with FunctionToolManager() as function_client:
        the_list_of_tools = function_client.get_tools_by_name(tools)

        for each in the_list_of_tools:
            wrapped_tool = tool_wrapper(each)
            the_wrapped_tools.append(wrapped_tool)
        
    for each in the_wrapped_tools:
        signature = inspect.signature(each)
        roulette_agent.tool_plain(each, retries=5)

    # Set up ComputerUse tools for models with that capability
    if "ComputerUse.*" in tools:
        try:
            from .cu import ComputerUse_tools
            for each in ComputerUse_tools:
                roulette_agent.tool_plain(each, retries=5)
        except Exception as e:
            print(f"Error setting up ComputerUse tools: {e}")

    # Set up BrowserUse tools
    if "BrowserUse.*" in tools:
        try:
            from .bu import BrowserUse_tools
            from .bu.browseruse import LLMManager
            LLMManager.set_model(llm_model)

            for each in BrowserUse_tools:
                roulette_agent.tool_plain(each, retries=5)
        except Exception as e:
            print(f"Error setting up BrowserUse tools: {e}")
            
    return roulette_agent
Set up the tools for the agent.
src/upsonic/server/level_utilized/utility.py