<?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: Szymon Paluch</title>
    <description>The latest articles on DEV Community by Szymon Paluch (@szymonpaluch).</description>
    <link>https://dev.to/szymonpaluch</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4033858%2F83ca0373-4fe9-4f36-ad35-29e23f9a3315.png</url>
      <title>DEV Community: Szymon Paluch</title>
      <link>https://dev.to/szymonpaluch</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/szymonpaluch"/>
    <language>en</language>
    <item>
      <title>12 Rules for Building AI Agents That Survive Production</title>
      <dc:creator>Szymon Paluch</dc:creator>
      <pubDate>Fri, 17 Jul 2026 12:30:14 +0000</pubDate>
      <link>https://dev.to/szymonpaluch/12-rules-for-building-ai-agents-that-survive-production-4j9h</link>
      <guid>https://dev.to/szymonpaluch/12-rules-for-building-ai-agents-that-survive-production-4j9h</guid>
      <description>&lt;p&gt;I sat the Claude Certified Architect exam expecting questions about model parameters, context limits, and API flags. I got something else. The exam barely tests trivia. It tests judgment: given a broken agent and four plausible fixes, which one actually addresses the root cause?&lt;/p&gt;

&lt;p&gt;The interesting part was how few ideas the whole thing rests on. The same handful of rules kept deciding the "right" answer, and they are the same rules that decide whether an agent holds up once real users touch it. Below are the twelve I kept running into, plus the four traps that look like solutions and are not.&lt;/p&gt;

&lt;p&gt;This is my own study material, derived from publicly available exam guidance. It reflects how I build, not an official Anthropic position.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The twelve rules&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Enforce determinism in code, not in prompts&lt;br&gt;
If a rule has to fire every single time, it is not a job for a prompt. A prompt is a suggestion the model usually follows. "Usually" is not a guarantee. When you need a guarantee, put it in a hook, a gate, or an allowlist. Code enforces. Prose requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pick the cheapest fix that hits the root cause&lt;br&gt;
Before you build a subsystem, try the levers that cost minutes: a sharper tool description, an explicit acceptance criterion, a config change. Most "we need to build X" moments dissolve once you test the cheap fix first. Reach for the classifier only after the one-line change fails.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bad tool selection? Start with the descriptions&lt;br&gt;
When an agent keeps picking the wrong tool, the description is almost always the culprit, not the model. Tool descriptions are the primary signal the model uses to choose. Rewrite them to say exactly when to use the tool and when not to, before you go anywhere near few-shot examples.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Over-engineering is almost always the wrong answer&lt;br&gt;
Narrowing scope and improving the prompt beat a new subsystem far more often than engineers expect. Every subsystem you add is one more thing to debug, monitor, and keep in sync. Complexity is a cost you pay forever, not once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A bigger context window does not fix attention&lt;br&gt;
Stuffing more into the window does not make the model pay better attention to what matters. It often does the opposite. Decomposition and structure fix attention: smaller tasks, cleaner inputs, explicit boundaries. "Just use the model with the larger context" is a non-answer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model confidence and tone are not signals&lt;br&gt;
A confident-sounding answer is not a correct one. Self-assessed confidence is poorly calibrated, and on the hard cases the model is often most sure precisely when it is wrong. Never gate a decision on how certain the model claims to be. Verify with something external.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An independent instance beats self-review&lt;br&gt;
A model grading its own work is biased toward its own work. A fresh instance, with no memory of having produced the output, catches far more errors. If you want a real review step, spin up a separate reviewer, do not ask the author to check itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Least privilege for tools&lt;br&gt;
Give each agent role only the tools it needs, roughly four to five. This is not only a security point. More tools measurably degrade selection quality: the model gets worse at choosing when the menu is longer. Fewer, sharper tools beat a giant toolbox.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Structure beats free text, everywhere&lt;br&gt;
Structured errors, structured outputs, structured handoffs between agents, all with explicit provenance. Free-text prose between components is where information quietly rots. When agent A hands to agent B, pass a schema, not a paragraph.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do not suppress errors, and do not panic&lt;br&gt;
Handle transient failures locally: retry the flaky network call, back off, move on. For everything else, escalate with context so the coordinator can decide. The two failure modes to avoid are swallowing the error silently and blowing up the whole run over something recoverable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Match the API to your latency requirement&lt;br&gt;
The Batch API costs about half as much but can take up to 24 hours. That is great for an overnight job and useless for anything a human is waiting on. Pick synchronous calls for human-blocking tasks and batch for the rest. Cost and latency are a trade you make on purpose.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A retry fixes format, not missing data&lt;br&gt;
Retrying a call can correct a malformed structure. It cannot conjure information that was never in the source. If the data is not there, running it again just wastes tokens and time. Know which problem you have before you hit retry.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The four traps&lt;br&gt;
These are the answers that feel smart in the moment and cost you later. Every one of them showed up as a tempting-but-wrong option.&lt;/p&gt;

&lt;p&gt;"Just write in the prompt that it is mandatory." Shows up exactly when you need determinism, which is the one thing a prompt cannot give you. See rule 1.&lt;br&gt;
"Add few-shot examples." Genuinely useful for ambiguous judgment calls. Useless for hard rules, where it creates the illusion of a guarantee without the guarantee.&lt;br&gt;
"Build a classifier." A heavy solution reached for before anyone tested the cheap levers. Sometimes correct, usually premature. See rule 2.&lt;br&gt;
"Make one tool that does everything." Merging tools feels like simplification. It makes selection worse, because now the model has to guess intent inside a single overloaded tool. See rule 8.&lt;br&gt;
It collapses into three ideas&lt;br&gt;
Strip away the specifics and the twelve rules are really three:&lt;/p&gt;

&lt;p&gt;What must always work goes in code, not in a request. Determinism is an architecture decision, not a wording decision.&lt;br&gt;
Match the complexity of the fix to the size of the problem. Cheap lever first, subsystem last.&lt;br&gt;
Pass structure, not prose. Between components, schemas beat sentences.&lt;br&gt;
None of this is exotic. It is the difference between an agent that demos well and one that is still running in three months. The exam rewards it because production rewards it.&lt;/p&gt;

&lt;p&gt;Szymon Paluch. I work with teams on agentic system strategy, taking Claude Code and agents from demo to production.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://szymonpaluch.com/blog/posts/agentic-design-rules" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fszymonpaluch.com%2Fblog%2Fimages%2Fagentic-design-rules-en.jpg" height="450" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://szymonpaluch.com/blog/posts/agentic-design-rules" rel="noopener noreferrer" class="c-link"&gt;
            12 rules for building AI agents | Szymon Paluch
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            The full cheat-sheet from prepping for the Claude Certified Architect exam: 12 rules, 7 recurring traps, the specifics of all 5 domains, and a facts table. The rules that decide whether an agent survives production.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fszymonpaluch.com%2Ffavicon.svg" width="64" height="64"&gt;
          szymonpaluch.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>agents</category>
      <category>ai</category>
      <category>architecture</category>
      <category>claude</category>
    </item>
  </channel>
</rss>
