🧠What is an AI agent?
An agent isn't a chatbot. It's a model taken out of its box and given tools and a goal. Here's how it really works, no magic.
You installed Claude Code or OpenCode and watched it write files, run commands, fix its own mistakes. It’s impressive, and a little magical. Except there’s no magic. Just one simple, powerful idea. Let’s take five minutes to break it down: once you understand what an agent is, you know what to expect from it, and above all what not to expect.
A model, a chatbot, an agent: three different things
We often mix up the three. The distinction is actually sharp:
- A language model (LLM) is the raw engine. You give it text, it gives you back text. It doesn’t do anything else. It doesn’t know the time, can’t read your files, remembers nothing.
- A chatbot is a model in a chat interface. Handy for thinking, drafting, explaining. But it stays trapped in its text bubble: it advises you to run a command, it doesn’t run it.
- An agent is a model given three things: a goal, tools to act on the real world, and a loop that makes it start over until the goal is reached. There, it no longer advises: it acts.
The loop, the heart of it all
Every agent, whether it’s Claude Code, OpenCode, or something else, runs on the same loop. It’s what turns a chatty model into an autonomous worker:
Let’s walk through a concrete example. You ask: “do the tests pass?” The agent doesn’t guess, it loops:
- Thinking : “To find out, I need to run the test command.”
- Action (tool) : it runs
npm testin your terminal. - Observation : it reads the output: three tests fail, in such-and-such file.
- Thinking : “The error says the function returns
null. I’ll read that file.” - Action : it opens the file, spots the bug, writes the fix.
- Action : it reruns
npm test. - Observation : all green. Goal reached, it stops.
Nobody dictated those steps to it. It chose them, one by one, based on what it observed. That’s what an agent is: a model that decides its next action in a loop, building on the result of the previous one.
Tools: what gives the brain hands
An agent is only worth the tools it’s given. A tool is a capacity to act: read a file, write one, run a shell command, query an API, search the web. The richer the tool palette, the more the agent can accomplish.
Claude Code and OpenCode come already equipped for development: filesystem, terminal, search, git. And you can extend that palette, that’s the whole point of the next page, Setting up your agents.
The degree of autonomy: a slider, not a switch
“Autonomous agent” scares people or makes them dream, depending on the mood. The reality is more nuanced: autonomy is a slider that you set.
- You approve every action. The agent proposes, you approve one by one. Slow, but total control, ideal at the start, or on sensitive work.
- You approve only the risky moves. The agent freely chains reads and tests, but asks you before deleting, pushing, or touching the network. The right setting day to day.
- You let it run. On a well-scoped, reversible task (a refactor covered by tests), you let it go and review the result at the end.
Why it’s a revolution for tinkerers
Because it shifts your role. You go from “the one who types the commands” to “the one who decides and reviews.” You describe an intention in plain language, the agent translates it into a series of concrete actions, and you approve. That’s exactly what makes a mini-machine so powerful in the hands of someone who isn’t a sysadmin: the agent does the technical move, you keep the course.