Tool Calling and Composio
Tool calling enables AI models to perform tasks beyond simple conversations, allowing them to interact with external services and applications. Instead of just answering questions, your AI assistant can now browse the internet, schedule meetings, update CRM records, or even manage tasks in project management tools.
With Composio, your AI apps and agents gain access to over 250 integrations, including popular services like GitHub, Google Calendar, Salesforce, Slack, and many more. This means your AI agents can seamlessly handle real-world tasks, saving you time and effort.
Overview
Here’s the above example in code:
Create tool
- Convert a function into LLM-readable form using the
@action
wrapper (Python) or the callback function (JS)
Tool Calling with Composio
Composio supports three main ways to use tool calling:
Pre-built tools that Composio hosts and maintains, giving you instant access to thousands of actions across hundreds of apps.
Tools that run locally in your environment, like file operations or custom business logic.
Your own tools defined using Composio’s tool definition format, which can be hosted anywhere.
Using Composio’s Hosted Tools
Composio hosts a growing list of tools from various popular apps like Gmail, Notion to essential apps for AI Engineers like Firecrawl, Browserbase.
This lets you build AI apps and agents without having to manually write the API calls and integrations in the tool format.
Here’s an example of using Firecrawl with to scrape a webpage.
Using Composio’s Local Tools
Composio ships with a host of tools that run locally on your system for performing common development tasks like file operations, shell commands, and code execution.
These don’t require any integration or authentication.
These tools run directly on the defined workspace while maintaining security through permission controls.
Workspaces are environments where local tools are fun. Read more about them here.
Workspaces?
Workspaces are environments where local tools run separately from your system.
Using Custom Tools
Custom tools allow you to define your own functions for LLMs to call without manually writing JSON schemas. This provides a unified tool calling experience across your application.
These can be:
- Functions you define in your codebase
- External APIs you want to expose to the LLM
- Business logic specific to your application
Custom tools can be seamlessly combined with both local and hosted tools
For creating custom tools using OpenAPI specifications, visit the Custom Tools Dashboard where you can upload and manage your API specs.
Here’s how to create and use custom tools with Composio: