January 12th, 2024

Nicolas Camara imageNicolas Camara

Introducing Tools and Actions

Give your AI access to tools for augmentation and actions for automation

Introducing Tools and Actions image

Tools & Actions enhance the AI’s functionality by enabling it to access data from various tool integrations and perform actions. An AI router decides whether to use a tool based on criteria, executes the tool’s API request, and checks if the query is complete or if additional tools are needed.

Tools

Tools in Mendable are integrations that allow the AI to access data from various sources to be used for augmentation. These can be anything from Web Search, CRMs, APIs. The tools are used by the AI router to gather information and answer queries.

Actions

Actions are also tools but instead of used for augmentation it is used for the AI to execute a task. These can be anything from sending an email, updating a database, or even triggering a workflow.

How Tools and Actions Work

When a user asks a question outside the AI’s existing knowledge, like the weather in San Francisco, the AI uses a routing system to select the best tool for the job. In this case, it chooses the “Get Weather” tool. After running the tool and determining no further tools are needed, the AI provides the user with the answer.

Drag to view it

How to activate tools and actions?

Tools & Actions are inactive by default. To activate them, go to the Tools & Actions tab in the dashboard and click the ‘Enable Tools’ button. You can also enable/disable individual tools by clicking the toggle next to the tool name after enabling tools.

Tools & Actions Tab

Choose from Template or create your own

You can choose from a list of templates or create your own tool. The templates are pre-configured with the most common tools and actions. You can also create your own tool by clicking the ‘Add Custom’ button.

Templates

Choosing a Template

When you choose a template, you will be prompted to enter the required information for the tool.

AI Input

The ‘AI Input’ tells the AI that it needs to fill that input at request time. This means that it will try to automatically fill the input with the correct data. For example, if you choose a ‘Get User’ template, the AI will try to fill the input with the user’s email address that the user would have provided in the chat.

To have the AI fill the input value at request time, use <ai-generated-value>as the input value or press the ‘AI Input’ button. This is valid for query, header and body fields.

Template

Creating a Custom Tool

You can also create custom tools. The most important part of a custom tool is the API request. The API request is what the AI will execute when it needs to use the tool. The API request can be of any type and also take advantage of the AI Input feature.

Make sure to wrap the AI Input with <ai-generated-value> in quotes if using in the body, header or query parms.

Mendable provides an API request builder to help you build your API request.

Currently, only users in paid plans can create custom tools.

API Request

Tool criteria

The second most important aspect of a tool is the criteria. The criteria is the tool description and what the AI uses to decide whether to use the tool or not. The criteria should be a complete description of the tool and what it does.

If you are facing issues with the AI not using the tool, you can check the criteria to see if it is accurate and detailed.

Example:

  • Tool Name: Recent News

    Here is what a good criteria would look like:

    Use this tool to get the most recent news about any topic. The tool will return the most recent news article about the topic provided.

Using the tool

After you created the tool and is enabled, the AI use it when it needs to. It works with all the components and the API.

Here is an example of using a tool to achieve a task:

Tool Example

In the example above, the AI used the “Web Search Tool” to find what the latest funding round for “Conta Simples” was.

Tool Chaining

The AI uses tools in an agentic flow. This means that the AI will use as many tools as it needs to complete the task. That also mean that it can take advantage of tool chaining which is when the output of one tool is used as the input of another tool automatically.

Here is an example where after doing the research, the AI uses the Slack tool to send the results to the channel:

Tool Chaining

How to access it?

Tools & Actions are unlocked for all paid users right now. If you are on the free plan, request access on the dashboard by visiting the Tools and Actions page. We are gradually releasing it to all users.

Pricing

While in beta, tools and actions are free to use.

In the future, each successful tool will call costs 3 credits.