# Lead Quorum: a multi-agent lead qualifier that refuses to guess (ADK + A2A)

> Source: <https://dev.to/vinimabreu/lead-quorum-a-multi-agent-lead-qualifier-that-refuses-to-guess-adk-a2a-5dom>
> Published: 2026-07-08 07:35:25+00:00

*This post is my submission for *[DEV Education Track: Build Multi-Agent Systems with ADK](https://dev.to/deved/build-multi-agent-systems).

##
What I Built

Most lead scoring demos share a failure mode: you paste messy notes, a model returns a confident number, and nobody can answer why it is a 60 and not a 40. I built the opposite. Lead Quorum is a distributed multi-agent qualifier where the number is set by deterministic code, the explanation provably adds up to the score, and when two independent readers disagree about the input, the system abstains instead of guessing.

Three production failures it kills by construction:

-
**Opaque scores.** Every point is granted and explained on the same line of code, and a test parses the explanation and asserts the named points sum to the score. The reason cannot drift from the number.
-
**One model grading its own homework.** Two readers running two different Gemini models extract the same lead independently, as separate services. Agreement between different models is real signal, not a model agreeing with itself.
-
**Fake confidence on thin input.** "They mentioned possibly renewing" should not score like "they renewed in March."

What a run looks like. Clear notes, both models agree:

Ambiguous notes, the models read "possibly renewing" differently:

That EXCLUDED is the feature. The score would differ depending on which reading you believe, so the honest output is no score, plus exactly what disagreed. A defensible abstention beats a fake-precise number built on a contradiction.

##
Cloud Run Embed

Open it, paste your own messy lead notes, and watch the audit trail: the score, the reason that reconciles to it, the two independent readings side by side, and the EXCLUDED abstention when they disagree about which rules fire. The two readers are separate Cloud Run services the orchestrator reaches over A2A.

##
Your Agents

Five roles. Two are LLMs, three are deterministic code, and that split is the design.

-
**Enrichment reader** (LlmAgent, gemini-flash-latest): extracts structured fields from raw notes. Temperature 0, pinned output schema, instructed to leave absent signals at their defaults instead of guessing.
-
**Rederive reader** (LlmAgent, gemini-2.5-flash-lite): reads the same notes from scratch, independently, on a deliberately different model. Runs as its own microservice, exposed over the A2A protocol with ADK's `to_a2a()`

and consumed through its agent card with `RemoteA2aAgent`

.
-
**Scoring agent** (custom BaseAgent, no LLM): applies the rubric. Each rule grants its points and writes its reason in the same branch, and the agent refuses to emit a result whose reason does not reconcile to its score.
-
**Corroboration agent** (custom BaseAgent, no LLM): compares the two readings in score-space. Same rules fire, values close: CONFIRMED. Same rules fire, readings drift: REVIEW, score stands, flagged. A rule flips between readings: EXCLUDED, no score, verdict names the flipped rule and both values.
-
**Orchestrator** (SequentialAgent + ParallelAgent): the two readers run concurrently, so wall-clock is one LLM round-trip, then scoring and corroboration run as pure code. Exactly two LLM calls per lead.

The readers deploy as independent Cloud Run services and the orchestrator reaches them over A2A, so the second opinion could be swapped for a different vendor or framework tomorrow without touching the pipeline.

##
Key Learnings

-
**Put the LLM only where judgment lives.** Multi-agent systems get expensive when every step is a model call. Two parallel calls per lead, everything downstream deterministic and unit-tested, made the system cheaper per unit of trust, not pricier.
-
**Score-space beats value-space for corroboration.** Two readings 500 dollars apart on the same side of a threshold produce the same score; that is drift, not contradiction. Comparing which rules fire, instead of raw field equality, lets abstention trigger only when the disagreement actually changes the answer.
-
**Reconciliation has to be enforced, not intended.** "Keep the reason next to the points" is a discipline, and disciplines rot. A failing test does not.
-
**A2A is what makes independence credible.** Behind an agent card, the second reader is a black box that could be any model, any framework, anywhere. That is the difference between a second opinion and an echo.
-
**ADK's workflow agents are underrated.** SequentialAgent and ParallelAgent gave me a deterministic, testable topology with no LLM routing where none was needed. The surprise of the build: RemoteA2aAgent has no output_key, so remote responses land in the event log, and a small capture adapter was the missing piece to keep the distributed pipeline identical to the local one.

Code: [github.com/vinimabreu/lead-quorum](https://github.com/vinimabreu/lead-quorum), MIT, 16 tests, including a script that runs the full distributed topology locally.
