Initialization Parameters

When setting up Composio tools, you might need to provide various configuration parameters like API keys, session IDs, or custom settings. These parameters can be specified at two levels:

  1. App-level: Parameters that apply to all actions within a specific tool/app
  2. Action-level: Specific parameters needed for individual actions

For example, if youโ€™re using the Image Analyzer tool, youโ€™ll need to provide an OpenAI API key. Similarly, other tools might require their own specific configuration parameters to function properly.

1

Import required libraries

2

Import Prompt template & Initialize ChatOpenAI & composio toolset client

During the initialization of the ComposioToolSet client, we can add metadata to actions & apps. In this example, weโ€™re adding an OpenAI API key for the IMAGE_ANALYSER_ANALYSE action:

3

Get Image Analyser Action from Composio

4

Invoke the agent

How to add metadata at App-level?

Above we saw how to add metadata at the Action-level. Hereโ€™s an example of how to add metadata at the App-level: