TL;DR

Năm 2026, mọi người đều build agent. Ít người biết rằng thứ quyết định agent thành công hay thất bại không phải model - mà là harness. "Agent = Model + Harness. If you're not the model, you're the harness." Avi Chawla vừa publish bài phân tích viral về anatomy của agent harness, và đây là những gì bạn cần biết.

Harness là gì - và tại sao nó quan trọng hơn bạn nghĩ

Khi developer nói "tôi đã build một agent", thực ra họ đang nói "tôi đã build một harness và trỏ nó vào một model." Harness là tất cả những gì không phải model: orchestration loop, tools, memory, context management, state persistence, error handling, guardrails.

Addy Osmani tóm gọn: "A decent model with a great harness beats a great model with a bad harness."

Bằng chứng cụ thể: LangChain thay đổi chỉ harness architecture — không đổi model — và nhảy từ ngoài top 30 lên rank 5 trên TerminalBench 2.0. Claude Code được rebuild 5 lần trong 6 tháng, mỗi lần rewrite loại bỏ bớt complexity. Một công ty xóa 80% tools có sẵn trong harness, hiệu suất agent tăng rõ rệt.

Ba tầng engineering - bạn đang ở tầng nào?

Xung quanh LLM có 3 tầng concentric:

  • Prompt engineering - craft instructions model nhận. Đây là tầng hầu hết mọi người biết.

  • Context engineering - quản lý what model sees & when. Ít người thực sự làm tốt.

  • Harness engineering - toàn bộ application infrastructure: orchestration, state persistence, error recovery, safety enforcement, lifecycle management. Đây là nơi quyết định.

Harness engineering bao gồm cả hai tầng trên. Nhiều team nghĩ prompt tốt là đủ, bỏ qua entire infrastructure layer này.

11 component của production agent harness

Avi Chawla liệt kê 11 component mà mọi production harness cần có:

  1. Orchestration Loop - chu kỳ Thought-Action-Observation (ReAct loop) điều phối toàn bộ execution

  2. Tools - tay của agent, định nghĩa qua schemas và registered capabilities

  3. Memory - multi-timescale: session-based & persistent

  4. Context Management - ngăn performance degradation qua compaction & selective loading

  5. Prompt Construction - hierarchical assembly của system prompts, tools, memory, history

  6. Output Parsing - convert model responses thành structured tool calls

  7. State Management - track progress qua checkpoints & resumable boundaries

  8. Error Handling - phân biệt transient failures vs unrecoverable errors

  9. Guardrails - 3-layer safety: input, output, tool-level

  10. Verification Loops - test kết quả qua rules, visual feedback, hoặc independent evaluation

  11. Subagent Orchestration - delegate complex tasks cho specialized agents

Những pattern quan trọng nhất

Ratchet Pattern: Mỗi failure của agent trở thành một permanent rule. "Every line in a good AGENTS.md should be traceable back to a specific thing that went wrong." Đây là cách harness tự cải thiện theo thời gian — không bao giờ mắc cùng một lỗi hai lần.

Ralph Loop: Agent duy trì context qua nhiều context windows bằng cách reinject prompts vào fresh context trong khi giữ nguyên filesystem state. Giải pháp thực tế cho context limit problem.

Context rot prevention: Compaction, tool output offloading, skills injection — ba kỹ thuật chống degradation khi context window đầy dần.

Tool minimalism: Ít tools hơn thường tốt hơn. Một công ty xóa 80% tools & hiệu suất tăng — model tập trung hơn khi không bị overloaded với options.

Thực tế 2026: Ngành đang converge

Dữ liệu thị trường cho thấy agent harness đang trở thành trung tâm:

  • Gartner dự báo 40% enterprise apps sẽ có task-specific AI agent vào cuối 2026

  • CrewAI đạt 45,900+ GitHub stars - framework adoption cao nhất nhóm role-based orchestration

  • LangGraph đạt 87% task success rate trong benchmark so sánh

  • 80% thời gian triển khai agentic AI bị tiêu tốn vào data engineering, không phải chọn framework

Điểm đáng chú ý: các coding agent top tier ngày càng giống nhau về harness patterns, bất kể model nền tảng. Ngành đang identify universal load-bearing components biến generative model thành reliable system.

Xu hướng tương lai: Harness mỏng đi, model mạnh lên

Khi model capability tăng, harness complexity nên giảm - không phải tăng. Claude Code rebuilt 5 lần/6 tháng, mỗi lần remove complexity là bằng chứng cho xu hướng này.

Tương tự như prompt engineering vẫn còn giá trị dù model tốt hơn nhiều, harness engineering sẽ không biến mất - nhưng sẽ trở nên gọn hơn, elegant hơn. Team nào master harness engineering sớm sẽ có lợi thế bền vững.

Via: Daily Dose of Data Science - Avi Chawla, LangChain Blog, Addy Osmani, Atlan.