<?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: Sayed Ali Alkamel</title>
    <description>The latest articles on DEV Community by Sayed Ali Alkamel (@sayed_ali_alkamel).</description>
    <link>https://dev.to/sayed_ali_alkamel</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%2F2652218%2F63a5dfd1-8229-48c1-85eb-54a58560297f.jpg</url>
      <title>DEV Community: Sayed Ali Alkamel</title>
      <link>https://dev.to/sayed_ali_alkamel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sayed_ali_alkamel"/>
    <language>en</language>
    <item>
      <title>Open Knowledge Format (OKF): A Technical Leader's Adoption Guide</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 24 Jul 2026 08:18:50 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/open-knowledge-format-okf-a-technical-leaders-adoption-guide-5cm7</link>
      <guid>https://dev.to/sayed_ali_alkamel/open-knowledge-format-okf-a-technical-leaders-adoption-guide-5cm7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Google Cloud published the Open Knowledge Format (OKF) on June 12, 2026. It is a directory of markdown files with YAML frontmatter that any AI agent can read without an SDK, an account, or an integration. If your teams are shipping agents against internal data, OKF is a cheap way to stop each team rebuilding the same context layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Open Knowledge Format?
&lt;/h2&gt;

&lt;p&gt;OKF is an open specification for representing the metadata, context, and curated knowledge that AI systems need, published as version 0.1 by the Google Cloud Data Cloud team (&lt;a href="https://cloud.google.com/blog/products/data-analytics/how-the-open-knowledge-format-can-improve-data-sharing/" rel="noopener noreferrer"&gt;Google Cloud blog&lt;/a&gt;). A bundle is a directory of markdown files. Each file is one concept: a table, a metric, an API, a runbook. The file path is the concept's identity, so &lt;code&gt;tables/orders.md&lt;/code&gt; has the concept ID &lt;code&gt;tables/orders&lt;/code&gt; (&lt;a href="https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md" rel="noopener noreferrer"&gt;OKF v0.1 spec&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;That is the whole idea. No runtime, no registry, no required tooling. Google calls v0.1 a starting point rather than a finished standard, and ships it under Apache 2.0.&lt;/p&gt;

&lt;p&gt;Hold onto one boundary: OKF is a format, not a platform and not a search signal. It is loaded by your agents, not crawled from a public URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  What problem does it actually solve?
&lt;/h2&gt;

&lt;p&gt;The context an agent needs is mostly internal. What a metric means in your business, which table joins to which, why an API was deprecated last quarter. Google's framing is that these facts sit in metadata catalogs with their own APIs, in wikis and shared drives, in code comments, and in the heads of a few senior engineers.&lt;/p&gt;

&lt;p&gt;So every new agent assembles the same answer from incompatible surfaces, and every catalog vendor models the same objects again. That shows up on your budget as duplicated integration work, not as a missing product. It is why the answer here is a format instead of another service.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1qoiv5lkee7qd77tdnjp.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1qoiv5lkee7qd77tdnjp.gif" alt=" " width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OKF or your existing data catalog?
&lt;/h2&gt;

&lt;p&gt;This is not a replacement decision. The spec lists prescribing storage, serving, or query infrastructure as an explicit non-goal, and it does not subsume domain schemas such as Avro, Protobuf, or OpenAPI. It references them instead.&lt;/p&gt;

&lt;p&gt;Rule of thumb: if the question is where knowledge is governed, that stays a catalog decision. If the question is how knowledge travels to an agent that your catalog vendor did not build, that is OKF.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does OKF actually work?
&lt;/h2&gt;

&lt;p&gt;Frontmatter carries the few fields you want to query or filter on. The body carries what humans and models actually read.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;BigQuery Table&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Orders&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;One row per completed customer order.&lt;/span&gt;
&lt;span class="na"&gt;resource&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://console.cloud.google.com/bigquery?p=acme&amp;amp;d=sales&amp;amp;t=orders&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;sales&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;revenue&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2026-05-28T14:30:00Z&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gh"&gt;# Schema&lt;/span&gt;

| Column        | Type    | Description                              |
|---------------|---------|------------------------------------------|
| &lt;span class="sb"&gt;`order_id`&lt;/span&gt;    | STRING  | Globally unique order identifier.        |
| &lt;span class="sb"&gt;`customer_id`&lt;/span&gt; | STRING  | FK to &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;customers&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;/tables/customers.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;. |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exactly one field is required: &lt;code&gt;type&lt;/code&gt;. Everything else, including &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;resource&lt;/code&gt;, &lt;code&gt;tags&lt;/code&gt;, and &lt;code&gt;timestamp&lt;/code&gt;, is recommended but optional. Concepts link to each other with ordinary markdown links, which makes the directory a graph rather than a tree. Two filenames are reserved: &lt;code&gt;index.md&lt;/code&gt; for progressive disclosure and &lt;code&gt;log.md&lt;/code&gt; for change history.&lt;/p&gt;

&lt;p&gt;Conformance is three rules. Every non-reserved &lt;code&gt;.md&lt;/code&gt; file has a parseable frontmatter block, every block has a non-empty &lt;code&gt;type&lt;/code&gt;, and any &lt;code&gt;index.md&lt;/code&gt; or &lt;code&gt;log.md&lt;/code&gt; follows its defined structure. Consumers are told not to reject a bundle over unknown types, unknown extra keys, or broken links.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you roll it out?
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn2vggn2gip0h6qwd8o9i.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn2vggn2gip0h6qwd8o9i.gif" alt=" " width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start where your agents are already wrong. Metric definitions and join paths are the usual first win, and they are small enough to finish.&lt;/p&gt;

&lt;p&gt;Google shipped a reference enrichment agent that walks a BigQuery dataset, writes one concept document per table and view, then runs a second pass that crawls documentation URLs you seed it with and adds citations and join paths. It also shipped a self-contained HTML visualizer and three browsable sample bundles. Treat all of it as a proof of concept, because nothing in the format requires a particular agent framework or model.&lt;/p&gt;

&lt;p&gt;The step that matters organizationally is the third one. Put the bundle in git, give each directory a named owner, and review changes through pull requests. Knowledge curation becomes a normal engineering activity with diffs, blame, and an approver, which is the governance mechanism most wikis never had.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Links are untyped.&lt;/strong&gt; A link asserts that a relationship exists, but the kind of relationship is carried by the surrounding prose, not by the link. If you need &lt;code&gt;depends_on&lt;/code&gt; versus &lt;code&gt;supersedes&lt;/code&gt;, you will add your own frontmatter keys. The spec permits that and tells consumers to preserve keys they do not recognize.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A writable bundle is an attack surface.&lt;/strong&gt; If an agent enriches concepts from crawled pages or ticket text, untrusted content lands in a file that other agents read as authority. That is indirect prompt injection, the top entry in &lt;a href="https://genai.owasp.org/llmrisk/llm01-prompt-injection/" rel="noopener noreferrer"&gt;OWASP's LLM risk list&lt;/a&gt;. Keep agent writes behind human review and scope what the enrichment pass may fetch. Google's reference agent enforces a hard page cap and a same-host filter for exactly this reason.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adoption is the open question, not the format.&lt;/strong&gt; The value of any exchange format is how many parties speak it, and at launch the reference producer and consumer were both Google's. Minor versions are promised to be backward compatible, major versions may break. Your downside is bounded: if OKF stalls, you are left with well organized, version-controlled documentation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does OKF improve SEO or AI search visibility?&lt;/strong&gt;&lt;br&gt;
No. It is an internal bundle your own agents load, not a public file published at a well-known URL. Schema.org markup is still what makes your web pages legible to search engines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does OKF replace MCP or RAG?&lt;/strong&gt;&lt;br&gt;
No. MCP is how an agent reaches tools and live systems. OKF is the durable context it reads before acting, and an MCP server can serve a bundle as a resource.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the license?&lt;/strong&gt;&lt;br&gt;
Apache 2.0, in the GoogleCloudPlatform/knowledge-catalog repository. Google also updated Knowledge Catalog, formerly Dataplex, to ingest OKF and serve it to agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does adopting it cost?&lt;/strong&gt;&lt;br&gt;
No license and no SDK. The real cost is curation time, plus answering who owns and approves each concept document.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is v0.1 safe to build on?&lt;/strong&gt;&lt;br&gt;
It is a draft. Bundles may declare &lt;code&gt;okf_version: "0.1"&lt;/code&gt; in the root &lt;code&gt;index.md&lt;/code&gt; frontmatter, and consumers that do not understand a declared version are told to attempt best-effort consumption rather than refuse the bundle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Introducing the Open Knowledge Format, Google Cloud blog: &lt;a href="https://cloud.google.com/blog/products/data-analytics/how-the-open-knowledge-format-can-improve-data-sharing/" rel="noopener noreferrer"&gt;https://cloud.google.com/blog/products/data-analytics/how-the-open-knowledge-format-can-improve-data-sharing/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OKF v0.1 specification: &lt;a href="https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md" rel="noopener noreferrer"&gt;https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OKF reference agent, visualizer, and sample bundles: &lt;a href="https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf" rel="noopener noreferrer"&gt;https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;OWASP LLM01, Prompt Injection: &lt;a href="https://genai.owasp.org/llmrisk/llm01-prompt-injection/" rel="noopener noreferrer"&gt;https://genai.owasp.org/llmrisk/llm01-prompt-injection/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Karpathy, LLM wiki pattern: &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" rel="noopener noreferrer"&gt;https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>opensource</category>
      <category>leadership</category>
    </item>
    <item>
      <title>Code Knowledge Graphs: How to Evaluate Graphify, GitNexus, and CodeGraph</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 24 Jul 2026 07:51:35 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/code-knowledge-graphs-how-to-evaluate-graphify-gitnexus-and-codegraph-409i</link>
      <guid>https://dev.to/sayed_ali_alkamel/code-knowledge-graphs-how-to-evaluate-graphify-gitnexus-and-codegraph-409i</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Graphify, GitNexus, and CodeGraph all parse your repo with tree-sitter and serve a graph to an AI coding agent over MCP. They occupy the same square of the market, so raw capability will not separate them. Three things will: the license, how long the graph stays out of date, and how much of the call graph the tool can actually resolve.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a code knowledge graph, and what is it not?
&lt;/h2&gt;

&lt;p&gt;A code knowledge graph is a pre-built index of every symbol in a repo and every edge between them: calls, imports, extends, implements. An agent queries that index instead of running grep and read until it reconstructs your architecture. In CodeGraph's benchmark across seven open source repos, the agent's file reads dropped to roughly zero on all seven (&lt;a href="https://github.com/colbymchenry/codegraph" rel="noopener noreferrer"&gt;README&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;What it is not is ground truth. Every edge was either read from source or guessed by a heuristic, and some edges never get built at all. Treat the output as a lower bound on impact, never a guarantee. That reframe is the difference between using a graph to explore a system and using it to approve a change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do these tools sit in the market?
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjsnx32aovuc776n72s0k.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjsnx32aovuc776n72s0k.gif" alt=" " width="760" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Two axes matter: how deep the analysis goes, and where it runs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Text match.&lt;/strong&gt; grep. Free, exhaustive, no structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Symbol index.&lt;/strong&gt; &lt;a href="https://github.com/oraios/serena" rel="noopener noreferrer"&gt;Serena&lt;/a&gt; runs real language servers and answers at the symbol level on your machine, and it also edits by symbol path rather than line number. Sourcegraph indexes with SCIP and returns every reference rather than a ranked list, at multi-repo scale, on a server (&lt;a href="https://sourcegraph.com/resources/context-compare" rel="noopener noreferrer"&gt;Sourcegraph&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Call graph.&lt;/strong&gt; All three tools in this article, plus FalkorDB's code-graph, which needs a graph database running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data flow.&lt;/strong&gt; &lt;a href="https://cpg.joern.io/" rel="noopener noreferrer"&gt;Joern&lt;/a&gt; builds a code property graph (syntax tree plus control flow plus program dependence) for questions like whether user input reaches a query unsanitized. GitNexus reaches into this tier with an opt-in &lt;code&gt;--pdg&lt;/code&gt; mode, currently TypeScript and JavaScript only.&lt;/p&gt;

&lt;p&gt;The three land in the same cell. Evaluate them on operations and risk, not on feature lists.&lt;/p&gt;

&lt;h2&gt;
  
  
  How stale does the graph get?
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvvdk8etu3xhyd8uxr4d4.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvvdk8etu3xhyd8uxr4d4.gif" alt=" " width="720" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the failure mode nobody demos. Between your edit and the next index, the tool answers from a graph that describes code you no longer have.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CodeGraph&lt;/strong&gt; watches the filesystem with native OS events and re-indexes after a 2 second debounce (tunable via &lt;code&gt;CODEGRAPH_WATCH_DEBOUNCE_MS&lt;/code&gt;). Inside that window its responses prepend a banner naming the pending file and telling the agent to read it directly. It also reconciles on reconnect, so edits made while no server was running get absorbed on the next query.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graphify&lt;/strong&gt; ties refresh to commits. Between commits, the graph drifts from your working tree.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitNexus&lt;/strong&gt; needs &lt;code&gt;gitnexus analyze&lt;/code&gt; re-run. Incremental indexing is still listed under actively building, though a post-commit hook can prompt a reindex in Claude Code and Codex.&lt;/p&gt;

&lt;p&gt;If your team points agents at a repo they are actively editing, measure this first. An index that lags by a working session is worse than no index, because the agent stops hedging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can you trust the blast radius?
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn5v0icvn81kpcw7dmc8r.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn5v0icvn81kpcw7dmc8r.gif" alt=" " width="720" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every one of these tools reports impact analysis. None of them can report the edges it failed to build, so read the provenance model before you trust a number.&lt;/p&gt;

&lt;p&gt;Graphify tags each edge &lt;code&gt;EXTRACTED&lt;/code&gt;, &lt;code&gt;INFERRED&lt;/code&gt;, or &lt;code&gt;AMBIGUOUS&lt;/code&gt;, so you can tell what was read from source and what was reasoned (&lt;a href="https://graphify.com/" rel="noopener noreferrer"&gt;graphify.com&lt;/a&gt;). GitNexus attaches a confidence score and, when several symbols share a name, returns a ranked candidate list instead of guessing. CodeGraph publishes measured cross-file coverage per language against a named benchmark repo and does not hide the weak results: 95.8% on TypeScript, 86.7% on Rust, 73.8% on Liquid.&lt;/p&gt;

&lt;p&gt;The residual is a static analysis ceiling, not a bug to file. Dynamic dispatch, reflection, dependency injection containers, and framework conventions resolve at runtime, so no AST parser will ever see them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which gate eliminates a tool first?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Graphify&lt;/th&gt;
&lt;th&gt;GitNexus&lt;/th&gt;
&lt;th&gt;CodeGraph&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;License&lt;/td&gt;
&lt;td&gt;MIT&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;PolyForm Noncommercial&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MIT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Telemetry&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;anonymous, on by default&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Languages&lt;/td&gt;
&lt;td&gt;36&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;30+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Query language&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cypher&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Human-readable output&lt;/td&gt;
&lt;td&gt;&lt;code&gt;graph.html&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;browser UI&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;none&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Non-code input&lt;/td&gt;
&lt;td&gt;docs, PDFs, SQL, Terraform&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Run the license gate first. GitNexus ships under PolyForm Noncommercial, so commercial use needs a license from Akon Labs (&lt;a href="https://github.com/abhigyanpatwari/GitNexus" rel="noopener noreferrer"&gt;README&lt;/a&gt;). That is a procurement conversation, not an install command, and it should happen before anyone builds a proof of concept on it. CodeGraph's telemetry is anonymous and documented, and it is on until you run &lt;code&gt;codegraph telemetry off&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to test on your own repo
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Edit a file, then immediately ask about it.&lt;/strong&gt; This measures the staleness window, which is the only number that reflects daily use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick a symbol whose blast radius you already know.&lt;/strong&gt; Compare what the tool returns against what you know breaks. The gap is your resolution ceiling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check your real language mix,&lt;/strong&gt; including infrastructure code. Terraform, SQL, and legacy modules are where coverage varies most.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decide who reads the output.&lt;/strong&gt; If only agents do, visualization is dead weight. If a lead needs to review architecture, its absence is a blocker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time a cold index on your largest repo,&lt;/strong&gt; then a warm one. Adoption dies on the first number, not the second.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do not adopt any of these on a small repo. On a few hundred files an agent's own search is fine and the index is overhead. The category earns its keep on large, tangled, polyglot codebases, which is exactly where it is hardest to evaluate cheaply.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is a code knowledge graph better than vector RAG for code?&lt;/strong&gt;&lt;br&gt;
For structural questions, yes. Vector search returns chunks ranked by similarity and hopes the model reconnects them, while a graph returns an explicit path with file and line citations. That makes the answer auditable rather than merely plausible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does my code leave my machine?&lt;/strong&gt;&lt;br&gt;
Not for source parsing. All three parse locally with tree-sitter and zero model calls on code. Graphify's optional pass over docs and PDFs uses a model API you configure, which can point at a local Ollama backend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I gate a pull request on graph impact analysis?&lt;/strong&gt;&lt;br&gt;
Only as a signal, not as a merge condition. The graph cannot enumerate the edges it failed to resolve, so a clean impact report is weak evidence of safety.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which one supports the most languages?&lt;/strong&gt;&lt;br&gt;
Graphify lists 36 grammars, CodeGraph more than 30 in its language table, GitNexus 14. CodeGraph reaches the unusual ones: COBOL, Solidity, Terraform, Nix, Erlang, VB.NET, Delphi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I still need an LSP tool like Serena?&lt;/strong&gt;&lt;br&gt;
Often yes. Graph tools find the blast radius, Serena makes the edit at symbol level. They solve different halves of the problem and run side by side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Graphify: &lt;a href="https://graphify.com/" rel="noopener noreferrer"&gt;https://graphify.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Graphify repo: &lt;a href="https://github.com/Graphify-Labs/graphify" rel="noopener noreferrer"&gt;https://github.com/Graphify-Labs/graphify&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitNexus repo: &lt;a href="https://github.com/abhigyanpatwari/GitNexus" rel="noopener noreferrer"&gt;https://github.com/abhigyanpatwari/GitNexus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CodeGraph repo: &lt;a href="https://github.com/colbymchenry/codegraph" rel="noopener noreferrer"&gt;https://github.com/colbymchenry/codegraph&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PolyForm Noncommercial license: &lt;a href="https://polyformproject.org/licenses/noncommercial/1.0.0/" rel="noopener noreferrer"&gt;https://polyformproject.org/licenses/noncommercial/1.0.0/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Serena: &lt;a href="https://github.com/oraios/serena" rel="noopener noreferrer"&gt;https://github.com/oraios/serena&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sourcegraph context comparison: &lt;a href="https://sourcegraph.com/resources/context-compare" rel="noopener noreferrer"&gt;https://sourcegraph.com/resources/context-compare&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Joern code property graph: &lt;a href="https://cpg.joern.io/" rel="noopener noreferrer"&gt;https://cpg.joern.io/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Star counts, versions, and benchmark figures in this category move weekly. Everything above was checked on 24 July 2026.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Flutter Material and Cupertino Leave the SDK: What Changes for Your App</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Sun, 19 Jul 2026 07:54:46 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/flutter-material-and-cupertino-leave-the-sdk-what-changes-for-your-app-3cn</link>
      <guid>https://dev.to/sayed_ali_alkamel/flutter-material-and-cupertino-leave-the-sdk-what-changes-for-your-app-3cn</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Flutter is moving Material and Cupertino out of the SDK and onto pub.dev as &lt;code&gt;material_ui&lt;/code&gt; and &lt;code&gt;cupertino_ui&lt;/code&gt;. Contributions to both libraries inside &lt;code&gt;flutter/flutter&lt;/code&gt; froze on April 7, 2026, and both package names are already reserved by the flutter.dev publisher. Nothing in your app breaks today, but every &lt;code&gt;import 'package:flutter/material.dart'&lt;/code&gt; in the ecosystem eventually becomes a package dependency.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Material and Cupertino decoupling?
&lt;/h2&gt;

&lt;p&gt;Flutter has always shipped its two design systems inside the framework. You import &lt;code&gt;package:flutter/material.dart&lt;/code&gt;, you get Material's widget set, and you declare nothing. The decoupling project, tracked in &lt;a href="https://github.com/flutter/flutter/issues/101479" rel="noopener noreferrer"&gt;flutter/flutter#101479&lt;/a&gt;, ends that arrangement and republishes both libraries as first-party packages on pub.dev.&lt;/p&gt;

&lt;p&gt;The first milestone landed on April 7, 2026, when all contributions to Material and Cupertino inside &lt;code&gt;flutter/flutter&lt;/code&gt; were frozen (&lt;a href="https://blog.flutter.dev/flutters-material-and-cupertino-code-freeze-d32d94c59c38" rel="noopener noreferrer"&gt;Flutter blog&lt;/a&gt;). No further changes are allowed in the framework copies. Development resumes in &lt;code&gt;flutter/packages&lt;/code&gt; once the new packages ship.&lt;/p&gt;

&lt;p&gt;One correction worth making, because a lot of write-ups still get it wrong: the packages are named &lt;code&gt;material_ui&lt;/code&gt; and &lt;code&gt;cupertino_ui&lt;/code&gt;, not &lt;code&gt;material&lt;/code&gt; and &lt;code&gt;cupertino&lt;/code&gt;. Both already exist on pub.dev at version 0.0.1 under the verified flutter.dev publisher, currently unlisted placeholders (&lt;a href="https://pub.dev/packages/material_ui/versions" rel="noopener noreferrer"&gt;pub.dev&lt;/a&gt;). Even as placeholders, &lt;code&gt;material_ui&lt;/code&gt; has collected 152 likes and 4.28k downloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why move Material and Cupertino out of the SDK?
&lt;/h2&gt;

&lt;p&gt;Release cadence is the headline reason. Flutter plans four stable releases for 2026 (&lt;a href="https://blog.flutter.dev/whats-new-in-flutter-3-41-302ec140e632" rel="noopener noreferrer"&gt;Flutter blog&lt;/a&gt;), so a one-line design fix waits roughly a quarter to reach anyone. Contributors in the tracking issue documented exactly that, including a &lt;code&gt;CupertinoAlertDialog&lt;/code&gt; divider rendering the wrong color because a value failed to resolve. Community design packages like &lt;code&gt;fluent_ui&lt;/code&gt; and &lt;code&gt;macos_ui&lt;/code&gt; ship on their own schedule and update far more often.&lt;/p&gt;

&lt;p&gt;The architectural reason matters more. Material and Cupertino were entangled with each other and with the core widgets layer. An audit posted in the issue found 21 of Material's 179 source files importing Cupertino, while Cupertino imported Material zero times. Untangling that meant pushing shared behavior down into &lt;code&gt;widgets&lt;/code&gt;, which is why the team has spent years relocating pieces like &lt;code&gt;ToggleableStateMixin&lt;/code&gt; and &lt;code&gt;RawMenuAnchor&lt;/code&gt; out of Material.&lt;/p&gt;

&lt;p&gt;The payoff is a dependency inversion. Core widgets stop knowing about design systems, and design systems depend on widgets instead. That is what puts &lt;code&gt;fluent_ui&lt;/code&gt;, &lt;code&gt;yaru&lt;/code&gt;, and your own in-house design system on the same footing as Material.&lt;/p&gt;

&lt;p&gt;![Two-lane diagram comparing how a design fix reaches your app today, waiting for the quarterly Flutter SDK release, versus after decoupling, when it ships as a material_ui release on pub.dev.]&lt;br&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9jcmasmdk7otbd7w8zie.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9jcmasmdk7otbd7w8zie.gif" alt=" " width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What actually changes in your pubspec?
&lt;/h2&gt;

&lt;p&gt;Two dependency lines and an import. That is the whole mechanical change for most apps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;sdk&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flutter&lt;/span&gt;
  &lt;span class="na"&gt;material_ui&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^1.0.0&lt;/span&gt;
  &lt;span class="na"&gt;cupertino_ui&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^1.0.0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// before&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:flutter/material.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// after&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:material_ui/material_ui.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The part that is not mechanical is what that import was hiding. &lt;code&gt;package:flutter/material.dart&lt;/code&gt; re-exports the entire widgets library, so plenty of files import Material only to reach &lt;code&gt;Column&lt;/code&gt;, &lt;code&gt;Text&lt;/code&gt;, or &lt;code&gt;StatelessWidget&lt;/code&gt;. Those files never needed a design system. They needed &lt;code&gt;package:flutter/widgets.dart&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When does this hit your app?
&lt;/h2&gt;

&lt;p&gt;Not yet, and not all at once. Flutter 3.44 shipped on May 18, 2026 with Material and Cupertino still inside the SDK. The in-framework copies are scheduled for deprecation in the stable release after 3.44, and deletion some time after that. The team has said it does not anticipate removing the old code within about a year (&lt;a href="https://github.com/flutter/flutter/issues/184093" rel="noopener noreferrer"&gt;flutter/flutter#184093&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Four steps, and only the first one has happened:&lt;/p&gt;

&lt;p&gt;![Four-step timeline of the Flutter Material and Cupertino decoupling: code freeze in April 2026, material_ui and cupertino_ui 1.0 published, SDK copies deprecated, SDK copies deleted.]&lt;br&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8v13sxfte96co2b725w0.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8v13sxfte96co2b725w0.gif" alt=" " width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to do before the packages land
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Audit your &lt;code&gt;material.dart&lt;/code&gt; imports.&lt;/strong&gt; Any file that imports Material but only touches widgets primitives should move to &lt;code&gt;package:flutter/widgets.dart&lt;/code&gt; now. This compiles on current stable, needs no new dependency, and removes those files from your migration entirely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Package authors, plan for two support windows.&lt;/strong&gt; If you publish something that re-exports Material or Cupertino widgets, you will need to work against both the SDK libraries and the new packages during the deprecation window. Decide early whether that is a major version bump or a compatibility shim, because your users will hit the deprecation warnings before you do.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Split your upgrade policy in two.&lt;/strong&gt; The whole point is that you can hold &lt;code&gt;material_ui&lt;/code&gt; at a version your design team signed off on while still taking SDK upgrades for performance and security fixes. Start treating the design system version and the Flutter version as two separate decisions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Will my app break when this ships?&lt;/strong&gt;&lt;br&gt;
No. The SDK copies stay through a deprecation window, and the Flutter team does not expect to delete them within about a year of the April 2026 freeze. You migrate on your own schedule.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the package names?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;material_ui&lt;/code&gt; and &lt;code&gt;cupertino_ui&lt;/code&gt;, both published by flutter.dev. Articles referring to &lt;code&gt;material&lt;/code&gt; and &lt;code&gt;cupertino&lt;/code&gt; predate the naming decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is Google dropping Material design in Flutter?&lt;/strong&gt;&lt;br&gt;
No. Material stays first-party and Google-maintained. It moves onto its own release train so fixes and new Material specs land without waiting for a quarterly SDK cut.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use material_ui today?&lt;/strong&gt;&lt;br&gt;
Not for real work. The published 0.0.1 is an unlisted placeholder, and its API reference still says the library is coming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does this shrink my app?&lt;/strong&gt;&lt;br&gt;
Probably not much. Tree shaking already drops unused widgets, so the real win here is architectural, not binary size.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Move the material and cupertino packages outside of Flutter (tracking issue): &lt;a href="https://github.com/flutter/flutter/issues/101479" rel="noopener noreferrer"&gt;https://github.com/flutter/flutter/issues/101479&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Flutter's Material and Cupertino code freeze: &lt;a href="https://blog.flutter.dev/flutters-material-and-cupertino-code-freeze-d32d94c59c38" rel="noopener noreferrer"&gt;https://blog.flutter.dev/flutters-material-and-cupertino-code-freeze-d32d94c59c38&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Material and Cupertino are now frozen (issue #184093): &lt;a href="https://github.com/flutter/flutter/issues/184093" rel="noopener noreferrer"&gt;https://github.com/flutter/flutter/issues/184093&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;material_ui on pub.dev: &lt;a href="https://pub.dev/packages/material_ui/versions" rel="noopener noreferrer"&gt;https://pub.dev/packages/material_ui/versions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;cupertino_ui on pub.dev: &lt;a href="https://pub.dev/packages/cupertino_ui/versions" rel="noopener noreferrer"&gt;https://pub.dev/packages/cupertino_ui/versions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;What's new in Flutter 3.41 (2026 release cadence): &lt;a href="https://blog.flutter.dev/whats-new-in-flutter-3-41-302ec140e632" rel="noopener noreferrer"&gt;https://blog.flutter.dev/whats-new-in-flutter-3-41-302ec140e632&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Flutter release notes: &lt;a href="https://docs.flutter.dev/release/release-notes" rel="noopener noreferrer"&gt;https://docs.flutter.dev/release/release-notes&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>mobile</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Agent Design Patterns: Google and Anthropic, Side by Side</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 17 Jul 2026 19:25:36 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/agent-design-patterns-google-and-anthropic-side-by-side-21l2</link>
      <guid>https://dev.to/sayed_ali_alkamel/agent-design-patterns-google-and-anthropic-side-by-side-21l2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Agent design patterns are reusable ways to structure how a language model plans, delegates, and checks its own work. Anthropic and Google both published official guides, and they mostly agree. The real skill is not memorizing patterns, it is choosing the simplest one that solves your task, then adding structure only when it pays off.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are agent design patterns?
&lt;/h2&gt;

&lt;p&gt;An agent design pattern is a common architectural approach for organizing an agentic system: how the model connects to tools, and how one or more agents are orchestrated to finish a task (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Anthropic frames the same idea as "simple, composable patterns" that beat complex frameworks in practice (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The single most useful distinction comes from Anthropic. Workflows are systems where the control flow is fixed in code. Agents are systems where the model decides the control flow at runtime. That one line predicts a pattern's cost, latency, and how hard it is to debug.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvuolf0mi119vdv170l2.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvuolf0mi119vdv170l2.gif" alt="Diagram: a task enters two lanes, a workflow lane where code decides the fixed path, and an agent lane where the model decides an open path." width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How the two official guides line up
&lt;/h2&gt;

&lt;p&gt;Google's guidance lives in two places: a Developer Blog post on eight multi-agent patterns in the Agent Development Kit (ADK) (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;), and a Cloud Architecture Center document that adds trade-offs and a decision table (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Anthropic's guidance is a single engineering post, "Building Effective Agents" (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Here is how the names map.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What you want to do&lt;/th&gt;
&lt;th&gt;Anthropic&lt;/th&gt;
&lt;th&gt;Google&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Start from one capable unit&lt;/td&gt;
&lt;td&gt;Augmented LLM&lt;/td&gt;
&lt;td&gt;Single-agent system&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run fixed steps in order&lt;/td&gt;
&lt;td&gt;Prompt chaining&lt;/td&gt;
&lt;td&gt;Sequential pipeline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Send each input to a specialist&lt;/td&gt;
&lt;td&gt;Routing&lt;/td&gt;
&lt;td&gt;Coordinator / dispatcher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Do independent work at once&lt;/td&gt;
&lt;td&gt;Parallelization (sectioning, voting)&lt;/td&gt;
&lt;td&gt;Parallel fan-out and gather&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Break a task down at runtime&lt;/td&gt;
&lt;td&gt;Orchestrator-workers&lt;/td&gt;
&lt;td&gt;Hierarchical task decomposition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Critique and improve output&lt;/td&gt;
&lt;td&gt;Evaluator-optimizer&lt;/td&gt;
&lt;td&gt;Generator-critic, iterative refinement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Let the model own the loop&lt;/td&gt;
&lt;td&gt;Autonomous agents&lt;/td&gt;
&lt;td&gt;ReAct&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pause for a person&lt;/td&gt;
&lt;td&gt;Human oversight, checkpoints&lt;/td&gt;
&lt;td&gt;Human-in-the-loop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Let peers collaborate freely&lt;/td&gt;
&lt;td&gt;(not named)&lt;/td&gt;
&lt;td&gt;Swarm&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Combine several patterns&lt;/td&gt;
&lt;td&gt;Combining and customizing&lt;/td&gt;
&lt;td&gt;Composite / custom logic&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The overlap is not a coincidence. Both teams watched the same production systems and named the same shapes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one rule both guides repeat
&lt;/h2&gt;

&lt;p&gt;Start simple. Anthropic says to find the simplest solution possible and add complexity only when it demonstrably improves outcomes. Google says to begin with a single agent, refine its prompt and tools, and reach for multi-agent designs only when one agent starts to struggle. The reason is money and reliability: multi-agent systems can use many more model calls, and every extra model call adds latency, cost, and a new place for errors to compound.&lt;/p&gt;

&lt;p&gt;A useful test before you add a pattern: can this task run as a single model call with good retrieval and a few examples? If yes, you do not need an agent at all (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  The patterns, one article each
&lt;/h2&gt;

&lt;p&gt;Each link below is a short, illustrated guide with an animated diagram, when to use it, when not to, and the known failure modes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/the-augmented-llm-the-building-block-every-agent-sits-on-4hdm"&gt;The Augmented LLM&lt;/a&gt;: the foundation, one model with retrieval, tools, and memory.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/prompt-chaining-fixed-steps-that-each-feed-the-next-4jkb"&gt;Prompt Chaining&lt;/a&gt;: fixed steps, each feeding the next.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/routing-classify-the-input-then-send-it-to-a-specialist-cl3"&gt;Routing&lt;/a&gt;: classify an input, then send it to a specialist.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/parallelization-run-subtasks-at-once-then-merge-1ok"&gt;Parallelization&lt;/a&gt;: run subtasks at the same time, then merge.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/orchestrator-workers-decide-the-subtasks-at-runtime-4ma0"&gt;Orchestrator-Workers&lt;/a&gt;: decide the subtasks at runtime and delegate.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/evaluator-optimizer-generate-critique-and-refine-in-a-loop-4a47"&gt;Evaluator-Optimizer&lt;/a&gt;: generate, critique, and refine in a loop.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/autonomous-agents-and-the-react-loop-when-the-model-owns-control-2mp"&gt;Autonomous Agents&lt;/a&gt;: the ReAct loop, where the model owns control.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/human-in-the-loop-let-a-person-authorize-the-risky-step-28o9"&gt;Human-in-the-Loop&lt;/a&gt;: a person authorizes high-stakes steps.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/the-swarm-pattern-peer-agents-that-debate-and-converge-4gn9"&gt;Swarm&lt;/a&gt;: peer agents that debate and converge with no central boss.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/sayed_ali_alkamel/composite-patterns-how-real-agent-systems-combine-the-basics-3404"&gt;Composite Patterns&lt;/a&gt;: how real systems chain patterns together.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to choose, in practice
&lt;/h2&gt;

&lt;p&gt;Group the decision by the shape of your task (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). If the steps are known and fixed, you are in workflow territory: sequential, parallel, or a refinement loop. If the model must plan and decide at runtime, you need dynamic orchestration: a single agent, a coordinator, hierarchical decomposition, or a swarm. If quality comes from cycles of feedback, use ReAct, a loop, or a generator-critic. If the task carries real risk, add a human-in-the-loop checkpoint regardless of the base pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Are Google and Anthropic's agent patterns different?&lt;/strong&gt;&lt;br&gt;
Mostly no. The names differ, but the shapes match: chaining equals a sequential pipeline, routing equals a coordinator, and so on. Google adds a few multi-agent patterns Anthropic does not name, such as swarm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between a workflow and an agent?&lt;/strong&gt;&lt;br&gt;
In a workflow the control flow is written in code, so it is predictable. In an agent the model decides the control flow at runtime, so it is flexible but costs more and is harder to debug (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need a framework to use these patterns?&lt;/strong&gt;&lt;br&gt;
No. Anthropic recommends starting with direct API calls, since many patterns take only a few lines of code. Frameworks like Google ADK help once you standardize on multi-agent orchestration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which pattern should I start with?&lt;/strong&gt;&lt;br&gt;
A single augmented LLM. Add another pattern only when that one agent measurably falls short.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Agent Development Kit docs: &lt;a href="https://google.github.io/adk-docs/" rel="noopener noreferrer"&gt;https://google.github.io/adk-docs/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Composite Patterns: How Real Agent Systems Combine the Basics</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 17 Jul 2026 19:22:38 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/composite-patterns-how-real-agent-systems-combine-the-basics-3404</link>
      <guid>https://dev.to/sayed_ali_alkamel/composite-patterns-how-real-agent-systems-combine-the-basics-3404</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Real agent systems rarely use one pattern. They chain several: route the request, fan out a search, then run a critic before replying. Google calls the mix a composite pattern, and gives you a custom logic pattern when even that is not enough. Anthropic frames the same idea as combining and customizing the building blocks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are composite patterns?
&lt;/h2&gt;

&lt;p&gt;Composite patterns combine the basic patterns to build production-grade applications (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;). Anthropic makes the same point about its building blocks: they are not prescriptive, they are common patterns you shape and combine to fit your use case (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Google's worked example is a customer support system: a coordinator routes the request, a technical issue triggers a parallel search of documentation and user history, and the final answer passes through a generator-critic loop to keep the tone consistent before it reaches the user (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7v39hwv9vh32mqe48ph7.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7v39hwv9vh32mqe48ph7.gif" alt="Diagram: a pipeline of combined patterns, a coordinator routes, a parallel stage fans out, a critic gates quality, then the reply goes to the user." width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  When one pattern is not enough: custom logic
&lt;/h2&gt;

&lt;p&gt;Sometimes the mix needs real branching that no single pattern provides. Google's custom logic pattern gives you maximum flexibility by letting you implement orchestration in code, using constructs like conditional statements to create workflows with multiple branching paths (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The example is a refund agent. A coordinator runs a parallel verifier that checks the purchaser and refund eligibility at once. It then calls a tool to decide eligibility. If the user is eligible, it routes to a refund processor. If not, it routes to a separate sequential flow for store credit. Whichever path runs, a final agent writes the answer (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). That mix of a parallel check plus a conditional branch to two different downstream processes is the textbook case for custom logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use composite and custom logic
&lt;/h2&gt;

&lt;p&gt;Use a composite pattern when a single task naturally spans several shapes: a decision, then concurrent work, then a quality check. Most production systems land here, because real requests are not uniform.&lt;/p&gt;

&lt;p&gt;Use the custom logic pattern specifically when you need fine-grained control or your workflow does not fit any standard pattern (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). It is the right tool for complex, branching logic that mixes predefined rules with model reasoning.&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not combine patterns before a single one has failed you. Google's own advice is to start simple, get a sequential chain working, debug it, and only then add complexity (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;). A composite system built on day one is a debugging nightmare with no baseline to compare against.&lt;/p&gt;

&lt;p&gt;And do not jump to custom logic when a supported pattern already fits. Hand-rolled orchestration is the most work to maintain, so use it only when the standard shapes genuinely cannot express your flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The cost of custom logic is ownership. Google is explicit: this approach increases development and maintenance complexity, because you are responsible for designing, implementing, and debugging the entire orchestration flow, which is more error-prone than a predefined pattern supported by a tool like ADK (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Composite systems also inherit every failure mode of their parts. A composite that includes a loop can loop forever, one that includes parallel work can hit race conditions, and one that routes can misroute. The more patterns you stack, the more places there are to fail, which is why the discipline of adding one at a time matters so much.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three pro tips before you combine patterns
&lt;/h2&gt;

&lt;p&gt;Google closes its guide with three that apply directly here (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Treat state as your whiteboard.&lt;/strong&gt; Use descriptive keys when one agent writes output, so downstream agents know exactly what they are reading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write precise descriptions.&lt;/strong&gt; In any routing step, a sub-agent's description is the documentation the model uses to decide. Be exact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start simple.&lt;/strong&gt; Do not build a nested loop system on day one. Get a chain working, then add complexity in measured steps.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is a composite agent pattern?&lt;/strong&gt;&lt;br&gt;
A composite pattern combines basic patterns, such as routing, parallelization, and a critic loop, into one system. Most production agents are composites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should I use custom logic instead of a standard pattern?&lt;/strong&gt;&lt;br&gt;
When your workflow needs branching that no single pattern expresses, or when you need fine-grained control that mixes coded rules with model reasoning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why not just start with a composite system?&lt;/strong&gt;&lt;br&gt;
Because you lose the ability to debug. Start with one pattern, prove it, then add the next. A day-one composite has no baseline and hides its bugs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do composites cost more?&lt;/strong&gt;&lt;br&gt;
Usually, since they run more patterns and more model calls. They also inherit the failure modes of every pattern they include, so plan safeguards for each.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>architecture</category>
    </item>
    <item>
      <title>The Swarm Pattern: Peer Agents That Debate and Converge</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 17 Jul 2026 19:22:24 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/the-swarm-pattern-peer-agents-that-debate-and-converge-4gn9</link>
      <guid>https://dev.to/sayed_ali_alkamel/the-swarm-pattern-peer-agents-that-debate-and-converge-4gn9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; In a swarm, several specialized agents talk to each other directly, share findings, and refine a solution together, with no central orchestrator. Google names it in its Cloud Architecture Center guide as the most powerful and the most expensive multi-agent pattern. Reach for it only when a problem truly benefits from debate.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the swarm pattern?
&lt;/h2&gt;

&lt;p&gt;The swarm pattern uses a collaborative, all-to-all communication approach, where multiple specialized agents work together to iteratively refine a solution to a complex problem (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). The defining feature is that each agent can communicate with every other agent, sharing findings, critiquing proposals, and building on each other's work.&lt;/p&gt;

&lt;p&gt;This is what sets a swarm apart from the coordinator pattern. A swarm typically has no central supervisor keeping the process on track. A dispatcher agent routes the initial request and facilitates communication, but it does not orchestrate the workflow the way a coordinator does (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc0n14ruh1mgh6j5crigw.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc0n14ruh1mgh6j5crigw.gif" alt="Diagram: three peer agents, researcher, engineer, and finance, pass work around a shared task, converging on consensus." width="780" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;A dispatcher interprets the request and decides which agent should start. From there, any agent can hand the task to another it judges better suited to the next step, or return the final answer to the user through the dispatcher (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Because there is no orchestrator to stop the process, you must define an explicit exit condition. Google is clear that this is often a maximum number of iterations, a time limit, or the achievement of a specific goal such as reaching consensus (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Without one, the swarm has no natural place to end.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Use a swarm for ambiguous or highly complex problems that benefit from debate and iterative refinement (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Google's example is product design: a market researcher agent, an engineering agent, and a financial modeling agent share ideas, debate the trade-offs between features and cost, and converge on a specification that balances the competing requirements.&lt;/p&gt;

&lt;p&gt;The value is the synthesis of multiple expert perspectives. When the answer depends on several specialists genuinely reacting to each other, a swarm can produce results a single agent or a rigid pipeline cannot.&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not use a swarm when a simpler pattern fits. If the task has a known structure, a sequential pipeline or a coordinator is cheaper and far easier to control. Do not use it when you need predictable latency or cost, because dynamic, all-to-all conversation is neither. And do not use it when you cannot define a solid exit condition, since an open-ended debate with no stopping rule is a recipe for runaway cost.&lt;/p&gt;

&lt;p&gt;Google's own comparison table flags the profile plainly: high latency and operational cost due to dynamic, all-to-all communication between agents (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). That is the price of admission.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The swarm is the most complex and costly multi-agent pattern to implement (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Two problems drive that.&lt;/p&gt;

&lt;p&gt;First, convergence is not guaranteed. Because no agent uses a model to orchestrate, the pattern can fall into unproductive loops or fail to converge on a solution (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Agents can talk past each other without ever settling.&lt;/p&gt;

&lt;p&gt;Second, the communication itself is hard to manage. You have to design sophisticated logic to control the inter-agent communication, manage the iterative workflow, and handle the significant cost and latency of a multi-turn conversation between agents (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). This is the pattern where multi-agent designs most often turn fragile, so many teams keep it as a last resort rather than a default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define an exit condition first.&lt;/strong&gt; With no orchestrator, an iteration cap, a time limit, or a consensus goal is the only thing that ends the run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expect the highest bill in the catalog.&lt;/strong&gt; All-to-all conversation multiplies model calls. Budget accordingly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Try a coordinator first.&lt;/strong&gt; If a central agent can route and combine, you probably do not need a swarm. Use the swarm only when debate is the point.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How is a swarm different from a coordinator?&lt;/strong&gt;&lt;br&gt;
A coordinator uses a model to orchestrate and route tasks. A swarm has no orchestrator; peers communicate all-to-all and hand off to each other, with a dispatcher only facilitating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is the swarm so expensive?&lt;/strong&gt;&lt;br&gt;
Dynamic, all-to-all communication means many model calls across a multi-turn conversation, which drives both latency and cost higher than any other pattern here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I stop a swarm from looping forever?&lt;/strong&gt;&lt;br&gt;
Define an explicit exit condition: a maximum number of iterations, a time limit, or reaching consensus. Without one, it may not converge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is swarm an Anthropic pattern too?&lt;/strong&gt;&lt;br&gt;
No. Google names it in its Cloud Architecture Center guide. Anthropic does not list a swarm in Building Effective Agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Agent Development Kit docs: &lt;a href="https://google.github.io/adk-docs/" rel="noopener noreferrer"&gt;https://google.github.io/adk-docs/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Human-in-the-Loop: Let a Person Authorize the Risky Step</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 17 Jul 2026 19:22:12 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/human-in-the-loop-let-a-person-authorize-the-risky-step-28o9</link>
      <guid>https://dev.to/sayed_ali_alkamel/human-in-the-loop-let-a-person-authorize-the-risky-step-28o9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Human-in-the-loop inserts a checkpoint where the agent pauses and waits for a person to approve, correct, or add input before it continues. Google names it as a first-class pattern, and Anthropic builds the same checkpoints into its agents. Use it whenever an action is irreversible or high-stakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the human-in-the-loop pattern?
&lt;/h2&gt;

&lt;p&gt;The human-in-the-loop pattern integrates points for human intervention directly into an agent's workflow. At a predefined checkpoint, the agent pauses and calls an external system to wait for a person to review its work, so the person can approve a decision, correct an error, or provide input before the agent continues (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Anthropic describes the same behavior for autonomous agents: they can pause for human feedback at checkpoints or when they hit a blocker (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). It is less a separate architecture and more a control you add to any pattern.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzwnsphkzbnxpkurwx6ru.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzwnsphkzbnxpkurwx6ru.gif" alt="Diagram: an agent does routine work, hits a checkpoint that pauses, a human approves or rejects, then the agent commits the action." width="800" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;The agent runs normally until it reaches a step that needs sign-off. It then calls an approval step that halts execution and requests a human decision. In Google ADK you implement this with a custom tool: the agent calls an approval tool that pauses execution or triggers an external system to request human intervention (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Google's example is a transaction agent that handles routine work but calls an approval tool for high-stakes checks, which pauses and waits for a human reviewer to say yes or no (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Google ADK, sketch
&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;TransactionAgent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Handle routine work. If high stakes, call ApprovalTool.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApprovalTool&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Use human-in-the-loop for tasks that need human oversight, subjective judgment, or final approval on critical actions (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Google is specific about which actions qualify: executing financial transactions, deploying code to production, or acting on sensitive data rather than merely processing it (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;A concrete case: an agent that anonymizes a patient dataset redacts the protected information automatically, then pauses for a human compliance officer to validate and approve the release, so no sensitive data leaks (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). The pattern shows up in coding too, where Anthropic notes that automated tests verify functionality but human review remains crucial for aligning a solution with broader system requirements (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not add a human checkpoint to routine, low-stakes, reversible actions. A pause there just adds latency and annoys the user for no safety gain. Do not use it where you need fully automated throughput and the risk is genuinely low. And do not treat it as a substitute for good guardrails; it is the last line, not the only line.&lt;/p&gt;

&lt;p&gt;The judgment call is honest: every checkpoint trades speed and autonomy for safety. Put them only where the downside of a wrong action is worse than the delay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The main cost is engineering. Google notes this pattern can add significant architectural complexity, because you have to build and maintain the external system for user interaction (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Pausing an agent, notifying a person, holding state while you wait, and resuming cleanly is real infrastructure.&lt;/p&gt;

&lt;p&gt;The second issue is human factors. If checkpoints fire too often, reviewers rubber-stamp them, and the safety benefit evaporates. Place checkpoints where judgment actually matters, so each one gets real attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Reserve it for irreversible actions.&lt;/strong&gt; Money moving, code shipping, sensitive data leaving. That is the bar Google draws.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design the pause and resume.&lt;/strong&gt; Holding state while a human decides, then continuing, is the hard part. Plan it before you add the checkpoint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not over-gate.&lt;/strong&gt; Too many approvals train reviewers to click through. Fewer, well-placed checkpoints stay meaningful.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is a human-in-the-loop agent?&lt;/strong&gt;&lt;br&gt;
An agent that pauses at a checkpoint and waits for a person to approve, correct, or add input before it continues, usually for high-stakes steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should an agent pause for a human?&lt;/strong&gt;&lt;br&gt;
Before irreversible or high-stakes actions: financial transactions, production deploys, or acting on sensitive data. Routine steps should not pause.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is human-in-the-loop a separate pattern or an add-on?&lt;/strong&gt;&lt;br&gt;
Both. Google lists it as a pattern, but in practice you layer it onto other patterns wherever a step carries real risk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it slow the agent down?&lt;/strong&gt;&lt;br&gt;
Yes, by design. You accept the delay at specific checkpoints in exchange for safety and accountability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>safety</category>
    </item>
    <item>
      <title>Autonomous Agents and the ReAct Loop: When the Model Owns Control</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Fri, 17 Jul 2026 19:21:55 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/autonomous-agents-and-the-react-loop-when-the-model-owns-control-2mp</link>
      <guid>https://dev.to/sayed_ali_alkamel/autonomous-agents-and-the-react-loop-when-the-model-owns-control-2mp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; An autonomous agent is a model using tools in a loop, deciding its own next step from what it observes. Anthropic calls it an agent; Google calls the core loop ReAct: thought, action, observation. It is the most flexible pattern and the most expensive, so you use it only when you cannot hardcode the path.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is an autonomous agent?
&lt;/h2&gt;

&lt;p&gt;Agents are systems where the model dynamically directs its own processes and tool usage, keeping control over how it accomplishes a task (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). That is the line that separates an agent from a workflow: in a workflow, code owns the control flow, but here the model owns it.&lt;/p&gt;

&lt;p&gt;Google names the loop that powers this the ReAct pattern, after the 2022 research paper. The agent runs an iterative loop of thought, action, and observation until an exit condition is met (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;, &lt;a href="https://arxiv.org/abs/2210.03629" rel="noopener noreferrer"&gt;ReAct paper&lt;/a&gt;).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foi0byemwui89fyfmkztt.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foi0byemwui89fyfmkztt.gif" alt="Diagram: a cycle of thought, action, and observation around a central environment node, with a dashed exit to a final answer." width="780" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The loop, step by step
&lt;/h2&gt;

&lt;p&gt;Google breaks ReAct into three moves (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Thought:&lt;/strong&gt; the model reasons about the task and decides what to do next, judging whether the request is fully answered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action:&lt;/strong&gt; it either picks a tool and forms a query to gather more information, or, if the task is done, writes the final answer and ends the loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observation:&lt;/strong&gt; it reads the tool output and saves what matters to memory, so it can build on past observations instead of repeating itself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anthropic frames the same idea and stresses one thing: at each step the agent must gain ground truth from the environment, such as tool results or code execution, to assess its progress (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). The loop ends on completion, or on a stopping condition like a maximum number of iterations.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;An agent is, in Anthropic's words, typically just an LLM using tools based on environmental feedback in a loop. Because so much rides on those tools, Anthropic spent more time optimizing tools than prompts when building its coding agent, and small changes mattered: switching to absolute file paths removed a whole class of mistakes (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Google adds a debugging benefit: the model's thinking gives you a transcript of its reasoning, which helps you see where it went wrong (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Use an autonomous agent for open-ended problems where you cannot predict the number of steps and cannot hardcode a fixed path (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). The agent may run for many turns, so you need some trust in its decisions. Anthropic's own examples are a coding agent that resolves real GitHub issues across many files, and a computer-use agent that operates a desktop to finish tasks.&lt;/p&gt;

&lt;p&gt;Google's fit is the same: complex, dynamic tasks that need continuous planning and adaptation, such as a robotics agent that recomputes its path as new obstacles appear (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). If the constraints change while the agent works, the loop lets it adjust.&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not use an autonomous agent when a workflow will do. If the steps are predictable, a fixed pipeline is cheaper, faster, and easier to trust. Do not use it for high-frequency, low-complexity tasks, where deterministic code beats both workflows and agents on cost and latency. And avoid it in untrusted environments without strong guardrails, because autonomy plus a risky action surface is how small mistakes become big ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;Autonomy has a price. Anthropic is direct: the autonomous nature of agents means higher costs and the potential for compounding errors, so it recommends extensive testing in sandboxed environments with appropriate guardrails (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Google names the two specific risks. The multi-step loop can raise end-to-end latency compared to a single query. And the agent's quality depends heavily on the model's reasoning, so an error or a misleading tool result in one observation can propagate and make the final answer wrong (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). One bad observation early can derail everything after it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set a stopping condition.&lt;/strong&gt; A maximum iteration count keeps a wandering agent from running forever.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invest in tools, not just prompts.&lt;/strong&gt; The agent acts through tools, so a clear, mistake-proof tool interface is where reliability comes from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandbox first.&lt;/strong&gt; Test in an isolated environment with guardrails before you let an agent act on anything that matters.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the ReAct pattern?&lt;/strong&gt;&lt;br&gt;
ReAct is the reasoning loop behind autonomous agents: the model thinks, takes an action such as a tool call, observes the result, and repeats until it has an answer (&lt;a href="https://arxiv.org/abs/2210.03629" rel="noopener noreferrer"&gt;ReAct paper&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is an agent different from a workflow?&lt;/strong&gt;&lt;br&gt;
In a workflow, the control flow is fixed in code. In an agent, the model decides the control flow at runtime. That flexibility costs more and is harder to debug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do autonomous agents cost more?&lt;/strong&gt;&lt;br&gt;
They run many turns, each a model call, and every call adds latency and cost. Errors can also compound across steps, requiring more testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I keep an autonomous agent safe?&lt;/strong&gt;&lt;br&gt;
Test in a sandbox, add guardrails, set a maximum iteration count, and keep humans in the loop for high-stakes actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models: &lt;a href="https://arxiv.org/abs/2210.03629" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2210.03629&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>react</category>
    </item>
    <item>
      <title>Evaluator-Optimizer: Generate, Critique, and Refine in a Loop</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Wed, 15 Jul 2026 17:49:22 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/evaluator-optimizer-generate-critique-and-refine-in-a-loop-4a47</link>
      <guid>https://dev.to/sayed_ali_alkamel/evaluator-optimizer-generate-critique-and-refine-in-a-loop-4a47</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; The evaluator-optimizer pattern has one agent generate output while another evaluates it and gives feedback, in a loop. Anthropic calls it evaluator-optimizer. Google splits the same idea into a generator-critic loop for correctness and an iterative refinement loop for quality. Both live or die by their exit condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the evaluator-optimizer?
&lt;/h2&gt;

&lt;p&gt;In the evaluator-optimizer workflow, one LLM call generates a response while another provides evaluation and feedback in a loop (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Google frames it as two specialized agents: a generator creates an output, and a critic evaluates it against set criteria, then approves it, rejects it, or returns it with feedback for revision (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;It mirrors how a writer works: draft, get notes, revise, repeat until it is good.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhfp2z9g5xeinmauhsqfj.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhfp2z9g5xeinmauhsqfj.gif" alt="Diagram: a generator drafts, an evaluator scores and gives feedback, a dashed loop returns the feedback to the generator, and passing output exits to the right." width="720" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Two flavors of the same loop
&lt;/h2&gt;

&lt;p&gt;Google draws a line worth keeping (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generator-critic&lt;/strong&gt; focuses on correctness. The critic returns a pass or fail against hard criteria, such as valid syntax or passing unit tests. On a pass, the loop breaks. On a fail, specific feedback goes back to the generator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iterative refinement&lt;/strong&gt; focuses on quality. A generator drafts, a critic suggests optimizations, and a refiner rewrites. It repeats to polish, not just to pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are implementations of a loop agent, and both need a way out (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Google ADK, sketch
&lt;/span&gt;&lt;span class="n"&gt;generator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generator&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Draft. If {feedback}, fix it.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;draft&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;critic&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Critic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Check {draft}. Output PASS or the errors.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;feedback&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;loop&lt;/span&gt;      &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LoopAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sub_agents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;generator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;critic&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;exit_condition&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PASS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;The generator produces a draft. The critic evaluates it against explicit criteria and either approves it or sends feedback. The loop repeats until the output passes or hits an iteration cap. In ADK you can set a hard limit with a maximum iteration count, and an agent can also signal early completion when the quality bar is met before the cap (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Anthropic gives two clear signals of fit: an answer that measurably improves when a human articulates feedback, and a model that can produce that kind of feedback itself (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). If both hold, a critic loop tends to pay off. Anthropic's example is literary translation, where the first pass misses nuance an evaluator can catch, and complex search, where the evaluator decides whether more searching is warranted.&lt;/p&gt;

&lt;p&gt;Google's version fits tasks where output must be highly accurate or must meet strict constraints before use, such as a generator writing code and a critic auditing it for vulnerabilities or checking that it passes tests (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not use it when you have no reliable way to judge good from bad. The loop becomes circular when the evaluator cannot tell a good output from a weak one, and you spend calls without converging. Do not use it when a single pass is already good enough, since the extra critic call is pure overhead. And avoid it for latency-critical paths, because each cycle adds at least one more model call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The direct cost is latency and money. The workflow needs at least one extra model call for the critic, and if revision loops kick in, both latency and cost accumulate with each iteration (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The dangerous failure is the loop that never ends. Google warns that if the termination condition is not defined correctly, or the subagents never produce the state that stops the loop, it can run indefinitely, leading to excessive cost, high resource use, and potential system hangs (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). A maximum iteration count is not optional, it is the safety belt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Always cap the iterations.&lt;/strong&gt; A hard limit prevents runaway cost and hangs, even when your quality check is imperfect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the criteria explicit.&lt;/strong&gt; The critic can only enforce standards you spell out. Vague criteria produce vague critiques.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick your flavor.&lt;/strong&gt; Pass or fail for correctness, iterative rewrite for quality. They want different exit conditions.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is evaluator-optimizer the same as generator-critic?&lt;/strong&gt;&lt;br&gt;
They are the same loop. Anthropic uses "evaluator-optimizer." Google splits it into a generator-critic loop for correctness and iterative refinement for quality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I avoid an infinite loop?&lt;/strong&gt;&lt;br&gt;
Set a maximum number of iterations and a clear exit condition. Optionally let the agent signal early completion when the quality bar is met.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When does this pattern actually help?&lt;/strong&gt;&lt;br&gt;
When feedback demonstrably improves the output and the model can generate that feedback. If either is missing, the loop wastes calls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is this the same as chain-of-thought?&lt;/strong&gt;&lt;br&gt;
No. Chain-of-thought is reasoning inside one call. This pattern uses a separate evaluation step and can loop across multiple calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>workflows</category>
    </item>
    <item>
      <title>Orchestrator-Workers: Decide the Subtasks at Runtime</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Mon, 13 Jul 2026 08:46:09 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/orchestrator-workers-decide-the-subtasks-at-runtime-4ma0</link>
      <guid>https://dev.to/sayed_ali_alkamel/orchestrator-workers-decide-the-subtasks-at-runtime-4ma0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; In orchestrator-workers, a central agent breaks a task into subtasks at runtime, delegates them to worker agents, and synthesizes the results. Anthropic calls it orchestrator-workers; Google calls it hierarchical task decomposition. The defining trait is that the subtasks are not known in advance.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is orchestrator-workers?
&lt;/h2&gt;

&lt;p&gt;In the orchestrator-workers workflow, a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Google's hierarchical task decomposition organizes agents into a multi-level hierarchy: a root agent receives a complex task, decomposes it into smaller subtasks, and delegates each to a specialized subagent, which can decompose further (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The one line to remember is Anthropic's: this looks like parallelization, but the subtasks are not pre-defined, they are determined by the orchestrator based on the specific input (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2cqb23xurluon20hjryi.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2cqb23xurluon20hjryi.gif" alt="Diagram: an orchestrator plans on the fly and delegates to three workers handling different files, which feed a synthesize node." width="799" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;The orchestrator reads the task, decides what subtasks it needs right now, and hands each to a worker. Google's ADK guide shows a report writer that does not research anything itself. It delegates to a research assistant, which in turn manages its own web-search and summarizer tools (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;A neat trick makes this composable: you can wrap a whole sub-agent as a tool. In ADK, wrapping an agent in an agent-tool lets the parent call the entire sub-workflow as if it were a single function (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Google ADK, sketch
&lt;/span&gt;&lt;span class="n"&gt;research&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ResearchAssistant&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;sub_agents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;web_search_agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;summarizer_agent&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;report&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ReportWriter&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Write a report. Use ResearchAssistant to gather info.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;AgentTool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;research&lt;/span&gt;&lt;span class="p"&gt;)])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Use orchestrator-workers when you cannot predict the subtasks a task will need. Anthropic's example is coding: the number of files to change and the nature of each change depend on the task, so you cannot hardcode them (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Search is similar, where you gather and analyze from sources you do not know ahead of time.&lt;/p&gt;

&lt;p&gt;Google positions hierarchical decomposition for ambiguous, open-ended problems that need multi-step reasoning: research, planning, and synthesis. A coordinator decomposes a research project into gathering, analysis, and writing, then delegates each to a specialist (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). Decomposing the ambiguity is the whole point.&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not reach for this when the subtasks are fixed. If you already know the steps, use parallelization or a chain, both of which are cheaper and easier to debug. Do not use it for simple tasks, because the multi-level structure adds real overhead you will not recover. And if a single agent with good tools already handles the task, the hierarchy is premature.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The cost is complexity, on two fronts. The multi-level structure adds considerable architectural complexity, which makes the system harder to design, debug, and maintain (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). And the layers of delegation and reasoning produce a high number of model calls, which significantly increases both latency and operational cost (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;There is a subtler risk when this pattern is pushed toward autonomous multi-agent territory. When parallel workers share implicit context they do not actually have, they can make conflicting choices that do not compose, which is why some teams keep writes single-threaded even in a hierarchy. The safe version keeps the orchestrator firmly in charge of how the pieces fit back together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;This is dynamic, not parallel.&lt;/strong&gt; If you can list the subtasks in advance, you do not need an orchestrator, you need a fan-out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrap sub-agents as tools.&lt;/strong&gt; Treating a sub-workflow as a single callable keeps the parent's reasoning clean and the system composable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget for the model calls.&lt;/strong&gt; Each layer multiplies calls. Watch cost and latency before you add another level.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How is orchestrator-workers different from parallelization?&lt;/strong&gt;&lt;br&gt;
Parallelization uses fixed, predefined subtasks. Orchestrator-workers decides the subtasks at runtime based on the input. Same shape on a diagram, different flexibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is hierarchical task decomposition the same pattern?&lt;/strong&gt;&lt;br&gt;
Yes, it is Google's name for it, extended across multiple levels. A root agent decomposes and delegates, and subagents can decompose further.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is this pattern so expensive?&lt;/strong&gt;&lt;br&gt;
Every layer of decomposition and delegation adds model calls, and those calls drive latency and cost. Deep hierarchies multiply the effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When does the model decide versus the code?&lt;/strong&gt;&lt;br&gt;
Here the orchestrator model decides the subtasks. That is what separates it from a coded pipeline, where the control flow is fixed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Parallelization: Run Subtasks at Once, Then Merge</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Thu, 09 Jul 2026 18:35:30 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/parallelization-run-subtasks-at-once-then-merge-1ok</link>
      <guid>https://dev.to/sayed_ali_alkamel/parallelization-run-subtasks-at-once-then-merge-1ok</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Parallelization runs independent subtasks at the same time and aggregates their outputs. Anthropic splits it into sectioning and voting, and Google calls it the parallel fan-out and gather pattern. Use it for speed, or to get several perspectives on the same problem for higher confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is parallelization?
&lt;/h2&gt;

&lt;p&gt;Parallelization has LLMs work simultaneously on a task and then aggregates their outputs programmatically (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Google's parallel pattern runs multiple specialized subagents on a task or subtasks at the same time, then synthesizes their outputs into one consolidated response (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Anthropic names two variations (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sectioning:&lt;/strong&gt; break a task into independent subtasks and run them in parallel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voting:&lt;/strong&gt; run the same task several times to get diverse outputs, then combine them.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ivvu0psa5osjxgk32jl.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ivvu0psa5osjxgk32jl.gif" alt="Diagram: a fan out node splits work to three parallel checks, security, style, and performance, which feed into one synthesize node." width="799" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;A dispatcher fans the work out, the workers run concurrently, and a final synthesizer gathers the results. Google's canonical example is automated code review: spawn a security auditor, a style enforcer, and a performance analyst on a pull request at the same time, then have a synthesizer combine their feedback into one review comment (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;One warning from Google's ADK guide: parallel agents run in separate threads but share session state, so each agent must write to a unique key to avoid race conditions (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Google ADK, sketch
&lt;/span&gt;&lt;span class="n"&gt;sec&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Security&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;security_report&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;sty&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Style&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;style_report&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;perf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Performance&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;performance_report&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;swarm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ParallelAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sub_agents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;sec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sty&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;perf&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;merge&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Synthesizer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Combine {security_report}, {style_report}, {performance_report}.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;workflow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SequentialAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sub_agents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;swarm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Use parallelization when the subtasks are independent and can run at once for speed, or when several attempts raise your confidence in the result (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). For complex tasks with many considerations, models often do better when each consideration gets its own focused call rather than one prompt trying to hold all of them.&lt;/p&gt;

&lt;p&gt;Two Anthropic examples make the split concrete. Sectioning fits guardrails: one model handles the user query while another screens it for problems, which beats making one call do both. Voting fits code review for vulnerabilities: several prompts each look for a problem, and you flag the code if any of them find one (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Do not parallelize when the subtasks depend on each other. If step two needs step one's output, they are a chain, not a fan-out. Do not use it when the subtasks are decided at runtime rather than fixed. That is orchestrator-workers, which looks similar but lets the lead agent choose the subtasks. And if a single call is fast and good enough, running many calls just multiplies cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The clearest cost is exactly that: running multiple agents at once raises immediate resource use and token consumption, which drives up operational cost (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). You trade money for latency.&lt;/p&gt;

&lt;p&gt;The harder problem is the gather step. Google notes that synthesizing potentially conflicting results requires complex logic, which adds to development and maintenance overhead (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). When two workers disagree, someone has to decide who wins, and that logic is where parallel systems get messy. Add the shared-state race condition risk, and careful key management becomes non-negotiable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Give every worker a unique output key.&lt;/strong&gt; Shared state plus concurrent writes equals race conditions. Distinct keys prevent them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design the merge first.&lt;/strong&gt; The synthesizer is the hard part, not the fan-out. Decide up front how you resolve conflicts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Know your variant.&lt;/strong&gt; Sectioning splits different subtasks, and voting repeats the same task for confidence. They solve different problems.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between sectioning and voting?&lt;/strong&gt;&lt;br&gt;
Sectioning breaks a task into different independent subtasks that run in parallel. Voting runs the same task multiple times and combines the outputs to raise confidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is parallelization the same as orchestrator-workers?&lt;/strong&gt;&lt;br&gt;
They look alike, but parallelization uses fixed, predefined subtasks, while orchestrator-workers decides the subtasks at runtime. Fixed versus dynamic is the dividing line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does parallelization always cost more?&lt;/strong&gt;&lt;br&gt;
It uses more tokens and compute at once, so it usually costs more per request. You accept that to gain speed or higher confidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I combine conflicting outputs?&lt;/strong&gt;&lt;br&gt;
That is the gather step, and it needs deliberate logic: a vote threshold, a priority order, or a synthesizer prompt. Plan it before you build the fan-out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>workflows</category>
    </item>
    <item>
      <title>Routing: Classify the Input, Then Send It to a Specialist</title>
      <dc:creator>Sayed Ali Alkamel</dc:creator>
      <pubDate>Wed, 08 Jul 2026 17:18:04 +0000</pubDate>
      <link>https://dev.to/sayed_ali_alkamel/routing-classify-the-input-then-send-it-to-a-specialist-cl3</link>
      <guid>https://dev.to/sayed_ali_alkamel/routing-classify-the-input-then-send-it-to-a-specialist-cl3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt; Routing classifies an input and hands it to the specialist best suited to it. Anthropic calls it routing, and Google calls it the coordinator or dispatcher pattern. It lets you write focused prompts for each case instead of one bloated prompt that tries to do everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is routing?
&lt;/h2&gt;

&lt;p&gt;Routing classifies an input and directs it to a specialized followup task (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Google's coordinator pattern describes the same move: a central agent analyzes a request, decomposes it, and dispatches it to the specialized agent that handles that function (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The reason it works is separation of concerns. Without routing, tuning a single prompt for one kind of input tends to hurt performance on the others (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Splitting lets each specialist stay sharp.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpnfzz2hfd0gdtusb50d2.gif" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpnfzz2hfd0gdtusb50d2.gif" alt="Diagram: a router node classifies intent, then sends the input down one of three paths, to a billing, tech support, or general specialist." width="799" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it actually works
&lt;/h2&gt;

&lt;p&gt;A classifier sits at the front. It can be an LLM or a plain classification model, whichever labels the input accurately. The label picks the downstream prompt, tools, and even the model size.&lt;/p&gt;

&lt;p&gt;In Google ADK this is model-driven delegation. You define a coordinator with a list of specialist sub-agents, and the framework transfers execution based on each specialist's description (&lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;Google Developers&lt;/a&gt;). The description field is doing real work here: it is effectively the API doc the model reads to decide where to send the request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Google ADK, sketch
&lt;/span&gt;&lt;span class="n"&gt;billing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Billing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Handles invoices and billing.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;tech&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;TechSupport&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Troubleshoots technical issues.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;router&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;LlmAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Coordinator&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Route billing issues to Billing and bugs to TechSupport.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="n"&gt;sub_agents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;billing&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tech&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A second win: route by difficulty
&lt;/h2&gt;

&lt;p&gt;Routing is not only about topic. Anthropic points out you can route easy, common questions to a small, cost-efficient model and hard, unusual ones to a larger model (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). That single decision can cut cost sharply without hurting the answers that actually need the big model.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use it
&lt;/h2&gt;

&lt;p&gt;Use routing when your inputs fall into distinct categories that are better handled separately, and when classification can be done accurately (&lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt;). Customer service is the canonical case: general questions, refunds, and technical support each want their own prompt, tools, and process. Google frames the fit as structured business processes that need adaptive routing, like sending an order-status, return, or refund request to the right specialist (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  When not to use it
&lt;/h2&gt;

&lt;p&gt;Skip routing when the categories are fuzzy or the classifier is unreliable. A wrong label sends the whole request down the wrong path, and the specialist has no way to know. If you cannot classify accurately, a single flexible agent may do better.&lt;/p&gt;

&lt;p&gt;Also skip it when one prompt already handles every input well. Routing adds at least one extra decision step, so if there is nothing to separate, you are paying for structure you do not need. And note the difference from parallelization: routing picks one destination, it does not run several at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;The main cost is more model calls. Because the coordinator and each specialist rely on a model to reason, this pattern makes more calls than a single agent, which raises token throughput, cost, and overall latency (&lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;Google Cloud&lt;/a&gt;). You get higher-quality, more focused answers, but you pay for the routing step.&lt;/p&gt;

&lt;p&gt;The second problem is misrouting. Classification is never perfect, and a confident wrong route is worse than a hedge. Weak specialist descriptions make this worse, because the model routes on those descriptions. Vague descriptions cause quiet, hard-to-trace errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things to know before you start
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write specialist descriptions like API docs.&lt;/strong&gt; In model-driven routing, the description is how the model decides. Be precise about what each specialist does and does not handle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route by cost, not just topic.&lt;/strong&gt; Sending easy requests to a smaller model is one of the cheapest wins in this whole catalog.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log the label.&lt;/strong&gt; When an answer is wrong, the first question is whether the route was wrong. Store the classification so you can find out.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is routing the same as the coordinator pattern?&lt;/strong&gt;&lt;br&gt;
Yes. Anthropic's routing and Google's coordinator or dispatcher pattern both classify an input and send it to one specialist.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is routing different from parallelization?&lt;/strong&gt;&lt;br&gt;
Routing sends an input to one path. Parallelization runs several paths at once and merges the results. Routing chooses, parallelization spreads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need an LLM to do the routing?&lt;/strong&gt;&lt;br&gt;
No. The classifier can be a traditional model or algorithm if that labels your inputs accurately. Use whatever is reliable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if the router misclassifies?&lt;/strong&gt;&lt;br&gt;
The request goes to the wrong specialist and usually fails silently. Accurate classification and clear specialist boundaries are what keep this pattern safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic, Building Effective Agents: &lt;a href="https://www.anthropic.com/engineering/building-effective-agents" rel="noopener noreferrer"&gt;https://www.anthropic.com/engineering/building-effective-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Developers Blog, Developer's guide to multi-agent patterns in ADK: &lt;a href="https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/" rel="noopener noreferrer"&gt;https://developers.googleblog.com/developers-guide-to-multi-agent-patterns-in-adk/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Architecture Center, Choose a design pattern for your agentic AI system: &lt;a href="https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system" rel="noopener noreferrer"&gt;https://docs.cloud.google.com/architecture/choose-design-pattern-agentic-ai-system&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>workflows</category>
    </item>
  </channel>
</rss>
