Agent Basics
Core concepts, the agent loop, foundations for newcomers.
24 posts · showing 11–20
-
Prompt Engineering Was the Beginning, Not the Skill
It got named as a discipline when the prompt was the entire interface. It's now one input among several — and if better prompts have stopped helping, five specific things are usually why.
-
What a Harness Actually Is, and Why It's the Real Product
A model takes messages and returns tool calls. Everything else is the harness — and it explains almost all the variance between agent systems that share the same model.
-
Why Turn 20 Costs More Than Turn 2
A six-turn run whose final context is 12,000 tokens sends 42,000. That gap is agent economics — and it makes an early oversized tool result the most expensive thing in your run.
-
Your First Agent: Build the Smallest Useful One
Three read-only tools, sixty lines of loop, and the raw array printed every turn. Then break it on purpose — a failing tool teaches more in five minutes than a week of building the complicated version.
-
Few-Shot Examples: When They Help an Agent and When They Hurt
Two or three similar examples is the worst case — enough to teach a template, not enough to convey the range. And the example nobody includes is the one where the right answer is to decline.
-
Tool Calls or Structured Output? Two Mechanisms, Two Jobs
Both emit schema-conforming JSON, which makes them look interchangeable. One expects a result back and one ends the turn — and that single difference decides every other question.
-
What a System Prompt Should and Shouldn't Contain
Five things belong in a system prompt. Most of what accumulates there — tool instructions, deterministic rules, incident patches, data — belongs somewhere it would actually work.
-
Why Two Identical Runs Give Different Answers
Same input, different result. Four things cause it, only one is a bug — and the most common culprit is that the input wasn't actually identical.
-
Format Tool Output for a Model, Not for a Log File
A bare empty array means "none exist" and "we couldn't check" at the same time, and the agent will pick the confident reading. Six changes to what your handlers return, in order of payoff.
-
Chatbot, Workflow, or Agent? Pick the Simplest Thing That Works
Six weeks building an agent for a task with three fixed steps. One question — can you draw the flowchart before seeing the input? — separates the three architectures and saves most of that time.