What is an agent harness

An agent harness is the code around a model that runs the loop, calls tools, holds state and enforces limits. LangChain defined it on 10 Mar 2026 as everything "that isn't the model itself". Eight published definitions, read on 19 Nov 2026, differ in how much code they include; a worked CVE-2026-82329 case shows the stakes.

Eight published definitions

Six of the eight come from four vendors (Anthropic, Databricks, LangChain, Microsoft) and two from engineering writers. Anthropic uses the word for a product in one source and for a narrow component in another.

Eight published harness definitions, read 19 Nov 2026. Vendor wording is the vendor's own.
PublisherSource and dateWording
AnthropicScaling Managed Agents, 8 Apr 2026"a harness (the loop that calls Claude and routes Claude’s tool calls to the relevant infrastructure)"
AnthropicEffective harnesses for long-running agents, 26 Nov 2025"The Claude Agent SDK is a powerful, general-purpose agent harness"
DatabricksWhat is an AI Agent Harness?, 17 Jun 2026 (page metadata)"the software infrastructure that wraps around a large language model (LLM) and enables it to act on tasks"
LangChainThe Anatomy of an Agent Harness, 10 Mar 2026"every piece of code, configuration, and execution logic that isn't the model itself"
LangChainDeep Agents overview, undated page; package deepagents 0.7.40 released 18 Nov 2026"the same core tool calling loop as other agent frameworks, but with built-in capabilities"
Martin Fowler site (Thoughtworks)Harness engineering for coding agent users, 2 Apr 2026 (page metadata)"everything in an AI agent except the model itself"
MicrosoftAgent Harness, Microsoft Learn page updated 28 Oct 2026; package agent-framework 1.26.0 released 12 Nov 2026"the runtime scaffolding that turns a language model into an agent that can perform work"
Philipp Schmid (personal blog)The importance of Agent Harness in 2026, 5 Jan 2026"the infrastructure that wraps around an AI model to manage long-running tasks"

Narrow and broad meanings

Two meanings circulate. The broad one (LangChain, Fowler, Databricks) equals the whole agent minus the model: system prompt, tools, filesystem, sandbox, orchestration and hooks. The narrow one is Anthropic's Managed Agents usage, where the harness is only the loop, one of three components next to a session log and a sandbox so that "the implementation of each" can be "swapped without disturbing the others".

Framework documentation now uses the word for a shipped object. Microsoft Agent Framework's Harness Agent (its definition is in the table above) switches on todo tracking, plan and execute modes, session file memory, standing tool approvals and OpenTelemetry by default, each with a disable option such as DisableToolAutoApproval (Microsoft Learn, Agent Harness). What a harness does without being asked is therefore a supplier's choice, and a security team reads the defaults first.

Anthropic's evaluation guidance says that when you evaluate an agent, "we’re evaluating the harness and the model working together" (Demystifying evals for AI agents). The Managed Agents post adds why harnesses keep changing: they "encode assumptions about what Claude can’t do on its own", and one such assumption, context resets added for Claude Sonnet 4.5, "had become dead weight" on Claude Opus 4.5. A harness is re-tested after a model change, not bought once.

What a security team owns in the harness

The definitions describe general-purpose agents, not security work. The split below applies LangChain's component list (system prompts, tools, bundled infrastructure, orchestration logic, hooks) to a team that runs an agent on its own findings. The decisions column is this site's framing.

Parts follow LangChain's component list; read 19 Nov 2026.
Harness partDecision a security team makesPage
Tools and sandboxWhich systems the agent can read or change, and with whose credentialsTools and permissions
Context and memoryWhat the agent may keep between investigationsContext and memory
OrchestrationWhether one agent or several, and which model does which stepOrchestration and subagents
ApprovalsWhich calls pause for a named personApprovals and checkpoints
LogsWhat is recorded per actionLogging and evidence
EvaluationHow the harness is tested before and after changesEvaluation harness

LangChain's shorthand is "Agent = Model + Harness". A raw model "cannot" keep durable state or execute code by itself; those are "harness level features". A product sold as an agent is a model plus someone's harness, and the harness is where permissions and approval live. The evaluation checklist questions that layer.

Worked case: one model, two harnesses, CVE-2026-82329

CVE-2026-82329 is an authentication bypass in self-hosted JFrog Artifactory (CVSS 3.1 base score 9.8). JFrog published the advisory on 28 Aug 2026. Fastly saw about 171,000 attempts on 1 Sep 2026, when a public exploit appeared, and about 406,000 on 2 Sep 2026; CISA added it to the Known Exploited Vulnerabilities catalog on 2 Sep 2026 with a due date of 5 Sep 2026. Release train 7.161.x is affected up to 7.161.19 and first fixed in 7.161.20. Fastly's report adds that patching does not revoke tokens already issued.

The case below is constructed: one instance on 7.161.19 is upgraded to 7.161.20 on 4 Sep 2026, a day before the due date. The CVE facts come from the record; the instance and the upgrade date are illustrative. The same model gets the same prompt, "Is this instance still exposed?", in two harnesses that differ only in their tool list.

Constructed case on CVE-2026-82329; CVE facts from JFrog's advisory, Fastly (3 Sep 2026), Wiz (10 Sep 2026, Groovy section added 17 Sep 2026) and CISA, read 19 Nov 2026.
StepHarness A: version lookup and KEV lookupHarness B: A plus read-only proxy-log search and plugin-directory listing
1. VersionReads 7.161.20; first fixed build is 7.161.20, so not affected nowSame
2. Due dateKEV due date 5 Sep 2026; upgrade finished 4 Sep 2026, so metSame
3. Reached before the upgrade?No tool to ask; the question is not askedSearches proxy logs for 28 Aug to 4 Sep 2026 for a POST to /access/api/v1/registry/join answered with HTTP 201 and a token whose key ID is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (the SHA-256 of an empty string), which Fastly calls high-confidence evidence of compromise
4. Left behind?No tool to askLists $JFROG_HOME/var/etc/artifactory/plugins/ and compares file names with the six Groovy plugins Wiz recovered from compromised instances, among them rce.groovy, cmd.groovy and jwtToken.groovy
5. Answer"Fixed. Close the ticket."Zero matches: "Fixed; no join-endpoint hit or unexpected plugin from 28 Aug to 4 Sep 2026." One match: "Fixed but compromised; open an incident."
Evidence keptTwo tool resultsQuery text, time range, match count, directory listing

The model did not change. Harness A answers "fixed" in both outcomes, because a version string cannot show whether tokens were minted between 28 Aug and 4 Sep. Harness B can separate the two, because the question "was it compromised" needs log and file access. A test set for either harness needs a case where patched and compromised differ, which this CVE provides (how to test an agent harness).

The log window opens on 28 Aug, the disclosure date, not on 1 Sep. Fastly saw single-digit probes on 29 and 30 Aug and about 75,000 attempts on 31 Aug, most of them from offensive security services, before the public exploit of 1 Sep. Its remediation advice is to revoke access tokens issued since 28 Aug 2026, so a search that starts on 1 Sep would miss a token minted earlier.

Every tool Harness B adds is read-only, so it needs no new approval path. Revoking tokens issued since 28 Aug 2026 and rotating the join key, the follow-up Fastly lists, changes state and does pause for a person: see approvals and checkpoints.

In this section

Sources

  1. LangChain, The Anatomy of an Agent Harness, 10 Mar 2026, read 19 Nov 2026
  2. Anthropic, Scaling Managed Agents, 8 Apr 2026, read 19 Nov 2026
  3. Anthropic, Effective harnesses for long-running agents, 26 Nov 2025, read 19 Nov 2026
  4. Databricks, What is an AI Agent Harness?, read 19 Nov 2026
  5. Philipp Schmid, The importance of Agent Harness in 2026, read 19 Nov 2026
  6. martinfowler.com, Harness engineering for coding agent users, read 19 Nov 2026
  7. LangChain, Deep Agents overview, read 19 Nov 2026
  8. PyPI, deepagents release metadata (0.7.40), read 19 Nov 2026
  9. Microsoft Learn, Agent Framework, Agent Harness, read 19 Nov 2026
  10. PyPI, agent-framework release metadata (1.26.0), read 19 Nov 2026
  11. Anthropic, Demystifying evals for AI agents, read 19 Nov 2026
  12. JFrog security advisories, CVE-2026-82329, read 19 Nov 2026
  13. Fastly Security Research, CVE-2026-82329 exploitation activity, 3 Sep 2026, read 19 Nov 2026
  14. Wiz Research, Artifactory Under Attack: In-the-Wild Exploitation of CVE-2026-42016, CVE-2026-42018 and CVE-2026-82329, 10 Sep 2026, updated 17 Sep 2026, read 19 Nov 2026
  15. CISA KEV entry for CVE-2026-82329, read 19 Nov 2026

Last reviewed 19 Nov 2026