> ## 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.

# Set Up Your Agent with FriendliLink

> Set up your coding agent with the FriendliLink CLI to use FriendliAI for fast, cost-efficient, and reliable open-source model inference.

Use [FriendliLink](https://github.com/friendliai/friendlilink) to connect your agent to FriendliAI with one command. Once you complete these steps, your agent will send requests to FriendliAI.

To get started, complete the following steps:

<Steps>
  <Step title="Install Your Agent">
    If you haven't already, install your agent:

    * [Claude Code](https://code.claude.com/docs)
    * [Codex](https://learn.chatgpt.com/docs/codex/cli#getting-started)
    * [Cursor](https://cursor.com/docs/get-started/quickstart)
    * [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/en/guide/quickstart)
    * [Hermes Agent](https://hermes-agent.nousresearch.com/docs/getting-started/installation)
    * [OpenCode](https://opencode.ai/docs#install)
    * [Pi](https://pi.dev/docs/latest/quickstart)
  </Step>

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

  <Step title="Install FriendliLink">
    In your terminal, run the following command:

    ```sh theme={null}
    curl -fsSL https://raw.githubusercontent.com/friendliai/friendlilink/main/install.sh | bash
    ```

    The command installs the FriendliLink CLI. You can use `friendlilink` or `frlink`.
  </Step>

  <Step title="Save Your API Key">
    In your terminal, run the following command:

    ```sh theme={null}
    frlink login
    ```

    Then, paste your FriendliAI API key.
  </Step>

  <Step title="Set Up Your Agent">
    In your terminal, run the following command:

    ```sh theme={null}
    frlink <FRIENDLILINK_AGENT_ID> on
    ```

    Replace `<FRIENDLILINK_AGENT_ID>` with your agent's ID:

    | Agent            | FriendliLink Agent ID |
    | ---------------- | --------------------- |
    | Claude Code      | `claude`              |
    | Codex            | `codex`               |
    | Cursor           | `cursor`              |
    | DeepSeek Harness | `dsh`                 |
    | Hermes Agent     | `hermes`              |
    | OpenCode         | `opencode`            |
    | Pi               | `pi`                  |

    Then, select a model. For example, select **zai-org/GLM-5.3**.
  </Step>

  <Step title="Send a Prompt to Your Agent">
    Open your agent and send a prompt. For example, use the following prompt:

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

    To learn more, see [FriendliLink README](https://github.com/friendliai/friendlilink).
  </Step>
</Steps>

<Card title="Help" icon="circle-question" href="https://learn.friendli.ai/collections/1270196079-integrations-and-compatibility">
  Find answers to common agent setup questions.
</Card>
