Toolkit
In this documentation, we will cover the essential aspects of the Yeager AI Toolkit, including its components, tools, and usage. We will also provide examples and explain how to create custom tools for your agents.
Toolkit
The Yeager AI Toolkit is a collection of pre-built tools designed to simplify the development process and enhance the capabilities of your AI agents. It is based on the YeagerAIToolkit
class, which allows users to register and manage tools for their agents.
Tools
Tools in Yeager AI are specific functionalities or features that can be added to your agents. They are built upon the YeagerAITool
class and can be registered in the YeagerAIToolkit
for easy access and management.
Creating Custom Tools
To create a custom tool, follow these steps:
Define the tool's specifications.
Create a solution sketch.
Implement the tool as a Python class, inheriting from
YeagerAITool
.Register the tool in the
YeagerAIToolkit
.
Registering Custom Tools
To register a custom tool in the YeagerAIToolkit
, simply create a new instance of the toolkit and call the register_tool()
method with your custom tool class as the argument:
Using Custom Tools in Agents
To use a custom tool in your agents, register it in the YeagerAIToolkit
and instantiate your Agent
with the toolkit as an argument:
Example: Custom Tool Creation and Usage
In this example, we will create a custom tool called WordCounter
that counts the number of words in a given text. We will then register this tool in the YeagerAIToolkit
and use it in an agent.
Create the
WordCounter
custom tool:
Register the
WordCounter
tool in theYeagerAIToolkit
:Use the `WordCounter` tool in an agent:
This example demonstrates how to create a custom tool, register it in the YeagerAIToolkit
, and utilize it within an agent.
Conclusion
The Yeager AI Toolkit offers an easy way to create, register, and manage tools that can enhance the capabilities of your AI agents. By following the guidelines and examples in this documentation, you can create custom tools tailored to your specific needs and leverage them in your agents.
Last updated