🛠️ What are Tools & Actions?
Learn about tools in Composio
What are tools?
Large Language Models (LLMs) are like a highly intelligent person who can understand and reason about almost anything but is sitting in an empty room with no ability to interact with the outside world. They can think and talk about sending emails, creating a ticket on Jira, or cloning a repository from GitHub, but can’t actually DO these things.
This is where tools come in. Tools give this intelligent being specific abilities to interact with the real world. Many AI models support tool calling (also called function calling).
The term tools and actions are used interchangeably in the documentation
How tool calling works
AI models with tool calling capabilities decide when and how to use specific tools to meet user requests. Developers create and provide these tools, equipping the AI with a toolbox to select the best tool for each task
For example, if a user asks an LLM to send an email to john@example.com
with subject Meeting Tomorrow
, the LLM can use the Gmail tool’s GMAIL_SEND_EMAIL
action to send the email.
LLM’s thinking process:
- Recognizes this requires email sending capability
- Identifies the appropriate tool (Gmail) & action (
GMAIL_SEND_EMAIL
) - Structures the necessary parameters:
- recipient: john@example.com
- subject: “Meeting Tomorrow”
- body: [drafts appropriate content]
- Calls the action with these parameters
Tool calling with Composio
At Composio, we offer tools for multiple platforms, accessible via Python and JavaScript SDKs. These platforms, referred to as Apps or Tools, include popular services like GitHub, Twitter, Salesforce, Jira, and Notion. Within each of these Apps, we provide Actions, which are essentially functions that can be executed. For example, you can send an email on Gmail, star a repository on GitHub, or create an issue on Jira. These tools can also be used directly, similar to function calls, without needing agents.
Action Types
- External Tool Actions: Pre-configured actions for specific tools, such as creating issues or changing issue status in Jira.
- System Management Actions: Actions that interact with the execution environment, like file system operations, shell commands, and browser automation.
- Custom Actions: User-defined actions in Python or JavaScript that extend Composio’s capabilities to interact with new or existing tools.
Action Limits
Empirical evidence indicates that agents perform optimally when limited to fewer than 20 actions. Providing LLMs with too many actions can lead to significant performance issues, such as increased response time and decreased accuracy.
To optimize agent performance, it’s essential to limit the number of actions available. This can be achieved through effective action filtering strategies. Here are some recommended approaches:
- Use specific actions from a tool
- Use tags to filter actions
- Use use cases to filter actions
- Implement custom filtering logic
By carefully curating the action set, you can significantly improve agent efficiency and response quality.
Was this page helpful?