---
title: "Connect Cline to AI Gateway or an AI Agent | Hostman Docs"
description: "Learn how to install the Cline VS Code extension and connect it to Hostman AI Gateway or a custom AI agent using the OpenAI Compatible provider settings."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

Cline is a VS Code extension that lets you work with an AI model directly from your editor—ask questions about your project, edit code, and run terminal commands without switching context.

Cline can be used as an alternative to Roo Code, which is no longer supported.

## Installing Cline

1.  Open VS Code.
2.  Go to the **Extensions** panel.
3.  Search for **Cline** and install it.

![6f7a56e6 9a66 433d 817a 0eecf7a51515.png](https://content.hostman.com/assets/c3506be7-58e4-49c9-ba86-3d7d6f0b48ca.png?width=1999&height=1259)

_Cline page in the [VSCode](https://code.visualstudio.com/) interface_

Once installed, a **Cline** tab appears in the sidebar with a chat interface.

## Connection Requirements

You can connect either an AI agent or an AI Gateway to Cline.

To connect an AI agent, you'll need:

-   [The agent's base URL](https://hostman.com/docs/ai-agents/api-usage/openai-compatible-api/#base-url)
-   [An API key](https://hostman.com/docs/ai-agents/manage-agents/api-access-key/)

To connect AI Gateway, you'll need:

-   Base URL: `https://ai-api.hostman.com/v1`
-   [An API key](https://hostman.com/docs/ai-agents/ai-gateway/connection/#creating-an-api-key)

## Configuring the Connection

1.  Open the **Cline** tab.
    
2.  On first launch, you'll be prompted to choose an account type. Select **Bring my own API key** and click **Continue**.
    

![932b54a2 7593 4057 B680 55bf108120fd.png](https://content.hostman.com/assets/3eb65505-4081-4a93-9791-289c5cce7720.png?width=1999&height=1260)

_Cline setup in the [VSCode](https://code.visualstudio.com/) interface_

3.  Enter your provider settings:
    
    -   **API Provider**: OpenAI Compatible
        
    -   **Base URL**: your base URL
        
    -   **API Key**: your API key
        
    -   **Model**: if you're using an AI agent, you can leave this blank or enter the model name from your agent settings. For AI Gateway, specify the model name—for example, `openai/gpt-5-nano`. You can [find the correct model identifier](https://hostman.com/docs/ai-agents/ai-gateway/connection/#getting-connection-details) in the AI Gateway **Connection** tab.
        
4.  Optionally, configure generation parameters. These apply only when using an AI Gateway connection. Expand **Model configuration** and set:
    
    -   **Context Window Size**: the amount of conversation history included in each request
        
    -   **Max Output Tokens**: the maximum number of tokens in the model's response
        
    -   **Temperature**: controls how varied the model's responses are
        
5.  Click **Done**, then click the back arrow to return to the chat.
    

You can now send messages to your agent or model directly from the editor.
