Composio
ComposioTools enable an Agent to work with tools like Gmail, Salesforce, Github, etc.
Prerequisites
The following example requires the composio-phidata
library.
pip install composio-phidata
composio add github # Login into Github
Example
The following agent will use Github Tool from Composio Toolkit to star a repo.
cookbook/tools/composio_tools.py
from phi.agent import Agent
from composio_phidata import Action, ComposioToolSet
toolset = ComposioToolSet()
composio_tools = toolset.get_tools(
actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER]
)
agent = Agent(tools=composio_tools, show_tool_calls=True)
agent.print_response("Can you star phidatahq/phidata repo?")
Toolkit Params
The following parameters are used when calling the GitHub star repository action:
Parameter
Type
Default
Description
owner
str
-
The owner of the repository to star.
repo
str
-
The name of the repository to star.
Toolkit Functions
Composio Toolkit provides 1000+ functions to connect to different software tools. Open this link to view the complete list of functions.
Last updated