Composio
Bundles contain custom components that support specific third-party integrations with Langflow.
This page describes the components that are available in the Composio bundle.
For information about specific Composio functionality, see the Composio documentation.
Use Composio components in a flow
Composio components are primarily used as tools for agents.
The Composio bundle includes an aggregate Composio Tools component and the following single-service components:
- Dropbox
- GitHub
- Gmail
- Google Calendar
- Google Meet
- Google Tasks
- Linear
- Outlook
- Slack (your Slack account)
- Slackbot (bot integration)
- Supabase
- Todoist
- Youtube
The Composio Tools component is an access point for multiple Composio services (tools). However, most of these services are also available as single-service components, which are recommended over the Composio Tools component.
Although you can use single-service components for non-agentic actions in your flows, they are primarily used in Tool Mode with Agent components. In contrast, the Composio Tools component can only be a tool for agents; it doesn't support non-agentic use.
The following example demonstrates how to use the Composio Gmail component as a tool for an Agent component. This allows the agent to use Composio Gmail functionality, if necessary, when generating responses. You can connect other Composio components in the same way.
-
Create a flow based on the Simple Agent template.
-
In Bundles, find the Composio bundle, and then add the Gmail component to the flow.
-
In the Composio API Key field, enter your Composio API key or use the
COMPOSIO_API_KEY
global variable. For more information, see Composio authentication.If the key is valid, the Alert is replaced by a Success indicator, and the Actions list populates with actions available to your API key.
-
In the component's header menu, enable Tool Mode.
If you are using the Composio Tools component, skip this step because the component is already configured as a tool.
-
In the Actions list, configure the Gmail actions that you want to provide to the agent. You can select the actions you want to allow, and you can edit each action's slug (agentic label) and description, which help the agent decide which tools to use.
-
Connect the Gmail component's Toolset output to the Agent component's Tools input.
-
In the Agent component, enter your OpenAI API key or configure the Agent component to use a different LLM. For more information, see Language model components.
At this point, your flow has four connected components:
- The Chat Input component is connected to the Agent component's Input port. This allows the flow to be triggered by an incoming prompt from a user or application.
- The Gmail component is connected to the Agent component as a tool. The agent may not use this tool for every request; the agent only uses this connection if it decides the Gmail tool can help respond to the prompt.
- The Agent component's Output port is connected to the Chat Output component, which returns the final response to the user or application.
-
To test the flow, click Playground, and then ask the LLM about the tools available to it. The agent should provide a list of connected tools, including the Gmail tool and the built-in tools in the Agent component. For example:
_18User:_18What tools are available to you?_18_18I have access to a variety of tools that allow me to help you with different tasks. Here are the main categories of tools available to me:_18_181. Gmail Tools:_18- Fetch emails, search, and filter messages._18- Fetch specific email details by message ID._18- Create email drafts (with attachments, HTML, CC/BCC, etc.)._18- Delete email drafts or specific messages._18_182. Date & Time Tools:_18- Get the current date and time in any timezone._18_183. Multi-Tool Use:_18- Run multiple tools in parallel for efficiency._18_18If you have a specific task in mind, let me know and I can tell you which tool I would use or demonstrate how I can help! -
To test a specific tool or function, tell the agent to perform an action that uses that tool. For example, ask the agent to write a draft email:
_10Create a draft email with the subject line "Greetings from Composio"_10recipient: "your.email@address.com"_10Body content: "Hello from composio!"The Playground prints the logic as the agent chooses the
GMAIL_CREATE_EMAIL_DRAFT
tool to create the email draft. The following example response is abbreviated:_10The draft email with the subject "Greetings from Composio" and body "Hello from composio!" has been successfully created._24{_24"recipient_email": "your.email@address.com",_24"subject": "Greetings from Composio",_24"body": "Hello from composio!",_24"is_html": false_24}_24_24{_24"data": {_24"response_data": {_24"id": "r-237981011463568567",_24"message": {_24"id": "195dd80528171132",_24"threadId": "195dd80528171132",_24"labelIds": [_24"DRAFT"_24]_24}_24}_24},_24"error": null,_24"successfull": true,_24"successful": true_24}For further confirmation, you can go to your Gmail account and find the message in your drafts folder.
-
Optional: To add more Composio services, repeat these steps to add more Composio components to your flow. For each component, provide the necessary credentials, enable Tool Mode, configure the actions, and then connect it to the Agent component's Tools port.
Composio parameters
All single-service Composio components have the same parameters, and the Composio Tools component has one additional parameter:
Name | Type | Description |
---|---|---|
entity_id | String | Input parameter. The entity ID for the Composio account. Default: default . This parameter is hidden by default in the visual editor. If you need to set this parameter, you can access it through the Controls in the component's header menu. |
api_key | SecretString | Input parameter. The Composio API key for authentication with the Composio platform. Make sure the key authorizes the specific service that you want to use. For more information, see Composio authentication. |
tool_name | Connection | Input parameter for the Composio Tools component only. Select the Composio service (tool) to connect to. |
action | List | Input parameter. Select actions to use. Available actions vary by service. Some actions might require premium access to a particular service. |
Composio authentication
Composio components require authentication to the Composio platform with a Composio API key.
You can provide this key directly in your components, or you can use the COMPOSIO_API_KEY
global variable, which Langflow can automatically load from your .env
file.
The Composio API key only handles the connection to Composio. Service provider authentication is managed through the Composio platform for each service that you want to use.
Make sure that your Composio API key provides access to the required services for the components in your flow. For example, if you are using the Composio Gmail component, your Composio API key must have access to the Gmail service.
Composio output
When used as tools for an agent, Composio components output Tools
, which is a list of tools for use by an agent.
When called by the agent, the response from the Composio service is ingested by the agent, not passed directly as output to the user or application.
In non-agentic use cases, the output is a DataFrame
containing the response from the specified Composio service, depending on the component and action used in the flow.
Because the Composio Tools component supports only agentic use, it cannot output DataFrame
.
All single-service Composio components can output either DataFrame
or Tools
.