Setting Up Your Agent Toolkit
Install and configure the essentials — a chat assistant, a coding agent, a terminal, and an API key — so you're ready for every lesson.
You can't learn to work with agents by reading about them. You need the tools on your own machine, set up properly, so that every exercise in this course is a two-minute start instead of a forty-minute detour through install errors.
This lesson walks you through the whole toolkit in one sitting: a chat assistant, a coding agent, a terminal, Node.js, git, and an Anthropic API key. Each step has instructions for macOS, Windows, and Linux where they differ, plus a quick check so you know it worked. If you've never opened a terminal before, that's fine. You'll type about a dozen commands in total, and each one is explained. Set aside 30 to 45 minutes, and by the end you'll have the same setup professionals use every day.
What you're installing and why
Here's the full kit, what each piece does, and whether you need it right away.
| Tool | What it's for | Needed for |
|---|---|---|
| Chat assistant (Claude, ChatGPT, or Gemini) | Quick questions, drafting, and asking for help when you're stuck | Every module |
| Terminal | The text window where you type commands and where terminal agents run | Module 0 onward |
| Git | Saves snapshots of your work so you can undo anything an agent does | Module 0 onward |
| Node.js | Runs JavaScript and TypeScript, and the code examples in this course | Module 0 onward |
| Coding agent (Claude Code, Codex, or Cursor) | An agent that reads, writes, and runs things on your computer | Module 0 onward |
| Anthropic API key | Lets your own code call Claude directly | Module 1 examples, Module 5 onward |
| Code editor (optional, e.g. VS Code) | Lets you look at files the agent creates | Helpful from Module 2 |
Do them in the order below. Git and Node.js come before the coding agent because some agents expect them to be present.
Step 1: A chat assistant
Create an account with at least one of these:
- Claude at claude.ai (also available as desktop and mobile apps)
- ChatGPT at chatgpt.com
- Gemini at gemini.google.com
The free tiers work for most of the early lessons. A paid plan gives you higher limits, access to the most capable models, and features like longer file uploads and deeper research modes. If you plan to use Claude Code as your coding agent, note that paid Claude plans (Pro and above) include it, while the free plan doesn't, so one Claude plan can cover two tools at once. Check each vendor's plans page for what's currently included.
Check: ask it "In one sentence, what is an AI agent?" and get a reply.
Step 2: Open a terminal
A terminal is a window where you control your computer by typing commands instead of clicking. Terminal agents like Claude Code and Codex run inside it, and it's where you'll run code.
macOS
Press Cmd+Space to open Spotlight, type Terminal, and press Enter. It also lives in Applications, inside the Utilities folder. The default shell (the program that interprets your commands) is zsh.
Windows
Use Windows Terminal with PowerShell. On Windows 11 it's built in: open the Start menu and search for "Terminal". On Windows 10, install Windows Terminal from the Microsoft Store, or search for "PowerShell" to use it directly.
Many developers on Windows also use WSL (Windows Subsystem for Linux), which runs a real Linux environment inside Windows. You don't need it for this course, but if a tool's docs recommend WSL, that's what they mean.
Linux
Open your distribution's terminal app. On Ubuntu and many others, Ctrl+Alt+T works. Your shell is most likely bash.
Five commands to get comfortable
These work in all three systems, including PowerShell:
pwd # print the folder you're currently in
ls # list what's in this folder
mkdir agent-course # make a new folder called agent-course
cd agent-course # move into it
cd .. # move back up one levelAnything after a # is a comment for you to read; you don't need to type it. Create the agent-course folder now. You'll use it throughout the course.
Step 3: Install git
Git is a version control system: it records snapshots of a folder so you can see exactly what changed and roll back any change. When an agent edits twenty files and one of them goes wrong, git is how you undo it in seconds. Module 2 covers it in depth; for now, you just need it installed.
macOS
Type git --version in the terminal. If git isn't installed, macOS will offer to install the Command Line Developer Tools, which include git. Accept and wait for it to finish. If you use Homebrew (a popular package manager for macOS), brew install git also works.
Windows
Install Git for Windows. The easiest route is from PowerShell:
winget install --id Git.Git -eYou can also download the installer from git-scm.com. The default options are fine. It includes Git Bash, a Linux-style terminal that some tools use behind the scenes. Close and reopen your terminal after installing.
Linux
Use your package manager:
sudo apt install git # Debian, Ubuntu
sudo dnf install git # FedoraTell git who you are
Git labels every snapshot with a name and email. Set them once, using your own details:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"Check: git --version prints a version number.
Step 4: Install Node.js
Node.js lets your computer run JavaScript outside a browser. The course's code examples use TypeScript, which runs on Node.js, and some agent tools are distributed through npm, the package manager that comes with Node. Always pick the LTS (long-term support) version; it's the stable one.
macOS
Download the LTS installer from nodejs.org and run it, or with Homebrew:
brew install nodeWindows
Download the LTS installer from nodejs.org, or from PowerShell:
winget install OpenJS.NodeJS.LTSClose and reopen your terminal afterward so it picks up the new commands.
Linux
The Node.js packages in many distributions' default repositories are out of date. The download page on nodejs.org shows current instructions for installing through a version manager such as nvm, which keeps everything in your home folder and makes upgrading easy. Follow those instructions for the LTS version.
Check: both of these print version numbers:
node --version
npm --versionStep 5: Install a coding agent
This is the centerpiece. A coding agent is an agent with tools for reading files, editing files, and running commands on your computer. Despite the name, it's useful far beyond code: it can organize folders, process spreadsheets, and write reports.
The course examples mostly use Claude Code, but the skills transfer. Pick one to start:
| Agent | Where it runs | Sign-in |
|---|---|---|
| Claude Code (Anthropic) | Terminal, plus editor and desktop integrations | Claude subscription or Anthropic API account |
| Codex (OpenAI) | Terminal, plus editor and cloud versions | ChatGPT plan or OpenAI API account |
| Cursor | A full code editor with a built-in agent | Cursor account |
Installing Claude Code
Install commands change from time to time, so treat the official Claude Code documentation as the source of truth. At the time of writing, the native installer is:
# macOS, Linux, or WSL
curl -fsSL https://claude.ai/install.sh | bash# Windows PowerShell
irm https://claude.ai/install.ps1 | iexOn Windows, Git for Windows (Step 3) is recommended: when it's installed, Claude Code runs commands through Git Bash; without it, Claude Code falls back to PowerShell. Package managers work too: brew install --cask claude-code on macOS, winget install Anthropic.ClaudeCode on Windows, or npm install -g @anthropic-ai/claude-code if you prefer installing through Node. After installing, open a new terminal and start it inside your course folder:
cd agent-course
claudeThe first run walks you through signing in. It will also ask whether you trust the files in this folder; that's a safety check, because the agent will be able to read and change them.
Installing Codex or Cursor instead
For Codex, install it with npm install -g @openai/codex (or brew install --cask codex on macOS), checking OpenAI's Codex documentation for current instructions, then run codex in your course folder and sign in with your ChatGPT account. For Cursor, download the app from cursor.com, open your agent-course folder in it, and open the agent panel.
Check: start your agent in the agent-course folder and type:
What folder are you in, and what files can you see? Don't change anything.
It should report the folder path and say it's empty (or list whatever is in it).
Step 6: Get an Anthropic API key
An API key is a secret password that lets your own programs call Claude directly through the API (application programming interface), instead of through the chat app. You'll use it to run the code examples in Module 1 and to build your own agent in Module 5. API usage is billed separately from chat subscriptions, per amount of text processed.
- Go to the Claude Developer Platform at platform.claude.com (formerly console.anthropic.com) and create an account.
- Add billing details and a small amount of credit. The early exercises use very little.
- Set a spend limit in your billing or limits settings so a runaway experiment can't surprise you.
- Create an API key and copy it. It starts with
sk-ant-. You may only be shown it once, so store it in a password manager.
Store the key as an environment variable
An environment variable is a named value your terminal makes available to every program you run. The Anthropic SDKs automatically look for one called ANTHROPIC_API_KEY.
On macOS (zsh), add it to your shell's startup file and reload it. Replace the placeholder with your real key:
echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.zshrc
source ~/.zshrcOn Linux (bash), do the same with ~/.bashrc instead of ~/.zshrc.
On Windows (PowerShell), save it for your user account, then close and reopen the terminal:
setx ANTHROPIC_API_KEY "sk-ant-your-key-here"Verify the key with a real API call
Let's make sure everything works end to end. In your terminal:
cd agent-course
mkdir key-check
cd key-check
npm init -y
npm install @anthropic-ai/sdkCreate a file called check-key.mjs in that folder (use your editor, or ask your coding agent to create it with exactly this content):
import Anthropic from "@anthropic-ai/sdk";
// Reads ANTHROPIC_API_KEY from your environment automatically.
const client = new Anthropic();
const response = await client.messages.create({
model: "claude-sonnet-5-5",
max_tokens: 2000,
messages: [{ role: "user", content: "Reply with exactly: Key works!" }],
});
for (const block of response.content) {
if (block.type === "text") console.log(block.text);
}
console.log("Tokens used:", response.usage.input_tokens + response.usage.output_tokens);Run it:
node check-key.mjsYou should see Key works! and a small token count. Congratulations: you just called a frontier model from your own code. If you get an authentication error, the environment variable isn't set in this terminal; open a fresh terminal and try again.
Open a new terminal window and work through this list. Fix anything that fails before moving on, using your chat assistant for help.
- I can sign in to a chat assistant and get a reply.
- I can open a terminal and move into my
agent-coursefolder. -
git --versionprints a version, and I set my name and email. -
node --versionandnpm --versionboth print versions. - My coding agent starts in
agent-courseand can describe the folder. - My API key is stored safely, with a spend limit set.
-
node check-key.mjsprints "Key works!"
Success looks like: every box checked, in a fresh terminal, without having to re-run any setup steps.
When something goes wrong
Most setup problems fall into a few buckets:
- "Command not found" right after installing: close the terminal and open a new one. Terminals only read the list of available programs when they start.
- Permission errors on macOS or Linux when installing global npm packages: don't reach for
sudo. Use the native installer or a Node version manager instead, which install into your home folder. - Corporate laptops may block installs or network access. Ask IT, or use a personal machine for the course.
- Anything else: paste the full command and the full error into your chat assistant, along with your operating system. Asking an AI to debug setup is a real agent skill, not a shortcut.
- Your toolkit is a chat assistant, a terminal, git, Node.js, a coding agent, and an Anthropic API key.
- Install git and Node.js before your coding agent; check each step with a version command.
- The official docs are the source of truth for install commands, which change over time.
- Store your API key in an environment variable, never in prompts or code, and set a spend limit.
- When setup fails, paste the exact error into a chat assistant. Next up: your first agent task.