<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fran</title>
    <description>The latest articles on DEV Community by Fran (@fransoto).</description>
    <link>https://dev.to/fransoto</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3861152%2F05781401-593c-4039-81c3-ea7100e965f7.png</url>
      <title>DEV Community: Fran</title>
      <link>https://dev.to/fransoto</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fransoto"/>
    <language>en</language>
    <item>
      <title>AI Security: The OWASP Top 10 LLM Risks Every Developer Should Know</title>
      <dc:creator>Fran</dc:creator>
      <pubDate>Sun, 12 Apr 2026 08:48:51 +0000</pubDate>
      <link>https://dev.to/fransoto/ai-security-the-owasp-top-10-llm-risks-every-developer-should-know-2ef5</link>
      <guid>https://dev.to/fransoto/ai-security-the-owasp-top-10-llm-risks-every-developer-should-know-2ef5</guid>
      <description>&lt;p&gt;Most LLM security articles warn you about the AI your users interact with. They don’t mention the AI tools you’re building with. I’ve used AI coding assistants to write code, generate documentation, and even learn cryptography fundamentals, all to deploy services in production. The OWASP Top 10 for LLM applications, updated after 2025, describes 10 risks that apply just as much to your internal AI toolchain as to the chatbot you’re shipping. The threat surface isn’t in front of your users. It starts in your IDE.&lt;/p&gt;

&lt;p&gt;While writing this post, the articles covering this list that I read focus on external-facing chatbots. I wrote this one to also consider all 10 risks in the AI workflows engineers are already running inside their companies. If you’re a developer using AI tools like Claude Code, Codex, or GitHub Copilot, not just someone building an AI product, this is written for you.&lt;/p&gt;




&lt;p&gt;Get the free AI Agent Building Blocks ebook when you subscribe to my substack:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofiip2m2mn7rirx3m2ux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofiip2m2mn7rirx3m2ux.png" alt="Ebook cover of " width="800" height="1290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  In this post, you’ll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What the OWASP Top 10 for LLM applications covers and why it was updated for 2025&lt;/li&gt;
&lt;li&gt;How prompt injection, sensitive data disclosure, and excessive agency affect real engineering workflows&lt;/li&gt;
&lt;li&gt;What changed between the 2023/24 and 2025 OWASP LLM Top 10 lists&lt;/li&gt;
&lt;li&gt;How to apply a practical security checklist mapped to all 10 LLM vulnerabilities&lt;/li&gt;
&lt;li&gt;Why agentic AI in 2026 makes several of these risks significantly more dangerous&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What is AI security for LLM applications?
&lt;/h2&gt;

&lt;p&gt;AI security means two different things, and the distinction matters.&lt;/p&gt;

&lt;p&gt;The first is using AI to improve security: threat detection, automated code reviews, and vulnerability scanning. The second is securing the AI itself: protecting the models, the pipelines, the APIs, and the data those systems handle. This article is about the second kind.&lt;/p&gt;

&lt;p&gt;LLMs introduce attack surfaces that traditional software doesn’t have. A conventional application has deterministic logic. You can audit a decision tree. LLMs are probabilistic and context-sensitive. The same prompt doesn’t always produce the same output. Adversarial inputs can produce emergent, unpredictable behavior.&lt;/p&gt;

&lt;p&gt;New attack vectors showed up with LLMs that didn’t exist before: crafted prompts, poisoned training data, plugin chains, and autonomous agent actions. The OWASP community responded by extending its trusted web application framework to cover these risks. The LLM Top 10 was built by over 600 contributors across 18+ countries, and the 2025 update reflects how much the threat landscape has changed in a single year.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the OWASP Top 10 for LLMs matters in 2026
&lt;/h2&gt;

&lt;p&gt;The original OWASP Top 10 for web applications became the de facto standard for secure development. Security certifications, compliance frameworks like SOC 2 and ISO 27001, and enterprise security reviews all cite it. The LLM version carries the same weight. If you’re working at a company that ships software, the OWASP LLM list will show up in your audits and your security checklists.&lt;/p&gt;

&lt;p&gt;This list was written for three audiences: developers building LLM-powered features like chatbots and copilots, security engineers reviewing AI integrations, and engineering leaders approving AI tooling for their teams.&lt;/p&gt;

&lt;p&gt;There was a first list on 2023/24 focused on first-wave LLM integrations. Insecure plugins, model theft, and overreliance. The 2025 update restructured everything around agentic AI, RAG systems, and supply chain risks that emerged when those deployments hit production. The AI landscape is evolving very fast, and three risks were entirely new in 2025: System Prompt Leakage, Vector and Embedding Weaknesses, and Misinformation. Several others were renamed or merged to reflect how the attacks evolved.&lt;/p&gt;

&lt;p&gt;Let’s review the full list.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The OWASP Top 10 LLM security risks (2025)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  LLM01:2025 — Prompt Injection
&lt;/h3&gt;

&lt;p&gt;Prompt injection is an attack where user prompts alter the LLM’s behavior or output in unintended ways, potentially causing it to violate guidelines, generate harmful content, or influence critical decisions.&lt;/p&gt;

&lt;p&gt;There are two types.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Direct injection happens when a user’s input directly alters model behavior, whether intentionally by a malicious actor or unintentionally by hitting an unexpected trigger.&lt;/li&gt;
&lt;li&gt;Indirect injection happens when the LLM processes external content — a web page, a document, a RAG result — that contains embedded adversarial instructions the model then follows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1el43xop4cd4lo5jxxxr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1el43xop4cd4lo5jxxxr.png" alt="A web page with a malicious propmt, at the right the LLM takes everyuthing as input, further at the right the LLM produces unintended output" width="800" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Prompt injection is different from jailbreaking, though both are related. Prompt injection manipulates model responses through specific inputs. Jailbreaking is a form of prompt injection where the attacker causes the model to disregard its safety protocols entirely. You can mitigate prompt injection through system prompt safeguards. Jailbreaking requires ongoing model training updates.&lt;/p&gt;

&lt;p&gt;This is ranked number one because it’s the most exploitable vulnerability on the list. No special access required. Anyone with a text field can attempt it. RAG and fine-tuning don’t fully eliminate the risk. Research confirms the vulnerability persists across model architectures.&lt;/p&gt;

&lt;p&gt;To mitigate: treat all external content as untrusted data, not as instructions. Use separate input channels for system instructions versus user content where possible. Add output validation before executing any LLM-generated actions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Prompts is one paradigm for coding with AI, but there’s also the paradigm of Spec-Driven Development to create a plan (a spec) before doing code changes. You can learn more in this article:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3q8aobv56je5egvoswhw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3q8aobv56je5egvoswhw.png" alt="Prompt Engineering vs Spec Engineering: Coding with AI Like a Senior Engineer" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/prompt-engineering-vs-spec-engineering" rel="noopener noreferrer"&gt;&lt;strong&gt;Prompt Engineering vs Spec Engineering: Coding with AI Like a Senior Engineer&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  LLM02:2025 — Sensitive Information Disclosure
&lt;/h3&gt;

&lt;p&gt;Sensitive information disclosure occurs when an LLM reveals confidential data from its training set, context window, or prior user interactions.&lt;/p&gt;

&lt;p&gt;GitHub announced that starting April 24th, GitHub Copilot will use your code and prompts to train its models. Besides taking advantage of your work, you can see how this is a problem. That’s LLM02 in practice. Feeding proprietary data into a model that could surface it to someone else.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxojkbz2ka8dsg5gh8f6x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxojkbz2ka8dsg5gh8f6x.png" alt="At the left, an engineer uses confidencial data for training and puts it in a black box. At the right another engineer is able to retrieve the exact propietary data" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are three main disclosure vectors.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, the model was trained on sensitive data and can be prompted to reproduce it.&lt;/li&gt;
&lt;li&gt;Second, sensitive data is in the context window and leaks through crafted user questions.&lt;/li&gt;
&lt;li&gt;Third, multi-tenant deployments where one user’s context bleeds into another’s responses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What makes this worse than a traditional data leak is that you can’t always tell what the model “knows.” The disclosure is probabilistic. The same prompt may not reproduce the data every time, which makes it hard to test systematically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; never include credentials or confidential business data in system prompts unless necessary. Use data masking before sending sensitive content to external AI APIs. Audit what your AI tools can actually access, especially browser plugins and meeting tools. If you can, use models deployed in your cloud, under your control.&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM03:2025 — Supply Chain
&lt;/h3&gt;

&lt;p&gt;LLM supply chain vulnerabilities come from insecure components in the AI development pipeline that introduce risks into production applications. This includes pre-trained models, datasets, libraries, or AI-assisted tooling.&lt;/p&gt;

&lt;p&gt;I used AI tools at work, but they have to be approved by the security department. Think about it, the AI tool is itself a supply chain component. If the model powering your coding assistant was fine-tuned on poisoned data, or the tool has an insecure plugin, your AI output that is sent to prod inherits that risk. That’s LLM03 in practice.&lt;/p&gt;

&lt;p&gt;Common supply chain risks include pre-trained models from open-source hubs with unknown training provenance, third-party AI SDKs with insecure dependencies, AI coding assistants that access your codebase and external APIs simultaneously, and models with undisclosed training data.&lt;/p&gt;

&lt;p&gt;This moved to number three in the 2025 update because the AI tooling ecosystem exploded in variety and popularity. The LLM itself is now one component in a larger pipeline. Each layer introduces risk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; pin model versions and don’t auto-update AI dependencies, similarly to what you’d do with the other software dependencies. Treat AI tools used in security reviews or certifications as components requiring their own security review. Maintain an AI Bill of Materials for your production AI pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM04:2025 — Data and Model Poisoning
&lt;/h3&gt;

&lt;p&gt;Data and model poisoning is an attack where adversarial data is introduced into a model’s training, fine-tuning, or feedback datasets to manipulate its behavior in ways that may not surface until specific conditions are triggered.&lt;/p&gt;

&lt;p&gt;This is distinct from supply chain (LLM03). Supply chain covers the pipeline components around the model. Poisoning targets the model’s learned behavior directly, through the data it was trained or fine-tuned on.&lt;/p&gt;

&lt;p&gt;Poisoning happens in several ways. Public datasets used for fine-tuning can be poisoned before or during collection. Feedback loops, specifically RLHF data from users, can be manipulated at scale by adversarial users. Backdoor attacks embed a hidden trigger. The model behaves normally until a specific phrase or pattern activates the malicious behavior.&lt;/p&gt;

&lt;p&gt;Recently, with the Claude Code codebase leaked, we saw in this application instructions to “not add attribution if it’s an Anthropic employee“. Now imagine this was not added at the client-level, but the model training or the RLHF phase was making the model react differently on certain conditions. That’s Model Poisoning.&lt;/p&gt;

&lt;p&gt;What makes this particularly insidious is that you can’t see the poison. It’s baked into the weights. We have to differentiate the transparent “open source” models from abstract “open weight” models. The weights allow us to execute, but not to understand the model. The model behaves normally in standard use cases and only misbehaves on specific trigger conditions. Discovery requires systematic red-teaming by security engineers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; vet training data sources and treat them like third-party code dependencies. Use models from verified, auditable sources with documented training data provenance.  Monitor model behavior over time for drift or anomalies in specific contexts.&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM05:2025 — Improper Output Handling
&lt;/h3&gt;

&lt;p&gt;Improper output handling occurs when LLM outputs are passed directly into downstream systems without adequate validation or sanitization. Think about browsers, shells, APIs, or databases.&lt;/p&gt;

&lt;p&gt;LLM outputs can contain HTML, JavaScript, shell commands, SQL, or executable code. All of those are potentially dangerous depending on where they land.&lt;/p&gt;

&lt;p&gt;If your app renders LLM output as HTML, you have a Cross-Site Scripting risk. If your app passes LLM output to a shell or code interpreter, you have a Remote Code Execution risk. If your app passes LLM output to a database query, you have a SQL injection risk.&lt;/p&gt;

&lt;p&gt;The common mistake is treating LLM output as safe because it came from your own system. The model was told to write a response. It wasn’t told to write safe output for every rendering context it might encounter downstream.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; apply context-appropriate output encoding everywhere: HTML escaping, SQL parameterization, shell quoting. Never pass raw LLM output to eval(), exec(), or shell commands. Treat LLM output as untrusted user input when passing it to any system that executes it. Have client application rules that prevent execution of certain commands, shell, or only allow the ones you trust.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM06:2025 — Excessive Agency
&lt;/h3&gt;

&lt;p&gt;Excessive agency is when an LLM-based system is granted too much autonomy, functionality, or permissions to act in the world, enabling it to take harmful or unintended actions beyond the intended scope.&lt;/p&gt;

&lt;p&gt;I used LLM assistance to write all my code and documents. Efficient, useful. But if the LLM suggests code that is slightly wrong, and I apply it without reviewing, the LLM has exercised agency over something that may cause trouble. At scale, in an agentic workflow where the LLM writes the code, commits it, and triggers the pipeline, this is exactly what LLM06 warns against. The more you automate, the more agency you hand over, and the less oversight each individual action gets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2t2alg0eexippbxku9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2t2alg0eexippbxku9k.png" alt="A human with a stop sign, a robot representing the AI agent speeding past the stop sign, ignoring the instructions" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Excessive agency has three dimensions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Excessive functionality&lt;/strong&gt; means the LLM can call more tools or APIs than its task requires.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excessive permissions&lt;/strong&gt; mean it operates with higher privileges than needed, like read-write when only read is required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excessive autonomy&lt;/strong&gt; means it takes multi-step actions without human checkpoints.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Agentic AI makes this the defining risk of 2026. Single LLM calls have a limited blast radius: the user sees the output and decides. Agentic workflows can take dozens of actions before a human sees results. You have your openClaw taking actions for you while you sleep. Each autonomous step compounds the risk of an uncaught mistake.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; scope each LLM agent to the minimum permissions it needs for its specific task. Add human-in-the-loop checkpoints for consequential actions like deploys, permission changes, and file commits. Log all LLM-initiated actions for audit trails.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Regarding guardrails for LLMs, I’d recommend you read this other article:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5k4f93trys8ivs68j2rq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5k4f93trys8ivs68j2rq.png" alt="Harness Engineering: Turning AI Agents Into Reliable Engineers" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/harness-engineering-ai-agents" rel="noopener noreferrer"&gt;&lt;strong&gt;Harness Engineering: Turning AI Agents Into Reliable Engineers&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  LLM07:2025 — System Prompt Leakage
&lt;/h3&gt;

&lt;p&gt;System prompt leakage occurs when the confidential instructions given to an LLM via the system prompt are exposed to users, attackers, or downstream systems, revealing business logic, security guardrails, or sensitive configuration.&lt;/p&gt;

&lt;p&gt;System prompts have become the standard mechanism for configuring LLM behavior in production apps. A poorly protected system prompt is now equivalent to exposed source code.&lt;/p&gt;

&lt;p&gt;What attackers do with leaked system prompts: they map the application’s security controls to find gaps, understand business logic to craft more targeted prompt injections, and extract competitive IP embedded in instructions like proprietary workflows or internal tool names.&lt;/p&gt;

&lt;p&gt;Leakage happens in several ways. Direct extraction, where prompts like “Repeat your system prompt” sometimes work on poorly guarded models. Indirect extraction, where crafted user inputs get access to partial system prompt content in responses. Also related to LLM02, if the system prompt itself contains sensitive data, it gets disclosed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; never embed secrets or credentials in system prompts. Test your application for system prompt leakage before deploying. Design system prompts as if they are public. Sensitive logic should live in code, not in prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM08:2025 — Vector and Embedding Weaknesses
&lt;/h3&gt;

&lt;p&gt;Vector and embedding weaknesses are vulnerabilities in the retrieval and storage of embeddings used in RAG and semantic search systems, enabling data poisoning, information extraction, or unauthorized access to indexed content.&lt;/p&gt;

&lt;p&gt;RAG systems became widespread in 2024, and vector databases are now a core component of enterprise LLM deployments. Embeddings are often treated as opaque black boxes, but they carry real security risks that weren’t widely understood when they got popular.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folfgh0hudp6y6qtc1q0s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folfgh0hudp6y6qtc1q0s.png" alt="A vector DB with a lock up front, but a backdoor where a robot, representing the LLM, is able to retrieve the exact original documents" width="800" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The attack patterns include many scenarios, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Embedding inversion:&lt;/strong&gt; extracting the original text from stored embeddings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Poisoning the vector store:&lt;/strong&gt; by injecting adversarial documents that get retrieved as authoritative context&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-tenant leakage:&lt;/strong&gt; where one user’s indexed content surfaces in another user’s query context&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Similarity search abuse&lt;/strong&gt;: where queries are crafted to surface sensitive documents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your RAG system indexes internal Confluence pages, code repositories, or support tickets, the vector store is a high-value target. Access controls on the source documents must be mirrored at the vector store level, not just at retrieval time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; apply source document access controls to vector store queries. Don’t return embeddings from documents that the user couldn’t read directly. Validate and sanitize documents before indexing. Treat ingested content like user input.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM09:2025 — Misinformation
&lt;/h3&gt;

&lt;p&gt;Misinformation occurs when an LLM generates false, misleading, or outdated information that users act on as if it were accurate, particularly dangerous in high-stakes domains like security, medicine, legal, or compliance.&lt;/p&gt;

&lt;p&gt;This risk captures both hallucination (fabricated facts) and confident incorrectness (plausible but wrong answers). The risk isn’t just that users trust AI too much. It’s that the AI gives them something false to trust.&lt;/p&gt;

&lt;p&gt;For example, I used LLMs to verify some details about different hashing algorithms. This is a common move now, we don’t search in Google and original specs, but we ask the LLM. However, anything related to hashing and encryption has security nuances. Choosing the wrong one in the wrong context is a vulnerability. If I take a decision from an LLM without verifying later against authoritative documentation, I’m falling for LLM09 risk. Scale that to your team writing security documentation, threat models, or code review feedback. Uncritical acceptance of that output is how misinformation enters production.&lt;/p&gt;

&lt;p&gt;The reason LLMs produce confident misinformation is structural. LLMs don’t signal uncertainty the way a search result does. They don’t have a cause-and-effect relationship (if A, then B). They only have probabilistic correlations (A and B happen at the same time 99% of the time). In security contexts, a confident but wrong answer can pass through review unchallenged. The fluency of LLM output with human-readable text creates a false sense of verification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; treat LLM outputs as first drafts, not final answers. Establish a verification step: AI output, then human review, then authoritative source check. I personally like moving the human all the way to the right of the process, but not removing the human. Require in your prmopts citation of primary sources where data comes from.&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM10:2025 — Unbounded Consumption
&lt;/h3&gt;

&lt;p&gt;Unbounded consumption occurs when an LLM application allows users or adversaries to consume excessive computational resources, causing degraded service, runaway costs, or denial of availability.&lt;/p&gt;

&lt;p&gt;It covers not just availability attacks but cost exhaustion, budget blowouts, and resource abuse by legitimate users who hit no limits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39wvmrin9wnf9oh7msvw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39wvmrin9wnf9oh7msvw.png" alt="A robot representing AI in a hamster wheel, and a counter of the money cost that is increasing as the robot runs" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This matters more in 2026 because agentic workflows can trigger cascading API calls. Anthropic just announced a few days ago that they will explicitly forbid the use of their subscription with OpenClaw. One user action with openclaw may spawn dozens of LLM requests. Cost-per-inference has dropped, making it easy to deploy LLMs, and also easy to accidentally burn through API budgets. Multi-step agents and techniques like Ralph Loops with no token or turn limits can self-loop forever.&lt;/p&gt;

&lt;p&gt;Attack patterns include flooding the API with max-context-length requests to maximize per-request cost, crafting prompts designed to trigger recursive or verbose responses, and prompt injection that triggers agentic loops consuming resources without termination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To mitigate:&lt;/strong&gt; implement rate limiting per user, API key, and endpoint. Set max token limits on inputs and outputs, both per request and per session. Set hard budget caps on AI API spending and alert before they’re hit, not after. Design agentic workflows with explicit termination conditions and maximum iteration counts.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How to secure LLM applications: practical checklist
&lt;/h2&gt;

&lt;p&gt;Here is every risk mapped to its most important mitigation action.&lt;/p&gt;

&lt;p&gt;Honestly, I’d forward this to every engineer I know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LLM01 — Prompt Injection:&lt;/strong&gt; Treat all external content as untrusted data, not instructions. Validate before acting on LLM outputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM02 — Sensitive Information Disclosure:&lt;/strong&gt; Mask sensitive data before sending to AI APIs. Audit what your AI tools can access.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM03 — Supply Chain:&lt;/strong&gt; Treat AI tooling as supply chain. Pin model versions. Audit tools used in regulated processes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM04 — Data and Model Poisoning:&lt;/strong&gt; Vet training data sources. Use models with documented provenance. Monitor for behavioral drift.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM05 — Improper Output Handling:&lt;/strong&gt; Apply context-appropriate encoding on all LLM outputs before rendering or executing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM06 — Excessive Agency:&lt;/strong&gt; Apply least-privilege to AI agents. Add human checkpoints for consequential actions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM07 — System Prompt Leakage:&lt;/strong&gt; Design system prompts as if public. Test for leakage before deployment. Keep secrets in code, not prompts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM08 — Vector and Embedding Weaknesses:&lt;/strong&gt; Mirror source document access controls at the vector store level. Validate documents before indexing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM09 — Misinformation:&lt;/strong&gt; Treat LLM outputs as first drafts. Require authoritative source verification for security guidance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM10 — Unbounded Consumption:&lt;/strong&gt; Set rate limits, token caps, and hard budget limits. Monitor inference costs in real time.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;By the way, checklists are one of the most important resources to use AI. You can learn my experience with “read“ checklists and “do“ checklists in this other article&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6162f3iyempvw41daom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6162f3iyempvw41daom.png" alt="How Checklists + AI Automation Made Me a 10x Engineer (And Can Do the Same For You)" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/how-checklists-ai-automation-made" rel="noopener noreferrer"&gt;&lt;strong&gt;How Checklists + AI Automation Made Me a 10x Engineer (And Can Do the Same For You)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  AI security in the real enterprise: what the OWASP list doesn’t tell you
&lt;/h2&gt;

&lt;p&gt;The OWASP list describes risks. It doesn’t describe who gets blamed when they materialize.&lt;/p&gt;

&lt;p&gt;We’re using AI tools all the time. When we ship fast, we only take partial credit for using AI, but the credits go to AI. When the AI tool misses a vulnerability, the developer get 100% of the blame. This asymmetry shapes how engineers should actually use AI: Aggressively for prototyping, conservatively when there’s accountability at risk. The struggle is that we don’t realize the asymmetry until something goes wrong.&lt;/p&gt;

&lt;p&gt;Organizations are also deploying AI faster than legal and compliance teams can catch up. I’ve developed small tooling, like getting meeting transcripts, and only months later, I got a notice about the legal requirements for it and to switch to an approved tool. LLM02 and LLM06 risks often materialize not from malicious actors but from well-meaning engineers working around slow policy processes. No malice required.&lt;/p&gt;

&lt;p&gt;Then there’s the review paradox. Using AI to pass to review is efficient, and I’d always encourage to use AI. But we can’t skip a human reviewing the AI review output. If the AI tool has its own supply chain risks (LLM03), and you’re using it to review a security standard, you’ve introduced the risk you’re reviewing against. This isn’t an argument against using AI tools for security reviews. It’s an argument for understanding what you’re trusting.&lt;/p&gt;

&lt;p&gt;The biggest shift in 2026 is what agentic AI does to blast radius. If we go to the first OWASP list for LLM applications in 2023, it assumed the prompts were triggered by a human. A user submitting a prompt and reviewing an output. In 2026, agents act autonomously across multiple steps. These risks all become more dangerous when there’s no human checkpoint in the workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practically:&lt;/strong&gt; figure out which of the 10 risks actually apply to your specific AI integration. They don’t all apply equally. Treat each AI tool used in a regulated process as a component requiring its own security review. Document your AI tool usage in your threat models.&lt;/p&gt;




&lt;p&gt;Get the free AI Agent Building Blocks ebook when you subscribe to my substack:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofiip2m2mn7rirx3m2ux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofiip2m2mn7rirx3m2ux.png" alt="Ebook cover of " width="800" height="1290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Common Questions about LLM Security
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the OWASP Top 10 risks for LLMs in 2025?
&lt;/h3&gt;

&lt;p&gt;The 2025 OWASP Top 10 for LLM Applications covers Prompt Injection, Sensitive Information Disclosure, Supply Chain, Data and Model Poisoning, Improper Output Handling, Excessive Agency, System Prompt Leakage, Vector and Embedding Weaknesses, Misinformation, and Unbounded Consumption. The full list is at &lt;a href="http://genai.owasp.org/llm-top-10" rel="noopener noreferrer"&gt;genai.owasp.org/llm-top-10&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is prompt injection in AI security?
&lt;/h3&gt;

&lt;p&gt;Prompt injection is an attack where malicious input overrides an LLM’s instructions, causing it to take unintended actions. It can be direct (from user input) or indirect (from external content the LLM processes, like a web page or document). It is ranked the top LLM vulnerability because it requires no special access to attempt.&lt;/p&gt;

&lt;h3&gt;
  
  
  How is the OWASP LLM Top 10 different from the OWASP Web Application Top 10?
&lt;/h3&gt;

&lt;p&gt;The OWASP Web App Top 10 covers traditional web vulnerabilities like XSS and SQL injection. The OWASP LLM Top 10 covers risks specific to large language models: prompt-based attacks, training data risks, autonomous agent behavior, and RAG system vulnerabilities. The two lists have overlapping mitigations but address fundamentally different attack surfaces.&lt;/p&gt;

&lt;h3&gt;
  
  
  What changed between the 2023/24 and 2025 OWASP LLM Top 10?
&lt;/h3&gt;

&lt;p&gt;The 2025 update added System Prompt Leakage, Vector and Embedding Weaknesses, and Misinformation. It removed Model Theft, Insecure Plugin Design, and Overreliance, which were absorbed into other categories. The update reflects the rise of agentic AI and RAG-based production systems that weren’t widespread when the 2023 list was written.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/subscribe"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion: the AI you trust is the AI you’re responsible for
&lt;/h2&gt;

&lt;p&gt;The code got shipped, and the feature launched. But the question stayed with me: What unknown unknowns may I be missing?&lt;/p&gt;

&lt;p&gt;The OWASP LLM Top 10 doesn’t answer that question for you. It gives you the vocabulary to ask it precisely. It’s not a compliance checkbox, but a thinking tool. Use it to audit how you’re using AI tools for building.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The OWASP Top 10 for LLM Applications (2025) defines 10 security risks specific to large language model systems, updated from the 2023/24 list to reflect agentic AI and RAG deployments.&lt;/li&gt;
&lt;li&gt;Prompt Injection (LLM01) remains the top risk because it requires no special access and persists even when using RAG or fine-tuning.&lt;/li&gt;
&lt;li&gt;Excessive Agency (LLM06) and Unbounded Consumption (LLM10) are the defining risks of agentic AI in 2026, where autonomous multi-step workflows amplify every unchecked mistake.&lt;/li&gt;
&lt;li&gt;Sensitive Information Disclosure (LLM02) often comes not from model misbehavior but from engineers inadvertently feeding sensitive data into AI tools they trust.&lt;/li&gt;
&lt;li&gt;Three risks are new in the 2025 update: System Prompt Leakage (LLM07), Vector and Embedding Weaknesses (LLM08), and Misinformation (LLM09), each reflecting how production LLM deployments evolved since 2023.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which of these 10 risks is already present in your AI workflow?&lt;/p&gt;




&lt;p&gt;If you read until here, continue reading about how to scale your software development process to handle the surge of code of AI: &lt;a href="https://strategizeyourcareer.com/p/scaling-software-engineering-with-ai" rel="noopener noreferrer"&gt;https://strategizeyourcareer.com/p/scaling-software-engineering-with-ai&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  References: OWASP LLM Top 10
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm01-prompt-injection/" rel="noopener noreferrer"&gt;LLM01:2025 Prompt Injection&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/" rel="noopener noreferrer"&gt;LLM02:2025 Sensitive Information Disclosure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm032025-supply-chain/" rel="noopener noreferrer"&gt;LLM03:2025 Supply Chain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm042025-data-and-model-poisoning/" rel="noopener noreferrer"&gt;LLM04:2025 Data and Model Poisoning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm052025-improper-output-handling/" rel="noopener noreferrer"&gt;LLM05:2025 Improper Output Handling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm062025-excessive-agency/" rel="noopener noreferrer"&gt;LLM06:2025 Excessive Agency&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm072025-system-prompt-leakage/" rel="noopener noreferrer"&gt;LLM07:2025 System Prompt Leakage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm082025-vector-and-embedding-weaknesses/" rel="noopener noreferrer"&gt;LLM08:2025 Vector and Embedding Weaknesses&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm092025-misinformation/" rel="noopener noreferrer"&gt;LLM09:2025 Misinformation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/" rel="noopener noreferrer"&gt;LLM10:2025 Unbounded Consumption&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://genai.owasp.org/llm-top-10/" rel="noopener noreferrer"&gt;Full 2025 list&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>programming</category>
      <category>owasp</category>
    </item>
    <item>
      <title>Harness Engineering: Turning AI Agents Into Reliable Engineers</title>
      <dc:creator>Fran</dc:creator>
      <pubDate>Sun, 12 Apr 2026 08:37:48 +0000</pubDate>
      <link>https://dev.to/fransoto/harness-engineering-turning-ai-agents-into-reliable-engineers-23an</link>
      <guid>https://dev.to/fransoto/harness-engineering-turning-ai-agents-into-reliable-engineers-23an</guid>
      <description>&lt;p&gt;Most AI coding agents can write impressive demos. Few can ship production code without breaking everything around it. The difference is harness engineering: the discipline of building systems that make AI agents reliable.&lt;/p&gt;

&lt;p&gt;Here is how I used it to ship 100+ PRs/month at Amazon&lt;/p&gt;




&lt;p&gt;Get the free AI Agent Building Blocks ebook when you subscribe to my Substack &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47mejqzu741g4ek6ycxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F47mejqzu741g4ek6ycxc.png" alt="Ebook cover of " width="800" height="1290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/ai-agents-building-blocks" rel="noopener noreferrer"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;I’m Fran. I’m a software engineer at Amazon during the day, and I write and experiment with AI during the night.&lt;/p&gt;

&lt;p&gt;I want to tell you about the moment I realized that prompting alone would never work for production AI agents.&lt;/p&gt;

&lt;p&gt;I was working on an automation project at Amazon. The goal was simple: update large JSON configuration files automatically based on requirements. These configs were thousands of lines long, and the updates followed predictable patterns.&lt;/p&gt;

&lt;p&gt;A perfect job for an AI agent, right? That’s what everyone thought. Engineers on the team opened their AI-powered IDE or CLI, typed their prompts to modify the JSONs, and watched the LLM struggle to modify the target node correctly.&lt;/p&gt;

&lt;p&gt;It failed to implement the changes properly. Every single time.&lt;/p&gt;

&lt;p&gt;The model wasn’t broken. We were on Opus 4.6 with a one-million context window.&lt;/p&gt;

&lt;p&gt;The context window was a problem. When you feed multiple 10,000-line JSON files into an LLM, the model loses track of the surrounding structure. It edits what you asked it to edit, but it quietly breaks everything around it. No error message. No warning. Just a structurally invalid file that passes a surface-level glance but fails in production.&lt;/p&gt;

&lt;p&gt;This is not a model quality problem. It is an &lt;strong&gt;environment&lt;/strong&gt; problem. And the fix is not a better prompt.&lt;/p&gt;

&lt;p&gt;You may think the fix is Anthropic to release a 10M context window, but we know that a bigger context window still degrades after 100k or 200k tokens.&lt;/p&gt;

&lt;p&gt;The real fix is a &lt;strong&gt;harness&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Harness engineering is the discipline that turned my broken prototype at Amazon into a system that now ships over 100 PRs per month. Fully autonomous.&lt;/p&gt;

&lt;p&gt;I wrote a 10-step guide to build that agent in this previous post:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkpdijt8yziu3flqocan.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkpdijt8yziu3flqocan.png" alt="How I built an agent that works at Amazon while I sleep (10 steps)" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/the-10-step-guide-to-building-your-own-ai-agent" rel="noopener noreferrer"&gt;&lt;strong&gt;How I built an agent that works at Amazon while I sleep (10 steps)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  In this post, you’ll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What harness engineering is and how it differs from prompt engineering, context engineering, and agent engineering&lt;/li&gt;
&lt;li&gt;Why AI agents fail on large structured files like JSON, and how to fix it with deterministic scripts&lt;/li&gt;
&lt;li&gt;The four pillars of a production AI harness: state management, context architecture, guardrails, and entropy management&lt;/li&gt;
&lt;li&gt;How I built a harness at Amazon that ships 100+ PRs/month without human intervention&lt;/li&gt;
&lt;li&gt;The mindset shift that separates engineers who demo AI from engineers who deploy it&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why AI Agents Fail on Large Files
&lt;/h2&gt;

&lt;p&gt;Most engineers today interact with AI coding tools the same way: open an IDE, type a prompt, review the output, repeat. For small files and isolated tasks, this works beautifully. But the moment the problem involves a large amount of files, the whole approach falls apart.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F103bl8nqjyjm9669ssaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F103bl8nqjyjm9669ssaq.png" alt="A stick-figure robot looking with a magnifier (inside the context window). Inside the magnifier, everything is tidy. Outside it's a mess." width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Large Language Models are probabilistic engines. They predict the next token based on patterns in their context window. When the context window is filled with thousands of lines of structured data, the model’s attention gets diluted. It correctly identifies the node you want to modify, but it loses track of sibling keys, nested brackets, and structural integrity. The result is a file that looks right at the point of change but is broken somewhere else.&lt;/p&gt;

&lt;p&gt;We have to understand that &lt;strong&gt;Context Window&lt;/strong&gt; isn’t the same as &lt;strong&gt;Context Attention.&lt;/strong&gt; As a human, I can store hundreds of items in a storage unit, but I will remember about a fraction of the items I have there.&lt;/p&gt;

&lt;p&gt;Same with LLMs. Performance degrades as the context window gets filled (and costs).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Did you know that every message you send is sending all the previous conversation in an API call?&lt;/strong&gt; Yes, you’re billed also for those past messages. The servers in the cloud don’t keep any state, they only have a cache.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuz7er1byud3zp3ox1f7r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuz7er1byud3zp3ox1f7r.png" alt="A comparison diagram. On the left it's what you see, a second user question and a second LLM answer. On the right, there's what AI sees: A system prompt, the MCP tool definitions, the user system prompt, the first question, all files referenced, first llm answer, second user question, all files referenced, second llm answer" width="800" height="1014"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the model fails to make an update, the instinct is to write a better prompt.&lt;/p&gt;

&lt;p&gt;Add more constraints.&lt;/p&gt;

&lt;p&gt;Tell the model to “preserve the surrounding structure.”&lt;/p&gt;

&lt;p&gt;“Make no mistakes.”&lt;/p&gt;

&lt;p&gt;But that is like asking someone to juggle while blindfolded and then giving them more detailed instructions about hand positioning. The problem is not the instructions. The problem is the blindfold.&lt;/p&gt;

&lt;p&gt;The context window itself becomes a liability when it’s packed with thousands of lines of repetitive structure. No prompt can fix that.&lt;/p&gt;

&lt;p&gt;I covered in this post how to scale AI setting up guardrails&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F14kmyidnu0skjpyc7c1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F14kmyidnu0skjpyc7c1l.png" alt="Scaling Software Engineering with AI" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/scaling-software-engineering-with-ai" rel="noopener noreferrer"&gt;&lt;strong&gt;Scaling Software Engineering with AI&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Harness Engineering?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Harness engineering is the discipline of designing the systems, architectural constraints, execution environments, and automated feedback loops that wrap around AI agents to make them reliable in production.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The term was first coined by Mitchell Hashimoto, the founder of HashiCorp. The metaphor comes from horse riding. Think of the LLM as a powerful horse. It has raw energy, speed, and strength. But without reins, a saddle, and a bridle, that energy is undirected and potentially destructive (the horse kicks you, the LLM runs a &lt;code&gt;rm -rf&lt;/code&gt;, and I don’t know which is worse&lt;code&gt;)&lt;/code&gt;. The harness allows the rider to  direct the horse’s power productively.&lt;/p&gt;

&lt;p&gt;To understand where harness engineering fits, here’s how it relates to the other disciplines you’ve probably heard about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Engineering&lt;/strong&gt; → Single interaction to craft the best input to the model (single request-response interaction).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Engineering&lt;/strong&gt; → Control what the model sees during a whole session (multiple interactions until clearing).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Harness Engineering&lt;/strong&gt; → Designs the environment, tools, guardrails, and feedback loops (multiple sessions).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Engineering&lt;/strong&gt; → Design the agent’s internal reasoning loop (define specialized agents).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platform Engineering&lt;/strong&gt; → Infrastructure to manage deployment, scaling, and cloud operations (where agents can run).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskd3up1i53k7wwnqsiif.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fskd3up1i53k7wwnqsiif.png" alt="A sequence diagram with user, the IDE/CLI client and the backend. The user sending a prompt is what prompt engineering covers. The files and context that IDe/cli AI client sends to backend is context engineering. And all the conversation, including the tools accessible for the IDE/CLI that determine how the backend responds are harness engineering" width="800" height="675"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Prompt engineering is about what you say to the model.&lt;/p&gt;

&lt;p&gt;Context engineering is about what the model sees.&lt;/p&gt;

&lt;p&gt;Harness engineering is about the entire world the model operates in. It includes the tools the agent can call, the constraints it cannot violate, the documentation structure it reads, and the automated feedback loops that catch its mistakes before they reach production.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/welcome"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Built a Harness That Ships 100+ PRs/Month at Amazon
&lt;/h2&gt;

&lt;p&gt;Let me walk you through the specific problem I solved, because abstract talk about agents only becomes useful when you see them applied to a real constraint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; We had large JSON configuration files that needed automated, repetitive updates. These files were too big for the LLM’s context window. Every manual update was tedious, error-prone, and time-consuming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What everyone else tried:&lt;/strong&gt; Engineers on the team opened their IDEs and started prompting. The LLM would correctly modify the target node, but would fail to identify which other files had to be updated, and it would fail to keep the correct JSON structure. There was no awareness of JSON structural integrity as a hard constraint. Every run was a coin flip. Sometimes it worked. Most times it broke. You can’t trust an AI like this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The harness approach:&lt;/strong&gt; Instead of trying to update the prompt, I narrowed the problem to one specific operation: How to read and write into our JSON files. I wasn’t trying to build a general-purpose agent. I built a scoped one. I wrote deterministic Python scripts to handle the actual JSON surgery: read the file, apply a precise modification, validate the structure, write it back. The agent’s only job was to provide the &lt;strong&gt;intent&lt;/strong&gt;, the what, and the where. The script provided the &lt;strong&gt;execution guarantee&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The key insight was this: the agent calls the script as a tool. It does not generate JSON directly. It tells the script what to change, and the script changes it with zero ambiguity. This means the AI is the brain that chooses which steps to take, like a CEO indicating directions. The AI didn’t have to make the groundwork itself.&lt;/p&gt;

&lt;p&gt;I then added a structural validation step as a guardrail. If the resulting JSON is malformed, the agent cannot proceed. It physically cannot ship a broken config. This provides a feedback loop, which is something managers and C-level executives also want when delegating to humans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The result:&lt;/strong&gt; 100+ PRs per month. Zero structural corruption. Fully autonomous. The system has been running for months, and after a few weeks of tweaking edge cases in the deterministic scripts, the Agent nails the updates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffgukq4j711cgd439nvkp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffgukq4j711cgd439nvkp.png" alt="Left: A horse going crazy with the title " width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At some point, we realized the only reason a PR gets rejected is that the requirement was wrong, not because the AI didn’t execute the requirement.&lt;/p&gt;

&lt;p&gt;That’s when you are into something good.&lt;/p&gt;

&lt;p&gt;This is what harness engineering looks like in practice. You stop asking the model to do things it’s bad at. You give it the tools for the parts that require precision, you let the agent handle the parts that require judgment, and you instruct it not to jump in to do the job itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/welcome"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Four Pillars of Harness Engineering
&lt;/h2&gt;

&lt;p&gt;My JSON automation project taught me the pattern to build a good AI agent, but the approach is generic. After studying how OpenAI, Anthropic, and other teams have built their own harnesses, I’ve identified four pillars that every production harness needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. State Management
&lt;/h3&gt;

&lt;p&gt;AI agents are stateless by default. Every API call starts with a blank slate. For a task that takes five minutes, this is fine. For a task that spans hours or requires following the updates of dozens of files, statelessness is bad. The agent forgets what it did 20 steps ago. It repeats the same mistake in a loop. It loses track of the overall architecture. This “AI amnesia” is the most common failure mode in long-running agent tasks, and it’s why Openclaw got very popular.&lt;/p&gt;

&lt;p&gt;A harness solves this by serializing context snapshots and restoring them across sessions. Think of it as save points in a video game. The agent does work, the harness saves a snapshot, and if the agent crashes or hits a rate limit, the harness restores the snapshot and picks up exactly where it left off.&lt;/p&gt;

&lt;p&gt;Advanced implementations use structured state objects that persist across runs. There are two main strategies here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context Compaction&lt;/strong&gt;, where the harness continuously summarizes the agent’s history as it approaches the token limit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Resets&lt;/strong&gt;, where the harness clears the window entirely and boots a fresh agent with a structured handoff of artifacts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both work. The right choice depends on your task length and coherence requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Context Architecture (Progressive Disclosure)
&lt;/h3&gt;

&lt;p&gt;The first agent-friendly codebases I saw produced gigantic &lt;a href="http://agents.md/" rel="noopener noreferrer"&gt;AGENTS.md&lt;/a&gt; files. This approach fails for the same reason a 500-page employee handbook fails on someone’s first day. The agent gets confused, misses critical rules, and follows outdated instructions that were never cleaned up.&lt;/p&gt;

&lt;p&gt;The better approach is &lt;strong&gt;progressive disclosure&lt;/strong&gt;. Give the agent a short table of contents that points to a structured &lt;code&gt;docs/&lt;/code&gt; directory. The agent reads the table of contents first, then navigates to the specific document it needs for the task at hand.&lt;/p&gt;

&lt;p&gt;This is the same pattern introduced with the Agent Skills standard. Instead of the early MCP implementations that loaded all the definitions above the user’s first prompt, let the agent find them when needed.&lt;/p&gt;

&lt;p&gt;The agent gets a map, not an encyclopedia.&lt;/p&gt;

&lt;p&gt;One more thing that is easy to forget: &lt;strong&gt;anything the agent cannot access in-context does not exist for it.&lt;/strong&gt; Your Slack threads, Google Docs, and verbal agreements in meetings… None of that is real to the agent unless provided or instructed to fetch them.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Deterministic Guardrails
&lt;/h3&gt;

&lt;p&gt;This is where harness engineering diverges most sharply from prompt engineering. Prompt engineering &lt;strong&gt;asks&lt;/strong&gt; the agent to write clean code or make no mistakes. Harness engineering &lt;strong&gt;mechanically enforces&lt;/strong&gt; it.&lt;/p&gt;

&lt;p&gt;You’d need custom linters, structural tests, and CI jobs that validate architecture before merge.&lt;/p&gt;

&lt;p&gt;The agent isn’t “discouraged” or “instructed against” skipping those. The agent is blocked.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a file exceeds a size limit, the linter rejects it.&lt;/li&gt;
&lt;li&gt;If a dependency flows in the wrong direction, the structural test fails.&lt;/li&gt;
&lt;li&gt;If the JSON output is malformed, the validation script prevents mering the PR.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The error messages in your custom lints and validations should include remediation instructions. When the agent hits a linter failure, the error message itself tells the agent exactly how to fix the problem. That error message gets injected directly into the agent’s context, creating a tight feedback loop that requires zero human intervention.&lt;/p&gt;

&lt;p&gt;This was a realization of my early attempts in the agent that modifies JSONs. I was using JQ commands instead of Python scripts. JQ ended all possible failures with a 0 or 1 exit code. These outputs are intended for terminals, not for LLMs to recover from them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz77no3goyfuvu792j4za.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz77no3goyfuvu792j4za.png" alt="A drawing of an LLM represented as the brain, having access to different tools (represented as a saw, hammer and screwdriver) and those tools having access to the code. A big red cross in a discontinued line hinting the llm can't access directly the code" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One more thing worth noting: A “boring” codebase is better for agents. Stable APIs, predictable patterns, and simple architectures are far easier for agents to model than clever abstractions. Every layer of complexity you add to your codebase is a layer the agent has to navigate.&lt;/p&gt;

&lt;p&gt;Keep it simple.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Entropy Management (Garbage Collection)
&lt;/h3&gt;

&lt;p&gt;This is something most people skip. AI agents replicate patterns, including bad ones. Over time, your codebase accumulates “AI slop”: redundant logic, verbose implementations, subtly hallucinated variables that the model keeps copying because they exist in the context.&lt;/p&gt;

&lt;p&gt;Left unchecked, this entropy degrades the entire codebase. People call it context poisoning.&lt;/p&gt;

&lt;p&gt;Some people use this as an argument that AI is bad. But whenever I face a bad AI output, instead of judging if AI is good or bad for this task, I ask myself how can we make AI work here? The answer is usually adding another harness.&lt;/p&gt;

&lt;p&gt;We can have a recurring cleanup agent. Think of it as garbage collection for your repo. For any implementation task, have a separate agent that scans the codebase, looks for drift from your golden principles, and fixes things before raising the PR. You can also execute this kind of agent on a schedule. Because you already designed other harnesses, like having unit tests and linters, you can allow AI to refactor code with confidence.&lt;/p&gt;

&lt;p&gt;It is the same concept as a “doc-gardening” agent that scans for stale documentation and updates it. Technical debt is called like this becuase it works like money debt. If you pay it daily, you stay solvent. If you let it accumulate, you end up spending a lot of time later.&lt;/p&gt;

&lt;p&gt;The harness should include entropy management from day one, not as an afterthought.&lt;/p&gt;

&lt;p&gt;To know where to apply the harnesses, I covered a 3-level framework for AI-assisted coding in this previous post:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0am57gssh6rwt1zhoplk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0am57gssh6rwt1zhoplk.png" alt="My code was AI Slop until I learned this system" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/the-three-levels-of-ai-productivity" rel="noopener noreferrer"&gt;&lt;strong&gt;My code was AI Slop until I learned this system&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Mindset Shift: From Prompts to Harness Engineering
&lt;/h2&gt;

&lt;p&gt;The biggest change harness engineering requires is not technical. It is mental.&lt;/p&gt;

&lt;p&gt;You stop writing prompts. You start designing environments. Your job is neither to write code nor to write the detailed prompts. It is to make the codebase &lt;strong&gt;legible to the agent&lt;/strong&gt;. Every file name, every directory structure, every naming convention, every piece of documentation exists not just for human developers but for the autonomous agents that will read, modify, and extend the codebase at machine speed.&lt;/p&gt;

&lt;p&gt;Constraints stop being restrictions and start being &lt;strong&gt;multipliers&lt;/strong&gt;. A custom linter you write once applies to every line of code the agent writes, deterministically, and forever. A structural test you build today catches every future violation automatically. You invest once, and the return compounds with every agent run. That is the leverage engineers had for humans, and we need it for AI agents.&lt;/p&gt;

&lt;p&gt;The engineers shipping the most code right now all converged on this independently. OpenAI’s internal team shipped one million lines of code and 1,500 PRs in five months using this approach. Anthropic has released 52 features in 50 days. My team at Amazon ships 100+ PRs per month. The patterns are the same: narrow the problem, use deterministic scripts at the execution boundary, enforce constraints mechanically, and make the codebase legible to the agent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftp18rbg8gkz1tqcj0ad0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftp18rbg8gkz1tqcj0ad0.png" alt="Claude Shipping Calendar, Claude Release Notes" width="800" height="924"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.productcompass.pm/p/claude-shipping-calendar" rel="noopener noreferrer"&gt;source&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Now, to apply these harnesses, you need to know the building blocks of IA agents.&lt;/p&gt;

&lt;p&gt;If you want the full guide, let me know your email below, and I’ll send you the free &lt;strong&gt;“AI Agents Building Blocks”&lt;/strong&gt; guide inside the newsletter’s welcome email&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofiip2m2mn7rirx3m2ux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fofiip2m2mn7rirx3m2ux.png" alt="Ebook cover of " width="800" height="1290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/welcome"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  To Recap:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is harness engineering in AI?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Harness engineering is the discipline of designing the systems, constraints, execution environments, and feedback loops that wrap around AI agents to make them reliable in production. Unlike prompt engineering, which focuses on a single model interaction, harness engineering governs the entire agent lifecycle, from state management to automated validation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is harness engineering different from prompt engineering?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Prompt engineering crafts the input to the model in a single interaction. Harness engineering designs the entire environment the agent operates in: tools, guardrails, documentation structure, and automated feedback loops. The goal is reliable behavior across thousands of runs, not just one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do AI agents fail on large structured files like JSON?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Large JSON files exceed or crowd out the model’s context window, causing the agent to lose track of the surrounding structure. It may correctly modify the target node but corrupt adjacent keys, producing a broken file. The fix is a deterministic script that handles the file surgery, with the agent only providing the intent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you build a simple AI agent harness?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start by narrowing the problem to one operation. Write deterministic scripts for the execution step. Wire the agent to tool-call those scripts instead of generating the output directly. Add a validation step that the agent cannot bypass (embed it in scripts if needed!). This three-part loop, intent to deterministic execution to validation, is the minimal viable harness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an &lt;a href="http://agents.md/" rel="noopener noreferrer"&gt;AGENTS.md&lt;/a&gt; file and why does it matter?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://agents.md/" rel="noopener noreferrer"&gt;AGENTS.md&lt;/a&gt; is a file in your repository that tells an AI agent the rules, conventions, and architectural constraints of your codebase. It acts as the agent’s static context, injected at startup, so it knows your team’s norms without you having to repeat them in every prompt. Keep it short (under 100 lines) and use it as a table of contents pointing to deeper documentation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion: The Harness IS the Product
&lt;/h2&gt;

&lt;p&gt;The model is the easy part. Everyone has access to the same foundation models. GPT, Claude, Gemini, they are all remarkably capable. The harness is the hard part. The harness is what separates a demo that impresses your manager from a production system that ships real code every day without breaking things.&lt;/p&gt;

&lt;p&gt;Here is what I want you to take away from this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Narrow the problem before you build the agent.&lt;/strong&gt; A scoped agent that does one thing well beats a general-purpose agent that does everything poorly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use deterministic scripts at the execution boundary.&lt;/strong&gt; Let the agent provide intent. Let the script provide the guarantee.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce constraints mechanically, not verbally.&lt;/strong&gt; If a rule matters, make it a linter, a test, or a validation step. Do not put it in a prompt and hope for the best.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the codebase legible to the agent, not just to humans.&lt;/strong&gt; Progressive disclosure, structured documentation, and the repo as the single system of record.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The engineers who figure this out first will have an enormous advantage. Not because they have better models, but because they have better harnesses.&lt;/p&gt;

&lt;p&gt;&lt;a href="//strategizeyourcareer.com/welcome"&gt;Subscribe now&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If you read until this point, you have to read this other article with the AI concepts every software engineer needs to know in 2026:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mwj0vwih5runuswq9uu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mwj0vwih5runuswq9uu.png" alt="Software engineer's AI stack in 2026" width="140" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://strategizeyourcareer.com/p/ai-glossary-for-software-engineers" rel="noopener noreferrer"&gt;&lt;strong&gt;Software engineer's AI stack in 2026&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>harnessengineering</category>
    </item>
  </channel>
</rss>
