# Set up your agent

> Go from nothing installed to an agent building your first screen, on a Mac or on Windows, in about fifteen minutes.

Module: Start from zero · Level: beginner · 8 min · https://school.agents.org.in/foundations/start/set-up-your-agent

By the end of this page you will have typed one sentence and watched an agent make a web page from it. Here is where you are heading:

*[Interactive demo: An empty folder, one sentence, a first screen.]*

Four steps get you there: open a terminal, install Node.js, install an agent, and ask it for something. Each one is a few clicks or one pasted line.

## 1. Open a terminal

A terminal (A window where you type commands to your computer instead of clicking. Many agents live in one) is the window where you type commands. Every computer already has one.

  **Mac:**

Press <kbd>Cmd</kbd> + <kbd>Space</kbd>, type **Terminal** and press <kbd>Enter</kbd>. A window opens with a line ending in `%` or `$`. That line is the prompt: it is waiting for you to type.

  **Windows:**

Press the <kbd>Windows</kbd> key, type **Terminal** and press <kbd>Enter</kbd>. (On older Windows, type **PowerShell** instead.) A window opens with a line ending in `>`. That is the prompt, waiting for you.

To run a command, paste it after the prompt and press <kbd>Enter</kbd>. To paste in a terminal, use <kbd>Cmd</kbd> + <kbd>V</kbd> on a Mac, or right-click (or <kbd>Ctrl</kbd> + <kbd>V</kbd>) on Windows.

## 2. Install Node.js

Node.js (A free program that lets your computer run JavaScript tools. Installing it also gives you npm, which installs agents like Claude Code and Codex) lets your computer run JavaScript tools, and it comes with npm (The tool that comes with Node.js for installing JavaScript packages. npx runs a package once without installing it for good), the tool that installs them. Claude Code and Codex are installed with npm, and most web projects need Node anyway.

  **Step: Download it.** Go to [nodejs.org](https://nodejs.org) and download the version marked **LTS** (long-term support, the steady one).

  **Step: Install it.** Open the file you downloaded and click through the installer with the default choices.

  **Step: Check it worked.** Close your terminal, open a new one, and run the line below. You should see a version number like `v22.x.x`.

```bash
node -v
```

> **If it says “command not found”.** The terminal you had open started before Node existed. Close it completely and open a fresh one. That fixes it nine times out of ten.

## 3. Install an agent

Pick one. They all work with this course; you can try another later.

  **Claude Code:**

Install it, then start it:

    ```bash
npm install -g @anthropic-ai/claude-code
```
    ```bash
claude
```

    The first time, it opens your browser to sign in. **You need a Claude account with a paid plan (Pro or Max) or Anthropic API credit.** On Windows, Claude Code also needs [Git for Windows](https://git-scm.com/downloads/win) installed; it will tell you if it is missing.

  **Cursor:**

Cursor is an app, not a command.

    1. Download it from [cursor.com](https://cursor.com) and install it like any app.
    2. Sign in. **Cursor needs a free account**; heavy use needs a paid plan.
    3. Choose **File → Open Folder** and pick a folder (make one first, below).
    4. Open the agent panel with <kbd>Cmd</kbd> + <kbd>L</kbd> on a Mac or <kbd>Ctrl</kbd> + <kbd>L</kbd> on Windows, and make sure it is set to **Agent**.

  **Codex:**

Install it, then start it:

    ```bash
npm install -g @openai/codex
```
    ```bash
codex
```

    The first time, it asks you to sign in. **You need a ChatGPT account on a paid plan, or an OpenAI API key.** Windows support is newer; if it gives you trouble, OpenAI's docs suggest running it inside WSL (Linux on Windows).

  **VS Code:**

1. Download [VS Code](https://code.visualstudio.com) and install it.
    2. Choose **File → Open Folder** and pick a folder (make one first, below).
    3. Open the Chat view from the title bar and switch it to **Agent** mode.
    4. Sign in with GitHub when asked. **Agent mode uses GitHub Copilot, which has a free plan.**

*(Every one of these needs an account. That is the price of the model, not of this course, which is free.)*

## 4. Make a project folder

An agent works inside one folder at a time, and it can change anything in it. So give it a fresh, empty folder of its own. In your terminal:

```bash
mkdir my-first-app
```
```bash
cd my-first-app
```

`mkdir` makes a directory (a folder); `cd` changes into it. Now start your agent here (`claude` or `codex`), or open this folder in Cursor or VS Code.

## 5. Ask for your first screen

Type a plain sentence. Be specific about what is on the screen and keep it small.

**Your first screen (paste into your agent):**

```text
Make a sign-up screen in one file, index.html: a heading, one line of text under it, an email field and one button. Plain HTML and CSS, no frameworks. Then tell me how to open it.
```

The agent will ask permission before it writes the file or runs anything. Read what it wants to do and say yes. When it is done, open `index.html` in your browser (double-click it in your file manager, or ask the agent to open it).

  **Too vague (avoid):**

"Make me a website." The agent has to guess everything, so it guesses the average: a hero, three cards, a footer.

  **Small and specific (do this):**

"A sign-up screen: heading, one line, email field, one button, in index.html." You can check every part of the answer at a glance.

It will look plain, maybe a little generic. That is fine: in [Your first review](/learn/start/your-first-review) you will make it better, with the skill doing half the work.

**Check yourself:** Why should you start your agent inside a new, empty folder?

- [ ] It runs faster there
- [x] An agent can change anything in the folder it is in, so give it one of its own
- [ ] Agents cannot open folders that have files
- [ ] npm needs an empty folder

*Why:* The agent can read, edit and delete files in its folder. A fresh project folder keeps its work contained and easy to see.

## In the skill

- https://school.agents.org.in/skill/meta/directing-agents.md
