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
Define the Assistant & resigter the 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
Python
chatbot = AssistantAgent( "chatbot", system_message="Reply TERMINATE when the task is done or when user's content is empty", llm_config=llm_config,)user_proxy = UserProxyAgent( name="User", is_termination_msg=lambda x: x.get("content", "") and "TERMINATE" in x.get("content", ""), human_input_mode="NEVER", code_execution_config={"use_docker": False},)toolset.register_tools(apps=[App.GITHUB], caller=chatbot, executor=user_proxy)
5
Run the Agent
Python
task = "Star a repo composiohq/composio on GitHub"response = user_proxy.initiate_chat(chatbot, message=task)print(response.chat_history)