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

# Quickstart

> Build and run an agent in under 2 minutes.

### Install the Icepick CLI

The Icepick CLI is a command line interface for quickly getting started with Icepick by scaffolding a new agent project:

<Tabs>
  <Tab title="npm">
    First, install the Icepick CLI:

    ```sh theme={null}
    npm i -g @hatchet-dev/icepick-cli
    ```

    Then create a new agent:

    ```sh theme={null}
    icepick create my-agent
    ```

    Then cd into the agent directory and install dependencies:

    ```sh theme={null}
    cd my-agent && npm install
    ```
  </Tab>

  <Tab title="pnpm">
    First, install the Icepick CLI:

    ```sh theme={null}
    pnpm i -g @hatchet-dev/icepick-cli
    ```

    Then create a new agent:

    ```sh theme={null}
    icepick create my-agent
    ```

    Then cd into the agent directory and install dependencies:

    ```sh theme={null}
    cd my-agent && pnpm install
    ```
  </Tab>

  <Tab title="yarn">
    First, install the Icepick CLI:

    ```sh theme={null}
    yarn global add @hatchet-dev/icepick-cli
    ```

    Then create a new agent:

    ```sh theme={null}
    icepick create my-agent
    ```

    Then cd into the agent directory and install dependencies:

    ```sh theme={null}
    cd my-agent && yarn install
    ```
  </Tab>
</Tabs>

### Generate a Hatchet API token

Icepick requires a [Hatchet](https://hatchet.run) API token for orchestration. You can generate a Hatchet token by signing up for a free account on [Hatchet Cloud](https://cloud.onhatchet.run) or following instructions for [self-hosting Hatchet](https://docs.hatchet.run/self-hosting).

Add this API token to the `.env` file in the project:

```sh theme={null}
HATCHET_CLIENT_TOKEN=<my-token>
```

### Set your LLM API key

Add this API token to the `.env` file in the project:

```sh theme={null}
OPENAI_API_KEY=<your-api-key>
```

### Run your agent

The default icepick agent is a simple deep research agent that can be triggered to perform a deep research task. It uses the OpenAI API to generate responses and the Hatchet API to orchestrate the agent's execution. For a full walkthrough of this agent, see the [deep research example](./examples/deep-research).

To start your agent, you can run the following:

<Tabs>
  <Tab title="npm">
    ```sh theme={null}
    npm run dev
    ```
  </Tab>

  <Tab title="pnpm">
    ```sh theme={null}
    pnpm run dev
    ```
  </Tab>

  <Tab title="yarn">
    ```sh theme={null}
    yarn dev
    ```
  </Tab>
</Tabs>

To trigger the agent, in a separate terminal you can run:

<Tabs>
  <Tab title="npm">
    ```sh theme={null}
    npm run trigger
    ```
  </Tab>

  <Tab title="pnpm">
    ```sh theme={null}
    pnpm run trigger
    ```
  </Tab>

  <Tab title="yarn">
    ```sh theme={null}
    yarn trigger
    ```
  </Tab>
</Tabs>

This will prompt you for a deep research prompt and then execute the agent.
