bhukyayedukondalunaik_00285
09/11/2025, 2:33 PMcomposio-langgraph>=0.7.15,<0.8 with Python >=3.11,<3.13.
### Code Snippet
python
all_enabled_composio_tools = composio_toolset.get_tools(
actions=array_of_action_strings,
processors=postprocessingfunctions,
)
When calling get_tools, the execution time becomes very high as the number of actions and subtools increases.
For 49 actions, the call took about 23 seconds.
The latency grows further depending on how many actions strings we pass.
This delay makes it difficult to use the tools in real-time scenarios, where faster response times are critical.infinity.vortex
09/11/2025, 4:10 PMinfinity.vortex
09/12/2025, 12:36 AMabhishekpatil4
09/12/2025, 6:05 AMactions you're passing? this would help in troubleshooting the issueinfinity.vortex
09/12/2025, 6:33 AM[Action.GITHUB_ADD_A_SECURITY_MANAGER_TEAM, Action.GIT_GET_PATCH_CMD]abhishekpatil4
09/12/2025, 6:35 AMinfinity.vortex
09/12/2025, 6:35 AM[StructuredTool(name='FIGMA_GET_CURRENT_USER', description='Retrieves detailed information for the currently authenticated figma user.', args_schema=<class 'composio.utils.shared.GetCurrentUserRequest'>, handle_tool_error=True, handle_validation_error=True, func=<function ComposioToolSet._wrap_action.<locals>.function at 0x7f86404e1440>), StructuredTool(name='FIGMA_GET_FILES_IN_A_PROJECT', description='Fetches a list of files in a figma project, optionally including branch metadata.', args_schema=<class 'composio.utils.shared.GetFilesInAProjectRequest'>, handle_tool_error=True, handle_validation_error=True, func=<function ComposioToolSet._wrap_action.<locals>.function at 0x7f86404e14e0>),bhukyayedukondalunaik_00285
09/12/2025, 6:53 AMbhukyayedukondalunaik_00285
09/12/2025, 6:58 AM[
'GOOGLESHEETS_ADD_SHEET',
'GOOGLESHEETS_APPEND_DIMENSION',
'GOOGLESHEETS_BATCH_UPDATE',
'GOOGLESHEETS_CLEAR_BASIC_FILTER',
'GOOGLESHEETS_DELETE_DIMENSION',
'GOOGLESHEETS_DELETE_SHEET',
'GOOGLESHEETS_GET_SPREADSHEET_BY_DATA_FILTER',
'GOOGLESHEETS_GET_SPREADSHEET_INFO',
'GOOGLESHEETS_INSERT_DIMENSION',
'GOOGLESHEETS_SEARCH_DEVELOPER_METADATA',
'GOOGLESHEETS_SET_BASIC_FILTER',
'GOOGLESHEETS_SPREADSHEETS_SHEETS_COPY_TO',
'GOOGLESHEETS_SPREADSHEETS_VALUES_APPEND',
'GOOGLESHEETS_SPREADSHEETS_VALUES_BATCH_CLEAR',
'GOOGLESHEETS_SPREADSHEETS_VALUES_BATCH_CLEAR_BY_DATA_FILTER',
'GOOGLESHEETS_SPREADSHEETS_VALUES_BATCH_GET_BY_DATA_FILTER',
'GOOGLESHEETS_UPDATE_SHEET_PROPERTIES',
'GOOGLESHEETS_UPDATE_SPREADSHEET_PROPERTIES',
'GOOGLESHEETS_AGGREGATE_COLUMN_DATA',
'GOOGLESHEETS_BATCH_GET',
'GOOGLESHEETS_BATCH_UPDATE_VALUES_BY_DATA_FILTER',
'GOOGLESHEETS_CLEAR_VALUES',
'GOOGLESHEETS_CREATE_CHART',
'GOOGLESHEETS_CREATE_GOOGLE_SHEET1',
'GOOGLESHEETS_CREATE_SPREADSHEET_COLUMN',
'GOOGLESHEETS_CREATE_SPREADSHEET_ROW',
'GOOGLESHEETS_EXECUTE_SQL',
'GOOGLESHEETS_FIND_WORKSHEET_BY_TITLE',
'GOOGLESHEETS_FORMAT_CELL',
'GOOGLESHEETS_GET_SHEET_NAMES',
'GOOGLESHEETS_GET_TABLE_SCHEMA',
'GOOGLESHEETS_LIST_TABLES',
'GOOGLESHEETS_LOOKUP_SPREADSHEET_ROW',
'GOOGLESHEETS_QUERY_TABLE',
'GOOGLESHEETS_SEARCH_SPREADSHEETS',
'GOOGLESHEETS_SHEET_FROM_JSON'
]abhishekpatil4
09/12/2025, 7:46 AMcheck_connected_accounts=False it takes even lesser. I've attached the code snippet & a screen recording for you ref.
We don't recommend getting a lot of tools & passing it to agents as it'll affect its accuracy in tool selection. If you're use case is non-agentic I would recommend using the APIs instead.
Also we've deprecated the old SDK and would suggest migrating to new one. [Migration guide](https://docs.composio.dev/docs/migration)
https://cdn.discordapp.com/attachments/1415706702694584444/1415966807126183936/Screen_Recording_2025-09-12_at_1.09.16_PM.mov?ex=68c5215a&is=68c3cfda&hm=44419b43216d330325541baae0b805a081d6c3b2a731fce963b8cbc3686030ec&
https://cdn.discordapp.com/attachments/1415706702694584444/1415966807742873620/old_sdk.py?ex=68c5215a&is=68c3cfda&hm=eed2ba485f293c446e95d44584c1ef89988a8a29be4d9048b2b13af01c51c457&bhukyayedukondalunaik_00285
09/12/2025, 8:22 AMbhukyayedukondalunaik_00285
09/12/2025, 8:30 AMtry:
composio_toolset = ComposioToolSet(
entity_id=bot_config.account_id,
api_key=app_settings.composio_api_key,
connected_account_ids=connected_account_ids,
)
except Exception as e:
logger.error(f"Error initializing Composio Toolset: {e}")
return []
logger.info(f"Composio Toolset: {composio_toolset}")
actions = [getattr(Action, action_str) for action_str in actions_str]
processor_loader = ProcessorLoader()
post_processors = processor_loader.discover_post_processors(actions_str)
logger.info(f"Discovered post-processors: {list(post_processors.keys())}")
# Build processors dictionary for Composio
processors_config = {}
if post_processors:
processors_config["post"] = post_processors
logger.info(
f"Applying post-processors to {len(post_processors)} tools"
)
all_enabled_composio_tools = composio_toolset.get_tools(
actions=actions,
processors=processors_config if processors_config else None,
)
logger.info(f"all_enabled_composio_tools: {all_enabled_composio_tools}")
the time difference between
logger.info(f"Discovered post-processors: {list(post_processors.keys())}")
and
logger.info(f"all_enabled_composio_tools: {all_enabled_composio_tools}") is significantly increasing with number of actions.abhishekpatil4
09/12/2025, 8:32 AMbhukyayedukondalunaik_00285
09/12/2025, 9:26 AMinfinity.vortex
09/14/2025, 5:50 AMinfinity.vortex
09/14/2025, 5:52 AM.get_tools which takes, as you mentioned 6s, but in our case sometimes 23s as well.
The other bottleneck is composio action cache download which takes 1mininfinity.vortex
09/14/2025, 5:52 AMinfinity.vortex
09/14/2025, 5:55 AM.get_tools?abhishekpatil4
09/14/2025, 7:15 AMabhishekpatil4
09/14/2025, 7:35 AMCOMPOSIO_LOGGING_LEVEL=debug) and you’ll see all the network calls made.. and we can troubleshoot the issue further.abhishekpatil4
09/14/2025, 7:38 AMabhishekpatil4
09/14/2025, 7:40 AMinfinity.vortex
09/14/2025, 9:38 AMinfinity.vortex
09/14/2025, 9:38 AMCOMPOSIO_LOGGING_LEVEL=debugabhishekpatil4
09/14/2025, 9:55 AMinfinity.vortex
09/14/2025, 12:07 PMabhishekpatil4
09/14/2025, 2:06 PMbhukyayedukondalunaik_00285
09/16/2025, 7:48 AMabhishekpatil4
09/18/2025, 6:28 AM@before_execute(tools=["GMAIL_SEND_EMAIL"])
def before_execute_modifier(
tool: str,
toolkit: str,
params: ToolExecuteParams,
) -> ToolExecuteParams:
params["connected_account_id"] = f"{{connected_account_id}}"
return paramsLshoo
09/25/2025, 9:58 PM