ตัวอย่างบทเรียน

What an AI Agent Harness Is Made Of: Instructions, Tools, Environment, State, Feedback Loops

Five harness engineering subsystems: instructions (AGENTS.md), tools, environment, state and feedback loops. Rollout order, ablation testing of each component's value at a fixed model, and the flow diagram between subsystems.

the five harness subsystems ablation measurement adoption curve
คุณจะเรียนรู้อะไรในบทเรียนนี้
  • Break your harness down into its five subsystems and identify which one is missing.
  • Learn to measure the contribution of a specific component using an ablation experiment rather than by eye.
  • Draw up a prioritised implementation plan based on the returns curve.

จุดเริ่มต้นของบทเรียน

'Just write a longer prompt'

  • The team spends a week writing a five-page AGENTS.md
  • The agent still won't run the tests by itself
  • Every session starts with fixing the environment
  • It looks like the model's fault — but it isn't

The team decides: since the agent keeps getting things wrong, everything needs describing in more detail — so they spend a week writing a five-page instruction document, listing libraries, tone of voice and the tech lead's favourite patterns. The agent reads it once, and still doesn't run the linter before committing — because it physically can't run the linter: it has no shell access with the right permissions. The problem isn't the length of the prompt. The problem is that instructions are only one of the five subsystems of a harness, and if the other four aren't in place, no amount of text will save you.

Myth: a harness = a prompt file

  • 🤔 Myth / Common confusion: 'I've got a harness' = 'I've got a prompt file'
  • ✅ In reality: a harness is five distinct subsystems, and instructions are just one of them
  • 📌 Remember: a shelf full of recipes is not yet a kitchen

The phrase 'I've got a harness' almost always means 'I've got a prompt file' — an AGENTS.md or a CLAUDE.md of some kind. But that isn't a harness, any more than a fridge full of ingredients is a restaurant. You've got the ingredients, but there's no stove, no knives, no way to taste-check a dish, and no quality-control system. A proper harness is five working parts, and missing any one of them doesn't make things 'a bit worse' — it creates its own distinct, predictable class of failures that will repeat again and again.

A kitchen with five stations

  • A harness = five subsystems working together
  • A missing part isn't 'slightly worse' — it's a systematic failure
  • Next up: one station of this kitchen at a time

Take away just one station from a professional kitchen, and it either never opens or ends up feeding customers on a wing and a prayer. A kitchen has five stations: the recipe shelf, the knife station, the stove, the prep counter, and the pass where quality control happens. It's exactly the same with a harness: instructions, tools, environment, state and feedback only work together, and a weak station can't be made up for by a strong one.

บทเรียนฉบับเต็มใช้ได้เมื่อสมัครสมาชิก

ฉบับเต็มมีสไลด์เพิ่มอีก 19 สไลด์

วิดีโอ สไลด์ทั้งหมด โน้ต แบบทดสอบ AI ติวเตอร์ และการสัมภาษณ์จะเปิดหลังเข้าสู่ระบบและสมัครสมาชิก

เข้าสู่ระบบหรือลงทะเบียน สมัครสมาชิก

เนื้อหาบทเรียน

  1. 'Just write a longer prompt'
  2. Myth: a harness = a prompt file
  3. A kitchen with five stations
  4. Stations 1–2: instructions and tools
  5. Stations 3–4: environment and state
  6. Station 5: feedback — the pass
  7. Where to start: 5 → 1 → 4 → 3 → 2
  8. ❓ Quick check: which station is your weakest?
  9. 💡 Diagnosis: how to tell what's broken
  10. Why different teams all follow the same path
  11. 🛠 What this looks like in real teams
  12. How to measure a component's value
  13. A zero drop ≠ 'the component is useless'
  14. Ablation pitfalls: it's not the place to start
  15. Constrain, don't micromanage
  16. A map, not a textbook
  17. Your harness rots just like code
  18. Where an agent's work leaks when one link breaks
  19. Read the diagram as a loop, not a list
  20. 30 minutes on the weakest station of your harness
  21. Next up: your first AGENTS.md for a payments backend
  22. A harness is a loop, not a file

บทความเกี่ยวกับบทเรียนนี้

บทเรียนทั้งหมดในคอร์สนี้

  1. What Is Harness Engineering? Why AI Coding Agents Fail Because of the Environment
  2. Error Accumulation in AI Agents: Why 95% Per-Step Accuracy Fails by Step 10
  3. AI Agent Reliability Metrics: MTBF, MTTR, Blast Radius and Little's Law
  4. Why AI Agents Fail in Production: Five Failure Layers and a Diagnostic Loop
  5. What an AI Agent Harness Is Made Of: Instructions, Tools, Environment, State, Feedback Loops
  6. Repository Map for AI Coding Agents: Project Structure and State Without Memory
  7. AGENTS.md Best Practices: Why a Giant Instructions File Fails and How to Build a Router
  8. AI Agent Memory Between Sessions: Session Handoff, PROGRESS.md and Bootstrap Contract
  9. feature_list.json for AI Agents: WIP=1, Feature Status and verify.sh Verification
  10. Agent Says 'Done' but the Feature Is Broken: Verification Gap and Definition of Done
  11. All Tests Pass, Feature Is Broken: E2E Tests and Architecture Rules for AI Agents
  12. AI Agent Observability: Sprint Contracts, Evaluator Rubrics and Clean Session Exit
  13. Autonomous AI Coding Agent for Hours: Loop Engineering and Stop Conditions
  14. Graph Engineering for AI Agents: When a Single Loop Is Not Enough and You Need a Task Graph
  15. Building an AI Agent Harness From Scratch: AGENTS.md, feature_list.json, verify.sh and an Autonomous Loop