Relying exclusively on a single flagship LLM across an entire multi-repo development stack causes two major bottlenecks: rapid exhaustion of premium quotas and tokens, and session freezing caused by polling loops waiting for child tasks. This article shares a battle-tested heterogeneous multi-agent architecture: using Gemini 4 (/boost) as the top-level cognitive architect, AgentRelay as the local asynchronous bridge, and gradient workload routing across DeepSeek Harness, Grok CLI 4.7, and Codex Sol 6.1 High / Astra to achieve low costs, superior intelligence, and blazing concurrency.
1. Three Fundamental Bottlenecks in Traditional AI Coding Workflows
Compute Waste from Overkill Routing
Routing trivial CRUD operations or CSS adjustments to expensive flagship models burns through premium quotas at alarming rates with minimal ROI.
Cross-Project Context Fragmentation
When a single feature spans a desktop application, a Chrome extension, and backend scripts across separate git repositories, single-session IDE assistants cannot cross workspace boundaries.
Polling Hell & Session Blocking
In traditional multi-agent orchestration, the master agent repeatedly polls child agents asking "are you done?", burning context tokens and risking timeouts on long builds.
2. The Architectural Philosophy: Asynchronous Decoupling & Gradient Compute Routing
The core design philosophy is simple: Let the most capable model handle architecture and scheduling, let the most cost-effective models execute tasks, and replace synchronous polling loops with event-driven callbacks.
┌────────────────────────────────────────────────────────┐
│ Top-Level Brain: Gemini 4 (/boost) │
│ (System Architecture · Task Decomposition · Reviews) │
└───────────────────────────┬────────────────────────────┘
│
┌───────────────────┴───────────────────┐
▼ (Local Sub-Conversations) ▼ (Cross-Project & Heterogeneous)
┌───────────────────────┐ ┌───────────────────────────────────┐
│ Concurrent Sub-Agents │ │ AgentRelay Hub │
│ (Same Workspace) │ │ (Asynchronous Dispatch & Callback)│
└───────────────────────┘ └─────────────────┬─────────────────┘
│
┌─────────────────────────┬───────────────┴───────────────┐
▼ (L1: Fast Deterministic)▼ (L2: Moderate & CLI Tools) ▼ (L3: Deep Concurrency)
┌─────────────────────┐ ┌─────────────────────┐ ┌──────────────────────┐
│ DeepSeek Harness │ │ Grok CLI 4.7 │ │ Codex Sol 6.1 High / │
│ (Boilerplate / Test)│ │(Business Logic / Ref)│ │ Astra │
└──────────┬──────────┘ └──────────┬──────────┘ └──────────┬───────────┘
│ │ │
└─────────────────────────┼─────────────────────────┘
│ (Passive Event Callback)
▼
[Completion report → Controller review]3. The Local Infrastructure Hub: What AgentRelay Solves
AgentRelay is a free local AI session bridge for Windows 10/11. As the communication backbone for heterogeneous local agents, it resolves three critical engineering obstacles:

Reuse Existing Clients and Subscriptions
Connect supported signed-in local sessions. Subscription coverage depends on the provider’s terms, available quota and task type.
Unifying Isolated Terminals and Workspaces
Antigravity IDE windows, Grok CLI harness terminals, and Codex processes operate as separate silos. AgentRelay provides a lightweight local IPC bus that delivers payloads across sessions and routes responses back seamlessly.
Local Communication, Deliberate Context Sharing
AgentRelay forwards messages locally. AI clients may use cloud models; follow their data policies and control which code and context you send.
4. Three Architectural Pillars
1. The Master Brain: Gemini 4 + /boost for High Concurrency
Global Vision and Sub-Task Decomposition
- Gemini 4 ingests complex requirements, maps out end-to-end call stacks, and decomposes large initiatives into well-defined, isolated sub-tasks with unambiguous JSON contracts.
- Leveraging /boost concurrent agent execution, the master session coordinates multiple threads in parallel rather than serial turn-by-turn generation, drastically reducing wall-clock delivery time.
2. Cross-Project Decoupling: Event-Driven Callbacks via AgentRelay
Eliminating Polling Overhead
- Fire-and-Forget Dispatch: Gemini 4 packages task payloads and pushes them via AgentRelay to target sessions or CLI processes across independent workspaces.
- Proactive reports reduce repeated checking. Queries remain useful for recovery and acceptance, and messages may still consume tokens.
- Workers save their results and report back. Active turns accept direct delivery; idle wake-up needs separate permission and validation. Accepted delivery does not prove the controller acted.
3. Cognitive Gradient Routing: Precision Model Matching
Matching Complexity with Cost
- Tasks are tiered into three distinct cognitive levels to optimize both output quality and token efficiency.

Cognitive Complexity & Model Dispatch Matrix
| Task Tier | Representative Use Cases | Target Model / Tool | Primary Benefits & Gains |
|---|---|---|---|
| L1: Low / Deterministic Coding | CRUD endpoints, schema serialization, regex authoring, UI boilerplate, unit tests | DeepSeek Harness | Extreme cost-efficiency with rapid code generation for deterministic tasks. |
| L2: Medium / Routine Refactoring | Core business logic, multi-file refactoring, API integrations, utility automation | Grok CLI 4.7 | High responsiveness and robust CLI tool execution for daily heavy lifting. |
| L3: High / Hardcore Engineering | Complex concurrency bottlenecks, IPC backpressure tuning, algorithm optimization | Codex Sol 6.1 High / Astra | Maximum reasoning capability on mission-critical paths where failure is unacceptable. |
5. Real-World Walkthrough: A Cross-Repository Feature Deployment
Example: Implementing a new data export protocol across a desktop core, updating a browser extension in a separate repo, and generating parsers with tests:
Master Planning (Gemini 4 + /boost)
Gemini 4 specifies the JSON Schema contract and partitions work into three parallel tracks.
Heterogeneous Routing (via AgentRelay)
Track 1 (DeepSeek Harness): Generates serialization boilerplate and 20 boundary tests. Track 2 (Grok CLI 4.7): Modifies data scraping in the extension repository. Track 3 (Codex Sol 6.1 High / Astra): Hardens desktop IPC backpressure controls.
Asynchronous Callback & Merge
Workers can handle independent tasks in parallel, save evidence and report back. The controller checks actual results before integration; successful communication does not replace code acceptance.

6. Measurable Engineering Gains
Control Costs Through Task Routing
Assign suitable tasks to each engine and reuse existing subscriptions. No fixed savings percentage was measured; account terms, quotas and model usage determine costs.
Quality Depends on Acceptance
Choose engines for the task and have the controller review artifacts and tests. Model selection alone cannot guarantee correctness.
Reduce Coordination Delays
Independent tasks can proceed in parallel, subject to dependencies, quotas and client availability.
This architecture is in active production across multi-workspace desktop and extension products. AgentRelay is available for free on GoodExts.
Get Started with AgentRelay Multi-Agent Routing
Bridge your local Codex, Grok, and Antigravity sessions today for asynchronous event-driven development.


