Documentation Index Fetch the complete documentation index at: https://mintlify.com/composiohq/composio/llms.txt
Use this file to discover all available pages before exploring further.
Toolkits are collections of related tools grouped by service (e.g., GitHub, Slack, Gmail). The Toolkits class provides methods to list, retrieve, and authorize toolkits.
from composio import Composio
composio = Composio()
toolkits_api = composio.toolkits
Methods
get
Retrieve toolkit information.
# Get a specific toolkit
github = composio.toolkits.get( "github" )
# Get all toolkits
all_toolkits = composio.toolkits.get()
# Get toolkits with query
toolkits = composio.toolkits.get( query = { "category" : "productivity" })
Toolkit slug to retrieve (e.g., "github", "slack").
Query parameters for filtering toolkits.
list
List all available toolkits with filtering and pagination.
toolkits = composio.toolkits.list(
category = "productivity" ,
limit = 20 ,
sort_by = "usage"
)
Filter by toolkit category.
Maximum number of results.
sort_by
Literal['usage', 'alphabetically']
Sort order for results.
managed_by
Literal['composio', 'all', 'project']
Filter by management type.
list_categories
List all toolkit categories.
categories = composio.toolkits.list_categories()
for category in categories:
print (category)
authorize
Authorize a user to use a toolkit (creates connected account).
connection_request = composio.toolkits.authorize(
user_id = "user_123" ,
toolkit = "github"
)
print ( f "Redirect URL: { connection_request.redirect_url } " )
# Wait for user to complete OAuth flow
connected_account = connection_request.wait_for_connection()
The user ID to authorize.
Toolkit slug to authorize.
get_connected_account_initiation_fields
Get required fields for connecting an account.
fields = composio.toolkits.get_connected_account_initiation_fields(
toolkit = "github" ,
auth_scheme = "OAUTH2" ,
required_only = True
)
get_auth_config_creation_fields
Get required fields for creating an auth config.
fields = composio.toolkits.get_auth_config_creation_fields(
toolkit = "github" ,
auth_scheme = "OAUTH2"
)
Examples
toolkits = composio.toolkits.list()
for toolkit in toolkits.items:
print ( f " { toolkit.name } : { toolkit.slug } " )
github = composio.toolkits.get( "github" )
print ( f "Name: { github.name } " )
print ( f "Description: { github.description } " )
print ( f "Logo: { github.logo } " )
# Initiate authorization
connection = composio.toolkits.authorize(
user_id = "user_123" ,
toolkit = "github"
)
# Redirect user to this URL
print ( f "Please visit: { connection.redirect_url } " )
# Wait for connection (with timeout)
try :
account = connection.wait_for_connection( timeout = 300 )
print ( f "Successfully connected: { account.id } " )
except ComposioSDKTimeoutError:
print ( "Connection timeout" )
Filter by Category
productivity_tools = composio.toolkits.list(
category = "productivity" ,
limit = 10
)
for toolkit in productivity_tools.items:
print ( f "- { toolkit.name } " )
Next Steps
Tools Get tools from toolkits
Connected Accounts Manage connections
Auth Configs Configure authentication