Skip to content

Tool Converter

The ToolConverter automatically detects tool formats and converts them to unified interfaces:

from langcrew.tools import ToolConverter, convert_tools
# Convert any tool
converted = ToolConverter.convert_tool(any_tool)
# Batch convert different formats
unified = convert_tools([crewai_tool, langchain_tool, my_function])

Convert CrewAI tools to LangChain format:

from crewai_tools import ScrapeWebsiteTool
from langcrew.tools import ToolConverter
# Convert CrewAI tool
crewai_tool = ScrapeWebsiteTool()
langchain_tool = ToolConverter.convert_crewai_tool(crewai_tool)
# Use with any LangChain-compatible agent
result = langchain_tool.run("https://example.com")

Convert multiple tools of different formats at once:

from langcrew.tools import convert_tools
# Mix different tool types
tools = [crewai_tool, langchain_tool, my_function]
unified_tools = convert_tools(tools) # All become LangChain tools

The Tool Converter provides seamless interoperability between different tool formats, enabling you to use tools from any source in your LangCrew applications without compatibility concerns.