# What is an agent?

> Know the difference between a chatbot and an agent, what a harness and an interface are, and why so many agents live in a terminal.

Module: Start from zero · Level: beginner · 7 min · https://school.agents.org.in/foundations/start/what-is-an-agent

Ask a chatbot to add a dark mode switch to your app, and it writes you a nice answer with some code to paste. Ask an agent the same thing, and it opens the file, changes it, runs your tests and tells you it is done.

Same words in. One gives you homework; the other does the work.

*[Interactive demo: The same request to a chatbot and to an agent. One explains, the other edits the file and runs it.]*

## A model only writes text

Under every chatbot and every agent is a large language model (The AI itself, like Claude or GPT. On its own it only reads text and writes text; it cannot open files or run anything) (an LLM): the AI itself, like Claude or GPT. On its own, a model can do exactly one thing. It reads text and writes more text.

It cannot open a file. It cannot run a command. It cannot see your screen. A chatbot is mostly a model with a text box, which is why it hands you code to paste: writing text is all it can do.

## A harness gives it hands

So how does an agent edit files? Theo Browne explains it well in [What is a harness?](https://x.com/theo/article/2113424203345265053): the model is wrapped in a layer of ordinary code called a harness (The hidden layer of ordinary code around a model: it lists the tools, notices when the model asks for one, runs it and sends the result back. Model + harness = agent).

The harness does four jobs:

  **Step: It lists the tools.** It tells the model which tools (One thing a harness can do for the model, like read_file, edit_file, run a command or search. Most run on your computer; an MCP server's tools run somewhere else) exist, such as `read_file`, `edit_file`, `bash` (run a command) and `search`, and the text format for asking to use one.

  **Step: It watches the model's text.** When the model writes something like `read_file("src/Settings.tsx")`, the harness notices that this is a request, not a sentence.

  **Step: It runs the tool.** The harness, not the model, actually opens the file or runs the command on your computer.

  **Step: It sends the result back.** The file's contents go back to the model, which reads them and writes its next step. Round and round until the job is done.

**An agent is a model plus a harness.** The model decides; the harness does.

*[Interactive demo: Step through one request. It goes down to the model, out to a tool, and back up to you.]*

## The interface is what you see

There is one more layer, the one you actually look at: the interface (The screen you see and type into: the claude screen in a terminal, Cursor's window, a desktop app. Not the same as the harness behind it). It is the screen where you type and read answers. For Claude Code, that is the `claude` screen in your terminal or the Code tab of the desktop app; for Cursor, it is Cursor's editor window with its agent panel.

People mix up the interface and the harness because apps like Claude Code and Codex ship both in one box. But they are different things. The interface is the dining room; the harness is the kitchen behind the wall, usually invisible.

> **The kitchen picture.** The model is the **chef**: it knows how to cook but has no hands of its own here. The harness is the **kitchen**: the counters, the stove, the staff who fetch things. The tools are the **pots and knives**. You are the diner, and the interface is the dining room where you order and get your plate.

## Tools here, and tools over there

Most tools run right on your computer: read this file, run that command. An MCP (Model Context Protocol: a standard way for an agent to use tools that live somewhere else, by sending a request to a server, like this course's exam server) server is a tool that lives somewhere else. Instead of running code on your machine, the harness sends a request "over there" and gets the answer back.

Think of it as the difference between an app you install and a website you visit by its address. In the kitchen picture, an MCP server is a cookbook the kitchen can choose to open. That is exactly how this course reaches your agent: it is an MCP server your agent can call to read lessons and sit exams. You will connect it in [Connect your agent](/learn/start/connect-your-agent).

## Which harness?

Several apps bundle a harness with an interface. They all do the same basic loop; they differ in where they live and how they look.

| App | Where it lives | Good first pick if… |
|---|---|---|
| Claude Code | Your terminal, plus a desktop app | You want the agent this course is tested with most |
| Cursor | A code editor (an app with windows and files) | You would rather click than type commands |
| Codex | Your terminal | You already use OpenAI's tools |
| VS Code | A code editor, with an agent panel | You already have VS Code open all day |

All of them can load the design-engineering skill and connect to this course. Pick one; you can switch later.

## What is a terminal?

Many agents live in a terminal (A window where you type commands to your computer instead of clicking. Many agents live in one): a plain window where you type commands to your computer instead of clicking. It looks old-fashioned, but it is just another way to say "open this folder" or "run this program".

  **Clicking (avoid):**

Open Finder or File Explorer, find Documents, make a new folder, name it `my-app`, double-click into it.

  **Typing in a terminal (do this):**

```
    mkdir my-app && cd my-app
    ```
    Same result, one line. And an agent can type it for you.

That last part is the point. Agents live in terminals because a terminal is a place where text becomes action, and text is what models write.

*(You do not need to learn terminal commands. You need to know how to open one and paste a line into it.)*

**Ask your agent to show its work (paste into your agent):**

```text
Before you change anything, tell me which files you will read, which you will edit and which commands you will run. Then do it, and list each tool call as you make it.
```

**Check yourself:** What turns a language model into an agent that can edit your files?

- [ ] A bigger model
- [x] A harness that gives it tools, runs them and sends the results back
- [ ] A nicer chat window
- [ ] Typing your request in a terminal

*Why:* A model only writes text. The harness lists tools, notices when the model asks for one, runs it on your computer and returns the result. Agent = model + harness.

## In the skill

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