diff --git a/docs/how-to/Create-Custom-Tools.md b/docs/how-to/Create-Custom-Tools.md index d9f477a0a..cc0bf74c9 100644 --- a/docs/how-to/Create-Custom-Tools.md +++ b/docs/how-to/Create-Custom-Tools.md @@ -65,4 +65,27 @@ agent = Agent( backstory='An expert analyst with a keen eye for market trends.', tools=[integtation_tool] ) -``` \ No newline at end of file +``` + + + +### Using the `Tool` function from langchain + +For another simple approach, create a function in python directly with the required attributes and a functional logic. + +```python +def combine(a, b): + return a + b +``` + +Then you can add that function into the your tool by using 'func' variable in the Tool function. + +```python +from langchain.agents import Tool + +math_tool = Tool( + name="Math tool", + func=math_tool, + description="Useful for adding two numbers together, in other words combining them." + ) +```