Member-only story
Create Custom AI Agents using LangChain Tools with Python
Connecting custom agents with LLMs
What are AI Agents?
In simple terms, Agents are a system that uses Large Language Models as a brain that will take action based on decision makers i.e. agent types that can be ReAct or other types of Agents. LLMs need to use tools to do some action to expand their capabilities other than just giving text output.
Tools are just functions to get more information from the external world. There are built-in and custom tools, the built-in tools can be web search
engines, python REPL, RAG, and custom tools can be API calls, database interaction, custom web scrapping, IoT device interactions, etc.
Topics to be covered
- Tool creation @tool method
- Invoke custom tool manually with LLM
- Creating AI Agent with a custom tool
- Example of real-world application
Tool creation @tool method
This is the simplest method to make a custom tool for an AI Agent. In this method, the decorator takes the function name as a tool name that can be used further use with the llm.
# Syntax Example:
from…