ComposioHQ / composio

Composio equips agents with well-crafted tools empowering them to tackle complex tasks
https://docs.composio.dev
Other
3.83k stars 1.02k forks source link

Add support for searching actions using use cases #183

Closed angrybayblade closed 1 month ago

angrybayblade commented 1 month ago
# Search and discovery

from composio import ComposioToolSet, App

toolset = ComposioToolSet()

print(
    toolset.find_actions_by_use_case(
        App.GITHUB,
        use_case="Star a repo",
    )
)
$ python snd.py

[<Action.GITHUB_GIST_S_STAR: ('github', 'github_gist_s_star', False)>, <Action.GITHUB_GIST_SUNSTAR: ('github', 'github_gist_sunstar', False)>, <Action.GITHUB_REPO_S_CREATE_FORK: ('github', 'github_repo_s_create_fork', False)>, <Action.GITHUB_ACTIVITY_LIST_STARGAZERS_FOR_REPO: ('github', 'github_activity_list_stargazers_for_repo', False)>, <Action.GITHUB_REPO_S_CREATE_FOR_AUTHENTICATED_USER: ('github', 'github_repo_s_create_for_authenticated_user', False)>, <Action.GITHUB_ACTIVITY_LIST_REPO_S_STARRED_BY_AUTHENTICATED_USER: ('github', 'github_activity_list_repo_s_starred_by_authenticated_user', False)>, <Action.GITHUB_ACTIVITY_CHECK_REPO_IS_STARRED_BY_AUTHENTICATED_USER: ('github', 'github_activity_check_repo_is_starred_by_authenticated_user', False)>, <Action.GITHUB_ACTIVITY_STAR_REPO_FOR_AUTHENTICATED_USER: ('github', 'github_activity_star_repo_for_authenticated_user', False)>, <Action.GITHUB_ACTIVITY_UN_STAR_REPO_FOR_AUTHENTICATED_USER: ('github', 'github_activity_un_star_repo_for_authenticated_user', False)>, <Action.GITHUB_ACTIVITY_LIST_REPO_S_STARRED_BY_USER: ('github', 'github_activity_list_repo_s_starred_by_user', False)>]
sawradip commented 1 month ago

A limit integer should be passable here...right? @kaavee315 @angrybayblade