AI agents, AI agents... they're everywhere. They've caused quite a frenzy in the world recently. But what even is an AI agent?
Let's start simple. Here's the dictionary definition of an agent:
Agent: a person, organization, software or substance that acts on behalf of another, exerts power or force, or produces a specific result.
So, an AI agent is something that acts on your behalf and produces a specific result for you. That's it.
Coding agents are the clearest example: Claude Code, Codex, OpenCode, Antigravity. Every one of them is built from the same pieces:
- The raw model. The AI itself: Claude, GPT, Gemini.
- The harness. The program wrapped around the model.
- The boot instructions. Who the agent is and how it produces results.
- You and your prompt. The job you want done.
Model = mind. Harness = body.
The simplest way to put it: the model is the mind, and the harness is the body.
The mind is smart. It can reason, write and plan. But on its own, it can't do anything. It can't open a file, search the web or send an email. It can only think and talk. A brain in a jar. That's the essence of most ChatGPT experiences. Answers, but no execution. You're left doing the grunt work.
The harness gives it a body. Its tools are the body's senses and hands: read a file, edit a file, search, run a command, look something up online. That's how the mind interacts with its environment. The mind decides what to do, the body does it and reports back.
The body also has reflexes. Things it does every time, automatically, no matter what the mind is thinking. Remember that one. We'll come back to it.
The loop: sense, act, adjust
The core of every harness is a loop. Developers call it the agent loop. Your body runs the same kind of loop every time you reach for something. Scientists call it the perception-action loop.
When you reach for a glass, your brain doesn't plan the whole reach and fire it off blind. It sends a small movement. Your eyes and your arm report where your hand is now. Your brain corrects, and the hand moves again. Small corrections, over and over, until your fingers close on the glass. Then it stops.
An agent works the same way. Each pass around the loop is one trip to the mind: it takes in everything so far and decides one next move. Say you ask, "Fix the typo on my homepage."
- Reach one. The harness sends the mind your message, its instructions and the list of tools it can use. The mind answers: "Search the files for the typo." The harness runs the search.
- Reach two. The harness sends everything again, plus what the search found. The mind: "Open that file."
- Reach three. "Change line 12."
- Reach four. "Open the page and check it."
- Reach five. The mind answers in plain words: "Fixed it." It didn't ask for a tool this time, so the loop stops and waits for you.
One message from you, five reaches. Your next message starts the loop again, with the whole conversation so far.
The loop is also how an agent explores when it doesn't know where the answer is. Think of finding the light switch in a dark room. You reach, feel the wall, shift your hand, feel again, until you find it and flip it on. Or scanning a room for your keys: every look decides where you look next. The agent never plans the whole job up front. It tries one thing, sees what happened, and lets that pick the next move.
What else the harness does
You don't need to know every part of a harness to use an agent. At its simplest, an agent needs a mind and a body, and the body needs only three things: senses and hands (its tools), reflexes, and the loop that connects them. Some harnesses stop right there. Pi, an open-source coding agent, ships without helpers or permission pop-ups on purpose. You add what you want.
Everything else works like the body's systems. Digestive, respiratory, lymphatic: each one is its own program running inside the body. Most harnesses come with a few systems built in:
- Helpers. For a big job, it can send out helpers, known as subagents. Think of a business owner hiring contractors. The plumber gets the plumbing, the electrician gets the wiring. Each one gets one job and only the information it needs, does the work and comes back with a short report. The owner never has to stand over them, so their attention stays on running the business.
- Checking its own work: tasting the drink. As a bartender, the recipe and the jigger (a measuring tool) are my workflow. But I don't always use them. When I free pour, the test is tasting the drink with a "straw test" before it goes out. Plenty of times it needed a slight adjustment. It didn't pass my own test. An agent does the same: it runs the tests, opens the page it just built and reads the error. It keeps adjusting until the thing actually works, not just until it sounds done.
- Asking first: the hot stove. Rules about what it can do alone and what needs your OK, like spending money, sending an email or deleting something. Some of these are reflexes: the hand pulls back before it gets burned, not after. More on those later.
- Managing its short-term memory: the whiteboard. More on that below.
Where it works
The room and the workbench aren't part of the body at all.
- The environment: the room it's standing in. A cloud agent gets a hotel room: a virtual machine the hosting software builds fresh when the conversation starts and cleans out when it ends. A CLI (command line interface) or desktop agent works in your house, on your own machine, so it matters what it touches. Either way, it needs a place to work and assemble its workbench.
- The project: the workbench. The folder it works in, where it saves its drafts, notes and files. For most people, a plain folder on your computer is all it needs. Developers usually keep that folder on GitHub, as a repository, or repo. A repo records every change, so you can see what changed and roll it back. It protects the main copy, so changes can be reviewed before they land. And it keeps the whole thing backed up online. Those are the basics of what GitHub can do. A repo is a project. A project is a folder.
The mind forgets between conversations
Inside a conversation, the mind remembers everything: every message you sent, every file it opened, every result it got back. That's why you can say "change that last part" and it knows what you mean.
Under the hood, the mind isn't really remembering. Think of a whiteboard the body carries. Every pass around the loop, the body holds the board up and the mind reads the whole conversation from the top.
The board has a limit, though, and a long conversation fills it up. The harness will likely handle this for you. It erases the older parts and writes a short summary in their place, saves big results to a file instead of keeping them on the board, and only loads a skill when the task needs it.
Start a new conversation and the board is wiped clean. The model doesn't learn from talking to you. It wakes up knowing a lot about everything and nothing about you or your work. In the beginning, that was the big issue. Now the major providers keep a memory file that updates with important things from your conversations. But those get large fast, without much structure.
That's where the boot instructions come in. There's one file in the folder it must read if it's there. Claude Code reads CLAUDE.md. Codex and most of the others read AGENTS.md (Claude Code now reads AGENTS.md if there's no CLAUDE.md). That file is where you begin giving the agent guidance about where it's working: what this place is, where everything lives, how work gets done here.
One way to look at it is like a note on the nightstand. From there, it can point to more files: who the agent is, the skills it has, a journal of what it's learned, a map of where everything lives and how to work through it.
That's an agent: a model and a harness. Folders and files are where you shape it.
Inside your folder, you create the skills, workflows and identities the main agent can use or become. Give it an in-depth identity, the right context, its workflows and its skills, and it becomes a backend developer. Point it at a different folder and it becomes a marketing expert, or whatever you need. It can write its own code to get the job done, like a script that cuts your videos, cleans them up and changes what needs changing.
That's how we built Lyte Works. We started with 21 roles and turned each one into an identity made for a digital agency. Every identity has its own context file, which the main agent reads when that identity is called on. It holds exactly what the agent needs for the task in front of it. And the file stays current: updating it is part of the workflow every time the identity is used. More on that in How to Build a Simple Memory Loop.
It doesn't always need an identity. Sometimes it's just a skill, a way of thinking or a workflow. When a task comes in, the main agent reads the right folder and becomes what you built, doing the work with the behaviors you gave it.
Credit where it's due
A programmer and creator named Lost and Lucky was one of the first people I saw talking about how proper folder and file organization lets you build any agent you want. He inspired me, so I have to give credit where it's due. He puts out a lot of valuable content for free.
Open-source agents like OpenClaw and Hermes Agent work the same way. Markdown files give their agents an identity, skills and everything else.
The big companies are moving to folders and files
It's not just the open-source crowd. The biggest names in AI are going the same direction:
- Anthropic, the company behind Claude, gave a talk literally titled "Don't Build Agents, Build Skills Instead." Their Agent Skills are folders of instructions and files an agent loads when it needs them.
- OpenAI is retiring custom GPTs and moving them to plugins built on skills.
- Google is replacing Gemini Gems with skills.
The big players are moving to a simpler setup, and that makes building an agent easier and faster for everyone. A chain of files telling the AI what to do is basically what agents were doing all along. Now it's just simpler.
And simpler matters. Agents are supposed to make your life easier, not have you micromanaging every little detail.
Own the folder
Once you see the pieces, one thing gets clear: the mind and the body are swappable. The same model runs in different harnesses, and a lot of harnesses can run different models. Models get better every few months. You should be free to switch.
The folder is the part that's actually yours. It holds your information: how you work, what you've learned, what the agent should and should not do. If it lives inside someone else's product, so does your agent. If it's files you own, it comes with you to whatever's next.
How to program the body's reflexes
Remember the reflexes?
Instructions in a file are a request. The model will usually follow them. Like a server on a slammed Friday, it skips steps when it's juggling too much.
A reflex in the harness happens every time. It puts the right instruction in front of the model at the right moment, whether the model remembered it or not. So we tweak the harness to always do certain things.
Every harness already comes with a base set of reflexes. It reads CLAUDE.md or AGENTS.md. It injects the provider's own boot prompt into the model before anything else. That part is controlled by the provider, unless you use an open-source agent, and it's how the big companies add their own guardrails and direction. None of that depends on the model remembering to do it. It's programmed into the startup.
We add our own reflexes on top, based on the project. These are called "hooks". A few of ours:
- When an agent starts, it gets a one-page brief before anything else: who it is, what's been happening lately, where everything lives.
- Before it touches code in one of our projects, it has to have read our coding guide. If it hasn't, it can't make the change.
- When it finishes, it gets checked for whether it wrote down what it learned.
Does that coding-guide reflex use tokens? Yes. But better safe than sorry. Agents can and have changed things they weren't supposed to. I wanted every file with code in it to follow the same base set of rules: easier to understand, easier to change, easier to build on. As soon as I added this reflex, things became much more seamless.
Understanding what an agent is, is step one. Step two is organizing the place it works. Step three is giving it the right context. Next, read Context Is Everything.
