ComposioTool Documentation¶
Description¶
This tools is a wrapper around the composio set of tools and gives your agent access to a wide variety of tools from the composio SDK.
Installation¶
To incorporate this tool into your project, follow the installation instructions below:
after the installation is complete, either run composio login
or export your composio API key as COMPOSIO_API_KEY
.
Example¶
The following example demonstrates how to initialize the tool and execute a github action:
- Initialize Composio tools
from composio import App
from crewai_tools import ComposioTool
from crewai import Agent, Task
tools = [ComposioTool.from_action(action=Action.GITHUB_ACTIVITY_STAR_REPO_FOR_AUTHENTICATED_USER)]
If you don't know what action you want to use, use from_app
and tags
filter to get relevant actions
or use use_case
to search relevant actions
- Define agent
crewai_agent = Agent(
role="Github Agent",
goal="You take action on Github using Github APIs",
backstory=(
"You are AI agent that is responsible for taking actions on Github "
"on users behalf. You need to take action on Github using Github APIs"
),
verbose=True,
tools=tools,
)
- Execute task
task = Task(
description="Star a repo ComposioHQ/composio on GitHub",
agent=crewai_agent,
expected_output="if the star happened",
)
task.execute()
- More detailed list of tools can be found here