You need to have an active GitHub Integration. Learn how to do this here
composio logincomposio add github
Donβt forget to set your COMPOSIO_API_KEY and OPENAI_API_KEY in your environment variables.
4
Get All Github Tools
You can get all the tools for a given app as shown below, but you can get specific actions and filter actions using usecase & tags. Learn more here
tools = toolset.get_tools(apps=[App.GITHUB])
5
Define the Agent
prefix_messages = [ ChatMessage( role="system", content=( "You are a Github Agent, and you can use tools to perform actions on Github." ), )]agent = FunctionCallingAgentWorker( tools=tools, llm=llm, prefix_messages=prefix_messages, max_function_calls=10, allow_parallel_tool_calls=False, verbose=True,).as_agent()
6
Execute the Agent
result = agent.chat("Star a repo composiohq/composio on GitHub")