All lessons · 44
The one call: how every AI product actually works
ChatGPT, Claude, Gemini, coding agents, RAG, MCP — all of it is the same single action repeated: send text in, get the most likely continuation out.
One action, repeated forever
Why should you care? Because this is the whole trick, and nobody tells you. Every AI product you have used — the chat window, the coding agent, the “research” button, the thing that books your meeting — is doing one single thing, over and over:
You send a bunch of text. The model writes the most likely continuation. That’s one call. Then something (you, or a program) decides what text to send next, and the same call happens again.
That’s it. For the text path — the one this lesson is about — there is no second kind of action hiding underneath. Chat is this. Agents are this. Tools are this. RAG (answering from your documents) is this. The only things that ever change are how much text goes in and which text goes in. The action itself never changes.
The sentence to remember
One call: text in, continuation out. Everything else in AI is built on top of that one call — by changing what text you send.
What one call looks like
You make one call: you send a piece of text, and nothing else. What does the model actually do with it?
pick an answer — you get the explanation right away
You send:
- one long piece of text (everything the model is allowed to see right now — this is called the context), and
- the model returns the continuation it thinks is most likely.
The model does not look anything up while answering. It does not open your files and it does not browse the web. It reads the text you sent and writes what most plausibly comes next. If the answer needs a fact, that fact has to be in the text you sent — or the model will invent something that sounds right.
The chat window is a loop, not a memory
This is the part that surprises people: the model has no memory of you. It sees only the text that arrives in this call. If your app has a memory feature, those saved facts were added to that text by the app — not recalled by the model.
When you send a second message in a chat, the app does not “remind” the model of anything. It sends the whole conversation again — your first message, the model’s reply, your second message — as one bigger piece of text. The model reads it fresh, every time, and continues from the end.
That is why a long conversation gets slower and more expensive: every new message re-sends everything before it. And it is why the model can suddenly “forget” something from the start of a long chat — if the text got too long, the oldest parts are dropped or summarised, so from the model’s point of view they never happened.
Here it is, step by step. Each of the three messages you send is its own call — press send next and watch the panel beside the chat: 14 tokens go out the first time, 38 the second, 58 the third. Nothing is remembered in between; the whole pile is simply sent again every time.
So where do tools, agents and RAG come from?
The model can only ever do one thing: continue the text it was given. So what can tools, agents and RAG possibly change?
pick an answer — you get the explanation right away
They are not different mechanisms. They are ways of changing the text before the next call:
- Tools — the model writes text like “call the weather service for Kyiv”. Your program runs the real thing, takes the answer, pastes it back in as text, and calls the model again. The model only ever saw text.
- RAG (answering from your documents) — before the call, your program finds the relevant paragraphs in your files and copies them into the text it sends. The model just reads them like you would.
- Agents — a loop: call, read what came out, do something, paste the result in as text, call again — until the job is done or something stops it.
- MCP — a standard way to plug tools in, so the model’s “call this” text and your program’s answer have an agreed format.
Every one of those is still: text in, continuation out. What changed is only which text went in.
Why this makes you better at using AI
If the model only ever sees the text you send, then most bad answers are a text problem, not an intelligence problem: the instruction was vague, the fact wasn’t included, or the context was so long that the important part got squeezed out. Fix the text, and the answer usually fixes itself.
Try it: watch the loop
Ask any assistant to show you the raw shape of a request. It cannot show you the real request your app sends — it will reconstruct a plausible one — but that is still enough to make the “everything is text” idea concrete in about a minute:
I want to understand how you receive messages. Show me, as plain text, what a
request to you looks like: the messages array, the roles (system / user /
assistant), and where my current conversation sits. Then answer one question:
if I send one more message, what exactly gets sent again?Where to go next
- If you want the mechanism in more depth — next-token prediction, why answers vary, why confident nonsense happens — read How LLMs Actually Work.
- If you want to see the text that actually arrives — tokens, the context window, and the knobs that change the continuation — read Talking to a Model: Tokens, Context and Sampling.
- If you want the map of every way text gets into the model — prompts, tools, MCP, skills, RAG — read One Map to Rule Them All.
You send a second message in a chat. What does the app actually do?
An agent "uses a tool". What is really happening?
Which part changes between a chat message, a RAG answer, and an agent step?
Your long conversation suddenly "forgets" something from the beginning. The most likely cause?