1.1 Architecture Trade-Offs: Deterministic Automation vs. Single-Agent vs. Multi-Agent
1. Key Concept Definitions: The 3 Architectural Tiers
Section titled “1. Key Concept Definitions: The 3 Architectural Tiers”Follow the Rule of Minimum Viable Agency—always select the simplest tier that satisfies the task’s ambiguity, latency, and security boundaries:
1. Deterministic Cloud Automation
Uses Cloud Workflows, Eventarc, or Dataflow when inputs are structured, rules are 100% known in advance, and millisecond latency or zero LLM token cost is required.
2. Single-Agent Architecture
Uses a single LLM agent when the task requires natural-language reasoning within one cohesive domain using a focused toolset (under 10 distinct tools) under a single security identity.
3. Multi-Agent System
Decomposes workloads across multiple agents when triggered by Tool Overload (15+ tools), Conflicting Personas (Drafter vs. Critic), Parallel Fan-Out Latency, or IAM/PAB Isolation.
2. Interactive Architecture Complexity Decision Engine
Section titled “2. Interactive Architecture Complexity Decision Engine”Switch between the 3 Architectural Tiers below and click the 3 decision gates in each view to evaluate Deterministic Automation, Single-Agent, and Multi-Agent designs:
3. Master Architecture Trade-Off Matrix
Section titled “3. Master Architecture Trade-Off Matrix”Compare the three architectural tiers across five core design dimensions:
| Architectural Dimension | Deterministic Automation (Workflows / Dataflow) | Single-Agent System (1 ADK LlmAgent / Studio Agent) |
Multi-Agent System (ADK Composite / A2A Fleet) |
|---|---|---|---|
| Input & Task Nature | Structured schemas, fixed rules, exact mathematical repeatability. | Unstructured natural language within 1 cohesive domain. | Unstructured, multi-domain goals requiring diverse specialized skills. |
| Optimal Tool Count | Fixed API steps (no dynamic tool selection). | 1 to ~10 distinct tools with clear, non-overlapping schemas. | 15+ tools partitioned into small, domain-focused sub-agents. |
| Latency & Cost Profile | Lowest Latency (ms) & $0 LLM Token Cost. | Low Latency (1 LLM loop) & moderate token cost. | Higher Token & Handoff Overhead (mitigated via ParallelAgent & Flash routers). |
| Security & IAM Boundary | Service account per workflow or pipeline step. | Single Agent Identity sufficient for all tools. | Distinct Agent Identities & PAB boundaries per specialist sub-agent. |
| Primary Architectural Trigger | “High-frequency structured ETL,” “strict sub-100ms SLA,” “fixed regulatory formula.” | “Customer FAQ + 4 account tools,” “minimize agent handoff latency,” “fast MVP.” | “30 tools causing routing errors,” “Generator + Critic loop,” “cross-team A2A ownership.” |
4. Real-World Deep Dive: Hybrid Pipelines, Context Pollution & Model Tiering
Section titled “4. Real-World Deep Dive: Hybrid Pipelines, Context Pollution & Model Tiering”| Architect Question | How It Works Under the Hood in Production |
|---|---|
| “What if a 10-step back-office mortgage pipeline has 9 deterministic database/SFTP steps, and ONLY Step 4 requires extracting unstructured notes from a scanned employer letter?” | Embed Gemini Inside Deterministic Cloud Workflows: Do not turn all 10 steps into an autonomous multi-agent conversation! Orchestrate the macro pipeline deterministically in Cloud Workflows, and have Step 4 make a focused call to Gemini (or a single extraction agent) with a strict JSON schema before resuming Step 5 deterministically! |
| “Why does a Single Agent degrade when asked to inspect 150,000 tokens of raw Kubernetes, VPC, and Database logs before answering?” | Context Window Pollution: Loading three massive raw log streams into a single agent’s conversation history bloats every subsequent reasoning turn. Delegating each log stream to a specialized Sub-Agent isolates the raw logs inside the sub-agent’s scoped invocation and returns only a concise 10-line summary to the coordinator! |
| “How does a Multi-Agent architecture reduce token costs when 80% of user turns are simple greetings or routing lookups?” | Per-Agent Model Tiering: Configure the front-door Coordinator/Router agent to run on Gemini Flash (ultra-low latency and cost), and invoke Gemini Pro strictly inside the complex underwriting sub-agent on the 20% of turns that require deep multi-document reasoning! |