Chat with tools
Superagent comes packed with pre-built tools you can use together with your Assistants. Tools are a way for assistants to connect and retrieve data/information from third-party APIs or applications.
Superagent supports different types of tools listed here.
Step-by-step guide
- Start by creating an LLM and an Agent. Note that you can use already created LLMs or Agents.
Note that you usually only need to create the llm
object once and re-use it for subsequent agents you create.
- Create a tool. You can create and attach multiple tools to an Assistant. Note that the
description
key tells the Assistant when this tool should be used. Be wary of what you put in as your description as it might effect the Assistants behaviour.
- Now we are ready to invoke the Agent…
That’s it! Tools are a super powerful way giving your Assistants superpowers. We are constantly adding new tools based on the feedback from the community.
Full code
Replit template
We’ve created a Replit template for this which you can run here.