Skip to main content

LLM vs. agent: what you're actually building

Module 1 · Lesson 2 · 7 min read

TL;DR

When you use claude.ai or Claude Code, you're using an agent — software that wraps a raw LLM with a conversation loop, memory, tools, and a system prompt. The API gives you only the raw model. This lab is about building the agent layer yourself, which is why the same model can feel so different depending on what's wrapped around it.

The idea

A raw LLM does one thing: text in, text out, with no memory of the last call (Lesson 1). That's powerful but bare. The polished experience you get from claude.ai or Claude Code isn't the raw model — it's an agent: a program that surrounds the model with everything it needs to feel helpful and stay on task.

The agent layer typically adds:

  • A conversation loop — it keeps calling the model and feeding results back.
  • Memory — it stores the conversation history and re-sends it each turn.
  • Tools — it lets the model search, run code, call APIs, read files.
  • A system prompt — a carefully written instruction set you never see.

claude.ai and Claude Code are agents. The API hands you only the inner box; you build the layer around it.

Analogy

The raw LLM is an engine. claude.ai is the whole car built around that engine — steering, dashboard, fuel system, safety features. The API ships you the engine on a pallet. Same horsepower; you're responsible for building the car.

Example: the same question, two ways

Ask the same question two ways and you'll notice the difference:

  • Through claude.ai (an agent): the answer is polished, remembers your last message, can search the web or run code, and follows house rules you never wrote. That refinement comes from the agent wrapped around the model.
  • Through the API (the raw model): you send messages, you get one completion back, and that's it. No memory, no tools, no hidden system prompt — unless you build them. The response can feel more "raw" precisely because nothing is steering it yet.
Side by side: a claude.ai chat thread that remembers earlier messages, next to a single raw API request and response with no memory.
Illustration: a chat app keeps the whole conversation and re-sends it; a raw API call is a single request and response.

Claude Code is another agent on top of the same kind of model. It can read your whole codebase, run shell commands, edit files, and stay coherent across a long task — not because the model is different, but because the agent around it feeds the model the right context and tools at each step.

Raw LLM (the API)Agent (claude.ai, Claude Code)
What you getOne response to one requestA full assistant experience
Memory of the chatNone — statelessYes — history is re-sent each turn
Tools (search, code, files)None by defaultBuilt in
System promptYou write it (or none)Crafted for you, hidden
Who builds the loopYou doAlready built

That last column is the whole point of this lab: you are going to build the agent layer, piece by piece, on top of a raw model.

Try it yourself

The demo below is about as close to a raw model call as it gets: one system message, one user message, one response — no memory, no tools. This is the bare material an agent is built from. Notice there's no "conversation" here, just a single request and reply.

Common mistake

People say "the LLM remembered what I said." It didn't — the agent did. The model is stateless; the app stores your history and re-sends it on the next call. You'll see exactly how that works (and what it costs) in the next two lessons.

Key takeaways

Key takeaways

  • claude.ai and Claude Code are agents built on top of a raw LLM.
  • The API gives you the raw model only — no memory, tools, or hidden prompt.
  • An agent = LLM + conversation loop + memory + tools + system prompt.
  • This lab is about building that agent layer yourself.
Go deeper: the simplest possible agent loop

Strip an agent down to its essence and it's a loop:

  1. Add the user's new message to the running history.
  2. Send the whole history (plus the system prompt and available tools) to the model.
  3. If the model asks to use a tool, run it and add the result to the history.
  4. Repeat step 2 until the model produces a final answer.
  5. Show that answer and wait for the next user message.

That's it. Everything fancy — multi-step reasoning, web search, code execution — is this loop with more tools and better prompts. By the end of this lab you'll have built every part of it.

Build this in AI Fluens Studio

Reading is step one. Open Studio and build a working agent end-to-end — every concept in this course is something you ship and run for real.

Open AI Fluens Studio