Composio is OpenSwarm’s external integration layer. Without writing a single line of API client code, every agent in the swarm gains access to Gmail, Slack, Google Calendar, HubSpot, GitHub, Stripe, and thousands of other services. Composio handles OAuth authentication, token refresh, and API call execution — the agents discover and call tools through a structured four-step sequence defined inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/UnkleFunk/HouseMusicSwarm-/llms.txt
Use this file to discover all available pages before exploring further.
shared_instructions.md.
Setup
Add your Composio credentials to.env:
COMPOSIO_API_KEY authenticates the OpenSwarm backend to the Composio API. The COMPOSIO_USER_ID is the identifier that ties Composio to your account’s connected apps — OAuth connections you set up in the Composio dashboard (authorizing Gmail, Slack, etc.) are stored against this user ID and retrieved automatically at runtime.
The tool discovery sequence
Agents follow a four-step sequence whenever they need to use an external integration. This sequence is defined inshared_instructions.md Section 4 and applies to every agent in the swarm:
ManageConnections — check authentication
Call
ManageConnections first to verify that the required external service is connected and authenticated for the current user. If a connection is missing, Composio will initiate the OAuth flow. This prevents tool calls from failing mid-workflow due to auth errors.SearchTools — discover candidate tools
Call
SearchTools with a natural-language description of the intent. Composio searches its tool registry and returns candidate tools with their schemas. Use this when you know what you want to accomplish but not the exact tool name.FindTools with include_args=True — inspect parameters
Once you have a candidate tool name, call
FindTools with include_args=True to retrieve the exact parameter schema. Only set include_args=True at this stage — earlier in the workflow it wastes context tokens on schemas you may not use.Programmatic tool calling
For complex multi-step workflows — where you need to call multiple tools in sequence, transform data between steps, or build conditional logic — agents can useProgrammaticToolCalling with direct composio client calls. The composio client object and user_id are automatically injected at runtime; do not import them manually.
ProgrammaticToolCalling only when ExecuteTool is not sufficient. For the majority of tasks — sending a message, creating a calendar event, submitting a ticket — the four-step sequence with ExecuteTool is cleaner and more token-efficient.
Supported toolkit families
GMAIL, OUTLOOK
Calendar & Scheduling
GOOGLECALENDAR, OUTLOOK, CALENDLY
Video & Meetings
ZOOM, GOOGLEMEET, MICROSOFT_TEAMS
Messaging
SLACK, WHATSAPP, TELEGRAM, DISCORD
Documents & Notes
GOOGLEDOCS, GOOGLESHEETS, NOTION, AIRTABLE, CODA
Storage
GOOGLEDRIVE, DROPBOX
Project Management
JIRA, ASANA, TRELLO, CLICKUP, MONDAY, BASECAMP, NOTION
CRM & Sales
HUBSPOT, SALESFORCE, PIPEDRIVE, APOLLO
Payments & Accounting
STRIPE, SQUARE, QUICKBOOKS, XERO, FRESHBOOKS
Customer Support
ZENDESK, INTERCOM, FRESHDESK
Marketing
MAILCHIMP, SENDGRID
Social Media
LINKEDIN, TWITTER, INSTAGRAM
E-commerce
SHOPIFY
Signatures
DOCUSIGN
Design & Collaboration
FIGMA, CANVA, MIRO
Development
GITHUB
Analytics
AMPLITUDE, MIXPANEL, SEGMENT
Best practices
These guidelines come directly fromshared_instructions.md Section 5.5 and apply to any agent using Composio:
- Save intermediate results to variables — if a tool returns a list of records you’ll reference later, store it rather than calling the tool again. Repeated API calls slow down the workflow and consume rate limit quota.
-
Explore the returned data structure before extracting fields — Composio responses vary by toolkit. Run a
FindToolsor an initialExecuteToolcall withoutreturn_fieldsfirst, inspect the shape of the response, then addreturn_fieldsto subsequent calls to extract only what you need. - Format outputs for readability — agents should return clean, human-readable summaries rather than raw JSON blobs. Include only the fields that are relevant to the current task; strip internal metadata the user doesn’t need.
-
Use
SearchToolsbeforeFindToolswhen the exact tool name is unknown — attemptingFindToolswith a guess at a tool name wastes a round-trip if the name is wrong. The search step is fast and returns exact names you can pass directly toFindTools. -
Prefer
ExecuteTooloverProgrammaticToolCalling—ExecuteToolhandles auth context, error formatting, and field extraction automatically. Only drop down toProgrammaticToolCalling(i.e., directcomposio.tools.execute(...)calls) when you need conditional logic or data transformation between multiple tool calls.
Composio authentication is per-user. The
COMPOSIO_USER_ID in your .env determines which OAuth connections are available. If you connect Gmail in the Composio dashboard under user ID user_abc, then set COMPOSIO_USER_ID=user_abc in .env — the agents will have access to that Gmail account. If you change the user ID, the previously authorized connections will not be available and ManageConnections will prompt for re-authentication.