Basic Agents / Lesson 1

What Is an Agent Harness?

The difference between a chatbot and an agent is the difference between giving advice and doing the work. An agent harness is the body your AI brain needs to actually get things done.

Goal

Understand what an agent harness is, what it does, and why you need one to move beyond chat

What You'll Need

⏱ Time: 12 minutes  |  📋 Tasks:

  • Familiarity with using a chatbot like ChatGPT or Claude (from Basic Chatbots track)
  • Your preferred chatbot open in a tab

You've Felt the Ceiling

You open a chatbot. You type a prompt. It responds with text. Good output, maybe great. But then you need the chatbot to do something — read a file, run a script, check a website, update a spreadsheet — and you hit a wall. The chatbot can talk about the task, but it can't perform it. You're back to copying, pasting, and doing the work yourself.

That wall is the ceiling of a chat-only interface. The model is smart enough to help, but it has no hands. It can't reach into your file system, execute code, call an API, or persist information between conversations.

An agent harness removes that ceiling. It gives the model the tools it needs to act on the world, not just talk about it.

What Agents Actually Do for You

Before we get into definitions and tables, let's start with what an agent can do that a chatbot can't. These are real examples of meaningful work, not technical demos:

  • Organize your files — "Go through my Downloads folder, sort everything into subfolders by file type, and delete anything that's been there over a year." The agent looks at every file, decides where it goes, moves it, and cleans up. You don't touch a single file.
  • Research and compile — "Find the top 5 competitors in my area, check their websites for pricing, and build me a comparison spreadsheet." The agent searches, reads each site, extracts the numbers, and builds the file. You come back to a finished document.
  • Monitor and alert — "Check this webpage every morning. If the price drops below $50, send me an email." The agent visits the page daily, reads the price, and acts when conditions are met. You don't check — it checks.
  • Batch process — "Take all these photos, resize them to 1200px wide, rename them with today's date, and put them in a folder called 'Processed'." The agent opens each image, edits it, names it, and files it. You go make tea.

The pattern in every case is the same: you describe what you want done, and the agent does the doing. Not the planning, not the advice — the actual work of reading, writing, moving, comparing, deciding, and reporting back. That's the shift from chatbot to agent, and it's what this whole track is about.

Chatbot vs Agent

These two terms get used interchangeably, but they describe fundamentally different things:

Dimension Chatbot Agent
Input Your typed prompt A goal, plus data from tools it can call
Output Text response Actions: files changed, code run, APIs called, data retrieved
Memory Current conversation only Persistent across sessions, can store and retrieve
Tools None (or limited, like web search toggle) File system, code execution, APIs, databases, search
Autonomy None — you guide every step Can execute multi-step plans without your input

A chatbot is a conversation. An agent is a delegation. You tell the agent what you want, and it figures out how to make it happen — reading, writing, running, checking, iterating — until the goal is met or it needs your input to proceed.

What a Harness Does

An agent harness is the software that turns a language model into an agent. It provides the infrastructure the model needs to do work. Every harness handles four core functions:

1. Model Routing

The harness connects to one or more language models. When you give the agent a task, the harness sends the prompt to the model, receives the response, and decides what to do next. Some harnesses let you route different types of tasks to different models — use a cheap fast model for simple lookups, a powerful expensive one for complex reasoning.

2. Tool Execution

This is the core of what makes an agent an agent. The harness provides tools the model can call: read a file, write a file, run a command, search the web, query a database, call an API. When the model decides it needs to use a tool, the harness executes it and feeds the result back to the model. The model can then decide what to do based on what the tool returned.

3. Memory

Chatbots forget everything when you close the tab. Many agent harnesses are the same — when you end a session and start a new one, the agent starts fresh with no memory of what happened before. The harness can give the model a place to store information it wants to remember — notes about your project, results from previous steps, preferences you've expressed — but it won't do this automatically. You need to specifically teach the agent what to save and how to save it, or it will lose everything between sessions like a chatbot does. We'll cover this in detail in a later lesson.

4. Sandboxing

Giving an AI the ability to run code and modify files is powerful — and risky. A harness runs the agent in a controlled environment. It restricts what the agent can access, caps resource usage, and logs every action. If the agent goes off course, the sandbox contains the damage.

The Mental Model: Brain and Body

Here's the simplest way to think about it:

Component Analogy Examples
The Model The brain GPT-4, Claude, Gemini — the thing that reasons
The Harness The body Opencode Desktop, Claude Cowork, LangChain — the thing that acts

The brain is smart but helpless without a body. It can think through any problem but can't pick up a pencil. The body gives the brain hands — the ability to read, write, execute, and sense the world. You need both for an agent to do useful work.

Throughout this track, when we talk about "running an agent," what we really mean is "running a harness with a model plugged in." The harness is the product you install. The model is the service you subscribe to. They work together, and you choose both.

Walkthrough: From Chat to Agent

Let's make this concrete. Here's the same task approached first as a chat, then as an agent delegation.

The Chat Way

Open ChatGPT and type this prompt:

I need to organize my downloads folder. It's a mess. Can you suggest how to sort files into subfolders by type?

ChatGPT will give you great advice. It might suggest folders for images, documents, audio, and archives. It might even write a Python script you could run. But it won't actually organize anything. You're still the one who has to open the terminal, run the script, or drag files around. The model gave you a plan; you execute it.

The Agent Way

Open your agent harness. Type something like:

Organize my downloads folder. Sort files into subfolders by type: images, documents, audio, archives, and other. Log what you moved where.

The agent harness reads the folder, identifies each file's type, creates subfolders, moves the files, and writes a log of what happened. The model figured out the plan, the harness executed it. You gave the goal, the agent did the work.

Key insight: The model in both cases is equally capable. What changed is the harness. In the chat scenario, the model had words-only output. In the agent scenario, the harness gave the model access to the file system, command execution, and logging tools. Same brain. Different body.

Your Takeaway — The Distinction Test

Before moving on, make sure you can answer this question: If I give this task to a chatbot, does it talk about the work or does it do the work? If the answer is "talks about it," you need an agent harness.

Keep this test in your pocket. It's the distinction that runs through every lesson in this track.

The Options: Desktop vs TUI Agents →