The Agent Harness
A model on its own only writes text. The harness is all the software around the model that turns that text into checked work: what the model reads, which tools it can use, which rules stop it, and how it recovers when it goes wrong. When you change the harness, the same model can become a much better agent.
8 min read8 মিনিটে পড়া যায় · 6 sections6টি সেকশন · 8 sources8টি সোর্স · updated Nov 2026আপডেট: Nov 2026
In plain words
An agent harness is the software that runs a model as an agent. The model picks the next step. The harness does the rest: it builds the context, runs the loop, offers the tools, checks each tool call, and keeps state between sessions.
Claude Code. Claude Code is one harness. The Claude Agent SDK gives you the same tools, agent loop, and context management that power Claude Code Source 5সোর্স 5. Its features include built-in tools, hooks, subagents, MCP, permissions, sessions, and skills and memory Source 5সোর্স 5. Anthropic calls its Managed Agents product a hosted agent harness that runs the agent loop Source 5সোর্স 5.
Harness versus model. The harness can matter as much as the model. LangChain kept its model fixed (gpt-5.2-codex) Source 1সোর্স 1. It changed only three parts of its harness: the system prompt, the tools, and the middleware (hooks around model and tool calls) Source 1সোর্স 1. Its coding agent went from 52.8 to 66.5 on Terminal-Bench 2.0, and from the Top 30 to the Top 5 Source 1সোর্স 1. Terminal-Bench 2.0 is a hard benchmark of 89 tasks in terminal environments. Each task has its own environment, a human-written solution, and tests Source 2সোর্স 2.
Six parts. This tutorial splits a harness into six parts. The grouping is the tutorial's own:
| Part | Its job |
|---|---|
| Context and memory | Choose what the model reads now, and what it keeps for later |
| Tools and skills | The actions the agent can take |
| Permissions | Decide which tool calls run, ask first, or are blocked |
| Sandbox | An outer wall around files and the network |
| Checks | Tests and hooks that verify the work before it counts |
| Recovery | Ways to undo, resume, or start again |
সহজ English
An agent harness is the software that runs a model as an agent. The model picks the next step. The harness does everything else. It builds what the model reads, runs the loop, offers the tools, checks each tool call, and remembers state between sessions.
Claude Code is one harness. The Claude Agent SDK gives you the same tools, loop, and context management that power Claude Code Source 5সোর্স 5. It has built-in tools, hooks, subagents, MCP, permissions, sessions, and skills and memory Source 5সোর্স 5. Anthropic calls its Managed Agents product a hosted agent harness Source 5সোর্স 5.
The harness can matter as much as the model. LangChain kept the same model (gpt-5.2-codex). It changed only three things around it: the system prompt, the tools, and the middleware. Middleware means hooks around the model calls and the tool calls Source 1সোর্স 1. Its coding agent went from a score of 52.8 to 66.5 on Terminal-Bench 2.0. It moved from the Top 30 to the Top 5 Source 1সোর্স 1. Terminal-Bench 2.0 is a hard test set of 89 tasks in a terminal. Each task has its own setup, a solution written by a person, and tests Source 2সোর্স 2.
This tutorial splits a harness into six parts. The grouping is the tutorial's own:
- Context and memory: what the model reads now, and what it keeps for later.
- Tools and skills: the actions the agent can take.
- Permissions: which tool calls run, which ask first, and which are blocked.
- Sandbox: an outer wall around files and the network.
- Checks: tests and hooks that verify the work before it counts.
- Recovery: ways to undo, continue, or start again.
বাংলা ব্যাখ্যা
Agent harness হলো সেই সফটওয়্যার, যা একটা model-কে agent হিসেবে চালায়। Model ঠিক করে পরের ধাপ কী হবে। বাকি সব কাজ করে harness। সে context তৈরি করে, loop চালায়, tool দেয়, প্রতিটা tool call যাচাই করে, আর এক session থেকে আরেক session-এ অবস্থা (state) মনে রাখে।
Claude Code একটা harness। Claude Agent SDK আপনাকে সেই একই tool, agent loop আর context management দেয়, যা Claude Code চালায় Source 5সোর্স 5। এতে আছে built-in tool, hook, subagent, MCP, permission, session, আর skill ও memory Source 5সোর্স 5। Anthropic তার Managed Agents প্রোডাক্টকে বলে একটা hosted agent harness, যা agent loop চালায় Source 5সোর্স 5।
Harness-এর গুরুত্ব model-এর সমান হতে পারে। LangChain একই model (gpt-5.2-codex) রেখেছিল। সে শুধু harness-এর তিনটা অংশ বদলেছিল: system prompt, tool, আর middleware। Middleware মানে model call আর tool call-এর চারপাশের hook Source 1সোর্স 1। এতে তাদের coding agent-এর স্কোর Terminal-Bench 2.0-এ 52.8 থেকে 66.5 হয়। অবস্থান Top 30 থেকে Top 5-এ ওঠে Source 1সোর্স 1। Terminal-Bench 2.0 হলো terminal-এ চলা 89টা কঠিন task-এর একটা benchmark। প্রতিটা task-এর নিজের environment, মানুষের লেখা একটা সমাধান, আর test আছে Source 2সোর্স 2।
এই টিউটোরিয়াল একটা harness-কে ছয় ভাগে ভাগ করে। এই ভাগ টিউটোরিয়ালের নিজের:
- Context ও memory: model এখন কী পড়বে, আর পরের জন্য কী রাখবে।
- Tool ও skill: agent কোন কোন কাজ করতে পারে।
- Permission: কোন tool call চলবে, কোনটা আগে অনুমতি চাইবে, কোনটা আটকে যাবে।
- Sandbox: ফাইল আর নেটওয়ার্কের চারপাশে একটা বাইরের দেয়াল।
- Check: test আর hook, যা কাজটা গোনার আগে যাচাই করে।
- Recovery: আগের অবস্থায় ফেরা, আবার চালু করা, বা নতুন করে শুরু করার উপায়।
How it works
user or app
|
v
+--------------------- agent harness ---------------------+
| context & memory tools & skills permissions |
| sandbox checks recovery |
+---------------------------------------------------------+
| ^
v |
model ---- tool call ----> tools and MCP servers
^ |
+-------- tool result --------------+
|
v
checked outputThe loop. The model reads the prompt, calls tools, gets the results, and repeats until it gives a reply with no tool calls Source 6সোর্স 6. The harness can stop the loop with a maximum number of turns or a maximum budget. Then the result reports error_max_turns or error_max_budget_usd Source 6সোর্স 6.
Context and memory. Context is a finite resource. The goal is the smallest set of high-signal tokens Source 4সোর্স 4. As the context grows, the model recalls it less well ("context rot") Source 4সোর্স 4. Context does not reset between turns. Near the limit, the SDK compacts it: it summarizes older history, so early instructions may be lost. Rules that must last belong in CLAUDE.md Source 6সোর্স 6. An agent can also write notes outside its context window Source 4সোর্স 4.
Tools and skills. Give a minimal set of tools with little overlap. A bloated tool set is a common failure Source 4সোর্স 4.
Permissions. An allow list approves tools, a deny list blocks them, and a permission mode sets how much a human must approve. A denied call returns a rejection message to the model Source 6সোর্স 6. The bypassPermissions mode is only for isolated environments Source 6সোর্স 6.
Sandbox. In Claude Code, the Bash sandbox is a boundary that the operating system enforces: Seatbelt on macOS and bubblewrap on Linux Source 7সোর্স 7. A sandboxed command has no direct route to the network. A proxy checks each host name against allowed and denied domains Source 7সোর্স 7. Sandbox, permission rules, and permission modes are separate layers, and the sandbox holds whatever the model chose to run Source 7সোর্স 7.
Checks. Hooks run at fixed points of the loop. A PreToolUse hook can block a tool call, and a Stop hook can validate the result Source 6সোর্স 6. LangChain added self-verification, used traces to find failure modes, and added a middleware that counts the edits to each file to catch loops Source 1সোর্স 1.
Recovery. Each new session of a long-running agent starts with no memory Source 3সোর্স 3. Anthropic's harness for such agents keeps a progress file and commits each step to git Source 3সোর্স 3. A session can be resumed by its ID Source 6সোর্স 6. Claude Code checkpoints track Claude's file edits, and /rewind restores them Source 8সোর্স 8.
The other pages of this module, as parts of a harness:
- Agentic loops: the loop that the harness runs.
- MCP: how the harness connects tools and data.
- Subagents: helpers with a clean context window Source 4সোর্স 4.
- AI gateway: the door between your apps and the models.
- Inference economics: the cost that a budget limit controls.
- Evals: how you prove that a harness change helped.
- Guardrails: the rules on what goes in and out.
- Observability: the traces that show each step.
সহজ English
The order is this. A user or an app sends a task to the harness. The harness has six parts: context and memory, tools and skills, permissions, sandbox, checks, and recovery. The harness sends the task to the model. The model asks for a tool call. The tool or MCP server runs and sends a result back. This repeats. At the end, the output goes through the checks.
The loop. The model reads the prompt, calls tools, gets the results, and does it again. It stops when it gives a reply with no tool calls Source 6সোর্স 6. The harness can stop the loop after a set number of turns or a set amount of money. Then the result says error_max_turns or error_max_budget_usd Source 6সোর্স 6.
Context and memory. The model can read only a limited amount. So give it the smallest set of useful tokens Source 4সোর্স 4. When the context grows, the model remembers it less well. This is called "context rot" Source 4সোর্স 4. The context does not reset between turns. When it is nearly full, the SDK makes a summary of the old part. Early instructions can get lost. Rules that must stay belong in CLAUDE.md Source 6সোর্স 6. An agent can also write notes outside its context Source 4সোর্স 4.
Tools and skills. Give a small set of tools that do not overlap. Too many tools is a common failure Source 4সোর্স 4.
Permissions. An allow list approves tools. A deny list blocks tools. A permission mode sets how much a person must approve. When a call is denied, the model gets a rejection message Source 6সোর্স 6. Use the bypassPermissions mode only in an isolated environment Source 6সোর্স 6.
Sandbox. In Claude Code, the Bash sandbox is a wall that the operating system keeps. macOS uses Seatbelt. Linux uses bubblewrap Source 7সোর্স 7. A command in the sandbox cannot reach the network directly. A proxy checks each host name against a list of allowed and denied domains Source 7সোর্স 7. The sandbox, the permission rules, and the permission modes are separate layers. The sandbox holds whatever the model decides to run Source 7সোর্স 7.
Checks. Hooks run at fixed points of the loop. A PreToolUse hook can block a tool call. A Stop hook can check the result Source 6সোর্স 6. LangChain added self-checks. It used traces to find where the agent failed. It also added a middleware that counts the edits to each file, to catch an agent that goes round in circles Source 1সোর্স 1.
Recovery. Each new session of a long-running agent starts with no memory Source 3সোর্স 3. Anthropic's harness for such agents keeps a progress file. It commits each step to git Source 3সোর্স 3. You can resume a session by its ID Source 6সোর্স 6. Claude Code checkpoints save Claude's file edits, and /rewind brings them back Source 8সোর্স 8.
The other pages of this module, as parts of a harness:
- Agentic loops: the loop that the harness runs.
- MCP: how the harness connects tools and data.
- Subagents: helpers that start with a clean context Source 4সোর্স 4.
- AI gateway: the door between your apps and the models.
- Inference economics: the cost that a budget limit controls.
- Evals: how you prove that a harness change helped.
- Guardrails: the rules on what goes in and out.
- Observability: the traces that show each step.
বাংলা ব্যাখ্যা
ক্রমটা এরকম। একজন user বা একটা app harness-কে একটা task পাঠায়। Harness-এর ছয়টা অংশ: context ও memory, tool ও skill, permission, sandbox, check, আর recovery। Harness task-টা model-কে পাঠায়। Model একটা tool call চায়। Tool বা MCP server সেটা চালিয়ে result ফেরত পাঠায়। এটা বারবার চলে। শেষে output check-এর মধ্য দিয়ে যায়।
Loop. Model prompt পড়ে, tool call করে, result পায়, আবার একই কাজ করে। যখন সে tool call ছাড়া একটা উত্তর দেয়, তখন থামে Source 6সোর্স 6। Harness নির্দিষ্ট সংখ্যক turn বা নির্দিষ্ট খরচের পরে loop থামাতে পারে। তখন result-এ লেখা থাকে error_max_turns বা error_max_budget_usd Source 6সোর্স 6।
Context ও memory. Model একবারে সীমিত পরিমাণই পড়তে পারে। তাই তাকে সবচেয়ে ছোট কিন্তু কাজের token-এর সেট দিন Source 4সোর্স 4। Context যত বাড়ে, model তত কম ভালোভাবে মনে রাখে। একে বলে "context rot" Source 4সোর্স 4। Turn-এর মাঝে context রিসেট হয় না। প্রায় ভরে গেলে SDK পুরনো অংশের একটা সারাংশ বানায়। তাতে শুরুর দিকের নির্দেশ হারিয়ে যেতে পারে। যে নিয়ম সবসময় থাকতে হবে, সেটা CLAUDE.md-এ রাখুন Source 6সোর্স 6। Agent নিজের context-এর বাইরে note-ও লিখে রাখতে পারে Source 4সোর্স 4।
Tool ও skill. অল্প কয়েকটা tool দিন, যাদের কাজ একটার সঙ্গে আরেকটা মেলে না। অনেক বেশি tool দেওয়া একটা সাধারণ ভুল Source 4সোর্স 4।
Permission. Allow list tool অনুমোদন করে। Deny list tool আটকায়। Permission mode ঠিক করে, একজন মানুষকে কতটা অনুমোদন দিতে হবে। কোনো call আটকে গেলে model একটা rejection message পায় Source 6সোর্স 6। bypassPermissions mode শুধু আলাদা করা (isolated) environment-এ ব্যবহার করুন Source 6সোর্স 6।
Sandbox. Claude Code-এ Bash sandbox হলো এমন একটা দেয়াল, যা operating system নিজে রক্ষা করে। macOS-এ Seatbelt, Linux-এ bubblewrap Source 7সোর্স 7। Sandbox-এর ভেতরের command সরাসরি নেটওয়ার্কে যেতে পারে না। একটা proxy প্রতিটা host name অনুমোদিত আর নিষিদ্ধ domain-এর তালিকার সঙ্গে মিলিয়ে দেখে Source 7সোর্স 7। Sandbox, permission rule আর permission mode আলাদা আলাদা স্তর। Model যা-ই চালাক, sandbox-এর দেয়াল টিকে থাকে Source 7সোর্স 7।
Check. Loop-এর নির্দিষ্ট জায়গায় hook চলে। PreToolUse hook একটা tool call আটকাতে পারে। Stop hook result যাচাই করতে পারে Source 6সোর্স 6। LangChain self-verification যোগ করেছিল, আর trace দেখে agent কোথায় ভুল করে তা খুঁজে বের করেছিল। সঙ্গে একটা middleware যোগ করেছিল, যা প্রতিটা ফাইলে কতবার edit হলো তা গোনে, যাতে একই জায়গায় ঘুরতে থাকা agent ধরা পড়ে Source 1সোর্স 1।
Recovery. দীর্ঘ সময় চলা agent-এর প্রতিটা নতুন session কোনো memory ছাড়াই শুরু হয় Source 3সোর্স 3। এমন agent-এর জন্য Anthropic-এর harness একটা progress ফাইল রাখে। প্রতিটা ধাপ git-এ commit করে Source 3সোর্স 3। ID দিয়ে একটা session আবার চালু (resume) করা যায় Source 6সোর্স 6। Claude Code-এর checkpoint Claude-এর ফাইল edit মনে রাখে, আর /rewind সেগুলো ফিরিয়ে আনে Source 8সোর্স 8।
এই module-এর অন্য পেজগুলো, harness-এর অংশ হিসেবে:
- Agentic loops: harness যে loop চালায়।
- MCP: harness কীভাবে tool আর data যুক্ত করে।
- Subagents: পরিষ্কার context নিয়ে শুরু করা সাহায্যকারী agent Source 4সোর্স 4।
- AI gateway: আপনার app আর model-এর মাঝের দরজা।
- Inference economics: budget limit যে খরচ নিয়ন্ত্রণ করে।
- Evals: harness-এ বদল কাজে লাগল কি না, তা প্রমাণের উপায়।
- Guardrails: কী ঢুকবে আর কী বের হবে, তার নিয়ম।
- Observability: প্রতিটা ধাপ দেখানো trace।
A real-life example
This is an invented example. A team runs an agent in CI each night to fix failing Playwright tests. One morning the agent's report says "all fixed", but 5 tests still fail. The tester checks the harness before blaming the model:
- Context. The run log shows a compaction. The rule "never change an expected value" was only in the first prompt, and the summary lost it. Rules that must last belong in
CLAUDE.mdSource 6সোর্স 6. The team moves the rule there. - Tools. The agent had no way to start the app, so it could not run the tests end to end. It declared the work done too early. Anthropic saw the same failure in its own long-running agents. Its fix was to test as a human user would, and to mark a feature as passing only after careful testing Source 3সোর্স 3.
- Permissions. The allow list did not include the test command, so the agent got a rejection message each time it tried Source 6সোর্স 6. The team allows one narrow rule, in the same style as
Bash(npm *)Source 6সোর্স 6. - Checks. The team adds a
Stophook that runs the suite and rejects "done" while a test fails Source 6সোর্স 6.
The model stays the same. Only the harness changes.
সহজ English
This is an invented example. A team runs an agent in CI each night. It fixes failing Playwright tests. One morning the report says "all fixed". But 5 tests still fail. The tester checks the harness before blaming the model:
- Context. The run log shows a summary step. The rule "never change an expected value" was only in the first prompt. The summary lost it. Rules that must stay belong in
CLAUDE.mdSource 6সোর্স 6. The team moves the rule there. - Tools. The agent could not start the app. So it could not run the tests from start to end. It said the work was done too early. Anthropic saw the same failure in its own long-running agents. Its fix was to test like a human user, and to mark a feature as passing only after careful testing Source 3সোর্স 3.
- Permissions. The allow list did not have the test command. So each try got a rejection message Source 6সোর্স 6. The team allows one narrow rule, in the same style as
Bash(npm *)Source 6সোর্স 6. - Checks. The team adds a
Stophook. It runs the tests and says no to "done" while a test fails Source 6সোর্স 6.
The model stays the same. Only the harness changes.
বাংলা ব্যাখ্যা
এটা একটা বানানো উদাহরণ। একটা টিম প্রতি রাতে CI-তে একটা agent চালায়। সেটা fail করা Playwright test ঠিক করে। এক সকালে agent-এর রিপোর্ট বলে "all fixed"। কিন্তু 5টা test তখনও fail করছে। Model-কে দোষ দেওয়ার আগে tester harness পরীক্ষা করেন:
- Context. Run log-এ দেখা যায় একটা compaction হয়েছে। "কখনো expected value বদলাবে না" নিয়মটা ছিল শুধু প্রথম prompt-এ। সারাংশে সেটা হারিয়ে গেছে। যে নিয়ম সবসময় থাকতে হবে, সেটা
CLAUDE.md-এ রাখতে হয় Source 6সোর্স 6। টিম নিয়মটা সেখানে সরায়। - Tool. Agent app চালু করতে পারেনি। তাই সে শুরু থেকে শেষ পর্যন্ত test চালাতে পারেনি। সে খুব আগেই বলে দিয়েছে কাজ শেষ। Anthropic তাদের নিজের long-running agent-এও একই ভুল দেখেছিল। তাদের সমাধান ছিল একজন সাধারণ user-এর মতো test করা, আর ভালোভাবে test করার পরেই কোনো feature-কে passing বলা Source 3সোর্স 3।
- Permission. Allow list-এ test command ছিল না। তাই প্রতিবার চেষ্টায় agent একটা rejection message পেয়েছে Source 6সোর্স 6। টিম একটা সরু নিয়ম অনুমোদন করে,
Bash(npm *)-এর মতো ধাঁচে Source 6সোর্স 6। - Check. টিম একটা
Stophook যোগ করে। সেটা test suite চালায়, আর কোনো test fail করলে "done" মানে না Source 6সোর্স 6।
Model একই থাকে। শুধু harness বদলায়।
Common mistakes
- Blaming the model first. LangChain changed only its harness and gained 13.7 points with the same model Source 1সোর্স 1.
- Too much context or too many tools. Context is a finite resource, and a bloated tool set is a common failure Source 4সোর্স 4.
- Important rules only in the first prompt. Compaction can drop them Source 6সোর্স 6.
- No limit on the loop. By default there is no limit on turns or budget Source 6সোর্স 6.
bypassPermissionson a shared machine. The docs say to use it only in isolated environments Source 6সোর্স 6.- Assuming the sandbox is on. In Claude Code it is off by default Source 7সোর্স 7.
- Trusting "done". An agent can declare the work done too early Source 3সোর্স 3.
- Checkpoints instead of git. A file that only Bash changed is not tracked, and checkpoints do not replace version control Source 8সোর্স 8.
সহজ English
- Blaming the model first. LangChain changed only the harness. With the same model, it gained 13.7 points Source 1সোর্স 1.
- Too much context or too many tools. The model can read only so much. Too many tools is a common failure Source 4সোর্স 4.
- Important rules only in the first prompt. The summary step can drop them Source 6সোর্স 6.
- No limit on the loop. By default there is no limit on turns or money Source 6সোর্স 6.
bypassPermissionson a shared machine. The docs say to use it only in an isolated environment Source 6সোর্স 6.- Thinking the sandbox is on. In Claude Code it is off by default Source 7সোর্স 7.
- Trusting "done". An agent can say the work is done too early Source 3সোর্স 3.
- Checkpoints instead of git. A file that only Bash changed is not tracked. Checkpoints do not replace version control Source 8সোর্স 8.
বাংলা ব্যাখ্যা
- প্রথমেই model-কে দোষ দেওয়া। LangChain শুধু harness বদলেছিল। একই model দিয়ে স্কোর 13.7 পয়েন্ট বেড়েছিল Source 1সোর্স 1।
- বেশি context বা বেশি tool। Context একটা সীমিত সম্পদ। অনেক বেশি tool দেওয়া একটা সাধারণ ভুল Source 4সোর্স 4।
- জরুরি নিয়ম শুধু প্রথম prompt-এ রাখা। Compaction সেটা বাদ দিতে পারে Source 6সোর্স 6।
- Loop-এর কোনো সীমা না রাখা। Default অবস্থায় turn বা budget-এর কোনো সীমা থাকে না Source 6সোর্স 6।
- শেয়ার করা মেশিনে
bypassPermissions। Docs বলে, এটা শুধু isolated environment-এ ব্যবহার করতে Source 6সোর্স 6। - ধরে নেওয়া যে sandbox চালু আছে। Claude Code-এ এটা default অবস্থায় বন্ধ থাকে Source 7সোর্স 7।
- "done" কথাটা বিশ্বাস করা। Agent খুব আগেই বলে দিতে পারে যে কাজ শেষ Source 3সোর্স 3।
- git-এর বদলে checkpoint। যে ফাইল শুধু Bash বদলেছে, সেটা track হয় না। Checkpoint version control-এর বিকল্প নয় Source 8সোর্স 8।
What a tester can check
Tutorial advice
These test ideas are the tutorial's own advice.
- Harness first. When an agent fails, read its trace in this order: context, tools, permissions. Blame the model last.
- Context. List what the agent saw at the start: the system prompt, the project rules file, and the tool list. In a long run, check that a key rule still holds after a summary step.
- Missing tool. Give a task that needs a tool the agent does not have. It should say so, not fake a result.
- Permissions. In a throw-away environment, ask for a blocked action, such as a write outside the project. Expect a clear denial.
- Sandbox. From inside the sandbox, try to call a host that is not allowed. Expect it to fail.
- Checks. Plant one failing test. The agent must not report "done".
- Recovery. Stop a run halfway, resume it, and check the progress file and the git log.
- Limits. Set a low turn limit. The run should stop with a clear status, not hang.
- Same model, two harnesses. Run the same eval set before and after a harness change, and compare.
সহজ English
These test ideas are the tutorial's own advice.
- Harness first. When an agent fails, read its trace in this order: context, tools, permissions. Blame the model last.
- Context. List what the agent saw at the start: the system prompt, the project rules file, and the tool list. In a long run, check that a key rule still holds after a summary step.
- Missing tool. Give a task that needs a tool the agent does not have. It should say so. It should not fake a result.
- Permissions. In a throw-away environment, ask for a blocked action. An example is a write outside the project. Expect a clear denial.
- Sandbox. From inside the sandbox, try to call a host that is not allowed. Expect it to fail.
- Checks. Plant one failing test. The agent must not say "done".
- Recovery. Stop a run halfway. Resume it. Check the progress file and the git log.
- Limits. Set a low turn limit. The run should stop with a clear status. It should not hang.
- Same model, two harnesses. Run the same eval set before and after a harness change. Compare the results.
বাংলা ব্যাখ্যা
এই test আইডিয়াগুলো টিউটোরিয়ালের নিজের পরামর্শ।
- আগে harness। কোনো agent fail করলে তার trace এই ক্রমে পড়ুন: context, tool, permission। Model-কে দোষ দিন সবার শেষে।
- Context. শুরুতে agent কী কী দেখেছিল তার তালিকা করুন: system prompt, project-এর নিয়মের ফাইল, আর tool-এর তালিকা। লম্বা run-এ দেখুন, সারাংশ তৈরির পরেও জরুরি নিয়মটা মানা হচ্ছে কি না।
- নেই এমন tool। এমন একটা task দিন, যার জন্য দরকারি tool agent-এর কাছে নেই। সে সেটা স্বীকার করবে। ভুয়া result দেবে না।
- Permission. একটা throw-away environment-এ একটা নিষিদ্ধ কাজ চান, যেমন project-এর বাইরে ফাইল লেখা। পরিষ্কার একটা denial আশা করুন।
- Sandbox. Sandbox-এর ভেতর থেকে অনুমোদন নেই এমন একটা host-কে call করার চেষ্টা করুন। এটা fail করা উচিত।
- Check. ইচ্ছে করে একটা fail করা test রাখুন। Agent যেন "done" না বলে।
- Recovery. একটা run মাঝপথে থামান, তারপর resume করুন। Progress ফাইল আর git log দেখুন।
- Limit. কম turn limit দিন। Run যেন পরিষ্কার status দিয়ে থামে, আটকে না থাকে।
- একই model, দুটো harness। Harness বদলানোর আগে আর পরে একই eval set চালান, আর তুলনা করুন।
Key words
| Term | Meaning |
|---|---|
| Agent harness | The software around a model that runs it as an agent: context, loop, tools, permissions, and state Source 5সোর্স 5 |
| Harness engineering | Changing the harness, not the model, to make an agent better Source 1সোর্স 1 |
| Terminal-Bench 2.0 | A benchmark of 89 hard tasks in terminal environments Source 2সোর্স 2 |
| Context rot | The model recalls less well as the context grows Source 4সোর্স 4 |
| Compaction | A summary of older history when the context is nearly full Source 6সোর্স 6 |
| Permission mode | The setting for how much a human must approve tool calls Source 6সোর্স 6 |
| Sandbox | A boundary, enforced by the operating system, around the agent's shell commands Source 7সোর্স 7 |
| Hook | Code that runs at a fixed point of the loop, for example before a tool runs Source 6সোর্স 6 |
| Checkpoint | A saved state of the agent's file edits that you can rewind to Source 8সোর্স 8 |
| Progress file | A file where a long-running agent logs what it has done Source 3সোর্স 3 |