Refactoring Monolithic Agent Configs Into Composable Units
Breaking monolithic agent configs into composable, versioned units prevents silent failures.

A production agent pipeline can fail in a way that leaves no trace of what went wrong: no checkpoint to roll back to, no partial result to salvage, just a stalled process and a bill that kept running while nobody was watching. This is the pattern engineers keep running into with monolithic agent configs, and it is structural. The typical shape is a single, massive linear script where one sub-task failure, an API timeout, a hallucinated output, stalls the entire run and often fails silently, with no checkpoint and no partial retry. As these tasks grow more complex, three failure modes tend to appear together. Accumulated conversation history, tool outputs, and intermediate reasoning compress the agent's early instructions out of its effective attention, so it ends up reasoning about a lossy summary of the task rather than the task itself. A single model asked to act as researcher, code generator, validator, and formatter all at once tends to do a mediocre job at each of those roles, while narrow instruction-tuned models built for one domain consistently beat generalist models operating in that same domain. And when a single-agent pipeline fails partway through, the execution state is often unrecoverable: the task restarts from zero, or it doesn't restart at all.
A fourth failure mode sits on top of these three, and it appears on the invoice. Google's own teardown of a sales research agent called Titanium, published on the Google Developers Blog, gives this problem a name and a face: a monolithic Python script that stalled on any single sub-task failure, with its entire knowledge base hardcoded to 12 case studies, unable to learn or scale without a developer going in and rewriting the code.
This is not just a runtime problem. Configurations are copying themselves across companies as undeclared shared components, with no governance layer anywhere in the chain tracking where they came from or what changes downstream when one of them breaks. The rest of this piece works through why that is the same disease that monolithic software had, and what engineering teams are starting to build to treat it.
How the Google ADK refactor of Titanium demonstrates decomposition
Titanium's rebuild is the clearest public record of what it actually takes to move an agent from monolith to composable pipeline, and its five lessons are the practical shape of what "composable units" means at the pipeline level. The core move was architectural: the single Python script was replaced with a SequentialAgent pipeline built on Google's Agent Development Kit, splitting the workload across five specialized nodes, a Company Researcher, a Search Planner, a Case Study Researcher, a Selector, and an Email Drafter, each one responsible for a narrow, clearly defined piece of the job.
Two of the supporting fixes matter as much as the headline split. The rebuilt version replaced those prompt-level instructions with native Pydantic objects, turning the contract between steps from a natural-language request the model might or might not follow into a runtime-validated Python object it has to satisfy. The second fix addressed the hardcoded 12-case-study corpus directly: an async crawler now feeds a vector search index, so the agent fetches and queries case studies at runtime instead of waiting on a developer to edit the source code every time the knowledge base needs to grow.
Each of the five specialist nodes runs on a context window scoped only to its own subtask, with a defined input contract and a defined output contract, and each can be swapped, upgraded, or replaced without touching the other four. The input and output contract, in particular, is the detail to hold onto. It is what makes the next question, how do you decompose the configuration that describes these agents, not just the code that runs them, tractable.

Why decomposition logic applies to agent configuration
It did not touch a separate, quieter problem: the configuration that defines each of those agents, their prompts, their tool access, their retry behavior, their budget ceilings, can still be monolithic, unversioned, and ungoverned even after the runtime has been cleanly decomposed. When that happens, the same brittleness that used to live in the Python script reappears one layer up, in the YAML files and prompt templates nobody is tracking.
The configuration surface for a real agentic system is large and varied: agent definitions, rules files, prompt templates, tool schemas, model selections, retry policies, budget ceilings, and credential scopes, scattered across different frameworks and runtime environments with no shared format tying them together. The agent-as-microservice framing laid out by ValueStream AI in April 2026 makes the stakes explicit: an agent built as a microservice has a defined input schema, a defined output schema, a single responsibility, and a standard communication protocol, and every one of those is a configuration artifact that needs its own versioning and validation, the same way a service contract does. An MCP-compliant tool boundary sitting on top of a freeform config file is still ungoverned underneath the handshake.
This failure pattern is one of the most consistent across multi-agent deployments: agents pass freeform text to each other, and the pipeline connecting them turns brittle in exactly the way a codebase turns brittle when nobody enforces an API contract between services. Defining structured input and output schemas for every agent, and validating those schemas at the boundary, is the configuration equivalent of contract testing in software engineering. Most LLMOps platforms today handle orchestration and observability reasonably well, but they stop there: agentic systems increasingly compose a mix of agents, prompts, tools, models, skills, policies, and workflows whose configurations shift independently across frameworks and runtime environments, and none of the common platforms offer a shared model for governing all of that as one coherent, versioned system. That gap, decomposed runtime, monolithic config, is where the next generation of tooling is aimed.
Composable config units as a formal engineering artifact
A handful of formal approaches, coming from different teams working independently, are converging on the same answer to that gap: config items that version on their own, schemas written in validated YAML, typed input and output edges between steps, and explicit rules for how a config item is born, changes, and retires. Together these give agent configuration the same basic engineering properties that source code has had for decades, a change history, a way to test a change before it ships, and a way to trace a production behavior back to the config that caused it.
The most complete treatment so far is Agentic Configuration Management, submitted to arXiv in August 2026 by Audrey Quessada-Vial of PwC. ACM is a framework-independent reference model built around typed, independently versioned Agentic Configuration Items, immutable revisions and baselines, a clean separation between configuration and runtime, explicit lifecycle and assurance rules, dependency-aware impact propagation, and runtime provenance tracking, backed by a full Python reference implementation with adapters for LangGraph, CrewAI, and the OpenAI Agents SDK. Independent versioning means a single prompt template or retry policy can change its own version number without forcing a re-release of the entire agent definition around it, and dependency-aware impact propagation means the system can calculate which downstream agents or pipelines a given config change will touch before that change goes live.
Two other efforts point the same direction. That turns an informal description of agent behavior into something a machine can actually verify, rather than something a human has to read and hope is accurate. At the safety boundary, a YAML guard pattern defines trigger conditions, severity, the lesson behind the rule, and a checklist, so an agent can be blocked from running a batch PUT operation without first confirming the resource's state with a GET call. Because the rule is declarative, it can sit in a pull request for review, live in version control, and be audited after an incident the same way any other code change would be.
RefactorPlatform, an open-source evaluation harness described in an arXiv submission from September 2026 (arXiv:2609.04898), illustrates what independently configurable design axes look like in a controlled evaluation harness: retrieval configuration, prompt specificity, orchestration mode, and model routing are each varied independently across isolated per-task workspaces, with AST-aware chunking delivering 25–30 percentage points better performance over naive token-window chunking per RefactorPlatform's evaluation, the same isolation principle applied to evaluation that composable config applies to production. Engineers who already trust rigorous benchmarking will recognize the method, isolate one variable, hold the rest fixed, measure the effect, and that's exactly the discipline composable config brings to production systems. Independently versioned config items with explicit dependency graphs do for agent systems what package manifests and semantic versioning do for software libraries. They make the dependency surface visible and let engineers compute the blast radius of a change before it ships, rather than finding out after.
Composable config units and enforceable cost and safety boundaries
Composability turns a budget cap or a safety rule from a policy someone has to remember to enforce into a constraint the system itself refuses to violate. In a monolithic config, cost and safety controls tend to get expressed as ambient guidance layered over an opaque block of behavior, a note in a prompt someone is supposed to act on, rather than a hard limit attached to a specific, bounded unit of work. Only composable units are precise enough to make that limit enforceable rather than advisory.
The failure mode this produces has a well-documented shape. Part of what makes this kind of runaway loop so expensive is that cost per call does not grow in a straight line. A session that starts out small in terms of input tokens can be sending many times that volume by the twentieth step, simply from accumulated context, and one documented analysis found that most of the tokens moving through a set of agent runs were carrying context the agent didn't actually need for the step it was on, leftover files, repeated searches, old exchanges it had already acted on.
The underlying distinction is between recording and intercepting. Observability tools write down what happened after it happened; they don't sit in the path of the next model call and decide whether that call should be allowed to go out. Two controls, expressed at the config level, close that gap. A hard step ceiling per turn turns an unbounded failure mode into a bounded one, and it is the single highest-leverage config value against a runaway loop. A cumulative token budget expressed in config tracks what a session has already spent and refuses to let the next step proceed past the limit, enforcing the limit directly rather than relying on a dashboard someone has to check.
The same pattern extends to workspace-level policy. Safety controls follow the same logic. In one documented incident, an AI agent wiped a Railway database in nine seconds, which raises the real governance question: how does a production system tell a destructive call apart from a legitimate one before it executes. What composable units make possible that a monolithic config cannot is control at the level of the individual unit: a budget ceiling per agent, a tool-access scope per agent, a retry limit per agent, a safety guard per agent, each one reviewable, versionable, and auditable on its own rather than bundled into one undifferentiated policy covering the whole system.
Per-unit observability and audit trail requirements
Enforcement depends on being able to trace what happened after the fact, which requires the same unit boundaries that make budgets and safety guards enforceable. A pipeline built from five specialist nodes, each with its own input contract, output contract, budget ceiling, and safety guard, produces a natural unit of record: every call can be logged against the specific agent that made it, the specific config version that governed it, and the specific policy that allowed or blocked it. A monolithic script offers none of that resolution. When it fails, the incident log shows that the process stopped, not which of a dozen internal steps caused the stop, what the token spend looked like at that step, or which version of which prompt was active when the call went out.
The config-item model that ACM formalizes carries this through by design. Dependency-aware impact propagation extends that same record forward: before a config change ships, the system can already show which downstream agents or pipelines it will touch, so the audit trail exists before the incident rather than only after it.
The YAML guard pattern described earlier does the same work at the safety layer. Because the rule blocking a batch PUT without a prior GET check is declarative and lives in version control, an auditor can see exactly which revision of the rule was active at the time of any given call, who approved it, and what changed since. That is the structural difference between a safety control a team can defend in a review and one it can only describe after reconstructing what the model might have been doing. Composable config units do not just make agent systems easier to build. They make it possible to say, with precision, what a system did, why it was allowed to do it, and what would have stopped it if the configuration had been set differently.


