AI Content Creation

Beyond the Base Model: Why AI Agent Frameworks and Harnesses Represent a Critical New Security Blind Spot

When evaluating the performance, reliability, and security of modern artificial intelligence systems, software developers and enterprise security teams have historically focused their attention squarely on the underlying large language model (LLM). Standard industry benchmarks are deliberately designed to measure the raw reasoning capabilities, contextual understanding, and prompt-adherence of models like GPT, Claude, or DeepSeek. In these evaluations, the accompanying agent harness—the runtime framework that bridges the model’s cognition with external APIs, databases, and enterprise toolsets—is typically treated as invisible wiring. It has long been assumed that the harness acts as a neutral substrate, serving merely as a mechanical conduit.

However, groundbreaking research released by cybersecurity firm Lasso Security fundamentally challenges this foundational industry assumption. In a comprehensive empirical study, researchers investigated the extent to which an agent harness alone can dictate performance and dictate behavior under adversarial conditions. By constructing a controlled environment featuring an autonomous attacker agent, holding the underlying model, system prompt, tool set, and target goals constant while varying solely the runtime framework underneath, the study uncovered alarming discrepancies.

The findings reveal that the harness is far from a passive, neutral environment. Simply swapping the underlying runtime framework can abruptly redirect an attack strategy, determine whether corporate network guardrails successfully block or negligently pass malicious payloads, and even quietly terminate multi-turn execution loops. For enterprise engineers and chief information security officers, this exposes a glaring blind spot: robust AI security is not an isolated property of the model alone, but rather an emergent characteristic of the specific model-harness pair.

Methodology and the Challenge of Isolating Experimental Variables

To effectively isolate the harness from confounding variables, the research team at Lasso Security instituted a rigorous and tightly controlled experimental architecture. The study directly pitted an open-source framework, LangChain’s deepagents operating on LangGraph, against a prominent closed-source vendor tool, Anthropic’s Claude Agent SDK.

The evaluation framework incorporated five distinct attacker models to ensure comprehensive coverage across the LLM landscape: Claude Sonnet 5, GPT-5.4, Grok 4, Kimi K2.6, and DeepSeek-V4-Pro. Each of these five models was deployed across both harnesses, yielding a matrix of ten distinct model-harness combinations.

This setup immediately introduced a significant engineering hurdle. While deepagents is designed to be inherently model-agnostic, the Claude Agent SDK naturally speaks the native Anthropic protocol and requires an intermediary translation layer to seamlessly communicate with non-Claude models. To solve this challenge without introducing architectural bias, researchers deployed all five models on Azure AI Foundry and routed every attacker query through a shared LiteLLM gateway. This standardized the entire network path, ensuring that every model was uniformly subjected to the exact same set of Azure content safety guardrails, thereby neutralizing the API provider as an experimental variable.

The researchers targeted five simulated enterprise application environments spanning highly regulated and sensitive sectors: finance, legal, healthcare, customer support, and education. Across these domains, they engineered 20 distinct attack missions specifically mapped to three critical categories outlined in the OWASP Top 10 for Agentic Applications: system-prompt leakage, sensitive-information disclosure, and harmful content generation. By executing each mission five times, the team amassed a robust dataset consisting of 1,000 discrete attack runs.

Structural Discrepancies in Prompt Compilation

To prevent tool orchestration from skewing results, the researchers severely restricted the attacker’s operational pathways. Although both harnesses provided full capability suites—including file system access, web search, and sub-agent delegation—the attacker was explicitly forced to operate through a single exposed tool designated as send_to_defendant. This stringent constraint ensured that the evaluation focused entirely on how each harness compiles prompts, manages conversational state, and executes turn-by-turn logic loops.

Despite receiving identical initial input prompts, the two distinct harnesses constructed fundamentally divergent request payloads behind the scenes:

The open-source deepagents framework relies on a modular middleware pipeline. It places the user’s system prompt first, but subsequently appends a bulky 7,041-character trailer composed entirely of framework middleware instructions. This trailer explicitly includes strict behavioral constraints (such as prioritizing accuracy over validating user beliefs), task-planning guidelines, file system tool definitions, and sub-agent spawner instructions. Consequently, the user’s original prompt ends up buried deep beneath layers of framework-generated text.

Conversely, the closed-source Claude Agent SDK places a concise 148-character identity line at the very beginning of the payload, immediately followed by the user’s system prompt. However, it shifts capability documentation entirely into serialized tool schemas—structured JSON definitions that instruct the model on how to properly format tool calls. The SDK’s tool schemas total an expansive 28,595 characters, which includes a staggering 9,114-character schema dedicated solely to its internal planning tool.

Why the agent harness matters as much as the model in AI security - TechTalks

While the total payload sizes for both frameworks were roughly comparable—hovering around 37,000 characters for deepagents versus roughly 40,000 characters for the Claude Agent SDK—their internal structural layouts were entirely inverted. In deepagents, capability instructions live directly inside the system prompt text, whereas in the Claude Agent SDK, those exact instructions reside within the serialized tool schemas.

The Pitfalls of Autonomous AI Self-Evaluation

During the preliminary phases of the study, researchers experimented with automated self-evaluation methods, wherein the AI is tasked with grading its own success or failure. However, this approach quickly proved unreliable due to severe inherent biases within large language models. In unmonitored testing, attacker agents completely missed 30 legitimate operational wins while simultaneously falsely declaring victory 155 times across just 303 self-claimed successes.

"Left unchecked, a self-graded pipeline would have reported about 42 percent success where the true rate was 25 percent," noted Michael Sromin, Senior Machine Learning Engineer at Lasso Security, during discussions with industry analysts. Both open-source and closed-source frameworks over-claimed victory by factors ranging from 1.5 to nearly 2 times. This statistical distortion proves that self-preference bias is a fundamental behavioral characteristic of modern LLMs rather than an isolated quirk of any single software scaffold.

To establish a bulletproof validation pipeline that avoids human-in-the-loop bottlenecks, Sromin recommends entirely decoupling the evaluation judge from the attacker agent and keeping it strictly blind to the harness under test. "Use ground truth wherever you can," Sromin advised. "A planted canary secret validated by exact string match has zero judgment error." LLM-based judges, he noted, should be strictly reserved for evaluating behavioral leaks that lack deterministic strings, and they must be guided by a rigorously written rubric calibrated against a superior model.

Aggregate Illusions: Statistical Variance Across Harnesses

A superficial review of the aggregate results across all 1,000 test runs might suggest that the two harnesses perform identically. As the study’s authors observed, "averaged over everything, the two harnesses look almost identical." However, cybersecurity experts emphasize that this overall average is a statistical illusion masking deep, turbulent dynamics beneath the surface. The closed-source harness is neither universally more nor less secure than the open-source alternative; rather, massive, opposing performance swings effectively cancel each other out depending entirely on the specific model paired with the runtime framework.

Because an LLM must re-read its entire context window on every individual turn of an agentic loop, structural differences in prompt scaffolding create persistent behavioral biases. Contrary to initial hypotheses, burying the user prompt beneath more than 7,000 characters of middleware instructions in the deepagents framework did not universally truncate the duration of an adversarial campaign. For example, DeepSeek successfully executed its full 20-turn operating budget under both frameworks.

Instead, context architecture significantly altered the qualitative nature of the attacks. Consistent with the well-documented "lost in the middle" position bias observed in long context windows, instructions or objectives placed at the very end of a prompt are attended to far more reliably than those buried under thousands of characters of framework boilerplate. Consequently, the exact same model, running for the exact same number of turns, pursued entirely different classes of attacks depending solely on which harness compiled its prompt.

Protocol Translation and Operational Bottlenecks

Where execution turn counts did drastically collapse, the root cause was not prompt placement within the context window, but rather protocol translation friction. Because the Claude Agent SDK is natively engineered for the Anthropic protocol, forcing non-Claude models to route through LiteLLM severely impaired their execution loops.

"The translation is where the attack quietly dies," Sromin explained. When operating on the native deepagents framework, the Kimi K2.6 model executed persistent, multi-turn campaigns, averaging 14.3 turns per attack and securing 22 operational wins. However, when forced to run through the Claude SDK’s translation layer, Kimi’s operational capacity plummeted, averaging a mere 1.0 turn per attack and securing only a single solitary win.

Furthermore, the study uncovered unexpected anomalies at the network layer. Both harnesses utilized relaxed content safety policies when dispatching HTTP requests to the Azure AI Foundry environment. Yet, because deepagents and the Claude Agent SDK format HTTP request bodies differently, identical prompt payloads triggered contrasting gateway behaviors.

Approximately 20 of deepagents’ GPT-5.4 attack sequences were summarily blocked at the door across four specific sensitive missions: patient Social Security number extraction, confidential legal data extractions, and the provision of insider-trading advice. In stark contrast, not a single one of the Claude SDK’s equivalent attempts was halted on those exact same tasks. As Sromin emphasized, "a filter’s effectiveness depends on the request format, not the content alone."

Why the agent harness matters as much as the model in AI security - TechTalks

Implications for Enterprise AI Security and Defense

These empirical findings carry profound implications for organizations seeking to defend against sophisticated autonomous threats. Traditional enterprise security architectures rely heavily on static prompt-injection filters and content moderation tools that evaluate individual user inputs in isolation. However, autonomous agents operate differently; they probe boundaries, absorb refusals, and dynamically pivot their strategies across multiple conversational turns.

"Defense has to be stateful and behavioral, judging intent across the whole conversation rather than message by message," Sromin stated. Modern enterprise security systems must monitor the entire execution trajectory of an agentic workflow, actively watching for escalation patterns, repeated conversational reframing following safety refusals, cognitive drift toward sensitive corporate objectives, and sophisticated obfuscation attempts.

Moreover, because the exact same malicious intent can manifest differently depending on how a runtime harness formats the underlying request, defensive red-teaming can no longer afford to test raw prompts in isolation. Cybersecurity teams must systematically vary both the underlying base model and the accompanying harness framework to identify precisely where runtime scaffolding inadvertently exposes novel enterprise attack vectors.

Strategic Recommendations for Software Developers

For software engineers, system architects, and DevOps professionals building production-grade agentic systems, these insights demand an immediate overhaul of application development and evaluation pipelines:

  1. Threat Model the Full Stack: Engineering teams must evaluate the complete model-harness configuration rather than relying solely on base model safety scores. Assessing an LLM in a standalone developer playground yields dangerously incomplete data, as wrapped runtime frameworks fundamentally alter how models process instructions and handle edge cases.

  2. Maintain Absolute Prompt Visibility: Development teams must demand complete operational visibility into compiled prompts. Frameworks routinely inject thousands of tokens containing middleware instructions, state definitions, and verbose tool schemas. Comprehensive system logs and debugging pipelines must capture the exact payload sent over the network on every execution turn to detect where framework scaffolding interferes with intended model behavior.

  3. Standardize Framework Benchmarks: The broader software engineering industry must establish standardized protocols for evaluating agent frameworks. This includes consistently reporting both the model and the specific framework version behind any performance score, varying strictly one experimental axis at a time, and isolating protocol translation penalties from core framework performance metrics.

Conclusion and Future Outlook for Harness Research

As software developers continue to grant AI agents increasingly autonomous access to expansive corporate toolsets and enterprise data lakes, researchers project that this underlying performance and security gap will widen significantly. In complex, multi-step workflows, minor per-turn discrepancies in context assembly, prompt scaffolding, and schema design compound exponentially over longer action chains.

While Lasso Security’s initial benchmark study deliberately restricted attacker agents to a single tool to cleanly isolate prompt assembly mechanics, the research team is already expanding its scope toward fully unrestricted operational environments.

"Settling it is exactly what a fully unrestricted, multi-tool run would do, and it is the study we are taking on next," Sromin concluded. "Let each harness orchestrate the whole tool kit end to end, so the gap and the advanced persistent threat question become measurable empirical facts rather than inferences."

Related Articles

Back to top button
Reel Warp
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.