> ## Documentation Index
> Fetch the complete documentation index at: https://composio-27-feat-docs-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Composio With LiteLLM

> Integrate Composio with LiteLLM and seamlessly interact with external apps

## Star A Repository on Github

In this example, we will use LiteLLM to star a repository on Github using Composio Tools

<Steps>
  <Step title="Install Packages">
    ```bash Python
     pip install composio_openai litellm
    ```
  </Step>

  <Step title="Import Libraries, Initialize ComposioToolSet & Create Router">
    ```bash Python
    from composio_openai import ComposioToolSet, App
    from litellm.router import Router

    toolset = ComposioToolSet()

    router = Router(
        model_list=[
            {
                "model_name": "anthropic/claude-3-5",
                "litellm_params": {
                    "model": "claude-3-opus-20240229",
                    "api_key": "<your-anthropic-api-key>",
                },
            }
        ]
    )
    ```
  </Step>

  <Step title="Connect Your GitHub Account">
    <Info>You need to have an active GitHub Integration. Learn how to do this [here](https://youtu.be/LmyWy4LiedQ?si=u5uFArlNL0tew0Wf)</Info>

    <CodeGroup>
      ```shell CLI
      composio login 
      composio add github
      ```

      ```python Python
      request = toolset.initiate_connection(app=App.GITHUB)
      print(f"Open this URL to authenticate: {request.redirectUrl}")
      ```
    </CodeGroup>

    <Tip>
      Don't forget to set your `COMPOSIO_API_KEY` and `OPENAI_API_KEY` in your environment variables.
    </Tip>
  </Step>

  <Step title="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](../../patterns/tools/use-tools/use-specific-actions)

    <CodeGroup>
      ```python Python
      tools = toolset.get_tools(apps=[App.GITHUB])
      ```
    </CodeGroup>
  </Step>

  <Step title="Configure Router">
    ```python Python
    response = router.completion(
        model="anthropic/claude-3-5",
        messages=[
            {"role": "user", "content": "Star the repository composiohq/composio on github"},
        ],
        tools=tools,
        tool_choice="auto",
    )
    ```
  </Step>

  <Step title="Execute Tool Calls">
    ```python Python
    result = toolset.handle_tool_calls(response=response)
    print(result)
    ```
  </Step>
</Steps>
