<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>AI Engineering on Yanmu</title>
        <link>https://AkuamT.github.io/en/tags/ai-engineering/</link>
        <description>Recent content in AI Engineering on Yanmu</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Mon, 25 May 2026 02:00:00 +0800</lastBuildDate><atom:link href="https://AkuamT.github.io/en/tags/ai-engineering/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>What Are Agent and Harness? — Video Notes</title>
            <link>https://AkuamT.github.io/en/p/what-are-agent-and-harness-video-notes/</link>
            <pubDate>Mon, 25 May 2026 02:00:00 +0800</pubDate>
            <guid>https://AkuamT.github.io/en/p/what-are-agent-and-harness-video-notes/</guid>
            <description>&lt;img src=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/cover.svg&#34; alt=&#34;Featured image of post What Are Agent and Harness? — Video Notes&#34; /&gt;&lt;h2 id=&#34;one-sentence-summary&#34;&gt;One-Sentence Summary&#xA;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;An Agent solves how AI gets work done; a Harness solves how AI does work reliably.&lt;/strong&gt; Together, they form the foundation of products like Claude Code, Codex, Open Cloud, and Qwen.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-from-chatgpt-to-ai-agent&#34;&gt;1. From ChatGPT to AI Agent&#xA;&lt;/h2&gt;&lt;h3 id=&#34;the-original-problem&#34;&gt;The Original Problem&#xA;&lt;/h3&gt;&lt;p&gt;Asking ChatGPT to create an animation with HTML + SVG (e.g., an Apple logo drawn with lines) often produces poor results — even in 2026, AI struggles with even a minimalist logo.&lt;/p&gt;&#xA;&lt;h3 id=&#34;manual-improvement&#34;&gt;Manual Improvement&#xA;&lt;/h3&gt;&lt;ol&gt;&#xA;&lt;li&gt;Search for Apple SVG assets on sites like iconfont&lt;/li&gt;&#xA;&lt;li&gt;Feed the SVG code to AI and ask it to recreate it&lt;/li&gt;&#xA;&lt;li&gt;Results improve significantly, but manually finding assets every time is tedious&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;automated-improvement--wrapper-sites-earliest-agent-prototype&#34;&gt;Automated Improvement — Wrapper Sites (Earliest Agent Prototype)&#xA;&lt;/h3&gt;&lt;p&gt;Build a website that wraps ChatGPT via API calls, adding backend functions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;User submits request&lt;/strong&gt; → The site tells AI: &amp;ldquo;Here&amp;rsquo;s the user&amp;rsquo;s prompt. I also have a logo search function you can call when needed.&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;AI analyzes&lt;/strong&gt; → Determines it needs an Apple logo, responds: &amp;ldquo;Call the asset search tool with parameter: Apple logo&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Site executes&lt;/strong&gt; → Backend runs the search function and finds SVG assets&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Final generation&lt;/strong&gt; → The site sends assets + user prompt to AI to complete the animation&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;441px&#34; data-flex-grow=&#34;183&#34; height=&#34;620&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525212936.png&#34; srcset=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525212936_hu_9bf2d3cef97bc770.png 800w, https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525212936.png 1140w&#34; width=&#34;1140&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;2-two-core-working-modes-of-agent&#34;&gt;2. Two Core Working Modes of Agent&#xA;&lt;/h2&gt;&lt;h3 id=&#34;1-react-reasoning--acting--step-by-step&#34;&gt;1. ReAct (Reasoning + Acting) — Step by Step&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Three-step loop:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Think&lt;/strong&gt;: AI analyzes the request, determines what&amp;rsquo;s needed and which tool to call&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Act&lt;/strong&gt;: AI tells the backend to call a tool (e.g., search for assets)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Observe&lt;/strong&gt;: Backend returns results; AI sees them and continues&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The loop repeats: Think → Act → Observe, until the task is complete.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This is the most fundamental working pattern of almost all AI Agents, including Claude Code, Codex, and Open Cloud.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;2-plan--execute--plan-first-then-execute&#34;&gt;2. Plan &amp;amp; Execute — Plan First, Then Execute&#xA;&lt;/h3&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Plan first&lt;/strong&gt;: Generate a work list / step sequence upon receiving the task&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Execute&lt;/strong&gt;: Follow the checklist step by step&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Mode&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Analogy&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Characteristic&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;ReAct&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Improvise as you go&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Flexible, adjust on the fly&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Plan &amp;amp; Execute&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Research before traveling&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Structured, suited for complex tasks&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;Real agents &lt;strong&gt;combine both&lt;/strong&gt;. For example, Qwen&amp;rsquo;s &amp;ldquo;Task Assistant&amp;rdquo; mode: first analyzes requirements and creates steps (Plan), then proactively searches, writes code, and adjusts (Act).&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;312px&#34; data-flex-grow=&#34;130&#34; height=&#34;893&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213008.png&#34; srcset=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213008_hu_8abcc76a1376ff26.png 800w, https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213008.png 1162w&#34; width=&#34;1162&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;3-advanced-agent-capabilities&#34;&gt;3. Advanced Agent Capabilities&#xA;&lt;/h2&gt;&lt;h3 id=&#34;tool-calling--function-calling&#34;&gt;Tool Calling / Function Calling&#xA;&lt;/h3&gt;&lt;p&gt;The Agent determines which tools to call based on the user prompt; the backend executes them and returns results.&lt;/p&gt;&#xA;&lt;h3 id=&#34;context-management-and-compression&#34;&gt;Context Management and Compression&#xA;&lt;/h3&gt;&lt;ul&gt;&#xA;&lt;li&gt;Large models have no memory — each conversation starts fresh&lt;/li&gt;&#xA;&lt;li&gt;The Agent must send the &lt;strong&gt;entire conversation history&lt;/strong&gt; to the AI each time, which grows longer over time&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Context window&lt;/strong&gt; = AI&amp;rsquo;s workspace, limited in size&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Context compression&lt;/strong&gt;: When the conversation exceeds the window, earlier content is summarized into a condensed version&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Trade-off: compression loses information, potentially causing the AI to forget previous instructions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;multi-agent-collaboration&#34;&gt;Multi-Agent Collaboration&#xA;&lt;/h3&gt;&lt;p&gt;One AI acts as the &lt;strong&gt;project manager&lt;/strong&gt; (understanding requirements, breaking down tasks, assigning work), while other AIs execute subtasks.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Each sub-AI has its own independent context window&lt;/li&gt;&#xA;&lt;li&gt;The project manager only sees final results, not intermediate steps&lt;/li&gt;&#xA;&lt;li&gt;Improves efficiency while mitigating context explosion&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;299px&#34; data-flex-grow=&#34;124&#34; height=&#34;941&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213022.png&#34; srcset=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213022_hu_3c2b8ba52f2ca08d.png 800w, https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213022.png 1173w&#34; width=&#34;1173&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;4-harness--the-safety-net-for-reliable-ai&#34;&gt;4. Harness — The Safety Net for Reliable AI&#xA;&lt;/h2&gt;&lt;p&gt;When Agents run in production, they encounter various issues that need a Harness to solve.&lt;/p&gt;&#xA;&lt;h3 id=&#34;engineering-checkpoints-in-a-harness&#34;&gt;Engineering Checkpoints in a Harness&#xA;&lt;/h3&gt;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Checkpoint&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Problem&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;Solution&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;Format Sanitization&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;AI adds &amp;ldquo;okay&amp;rdquo;, markdown code blocks, or extra newlines when returning JSON&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Clean: remove fluff, wrapping symbols, extra newlines; send errors back for regeneration if still failing&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;Parameter Validation&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Tool call parameters are invalid (e.g., city field contains a non-city name)&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Validate format/range before calling; reject and request refill if invalid&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;Input Filtering&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Prompt injection attacks (&amp;ldquo;ignore all previous instructions&amp;rdquo;) / malicious SVG uploads&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Scan user input for suspicious instructions and asset safety before processing&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;Output Filtering&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;AI-generated content may contain malicious code&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Scan output content for threats&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;Hard-Coded Validation&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;AI repeatedly makes the same error (e.g., always using pure white backgrounds)&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;Enforce with code: auto-detect SVG background color and replace white with dark&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;396px&#34; data-flex-grow=&#34;165&#34; height=&#34;703&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213039.png&#34; srcset=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213039_hu_3ed75d1f97918308.png 800w, https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213039.png 1160w&#34; width=&#34;1160&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;core-principle-of-harness-engineering&#34;&gt;Core Principle of Harness Engineering&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;If you can enforce it with code, never rely on prompting alone.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;5-complete-architecture-summary&#34;&gt;5. Complete Architecture Summary&#xA;&lt;/h2&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;330px&#34; data-flex-grow=&#34;137&#34; height=&#34;810&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213102.png&#34; srcset=&#34;https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213102_hu_23b88fc6c4151d43.png 800w, https://AkuamT.github.io/p/agent-%E5%92%8C-harness-%E5%88%B0%E5%BA%95%E6%98%AF%E4%BB%80%E4%B9%88-%E8%A7%86%E9%A2%91%E7%AC%94%E8%AE%B0%E6%95%B4%E7%90%86/images/Pasted-image-20260525213102.png 1115w&#34; width=&#34;1115&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;one-sentence-to-elevate&#34;&gt;One Sentence to Elevate&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Agent is the horse; Harness is the tack.&lt;/strong&gt; A horse without tack runs into problems; tack without a horse does nothing. Together, they transform AI from a chat-only chatbot into a worker that gets things done in the real world.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;</description>
        </item></channel>
</rss>
