<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>Ju Lin's AI Weblog: Explainer</title><subtitle>An independent research notebook on AI engineering, agents, models and the systems around them.</subtitle><id>https://julin.ai/atom/tags/explainer/index.xml</id><link rel="self" type="application/atom+xml" href="https://julin.ai/atom/tags/explainer/index.xml"/><link rel="alternate" type="text/html" href="https://julin.ai/tags/explainer/"/><author><name>Ju Lin</name></author><updated>2026-08-26T00:00:00+12:00</updated><entry><title>What Is an Agent Harness?</title><id>https://julin.ai/2026/08/26/agent-harness/</id><link rel="alternate" type="text/html" href="https://julin.ai/2026/08/26/agent-harness/"/><published>2026-08-26T00:00:00+12:00</published><updated>2026-08-26T00:00:00+12:00</updated><category term="explainer"/><category term="agents"/><content type="html">&lt;p&gt;An oversimplified equation: &lt;strong&gt;agent harness = ai agent − model.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="overview"&gt;Overview&lt;/h3&gt;
&lt;p&gt;&lt;img src="/2026/08/26/agent-harness/diagram-equation.svg" alt="AI Agent minus Model equals Harness."&gt;&lt;/p&gt;
&lt;p&gt;An agent harness is everything in an AI agent besides the model — everything outside the LLM inference call. It&amp;rsquo;s a piece of software that provides an environment for the LLM to observe and take actions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The agent harness has a &lt;strong&gt;system prompt&lt;/strong&gt; that defines the LLM&amp;rsquo;s basic behavior and controls how it puts out tokens.&lt;/li&gt;
&lt;li&gt;The agent harness includes a set of &lt;strong&gt;tools&lt;/strong&gt; that the LLM can call.&lt;/li&gt;
&lt;li&gt;The agent harness interacts with the LLM to get tokens back.&lt;/li&gt;
&lt;li&gt;The agent harness interleaves LLM outputs and tool calls, typically called the &lt;strong&gt;agent loop&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="the-system-prompt"&gt;The system prompt&lt;/h3&gt;
&lt;p&gt;&lt;img src="/2026/08/26/agent-harness/diagram-sequence.svg" alt="Sequence diagram: the harness sends the system prompt, then the user message, and the LLM sends tokens back."&gt;&lt;/p&gt;
&lt;p&gt;Before the user&amp;rsquo;s message arrives, the harness sends the model a fixed set of instructions: the &lt;strong&gt;system prompt.&lt;/strong&gt; It sets the model&amp;rsquo;s baseline behavior and constrains how it generates tokens.&lt;/p&gt;
&lt;h3 id="tools"&gt;Tools&lt;/h3&gt;
&lt;p&gt;&lt;img src="/2026/08/26/agent-harness/diagram-tools.svg" alt="An LLM connected to four labeled tool boxes: read file, run command, search web, send email."&gt;&lt;/p&gt;
&lt;p&gt;The harness also defines a set of &lt;strong&gt;tools&lt;/strong&gt; the model can invoke: named actions, each with a description of what it does and how to call it. The model doesn&amp;rsquo;t execute these actions itself — it only requests them.&lt;/p&gt;
&lt;h3 id="the-model-call"&gt;The model call&lt;/h3&gt;
&lt;p&gt;&lt;img src="/2026/08/26/agent-harness/diagram-call.svg" alt="The harness sends a prompt to the LLM and receives tokens back."&gt;&lt;/p&gt;
&lt;p&gt;The harness communicates with the model through a single interface: it sends a prompt and gets tokens back. That call is the only boundary between the harness and the model.&lt;/p&gt;
&lt;h3 id="the-agent-loop"&gt;The agent loop&lt;/h3&gt;
&lt;p&gt;&lt;img src="/2026/08/26/agent-harness/diagram-loop.svg" alt="LLM sends tokens to the harness, the harness runs a tool and sends the result back, or stops with an answer."&gt;&lt;/p&gt;
&lt;p&gt;The harness inspects the returned tokens for a tool call. If one is present, it executes the tool, appends the result to the context, and calls the model again. If not, it returns the output as the final answer. This send-inspect-act cycle is the &lt;strong&gt;agent loop.&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="further-reading"&gt;Further reading&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://earendil.com/posts/what-is-a-harness/"&gt;What is a Harness?&lt;/a&gt; — Earendil&lt;/li&gt;
&lt;li&gt;&lt;a href="https://learn.microsoft.com/en-us/agent-framework/concepts/harness"&gt;Agent Harness&lt;/a&gt; — Microsoft Learn, Agent Framework docs&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.langchain.com/blog/the-anatomy-of-an-agent-harness"&gt;The Anatomy of an Agent Harness&lt;/a&gt; — Vivek Trivedy, LangChain&lt;/li&gt;
&lt;/ul&gt;</content></entry><entry><title>Four Ways to Teach an AI to Draw a Cat</title><id>https://julin.ai/2026/08/24/four-ways-to-teach-ai-eli5/</id><link rel="alternate" type="text/html" href="https://julin.ai/2026/08/24/four-ways-to-teach-ai-eli5/"/><published>2026-08-24T00:00:00+12:00</published><updated>2026-08-24T00:00:00+12:00</updated><category term="explainer"/><category term="training"/><summary>A visual explainer comparing SFT, DPO, RL, and on-policy distillation through the analogy of teaching someone to draw a cat.</summary></entry><entry><title>Neural Network, Explained in Plain Language</title><id>https://julin.ai/2026/08/23/neural-network-eli5/</id><link rel="alternate" type="text/html" href="https://julin.ai/2026/08/23/neural-network-eli5/"/><published>2026-08-23T00:00:00+12:00</published><updated>2026-08-23T00:00:00+12:00</updated><category term="explainer"/><summary>A six-part visual explainer of how a neural network learns, with animated diagrams for every step.</summary></entry><entry><title>Evals, Explained in Plain Language</title><id>https://julin.ai/2026/08/23/evals-eli5/</id><link rel="alternate" type="text/html" href="https://julin.ai/2026/08/23/evals-eli5/"/><published>2026-08-23T00:00:00+12:00</published><updated>2026-08-23T00:00:00+12:00</updated><category term="explainer"/><summary>A visual explainer of how you actually know an AI system got better — not by feel, but by testing and scoring it.</summary></entry><entry><title>Next Token Prediction, Explained in Plain Language</title><id>https://julin.ai/2026/08/22/next-token-prediction-eli5/</id><link rel="alternate" type="text/html" href="https://julin.ai/2026/08/22/next-token-prediction-eli5/"/><published>2026-08-22T00:00:00+12:00</published><updated>2026-08-22T00:00:00+12:00</updated><category term="explainer"/><summary>A visual explainer of how a language model writes text one small piece at a time.</summary></entry></feed>