Modern Agent Anatomy
This is the third of three articles on terminology with agents.
- Agent is a Terribly Non-Specific Term
- The "Hello World" of Agent Development
- Modern Agent Anatomy (this article)
Before naming the parts, I like to think about what boxes I would put on the whiteboard. If I wanted to just point at what I'm talking about, where does it sit in space? Relative to the other pieces of the agent stack: all the pieces for an LLM to be used as an agent.
One turn, in motion
The stack is useful for naming static boundaries. A prompt turn is easier to understand when those boundaries move: the harness assembles context, asks the model what to do, executes any requested tools, reduces their results into the next context, and repeats until the model returns a final response instead of another tool call.
The following diagram holds one example turn constant: change one line in a
crate README. The harness loads its initial context, calls grep, calls edit,
then returns a final response. The stack view shows ownership, the sequence view
shows component messages, and the ledger shows the context accumulated for each
later evaluation. A shared phase rail keeps all three views synchronized.
Prompt turn · synchronized plate
One prompt turn, three synchronized views
The same request moves through stack ownership, message sequence, and accumulated context. The shared phase rail keeps all three readings aligned.
Stack traversal
The harness coordinates every round trip between interface, context, model API, and tools.
Message sequence
The model is evaluated three times around two tool calls and their results.
Context ledger
Seven typed history entries accumulate into the context used by later evaluations.
- Interface → Harness: prompt
- Harness → Context: load repo context
- Context → Harness: context loaded
- Harness → Model API: evaluate 1
- Model API → Harness: tool: grep README
- Harness → Tools: grep README
- Tools → Context: read README
- Context → Tools: README contents
- Tools → Harness: grep result
- Harness → Model API: evaluate 2
- Model API → Harness: tool: edit README
- Harness → Tools: edit README
- Tools → Context: write one line
- Context → Tools: edit applied
- Tools → Harness: edit result
- Harness → Model API: evaluate 3
- Model API → Harness: final response
- Harness → Interface: return response
Notes that are critical to elucidate the agent stack:
- the three tiers of the harness (RETL, orchestrator, user customizations)
- the RETL itself (the following or preceeding blog post)
- orchestrator around the RETL (goal commands, multi agents, approval modes, etc)
- Martin Fowler, the "inner harness"
- then the "outer harness" from user (scripts used for hooks, custom tool definitions, skills, repo context)
- how "harness engineering" blog post coined that term for specifically the outer loop
- where do multi agent orchestrators fit? where do cloud runtimes fit?
