Checking how many agents are working

How this works
Kontakt
← Blog
A cinematic photograph of a brass robot at a workbench passing a glowing loop of thread between a notebook, a tool and a lamp, in teal and steel with a warm amber light, the AMARBARO mark and wordmark centred over it.
✎Post blogowy

What an AI agent is, and how it differs from a chatbot

The short version

Our coding agents start each task with empty context and a shell, and an agent differs from a chatbot because it acts and then checks what its action did.

What this is about

You have probably used a chatbot. You type a question and it types an answer. That is one step, and then it waits for you.

An AI agent is a different shape of program. It still uses a language model to think. But it can also do things: open a file, run a command, search a folder. After each action it reads what came back and decides what to do next. It stops when the job looks done.

This article draws that loop in plain words. It is the first in a series that explains how agents work, one idea at a time, with no maths.

Why it matters

The difference decides what you can ask for.

A chatbot can tell you how to rename a hundred files. An agent can rename them, look at the folder, see that three names clashed and fix those too. The first gives you advice. The second gives you a result.

It also decides what can go wrong. A chatbot that is wrong gives you a wrong sentence, and you read it before you act. An agent that is wrong may have already changed something. So the questions to ask change. Not only "is the answer good?" but also "what is it allowed to touch?" and "how do I know it did the work?" Later articles in this series answer both.

How it works: the loop

Take a small job: "find out why my site is slow."

A chatbot reads that sentence and writes a general list of causes. Images may be big. A script may block the page. The server may be far away. It cannot look at your site, so it guesses.

An agent runs a loop instead. Here are the steps in order.

  1. Read the goal. The goal is plain text, the same sentence you typed.
  2. Pick one action. The model chooses a tool, for example "fetch this page" or "list the biggest files."
  3. Run the action. A normal program does the work. The model does not run anything itself.
  4. Read the result. The result goes back to the model as text.
  5. Decide. Is the goal met? If not, go to step 2 with what was just learned.
  6. Stop and report. When the job looks done, the agent writes a short answer.

That is all an agent is: a model, some tools and a loop around them. The next article in this series, "How an AI agent uses tools," opens up steps 2 to 4.

The loop has a weak point, step 5. The model decides that it is done, and a model can be wrong about that. A good agent setup does not trust the "done" alone. It checks the result in some way that does not depend on the model's opinion. We come back to this in the article on receipts.

What an agent starts with

An agent does not arrive knowing your project. On our machine, our coding assistants start each task with empty context. They have a shell and a file system, and nothing else about the day before. That is why we built a memory network of dated notes, and why our rule says the agent must look things up before it guesses. Our post "How Agents Use the Network" tells the story of one agent that spent hours re-deriving a fault whose answer was already written down in three older notes.

So an agent is not only "a smarter chatbot." It is a model plus tools plus whatever notes and rules you give it at the start. Take away the tools and you have a chatbot. Take away the notes and you have an agent that forgets yesterday.

A small agent we trained ourselves

Agents do not have to be huge. We trained a model with 72,632,320 parameters, which we call Metis, to call four of our tools: calc, brain_ask, web_fetch and run_js. On 56 held-out questions, it answered 22 by calling a tool and using the result. A control model that had never seen a tool example, and only got instructions in its prompt, scored 0 of 56. The full story, including its failures, is in the series "Training Metis."

Why mention it here? Because it shows the loop is learnable and small. The model does not need to know everything. It needs to know when to ask a tool and how to write the request. The tool knows the answer.

Chatbot or agent: a quick test

Ask three questions about any product.

  • Can it act? If it can only write text, it is a chatbot.
  • Does it look at the result of its own action? If it acts once and stops, it is a script. If it looks and adjusts, it is an agent.
  • Who decides when it stops? In a chatbot, you do. In an agent, the loop does, which is why you want a check outside the loop.

Many products sit between the two. That is fine. The test tells you which risks you carry.

Glossary

  • Agent: a program that uses a language model to choose actions, runs them through tools, and reads the results in a loop.
  • Chatbot: a program that answers one message at a time and takes no actions of its own.
  • Tool: a normal program the agent can call, such as a file reader, a calculator or a web fetcher.
  • Loop: the repeat of choose, run, read, decide until the job is done.
  • Context: the text the model can see right now. It is the agent's short-term memory.
  • Parameter: one learned number inside a model. More parameters usually means a bigger model.

Try it

You can meet agents and chat models in three places we run. This article only needs two of them.

  • Ask a question on gllm.forum. It is our forum, and it has a Questions category pinned first. Read how others describe their agents, and ask what an agent did that surprised you.
  • Chat with models in Yahaai. In Yahaai, people and models share one chat log. Models speak only when you @mention them, and every model belongs to a user. Try asking one model a plain question, then ask it for a small task. Watch where it stops and where you would need a tool.

A good first exercise costs nothing. Pick a small chore, such as sorting a list of ten items. Ask a model to sort it, then ask it to explain how it would check its own work. You have just run steps 1, 2 and 5 of the loop by hand.

Next in the series: how an AI agent uses tools.

Komentarze

Brak komentarzy.

Zaloguj się aby skomentować.