> ## Documentation Index
> Fetch the complete documentation index at: https://friendli.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use OpenHands with FriendliAI

> Configure OpenHands to use FriendliAI for fast, cost-efficient, and reliable open-source model inference.

export const AgentSteps = ({agentName, agentInstallUrl, agentPromptPageName, agentPromptUrl, children}) => <Steps>
    <Step title={`Install ${agentName}`}>
      <p>If you haven't already, <a href={agentInstallUrl}>install {agentName}</a>.</p>
    </Step>

    <Step title="Get a FriendliAI API Key">
      <p>If you need a new API key, <a href="/docs/examples/agents/overview#create-an-api-key">create one.</a></p>
    </Step>

    <Step title={`Set Up ${agentName}`}>
      {children}
    </Step>

    <Step title={`Send a Prompt to ${agentName}`}>
      <p>Open your agent and send a prompt. For example, use the following prompt:</p>

      <Prompt description="Use a FriendliAI model to explore your codebase." icon="robot">
        What can you tell me about this codebase?
      </Prompt>

      <p>To learn more, see <a href={agentPromptUrl}>{agentName} Docs {">"} {agentPromptPageName}</a>.</p>
    </Step>

  </Steps>;

export const AgentIntro = ({agentName, agentMarketingUrl}) => <>
    <p>Set up <a href={agentMarketingUrl}>{agentName}</a> to connect to FriendliAI. Once you complete these steps, your agent will send requests to FriendliAI.</p>

    <p>To get started, complete the following steps:</p>

  </>;

<AgentIntro agentName="OpenHands" agentMarketingUrl="https://www.openhands.dev" />

<AgentSteps agentName="OpenHands" agentInstallUrl="https://docs.openhands.dev/openhands/usage/agent-canvas/setup" agentPromptPageName="First Time Setup" agentPromptUrl="https://docs.openhands.dev/openhands/usage/agent-canvas/first-time-setup">
  1. Start Agent Canvas. Then, open `http://localhost:8000`.

  2. On **Choose your agent**, select **OpenHands**. Then, click **Next**.

  3. On **Set up your LLM**, click the **Advanced** tab.

  4. Connect OpenHands to FriendliAI's API:
     1. In **Authentication**, select **API key**.

     2. In **Custom Model**, enter the FriendliAI model ID with the `friendliai/` provider prefix. For example, enter `friendliai/zai-org/GLM-5.2`.

     3. In **Base URL**, paste the following FriendliAI base URL:

        ```text theme={null}
        https://api.friendli.ai/serverless/v1
        ```

     4. In **API Key**, paste your FriendliAI API key.

     5. Click **Next**.

  <Tip>If you already finished the first-time setup, open **Settings > LLM** and add a new LLM profile with the same values instead.</Tip>

  To learn more, see [OpenHands Docs > Manage LLM Profiles](https://docs.openhands.dev/openhands/usage/agent-canvas/llm-profiles).
</AgentSteps>
