Skip to content
The 31 guidesFREN中文
Guides
Part 2 · guide 4 of 6 Level: Easy Reading time: 12 min

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.

In this guide
  1. 01A model, a chatbot, an agent: three different things
  2. 02The loop, the heart of it all
  3. 03Tools: what gives the brain hands
  4. 04The degree of autonomy: a dial you set
  5. 05What it changes for tinkerers
  6. 06Frequently asked questions

In short

An AI agent is a language model given a goal, tools to act (read and write files, run commands, search the web) and a loop that makes it try again until the job is done. Where a chatbot advises, an agent executes, which is why you set its level of autonomy and review what it does. Claude Code and OpenCode are agents of this kind, ready to use for software work.

Do this first: Installing the agent (very early)

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:

1 · You Goal your request
2 · The model Reasons, decides which action, with which tool
3 · The tools Acts read or write a file, run a command, call an API…
4 · The feedback Observes the result and feeds it back to the model
↻ it loops until “it’s done”
The agent loop: it receives a goal, the model thinks and decides on an action, it uses a tool, observes the result, and starts over, until 'done.'

Let’s walk through a concrete example. You ask: “do the tests pass?” The agent doesn’t guess, it loops:

  1. Thinking: “To find out, I need to run the test command.”
  2. Action (tool): it runs npm test in your terminal.
  3. Observation: it reads the output: three tests fail, in such-and-such file.
  4. Thinking: “The error says the function returns null. I’ll read that file.”
  5. Action: it opens the file, spots the bug, writes the fix.
  6. Action: it reruns npm test.
  7. 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 brain matters as much as the hands. Not every model holds the loop equally well: some chain twenty actions without losing the thread, others wander off after three. The Quelle IA site keeps a ranking of models for agents (in French), built precisely on this ability to chain actions on their own.

The degree of autonomy: a dial you set

“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.

Claude Code files these notches under its permission modes: manual approval, automatic acceptance of file edits, plan mode (it proposes without touching anything), and an “auto” mode where a classifier reviews each action on your behalf. OpenCode has its own settings, with the same logic.

What it changes 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.

Frequently asked questions

What can a language model do on its own, without tools?

Nothing beyond turning text into text. A bare language model does not know the time, cannot read your files and remembers nothing. The goal, tools and loop added around it are what turn it into an agent that can act.

How does an AI agent's loop work?

The agent receives a goal, thinks, picks an action, uses a tool, observes the result and starts again until the goal is reached. To find out whether tests pass, for example, it runs the test command, reads the errors, opens the faulty file, fixes it, reruns the tests and stops when everything is green. Nobody dictates these steps: it chooses them based on what it observes.

Are all models equally good at running an agent?

No. Some chain twenty actions without losing the thread, others get lost after three. Quelle IA keeps a ranking of models for agents, based precisely on this ability to chain actions on their own.

How much autonomy should you give a coding agent?

It is a slider you set according to the stakes. Approve every action at first or on sensitive work, only risky moves (deleting, pushing, touching the network) day to day, and let it run on a well-bounded, reversible task such as a refactor covered by tests. Tighten it when you are starting out, loosen it once you have learned what the agent does well.

What are Claude Code's permission modes?

Claude Code offers manual approval, automatic acceptance of file edits, a plan mode where it proposes without touching anything, and an 'auto' mode where a classifier reviews each action on your behalf. OpenCode has its own settings, built on the same logic.

Terms in this guide: AgentLLMClaude CodeOpenCodeShellAPIGit

Spotted a mistake?

A command stopped working, a price changed?

Tools change every month. Tell me what is wrong in this chapter and I will fix it and update its date.

Only the page, your message and the optional contact are kept. Nothing else.

Guide 12 of 31 · part 2 no guides read yet Open the list of guides