الدليل الفني

وكيل السقالات والأحزمة

An agent harness, or scaffold, is the code around a language model that turns it into an agent: it runs the loop of calling the model, executing the tools it requests, feeding results back, and deciding when to stop.

  • قراءة لمدة 3 دقائق
  • آخر تحديث
في هذه الصفحةقراءة لمدة 3 دقائق
  1. نظرة عامة
  2. الغوص العميق
  3. التأثير الاستراتيجي
  4. The Future of Agent Scaffolding and Harnesses
  5. التنفيذ في العالم الحقيقي
  6. المخاطر والدرابزين
  7. خارطة طريق التنفيذ
  8. استمر في الاستكشاف
  9. الأسئلة المتداولة

نظرة عامة

It matters because the harness strongly shapes results, so the same model can score very differently on the same benchmark depending on how its tools, context and error handling are designed.

الغوص العميق

A language model on its own produces text. An agent needs a program that repeatedly asks the model what to do, performs the action, and shows the model what happened. That program is the harness. Its core parts are the loop, tool definitions, tool dispatch, context management, stopping rules and error handling. The loop sends the conversation so far to the model. If the model requests a tool, the harness validates the arguments, runs the tool, and appends the result. If the model gives a final answer, the loop ends. Stopping rules add limits: a maximum number of steps, a token or cost budget, a timeout, or a check such as tests passing. Tool design has large effects. The SWE-agent project from Princeton researchers, published in 2024, argued that agents need an agent-computer interface designed for models, with concise file viewers, search commands and immediate feedback on bad edits, and showed this improved results over giving the model a plain shell. Output formatting matters too: truncating huge outputs, summarising errors clearly and returning structured results help the model act correctly. Context management decides what the model sees as the history grows: keeping recent steps, summarising older ones, or storing notes in files. Error handling decides whether a failed tool call crashes the run or is returned to the model as information it can react to. This is why benchmark numbers need context. On coding benchmarks such as SWE-bench, reported scores for one model vary across scaffolds, retry policies and step limits. A common misconception is that a leaderboard number measures the model alone; it measures the model plus harness plus settings. Products such as command-line coding agents are, in large part, carefully engineered harnesses around a model.

التأثير الاستراتيجي

التكلفة والميزانية

تؤدي قرارات الهندسة المعمارية إلى زيادة الأداء وتكلفة التشغيل لسنوات.

قرارات أوضح

يساعد التعليم الفني الفرق على اختيار المجموعة المناسبة، وليس فقط المجموعة الأحدث.

مراقبة الجودة

تعمل الخيارات الهندسية الأفضل على تقليل حوادث الموثوقية في الإنتاج.

The Future of Agent Scaffolding and Harnesses

Model providers increasingly ship their own agent products and software development kits, which standardises some harness patterns such as tool schemas, permissions and context compaction. Protocols for connecting tools to models, such as the Model Context Protocol, make tool integration more reusable. Harness design is likely to remain a meaningful source of performance differences, and evaluations are moving toward reporting the scaffold alongside the model. For builders, careful tool design, clear stopping rules and good logging will keep mattering regardless of which model is underneath.

التنفيذ في العالم الحقيقي

A coding agent harness gives the model tools to view files, edit specific line ranges and run tests, then loops until tests pass or a step limit is reached.

A research assistant harness stops the loop after 20 tool calls and asks the model for a summary with sources, preventing runaway costs.

A team replaces a raw shell tool with a file editor that shows a short window of lines and reports syntax errors immediately, and their agent's success rate on internal tasks improves without changing the model.

A customer operations agent harness intercepts any refund tool call above a set amount and pauses for human approval before executing it.

المخاطر والدرابزين

  • يمكن أن يؤدي تحسين معيار واحد إلى إخفاء نقاط ضعف النظام الأوسع.

  • غالبًا ما يتم التقليل من تكاليف البنية التحتية والصيانة.

  • يمكن أن تنمو الفجوات الأمنية وقابلية المراقبة عندما تصبح الأنظمة أكثر تعقيدًا.

خارطة طريق التنفيذ

  1. تحديد الكمون والجودة وأهداف التكلفة قبل التنفيذ.

  2. المعيار في ظل ظروف التحميل والبيانات الواقعية.

  3. مراقبة الأدوات للأخطاء والانجراف وتأثير المستخدم.

  4. قم بإعداد مسارات التراجع والاستجابة للحوادث قبل القياس.

استمر في الاستكشاف

Free newsletter

Get the daily AI briefing

Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.

One email each weekday. Unsubscribe in one click. We never sell or share your address.

Test yourself

Take the Agent Scaffolding and Harnesses quiz

Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.

ابدأ الاختبار

Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation

الأسئلة المتداولة

What is Agent Scaffolding and Harnesses?

An agent harness, or scaffold, is the code around a language model that turns it into an agent: it runs the loop of calling the model, executing the tools it requests, feeding results back, and deciding when to stop. It matters because the harness strongly shapes results, so the same model can score very differently on the same benchmark depending on how its tools, context and error handling are designed.

What is an agent harness?

The harness is the surrounding program that turns a text-generating model into an agent.

Which is an example of a stopping rule?

Stopping rules end the loop based on limits like step counts, budgets, timeouts or success checks.

What did the SWE-agent project emphasise?

SWE-agent argued that tools designed for models improve results over a plain shell.

Why can the same model score differently on SWE-bench in different reports?

A benchmark score measures the whole system, not the model alone.

How should a harness usually handle a failed tool call?

Returning actionable errors lets the model correct its approach instead of ending the run.