What are the best practices for creating custom toolkits in SuperAGI?
I want my agent to interact with a proprietary internal API for lead generation. While SuperAGI has great default tools like Google Search and GitHub, I need to build a custom toolkit. What is the standard process for defining the tool’s input schema and ensuring the agent knows exactly when to call this specific function during its reasoning loop?
2025-08-22 in Software Development by Matthew Wilson
| 9848 Views
All answers to this question.
Building custom tools is where this platform really shines. You need to create a new class that inherits from the BaseTool. The most critical part is the docstring and the Pydantic schema for the input. The LLM uses these descriptions to decide if the tool fits the current sub-task. I built a custom Salesforce toolkit last month, and I found that being very specific in the "description" field reduced agent errors by about 50%. Also, make sure to handle exceptions gracefully within the tool, otherwise, the agent might get stuck in an infinite loop trying to fix a connection error it doesn't understand.
Answered 2025-08-23 by Cynthia Roberts
Is there a way to test the tool in isolation before deploying the entire agent, or do we have to run the full loop to see if the toolkit works?
Answered 2025-08-24 by Patrick Harris
-
Patrick, you should definitely unit test your tool class in a separate Python script first. Once the logic is sound, you can register it in the SuperAGI marketplace locally. I usually mock the LLM response to trigger the tool call just to see if the data parsing works as expected before doing a live run.
Commented 2025-08-25 by Matthew Wilson
The SDK is quite modular, making it easy to wrap almost any REST API into a usable agent tool.
Answered 2025-08-26 by Brian Anderson
-
Exactly, Brian. The abstraction layer they built is very developer-friendly compared to other agentic frameworks I've tried recently.
Commented 2025-08-27 by Cynthia Roberts
Write a Comment
Your email address will not be published. Required fields are marked (*)

