ComposioTools 使代理能够使用 Gmail、Salesforce、Github 等工具。
前提条件
以下示例需要 composio-agno
库。
pip install composio-agno
composio add github # 登录 Github
以下代理将使用 Composio Toolkit 中的 Github 工具来 star 一个仓库。
cookbook/tools/composio_tools.py
from agno.agent import Agent
from composio_agno 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 agno-agi/agno repo?")
调用 GitHub star 仓库操作时使用以下参数:
参数 | 类型 | 默认值 | 描述 |
---|
owner | str | - | 要 star 的仓库的所有者。 |
repo | str | - | 要 star 的仓库的名称。 |
Composio Toolkit 提供 1000 多个函数来连接不同的软件工具。
打开此 链接 查看完整的函数列表。
Responses are generated using AI and may contain mistakes.