<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="rss.xsl"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Agent Actions Blog</title>
        <link>https://docs.runagac.com/blog</link>
        <description>Agent Actions Blog</description>
        <lastBuildDate>Sun, 29 Nov 2026 09:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <item>
            <title><![CDATA[Task Decomposition: Splitting LLM Workflows into Single-Purpose Steps Using agent-actions (Part 1)]]></title>
            <link>https://docs.runagac.com/blog/task-decomposition/why-decompose</link>
            <guid>https://docs.runagac.com/blog/task-decomposition/why-decompose</guid>
            <pubDate>Sun, 29 Nov 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[Splitting LLM workflows into single-purpose steps: why task decomposition lets lower-cost and local models do the work, how to decompose a job, where to set step boundaries, and how to try it.]]></description>
            <content:encoded><![CDATA[<figure class="dia"><img src="https://docs.runagac.com/img/blog/task-decomposition/one-prompt-vs-seven-steps.png" alt="One prompt vs seven steps: a six-job prompt decomposed into seven steps that each ask for one thing"></figure>
<p>Task decomposition is a technique that engineering has relied on for a long time. In its general form, it means breaking an assigned job down into a planned sequence of subtasks, so that each subtask is small enough for one part of a system to carry out and manage on its own (<a href="https://www.sciencedirect.com/topics/engineering/task-decomposition" target="_blank" rel="noopener noreferrer" class="">ScienceDirect</a>). The technique appears in fields as different as robotics, human reliability analysis and parallel computing, and the way it is applied in those fields carries over closely to <a href="https://www.anthropic.com/engineering/building-effective-agents" target="_blank" rel="noopener noreferrer" class="">LLM workflows</a>. In each case, the subtasks that result are either independent of one another, in which case they can be carried out at the same time, or sequentially dependent, in which case the output of one becomes the input of the next. Each subtask is then assigned to whichever resource is best suited to perform it, and the decomposition is considered complete when every subtask has been reduced to a single unit of work, such as one piece of information to gather, one decision to make or one action to take.</p>
<!-- -->
<p>This series applies the same technique to LLM workflows. A job that would otherwise be handled by one large prompt is broken into a graph of steps, each of which makes a single decision, and agac runs those steps in the way a data pipeline runs its transformations, giving each step its own contract, its own checks and its own stored output. Because each step is narrow, most of them can be handled by a small or local model rather than a large hosted one.</p>
<ol>
<li class=""><strong>Part 1:</strong> Splitting LLM Workflows into Single-Purpose Steps</li>
<li class=""><strong>Part 2:</strong> How One Record Moves Through a Step</li>
<li class=""><strong>Part 3:</strong> Six Patterns for Setting Step Boundaries</li>
</ol>
<p><strong><a href="https://github.com/Muizzkolapo/agent-actions" target="_blank" rel="noopener noreferrer" class="">agac (Agent-Actions)</a></strong> is an open-source framework that runs LLM workflows using the same approaches that have been tried and tested in data pipelines for large scale data transformations. I built agent-actions to apply the same steps over many records, with an LLM as the transformation tool instead of something like SQL, and with every result validated against predefined contracts and stored. It borrows from how we process data in OLTP and OLAP systems, so a workflow can run in <a href="https://docs.runagac.com/docs/reference/execution/run-modes#online-mode" target="_blank" rel="noopener noreferrer" class="">online mode</a>, where each record goes to the model as it is processed, much like a transaction in an OLTP system, or in <a href="https://docs.runagac.com/docs/reference/execution/run-modes#batch-mode" target="_blank" rel="noopener noreferrer" class="">batch mode</a>, where records go through the provider's batch API at a lower cost, much like a job in an OLAP system. In agent-actions, a <a href="https://docs.runagac.com/docs/guides/record-lifecycle" target="_blank" rel="noopener noreferrer" class="">record</a> is one item of input that needs one or more specific outcomes, such as one support or incident ticket that needs triage and resolution, one contract whose clauses and references need extracting, or one documentation page that needs converting into a list of FAQs.</p>
<p>agac enables us to describe the task to be done once in a YAML file, much like the way we define GitHub Actions, so that the workflow is reusable and easy to understand. Each step in the workflow file is an <em><a href="https://docs.runagac.com/docs/tutorials/concepts#actions" target="_blank" rel="noopener noreferrer" class="">action</a></em>, which can be a model call, with its own prompt, model and answer shape (<a href="https://docs.runagac.com/docs/reference/schemas" target="_blank" rel="noopener noreferrer" class="">schema</a>), or a Python function that makes no model call. A Python tool is defined the same way as a model step. It names the fields it reads and declares its own expected schema, just as we do when we define tools for agents. The design approach in agac ensures that every step shares one interface, so steps are interchangeable and pluggable, and you can swap a model step for a tool, or one model for another, without touching the steps around it, and reuse a step in another workflow. The approach is also deliberately opinionated (convention over configuration). There is one way to define a step, so the framework, the engineers and the coding assistants that build on it have a single way of doing things. An action defines everything it needs to get a response, including the predecessor it inherits its input data from. Defining steps this way naturally turns the workflow into a DAG, which gives agac an easy way to plan the order of execution before the run, so that independent actions can run in parallel while dependent actions follow the DAG.</p>
<p>Below are two sample actions from the incident support example we will be using in this article.</p>
<div class="language-yaml cb-instrument codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#e2e8ec;--prism-background-color:#1a2028"><div class="cb-head"><div class="cb-lights" aria-hidden="true"><span class="cb-light cb-light--red"></span><span class="cb-light cb-light--amber"></span><span class="cb-light cb-light--green"></span></div><span class="cb-head-name">yaml</span><div class="cb-head-right"><span class="cb-head-chip">YAML</span><button type="button" class="cb-head-btn" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><span class="cb-head-btn-label">Copy</span></button></div></div><div class="cb-body-wrap"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#e2e8ec;background-color:#1a2028"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#e2e8ec"><span class="token punctuation" style="color:#7c878e">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">name</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> classify_issue</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">intent</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token string" style="color:#5ef0a6">"Classify the issue"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">prompt</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> $support_resolution.Classify_Issue  </span><span class="token comment" style="color:#6e7a81;font-style:italic"># the instructions</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">schema</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">{</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">issue_type</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> string </span><span class="token punctuation" style="color:#7c878e">}</span><span class="token plain">              </span><span class="token comment" style="color:#6e7a81;font-style:italic"># the answer's shape</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">context_scope</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">observe</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">source.title</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> source.body</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> source.labels</span><span class="token punctuation" style="color:#7c878e">]</span><span class="token plain"> </span><span class="token comment" style="color:#6e7a81;font-style:italic"># all it may see</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain"></span><span class="token punctuation" style="color:#7c878e">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">name</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> assess_severity</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">intent</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token string" style="color:#5ef0a6">"Rate the severity"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">dependencies</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">classify_issue</span><span class="token punctuation" style="color:#7c878e">]</span><span class="token plain">              </span><span class="token comment" style="color:#6e7a81;font-style:italic"># runs after it</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">prompt</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> $support_resolution.Assess_Severity</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">schema</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">{</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">severity</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> string </span><span class="token punctuation" style="color:#7c878e">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">context_scope</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">observe</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">source.title</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> source.body</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> classify_issue.issue_type</span><span class="token punctuation" style="color:#7c878e">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">drop</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">source.labels</span><span class="token punctuation" style="color:#7c878e">]</span><span class="token plain">                     </span><span class="token comment" style="color:#6e7a81;font-style:italic"># never sent</span><br></div></code></pre></div></div>
<ul>
<li class=""><strong>The first action is classify_issue.</strong> From its intent we can see that it takes some input and classifies it into one of a listed set of categories, its <a href="https://docs.runagac.com/docs/reference/validation/expectations#deterministic-expectation-types" target="_blank" rel="noopener noreferrer" class="">accepted values</a>, much like a dbt or Great Expectations accepted_values test on a column, which closes the boundary so that the model can only answer with a value we have defined. Rather than being written inline, the prompt is defined once in a central <a href="https://docs.runagac.com/docs/reference/prompts/prompt-store" target="_blank" rel="noopener noreferrer" class="">prompt file</a> and called by name ($support_resolution.Classify_Issue). The action then declares its schema, the shape of its answer, and its <a href="https://docs.runagac.com/docs/reference/context/context-scope" target="_blank" rel="noopener noreferrer" class="">context_scope</a>, the inputs we want the model to see. Showing only those fields avoids context pollution and gives the model just the context it needs, on a need to know basis.</li>
<li class=""><strong>The second action is assess_severity.</strong> It names classify_issue under <a href="https://docs.runagac.com/docs/tutorials/concepts#dependency-types" target="_blank" rel="noopener noreferrer" class="">dependencies</a>, so it runs only after the issue has been classified, and it reads that answer as classify_issue.issue_type alongside the ticket's title and body. It also <a href="https://docs.runagac.com/docs/reference/context/context-scope#drop-directive" target="_blank" rel="noopener noreferrer" class="">drops</a> source.labels, so the reporter's own labels never reach the model and cannot anchor its rating. Looking at just these two actions, we can already see the graph forming. classify_issue depends on nothing, so it is a starting node, and assess_severity hangs off it, joined by the dependency it declares. Every action added this way names what it reads from, and agac builds the whole DAG from those links, with no extra wiring.</li>
</ul>
<p>The model call is the small part of the system; in effort and cost it is cheap, but the harder question is how far we can trust the response it returns. agac addresses this by wrapping every output in a harness of validation that accepts no answer until it passes its checks, so that an answer which does not meet its predefined requirements fails, and the failed record has a clear path to be retried or set aside in quarantine, much like a dead letter queue. These checks test the form of an answer, such as whether a category is on the list, and not whether its judgement is right; Part 3 of this series will show how to check a judgement. Because agac applies the same rules to every record, this holds whether a run covers a hundred records or millions of transactional records, which is what makes applying an LLM at that scale manageable. For every action and every record, agac does the following.</p>
<ul>
<li class=""><strong>Before the run</strong>, it checks every key, every prompt reference and every dependency, so a typo stops the run before a single paid call. This avoids the situation where, mid-run, we find that a prompt or config is missing and the workflow fails at step 5 with thousands of API calls already made.</li>
<li class=""><strong>Before each call</strong>, it compiles and renders the prompt from only the fields the action observes, and skips the records that a <a href="https://docs.runagac.com/docs/reference/execution/guards" target="_blank" rel="noopener noreferrer" class="">guard</a> rules out (similar to a WHERE clause in SQL).</li>
<li class=""><strong>After each call</strong>, it checks the answer against its schema and the action's rules (called <a href="https://docs.runagac.com/docs/reference/validation/expectations" target="_blank" rel="noopener noreferrer" class="">agac expectations</a>), and sends an answer that breaks a rule back to the model with the reason if repair is enabled. When the tries run out, a setting on the action decides what happens: by default agac keeps the last answer with its failed checks attached, and if you choose, it sets the record aside in quarantine so that later steps skip it.</li>
<li class=""><strong>After each record</strong>, it stores the answer on the record with a status, and keeps every prompt the model saw, along with the other artifacts used to generate the outcome, for easy observability through the agac docs site. A rerun skips the work already done, and <a href="https://docs.runagac.com/docs/reference/cli/retry" target="_blank" rel="noopener noreferrer" class=""><code>agac retry</code></a> sends only the failed records again.</li>
</ul>
<figure class="dia"><img src="https://docs.runagac.com/img/blog/task-decomposition/the-harness-around-every-model-call.png" alt="Fig. 1, the harness around every model call: preflight once before the run; then for every record at every step, done before, guard, context, the model call, the check with a repair loop back to the model, and store; an answer still failing after the last try is kept and flagged or set aside"></figure>
<p>Each action can use its own model, so a single workflow can mix models and give each step the one best suited to it, whether that is OpenAI, Anthropic, Gemini, Groq, Cohere, a model on your own machine through Ollama, or even a <a href="https://docs.runagac.com/docs/reference/configuration/endpoints" target="_blank" rel="noopener noreferrer" class="">custom endpoint</a> you have created. agac is not an agent framework in which the model decides the next step. Instead, it falls under the definition of an <a href="https://www.anthropic.com/engineering/building-effective-agents" target="_blank" rel="noopener noreferrer" class="">LLM workflow</a>. In agac you decide the steps and the model answers one narrow question at each of them, so that each business process can be defined as a workflow that balances ease of use, easy debugging and the right harness to check the form of every output.</p>
<p>To show the kind of work agac is built for, take one support ticket, "CSV export fails. Export returns 500 for all users." Someone has to decide what kind of issue it is, how severe it is, which part of the product it touches and which team gets it, and then write a summary and a reply. One approach is to give the whole job to a frontier model in one prompt and define the expected output fields, as shown below.</p>
<div class="language-text cb-instrument codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#e2e8ec;--prism-background-color:#1a2028"><div class="cb-head"><div class="cb-lights" aria-hidden="true"><span class="cb-light cb-light--red"></span><span class="cb-light cb-light--amber"></span><span class="cb-light cb-light--green"></span></div><span class="cb-head-name">text</span><div class="cb-head-right"><span class="cb-head-chip">TXT</span><button type="button" class="cb-head-btn" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><span class="cb-head-btn-label">Copy</span></button></div></div><div class="cb-body-wrap"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#e2e8ec;background-color:#1a2028"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#e2e8ec"><span class="token plain">You are a support assistant. Read the ticket below.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">1. Classify it as bug, feature_request, question, account_issue or performance.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">2. Rate its severity as critical, high, medium or low.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">3. Identify the product area.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">4. Choose the team, using these routing rules: { ...30 lines of rules... }</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">5. Write a one-line summary for the dashboard.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">6. Draft a reply to the customer.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">Return JSON with the keys issue_type, severity, product_area, assigned_team,</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">summary and suggested_response.</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">Ticket: {{ title }} {{ body }} {{ labels }}</span><br></div></code></pre></div></div>
<p>From a task decomposition standpoint, that prompt asks for six jobs in one answer. A top of the line model can usually do all six at once and return a valid JSON object with six keys, but when the ticket then goes to the wrong team, there is no way to tell whether the classification, the severity or the routing was at fault, because all three came out of the same call. The prompt also drafts a reply for every ticket, including the ones no agent will ever answer, so part of every call is spent on work nobody uses.</p>
<p>Here is the same job decomposed into steps, where each step asks for one thing and returns it as one JSON field:</p>
<table><thead><tr><th>Step</th><th>Asks the model for (via a defined schema)</th><th>LLM Context (what the model sees)</th></tr></thead><tbody><tr><td><code>classify_issue</code></td><td>One field: <code>issue_type</code></td><td>Title, body, labels</td></tr><tr><td><code>assess_severity</code></td><td>One field: <code>severity</code></td><td>Title, body, the category</td></tr><tr><td><code>identify_area</code></td><td>One field: <code>product_area</code></td><td>Title, body, the category</td></tr><tr><td><code>assign_team</code></td><td>One field: <code>assigned_team</code></td><td>The three answers above and the routing rules</td></tr><tr><td><code>summarize_issue</code></td><td>One field: <code>summary</code>, one line</td><td>Title, body, the three answers</td></tr><tr><td><code>draft_response</code></td><td>One field: the reply, only when severity is not low</td><td>The title, the category, the severity, the summary and the team; not the raw body</td></tr><tr><td><code>format_output</code></td><td>Nothing. It is a Python function</td><td>Every answer above</td></tr></tbody></table>
<p>Each of these is a narrow task that a lower cost model, hosted or local, can do well, because each step has a single goal and needs little reasoning. If an issue is routed to the wrong team, we know exactly which step in the workflow to focus on, whether that means changing the model it uses or improving its prompt. The same structure has a cost. Each step builds on the answers before it, so a wrong issue_type is read by the severity, area and summary steps and can make all three wrong. A check on the steps that others depend on, such as a second rater that cannot see the first answer (Pattern 4 in Part 3), stops one error from spreading. This is what I mean by task decomposition, and agent-actions (agac) makes it a first class feature that applies to every record it processes.</p>
<p>As stated earlier, because each action names the action it reads its input fields from, the decomposed job is naturally a graph, and agac runs the steps that do not depend on each other at the same time. <code>assess_severity</code> and <code>identify_area</code> both depend only on classify_issue, so they run together, and the same is true of <code>assign_team</code> and <code>summarize_issue</code>. When we run the example, agac prints the plan it has worked out before making any call, much like terraform plan shows what will change before anything is applied, or dbt compile shows the SQL before it runs, as shown below.</p>
<figure class="dia"><img src="https://docs.runagac.com/img/blog/task-decomposition/the-plan-before-the-first-call.png" alt="Fig. 2, the plan agac works out before the first call: classify_issue in step 1; assess_severity and identify_area in step 2; assign_team and summarize_issue in step 3; draft_response in step 4; format_output, a Python tool, in step 5"></figure>
<div class="language-text cb-instrument codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#e2e8ec;--prism-background-color:#1a2028"><div class="cb-head"><div class="cb-lights" aria-hidden="true"><span class="cb-light cb-light--red"></span><span class="cb-light cb-light--amber"></span><span class="cb-light cb-light--green"></span></div><span class="cb-head-name">text</span><div class="cb-head-right"><span class="cb-head-chip">TXT</span><button type="button" class="cb-head-btn" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><span class="cb-head-btn-label">Copy</span></button></div></div><div class="cb-body-wrap"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="color:#e2e8ec;background-color:#1a2028"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#e2e8ec"><span class="token plain">Step 1/5 classify_issue</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">Step 2/5 2 actions: identify_area, assess_severity</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">Step 3/5 2 actions: assign_team, summarize_issue</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">Step 4/5 draft_response</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">Step 5/5 format_output</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">✓ 7 completed</span><br></div></code></pre></div></div>
<p>agac uses task decomposition to make small and local models usable and reliable without you having to write manual glue code around them. A small or local model that runs on your own machine through Ollama often cannot follow a prompt with six parts and return a valid JSON object with six keys, and making it work usually means writing code to retry, repair and stitch its answers together. The same model can answer "which of these five categories is this ticket?" as a JSON object with one field, reliably and at no cost per call, and agac supplies the glue that would otherwise sit around it, from checking each answer to passing it on to the next step. Once every step asks for one or two fields, most of the steps no longer need a frontier model at all, and the few that do can still use one.</p>
<p>This design moves the cost of the job from model capability to engineering. With one large, well engineered prompt, we pay for capability by using a more capable model on every call, for every record and on every rerun. With task decomposition, we spend that budget on engineering instead, because someone has to break the job into steps, decide what each step may see, write the checks, handle the answers that fail and keep track of what has already run. That work has usually meant writing and maintaining a lot of code around the model calls, or picking up one of the existing tools and frameworks and extending it with custom implementations. In agac, the way a workflow is defined makes task decomposition a natural, first class feature rather than something we bolt on, and because every step has a name, a declared input and a declared output, <a href="https://docs.runagac.com/docs/reference/data-io/prompt-traces" target="_blank" rel="noopener noreferrer" class="">prompt traces</a> and observability come with that structure for free. As described above, each step is a few lines of YAML, the whole workflow is checked before it runs, an answer that breaks one of the step's rules is sent back with the reason, completed records are not billed again unless we choose to rerun them, and every prompt the model saw is stored. What is left for me is deciding where to set the step boundaries, which depends on understanding the task and is the part of the design I want to spend my time on.</p>
<p>This post covers how to decompose a job into steps, how to decide where a step boundary belongs, how to run steps on a local model, and how to try the example yourself.</p>
<p>This is a series of three posts:</p>
<ol>
<li class=""><strong>Splitting LLM Workflows into Single-Purpose Steps</strong> (this post): the method, and why it lets lower-cost and local models do the work.</li>
<li class=""><strong>How One Record Moves Through a Step:</strong> how one record reaches the model, what the model receives, and the data-engineering techniques agac applies to every answer.</li>
<li class=""><strong>Six Patterns for Setting Step Boundaries:</strong> the patterns I use, with their full config.</li>
</ol>
<p>The series is designed to be read in order, though each part stands on its own. Part 1 is the method, and most of it applies to LLM workflows in any tool. Part 2 opens agac up and shows the machinery that runs the method for every record. Part 3 turns the method into reusable patterns, each with its complete config. All three parts follow one running example, the support workflow that ships with agac (<a href="https://github.com/Muizzkolapo/agent-actions/tree/main/examples/support_resolution" target="_blank" rel="noopener noreferrer" class="">examples/support_resolution</a>). The snippets show a version of it in JSON mode, with a schema and rules on each step. The file that ships runs in plain-text mode, and the Try it section at the end of this part shows how to run it and what to change. Where the text uses a term that is agac's own, such as <em>action</em>, <code>context_scope</code>, guard or <code>expect:</code>, the term links to its page in the <a href="https://docs.runagac.com/" target="_blank" rel="noopener noreferrer" class="">agac docs</a>, so you can go deeper on any of them without losing the thread.</p>
<p>Task decomposition does not make a weak model strong, but it does make each request narrow enough that a lower cost or local model can answer it well, and it moves every decision that follows a fixed rule out of the model and into code, where we can test it and rely on it to behave the same way every time.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-to-decompose-a-job">How to decompose a job<a href="https://docs.runagac.com/blog/task-decomposition/why-decompose#how-to-decompose-a-job" class="hash-link" aria-label="Direct link to How to decompose a job" title="Direct link to How to decompose a job" translate="no">​</a></h2>
<p>To showcase how I decompose a job, the steps below follow an approach that borrows from my experience as an analytics and data engineer and from ideas in data modelling, such as finding the grain of the data before deciding what to build on top of it. At a high level, the same steps extend to any job to be done that we are trying to break down, as long as it runs over many records.</p>
<p><strong>1. Find the atomic unit.</strong> I start with the smallest piece of output that can be judged right or wrong on its own, which in data modelling terms is the grain. For support, that is one label for one ticket, one routing decision or one reply, rather than a whole triage in one answer. Each model call produces one unit, because when a call produces five, a mistake in one of them is hidden among the other four and a retry bills all five again.</p>
<p><strong>2. List the decisions that make one unit.</strong> I write down, in order, every decision that sits between the raw ticket and a finished triage, such as what kind of issue it is, how severe it is, which team gets it and what to reply. Each decision is a candidate step, and a prompt that makes all of them at once is the large prompt I am trying to replace, and this holds even when that prompt was written with the best prompt engineering techniques.</p>
<p><strong>3. Give each decision to a model or to code.</strong> A decision that needs reading or judgement goes to a model, while a decision that follows a rule, such as a count, a date comparison or a lookup in a routing table, goes to code, where it costs less, does not drift between runs and can be tested.</p>
<p><strong>4. Decide what each step may see.</strong> Each step should see only what its decision needs, which keeps the prompt small and makes some checks possible in the first place, such as a second rater that rates the ticket without seeing the first rating. The idea behind this comes from my experience of working with LLMs over the past four years. Context is important, but its quality and amount matter just as much, and providing context that a specific response does not need can pollute the prompt and send the wrong signal to the model.</p>
<p><strong>5. Write down what a good answer looks like.</strong> For each model step, I state the rules a good answer must pass, such as the right number of items, a value from an allowed list, a length or a format. Because the step is narrow, that list is short enough to describe a good answer fully, and it becomes the gate every answer has to pass. These rules also let me keep a set of golden outputs to test against, and because each step records how it arrived at its answer, the results become explainable to a useful extent.</p>
<p><strong>6. Decide what happens when a unit fails.</strong> I choose, per step and in advance, whether a failed unit is sent back to the model with the reason, dropped, or stops the run, so that the same failure is always handled the same way. The right choice depends on the cost of failure. When I am generating content for a website, such as FAQs from a documentation page, retrying a failed record might not be worth it. In legal clause extraction, or when I am trying to resolve an incident, a failure means a user somewhere is affected, so I can choose to retry, or to quarantine the record and pass it to the <a href="https://docs.runagac.com/docs/guides/human-in-the-loop" target="_blank" rel="noopener noreferrer" class="">human in the loop (HITL)</a> step that agac supports, which surfaces the failure to a person.</p>
<p><strong>7. Then choose the model.</strong> When choosing a model, I personally start with the smallest and cheapest one I can find that handles that one decision well, and the way agac is designed makes it easy to iterate quickly and swap models when needed. Since each step asks for one thing, that model usually costs far less than the one the large prompt needed, and for many steps it can be a local model with no cost per call.</p>
<p>If we apply the design principles above to the support workflow (the large prompt earlier), the atomic unit is one triage decision for one ticket. Each decision then becomes one of the seven actions in the table at the start of this post, six of them model calls and one a Python tool, and none of them needs a frontier model.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="where-to-set-step-boundaries">Where to set step boundaries<a href="https://docs.runagac.com/blog/task-decomposition/why-decompose#where-to-set-step-boundaries" class="hash-link" aria-label="Direct link to Where to set step boundaries" title="Direct link to Where to set step boundaries" translate="no">​</a></h2>
<p>When I am defining step boundaries, there are a few considerations I use to justify why a boundary belongs where I have put it, and I treat a separate step as justified when it meets at least one of the conditions in the table below. Each condition maps to a feature in agac, which I will explain in more detail in Part 2, and Part 3 shows each one in a full workflow.</p>
<table><thead><tr><th>Reason to make a separate step</th><th>What it looks like in agac</th></tr></thead><tbody><tr><td>It does one job, so its prompt can be short and strict. A narrow step can carry its own contract, much like the data contract and quality checks we define on a column in an analytics pipeline.</td><td>A separate action with its own prompt and schema</td></tr><tr><td>It needs instructions or a role that would confuse the other steps. In data modelling we build the warehouse in layers, from raw to staging to presentation, so that each layer and each model has one purpose, and in the same way a classifier and a reply writer need different instructions and roles, so they live in separate steps.</td><td>A separate prompt for the same record</td></tr><tr><td>It must see less than its neighbours. Like an authorized view that exposes only the columns a user needs, the step sees only the fields its decision depends on, so a second rater never sees the first rating.</td><td><a href="https://docs.runagac.com/docs/reference/context/context-scope" target="_blank" rel="noopener noreferrer" class=""><code>context_scope</code></a> with only the fields it needs</td></tr><tr><td>Code can make its decision. A lookup, a count or a date comparison belongs in code, which is deterministic and can be tested.</td><td><a href="https://docs.runagac.com/docs/reference/tools" target="_blank" rel="noopener noreferrer" class=""><code>kind: tool</code></a></td></tr><tr><td>The model cannot do the combined job within its token limit</td><td>Split the record, so each call does one part</td></tr><tr><td>A good answer can be stated as rules</td><td>An <a href="https://docs.runagac.com/docs/reference/validation/expectations#the-expect-block" target="_blank" rel="noopener noreferrer" class=""><code>expect:</code></a> block of rules on that step</td></tr></tbody></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="running-the-workflow-on-a-local-model">Running the workflow on a local model<a href="https://docs.runagac.com/blog/task-decomposition/why-decompose#running-the-workflow-on-a-local-model" class="hash-link" aria-label="Direct link to Running the workflow on a local model" title="Direct link to Running the workflow on a local model" translate="no">​</a></h2>
<p>Here is another version of the workflow above, where most steps run on a local model through Ollama and only the step that needs it calls a hosted API. Each action names its model with two settings, <a href="https://docs.runagac.com/docs/reference/configuration#model-fields" target="_blank" rel="noopener noreferrer" class=""><code>model_vendor</code></a> and <a href="https://docs.runagac.com/docs/reference/configuration#model-fields" target="_blank" rel="noopener noreferrer" class=""><code>model_name</code></a>, and any action can override the <a href="https://docs.runagac.com/docs/reference/configuration/defaults" target="_blank" rel="noopener noreferrer" class="">workflow default</a>. With <code>model_vendor: ollama_local</code>, agac sends the step to a model running on your own machine, with no API key and no cost per call, so in the example below the local model is the default and only <code>draft_response</code> uses a hosted model.</p>
<div class="language-yaml cb-instrument codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#e2e8ec;--prism-background-color:#1a2028"><div class="cb-head"><div class="cb-lights" aria-hidden="true"><span class="cb-light cb-light--red"></span><span class="cb-light cb-light--amber"></span><span class="cb-light cb-light--green"></span></div><span class="cb-head-name">yaml</span><div class="cb-head-right"><span class="cb-head-chip">YAML</span><button type="button" class="cb-head-btn" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><span class="cb-head-btn-label">Copy</span></button></div></div><div class="cb-body-wrap"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="color:#e2e8ec;background-color:#1a2028"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#e2e8ec"><span class="token key atrule" style="color:#ff6e4a">defaults</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">json_mode</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token boolean important" style="color:#ff6e4a">true</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">model_vendor</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> ollama_local</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token key atrule" style="color:#ff6e4a">model_name</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> qwen3</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain">8b                </span><span class="token comment" style="color:#6e7a81;font-style:italic"># local, no API cost</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain"></span><span class="token key atrule" style="color:#ff6e4a">actions</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token punctuation" style="color:#7c878e">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">name</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> classify_issue              </span><span class="token comment" style="color:#6e7a81;font-style:italic"># one field from a fixed list: local is enough</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">intent</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token string" style="color:#5ef0a6">"Classify the issue"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">schema</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">{</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">issue_type</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> string </span><span class="token punctuation" style="color:#7c878e">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">prompt</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> $support_resolution.Classify_Issue</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">context_scope</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">      </span><span class="token key atrule" style="color:#ff6e4a">observe</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">source.title</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> source.body</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> source.labels</span><span class="token punctuation" style="color:#7c878e">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">  </span><span class="token punctuation" style="color:#7c878e">-</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">name</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> draft_response              </span><span class="token comment" style="color:#6e7a81;font-style:italic"># a reply a customer will read: use a hosted model</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">intent</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token string" style="color:#5ef0a6">"Draft a response"</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">dependencies</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">classify_issue</span><span class="token punctuation" style="color:#7c878e">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">schema</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">{</span><span class="token plain"> </span><span class="token key atrule" style="color:#ff6e4a">suggested_response</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> string </span><span class="token punctuation" style="color:#7c878e">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">prompt</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> $support_resolution.Draft_Response</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">model_vendor</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> openai</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">model_name</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> gpt</span><span class="token punctuation" style="color:#7c878e">-</span><span class="token plain">6</span><span class="token punctuation" style="color:#7c878e">-</span><span class="token plain">luna</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">api_key</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> OPENAI_API_KEY</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">    </span><span class="token key atrule" style="color:#ff6e4a">context_scope</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">      </span><span class="token key atrule" style="color:#ff6e4a">observe</span><span class="token punctuation" style="color:#7c878e">:</span><span class="token plain"> </span><span class="token punctuation" style="color:#7c878e">[</span><span class="token plain">source.title</span><span class="token punctuation" style="color:#7c878e">,</span><span class="token plain"> classify_issue.issue_type</span><span class="token punctuation" style="color:#7c878e">]</span><br></div></code></pre></div></div>
<figure class="dia"><img src="https://docs.runagac.com/img/blog/task-decomposition/one-workflow-two-kinds-of-model.png" alt="Fig. 3, one workflow, two kinds of model: local steps on ollama_local / qwen3:8b, draft_response on openai / gpt-6-luna"></figure>
<p>This arrangement works for two reasons. The first is that each step asks for only one answer, which is a request that a local model can satisfy reliably. The second is that each schema is small, with a single field in this example, and for <code>ollama_local</code> agac sends that schema to Ollama in its <code>format</code> parameter, so the local model is constrained to return JSON that agrees with the schema.</p>
<p>Having every step give its answer in JSON is also what keeps a decomposed workflow manageable as it grows. agac sends the schema to the model together with the prompt, and it checks the reply against that schema before the next step is allowed to read it. The answer is then stored on the record under the name of the step, so the next step reads one named field, for example <code>classify_issue.issue_type</code>, rather than having to parse free text, and for the same reason a guard can test that field and a tool can read it as data. If a reply is not valid JSON, or a required field is missing, and the step has an expect: block, agac generates the reply again at the same step, and when <a href="https://docs.runagac.com/docs/reference/validation/expectations#re-roll-or-steer" target="_blank" rel="noopener noreferrer" class=""><code>structural: auto</code></a> is set in the step's <code>expect:</code> block it also sends the schema error back to the model. In practice, it is best to keep each schema to one or two fields and to use <code>expect:</code> rules, such as an <a href="https://docs.runagac.com/docs/reference/validation/expectations#deterministic-expectation-types" target="_blank" rel="noopener noreferrer" class=""><code>accepted_values</code></a> list, to check the values themselves, which Part 3 covers in detail.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="try-it">Try it<a href="https://docs.runagac.com/blog/task-decomposition/why-decompose#try-it" class="hash-link" aria-label="Direct link to Try it" title="Direct link to Try it" translate="no">​</a></h2>
<p>The support workflow ships with agac as an example, so the quickest way to see everything in this post in action is to run it yourself with the commands below.</p>
<div class="language-bash cb-instrument codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#e2e8ec;--prism-background-color:#1a2028"><div class="cb-head"><div class="cb-lights" aria-hidden="true"><span class="cb-light cb-light--red"></span><span class="cb-light cb-light--amber"></span><span class="cb-light cb-light--green"></span></div><span class="cb-head-name">bash</span><div class="cb-head-right"><span class="cb-head-chip">BASH</span><button type="button" class="cb-head-btn" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><span class="cb-head-btn-label">Copy</span></button></div></div><div class="cb-body-wrap"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#e2e8ec;background-color:#1a2028"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#e2e8ec"><span class="token plain">pip </span><span class="token function" style="color:#c9a0ff">install</span><span class="token plain"> agent-actions</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">agac init example support_resolution my_project </span><span class="token operator" style="color:#7c878e">&amp;&amp;</span><span class="token plain"> </span><span class="token builtin class-name" style="color:#ffb454">cd</span><span class="token plain"> my_project</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">agac run </span><span class="token parameter variable" style="color:#5ccfe6">-a</span><span class="token plain"> support_resolution</span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">agac preview </span><span class="token parameter variable" style="color:#5ccfe6">-w</span><span class="token plain"> support_resolution </span><span class="token parameter variable" style="color:#5ccfe6">--action</span><span class="token plain"> assign_team</span><br></div></code></pre></div></div>
<p>The shipped example uses a Gemini model by default, so set <code>GEMINI_API_KEY</code> first. It runs in <a href="https://docs.runagac.com/docs/guides/non-json-mode" target="_blank" rel="noopener noreferrer" class="">plain-text mode</a>; for the JSON mode this series uses, set <code>json_mode: true</code> and replace each <code>output_field</code> with a one-field <code>schema</code>, as shown above. To try it without an API key, <a href="https://docs.runagac.com/docs/guides/sandbox" target="_blank" rel="noopener noreferrer" class=""><code>agac run --sandbox</code></a> runs the same workflow against a scripted model.</p>
<p>Another approach I use personally is to build the workflow together with a coding assistant. agac ships with skills that a coding assistant such as Claude Code, Codex or Pi can use to create a workflow, so I describe the job, let the assistant draft the actions, schemas and prompts, and then we run it, inspect the results and improve it over a few short iterations. Because there is one way to define a step, the assistant has a clear pattern to follow, and the checks agac runs before each run catch its mistakes early.</p>
<p>To set this up, install agac's skills into your project. Run the command from the project folder, the one that holds <code>agent_actions.yml</code>:</p>
<div class="language-bash cb-instrument codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#e2e8ec;--prism-background-color:#1a2028"><div class="cb-head"><div class="cb-lights" aria-hidden="true"><span class="cb-light cb-light--red"></span><span class="cb-light cb-light--amber"></span><span class="cb-light cb-light--green"></span></div><span class="cb-head-name">bash</span><div class="cb-head-right"><span class="cb-head-chip">BASH</span><button type="button" class="cb-head-btn" aria-label="Copy"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><span class="cb-head-btn-label">Copy</span></button></div></div><div class="cb-body-wrap"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="color:#e2e8ec;background-color:#1a2028"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:#e2e8ec"><span class="token plain">agac skills </span><span class="token function" style="color:#c9a0ff">install</span><span class="token plain"> </span><span class="token parameter variable" style="color:#5ccfe6">--claude</span><span class="token plain">    </span><span class="token comment" style="color:#6e7a81;font-style:italic"># Claude Code: copies the skills to .claude/skills/</span><span class="token plain"></span><br></div><div class="token-line" style="color:#e2e8ec"><span class="token plain">agac skills </span><span class="token function" style="color:#c9a0ff">install</span><span class="token plain"> </span><span class="token parameter variable" style="color:#5ccfe6">--codex</span><span class="token plain">     </span><span class="token comment" style="color:#6e7a81;font-style:italic"># OpenAI Codex: copies them to .codex/skills/</span><br></div></code></pre></div></div>
<p>agac ships four <a href="https://docs.runagac.com/docs/reference/cli/skills" target="_blank" rel="noopener noreferrer" class="">skills</a>, each of which covers a different part of the work. The first, <code>agac-agent-skills</code>, helps the assistant build, run, inspect and debug workflows. The second, <code>agac-expectations</code>, helps it write and calibrate <code>expect:</code> rules. The third, <code>agac-operations</code>, covers running large workflows safely, including batch mode, resuming a run, reruns and retries, and the fourth, <code>agac-blind-verification</code>, checks outputs with verifiers that never see the reference answer. There is no need to call a skill by name, because Claude Code loads the skill that matches the request when you describe the job in plain words, for example <em>"Add a step to the support workflow that tags each ticket with the customer's plan, then test it in the sandbox"</em>. A skill can also be called directly, for example with <code>/agac-agent-skills</code>, and after an upgrade of agac the install command should be run again with <code>--force</code> so that the skills are refreshed.</p>
<p>Part 2 goes inside agac: how one record reaches the model, the exact prompt and request the model receives, and the data-engineering techniques that keep every answer checked and traceable, and skip the work already done.</p>]]></content:encoded>
            <category>Task decomposition</category>
            <category>Local models</category>
            <category>Design</category>
        </item>
    </channel>
</rss>