The fundamentals
An intro on how AI works, what an agent & harness is, why we build different models, and general foundational knowledge.
Why is this important?
I've personally found that having a great understanding of the relational structure between LLM’s, models and agents paved the way for me to start understanding how to actually operate & leverage said tools.
Don't worry if it's your first time hearing any of these terms!
Think of LLM's, Models and Agents as layers of the human body. Each are closely builds on top of the functionality of the previous one. The LLM is the neurons (they think), the model is the brain (it reasons), and the agent is the body (it actually goes and does things).
LLM
The raw brain, trained to predict the next word.
AI and LLM's
Artificial intelligence isn't really intelligent.
What we assume to be "intelligence", or "capacity to reason" is really just an algorithm thats really good at guessing text from patterns they've already seen.
The algorithms making these predictions are called Large Language Models (LLM's). They can “predict text” by identifying recurrent patterns on the internet, books, and other sources of information.
Prediction is not a new concept -- in fact -- you definitely see it every day. Examples include Gmail's auto complete or Google suggested search.
LLM’s just do said predication on a much more massive and complicated scale.
However, what's important to understand is that predictions can be really opinionated. What might be considered a relevant prediction in one context could be wrong in another. (ie: the word "apple'"predicts 'pie' in a cookbook and 'iPhone' in a tech blog.")
To calibrate their predictions, LLM's use these things called weights: multipliers that mathematically bias their predictions.
All the big frontier labs have their own LLM's, which vary in their capabilities. For example, OpenAI has ChatGPT. Anthropic has Claude. Google has Gemini.
Since these are all closed weightClosed weight means the company keeps the model's weights private: you can only use it through their app or API. Open weight models (like Llama) publish the weights, so anyone can download and run them. models, each of these LLM's have different weights and thus, different things they excel at. Claude is generally better at coding, ChatGPT is considered better at writing.
Models
Changing a LLM's weights impacts its cost, ability to reason, and overall performance. More weights means yeah, it’s “smarter”, but also more expensive and slower.
Wouldn't I just want one universally smart LLM with a ton of weights?
Upgrading your flagship LLM each time with more weights would be a disaster. Users would be forced to use super expensive LLM’s for everything from the most primitive tasks to the most complicated. This would be hugely inefficient and expensive since ai use cases vary so much.
Instead, companies release snapshots of LLM’s with different weights, called models. Anthropic’s LLM is Claude, but their models are Haiku, Sonnet, Opus and Fable. Concurrently, each model’s weights are fine tuned to specific tasks. (For example, I would use Haiku for triaging, Opus for coding, Sonnet for writing, and Fable for planning.)
A good analogy I like to think of is Minecraft snapshots. If I like rod and sword PVP, I’ll play version 1.8. If I like crystal PVP and maces, I’ll play on version 1.21.
It's imperative to understand the difference between models so you can better partition out tasks. It’s overkill to use such a powerful model for primitive tasks.
Haiku 4.5- Triaging, quick fixes, anything small and well-defined
Sonnet 5- Writing copy and drafts, everyday work
Opus 5- Coding: building features, long multi-step tasks
Fable 5.1- Planning, ambiguous problems, storyboards into animation
Another important thing to understand is that more powerful models have a higher hallucination rate. When I researched benchmarks a few weeks ago, all the top models (Sol 5.6, Fable etc...) shared around a 30% hallucination rate.
Hallucination rate refers to the percentage of times that a model makes something up when it’s pressed about information it doesn’t know. Obviously, the more ambiguous the task, and the more weights an agent has configured, the higher the chance of this happening.
So, being able to understand models, as well as the task you’re partitioning to it is really important. Understanding when to use a powerful model like Fable to plan, vs a cheaper model like Haiku to fix small things is really important for creating high leverage workflows.
Tokens
To actually do stuff and remember things, models use Tokens. Tokens are like a unit of memory. Every action — a line of code, a file searched, a reply written — costs tokens. You can think of them like an energy system for agents.
Every token spent costs money, which is why companies like Anthropic or OpenAI put usage limits on their plans. If you're calling an API which uses an agent, you'll likely be on a pay-per-use plan, where tokens are consumed as you use them.
It's much cheaper to buy an AI subscription (Claude Pro, ChatGPT Pro). You get a lot more usage out of plans relative to the amount spent compared to pay-per-use.
Concurrently, it’s also really expensive to run some of these actions, because they take more tokens. IE planning, designing, anything more ambitious requires more tokens to use. Obviously, for the average person just looking to change a line of code, or do something pretty straight forward, you dont need to make these super complicated and expensive calls.
Agents & Harnesses
On their own, models can't really do much. All they do is listen and then spit out text responses. Obviously, this is not very useful. To extend a model's capabilities, we give it a "harness".
A harness is like giving your brain a body. It gives your model the ability to do things, like read files, run commands, browse the web etc. Giving your model a harness turns it into an agent.
Every time you open a new chat, you're creating a new agent. When you ask Claude (a model) to summarize your emails, it's using a harness to call tools which allow it to read your emails. When you get it to change your code, similarly, its calling tools to both read and write to your codebase.
Pretty cool right?
So when I say "I have 3 agents running", I just have 3 sessions of like Claude working at once.
Is it good to have more agents running at once? Not necessarily, but to understand why, I really recommend you read the next chapter on context.
Subagents
Sometimes it’s more efficient to split a big task into smaller ones that several agents can work on at the same time. (Divide and conquer).
Say you ask for a report on ten competitors: instead of one agent reading ten websites back to back, it can hand one competitor to each of ten agents, let them all work at once, and stitch their summaries into a single report.
Now, spinning up 10 agents across 10 different windows is kinda annoying and hard to manage. Instead we spin up multiple agents within a singular session. These are called subagents.
Some models such as Fable, are very smart, and have the capacity to recognize when a task is too big for it to complete on its own; so they call their own agents and split the task amongst them.
/code-review ultra
Release a swarm of subagents to hunt for bugs.
These are called orchestrator models (which I’ll talk more about later). You don’t need to worry too much about spinning up subagents, since agents are generally smart enough to understand when they should do this.
That being said, more agents, and more subagents does not linearly equate to better results. A really big thing about using AI & agents effectively is the ability to understand and practice restraint.
Regulating restraint and getting good results is really just a matter of understanding context, which is a supremely important topic that I talk about in the next chapter.