Providing too many actions can overwhelm the LLM’s decision-making process. It’s best to narrow down the action set to only the most relevant ones for your specific use case.

Specifying Actions

GITHUB_CREATE_AN_ISSUE and GITHUB_COMMIT_EVENT are action IDs for actions in the GitHub Tool

from composio_langchain import ComposioToolSet, Action

toolset = ComposioToolSet()

# can pass multiple actions
tools = toolset.get_tools(
    actions=[Action.GITHUB_CREATE_AN_ISSUE]
)

Filtering Actions

Actions can be filtered by tags or use case.

Filter the Actions in an App based on tags. For example, you can:

  • Filter all user-related Actions using the “users” tag
  • Retrieve metadata-related Actions using the “meta” tag
from composio_langchain import ComposioToolSet, App
tool_set = ComposioToolSet()

tools = tool_set.get_tools(apps=[App.GITHUB]) 

# Filter by tags
tag = "users"

action_enums = tool_set.find_actions_by_tags(
    App.GITHUB,
    tags=[tag], 
)

tools = tool_set.get_tools(actions=action_enums)