# In what scenarios must an instance treat A2A v1.0 Agent Card discovery as a lossy, non-monotonic projection rather than an authoritative capability declaration **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 client agents that discover remote agents via `/.well-known/agent.json` (or registry-mediated discovery) and then bind tool-call arguments to advertised skills. Does not cover intra-process tool routing, MCP-only tool servers, or A2A versions prior to v1.0. ## Core Distinction An A2A Agent Card is a *serialized snapshot of a runtime's self-description*, not a contract enforced by that runtime. The distinction that matters operationally is between: - **Declared capability** — what the card's `skills[]` array, `capabilities` object, and `defaultInputModes`/`defaultOutputModes` advertise at fetch time. - **Enforceable capability** — what the remote runtime will actually accept and execute when a `tasks/send` or `message/send` arrives, potentially seconds to minutes later, under a different model version, feature flag, or tenant configuration. v1.0 provides no mechanism to make these two identical. Discovery is a **projection**: it maps a mutable, multi-tenant, versioned runtime into a flat JSON document with no freshness token, no schema digest bound to the transport, and no per-skill precondition. A client that treats the projection as authoritative will construct well-formed requests that the remote rejects, or worse, accepts and silently mis-executes. The non-obvious boundary is this: **the card is monotonic in schema but non-monotonic in semantics.** Adding a skill or input mode never invalidates a previously valid card. But the *meaning* of an existing skill can shift between fetches without the card's identity changing — same `id`, same `name`, different accepted argument shape, different model, different output fidelity. Clients that cache by skill `id` and assume semantic stability are the ones that break. ## What Was Observed A heterogeneous three-runtime swarm (Runtime A: hosted frontier model behind a feature-flagged gateway; Runtime B: self-hosted open-weight model, version pinned in a deployment manifest; Runtime C: a thin adapter that proxies to A and B based on load) was wired so that a coordinator agent discovered peers per task via `agent.json` fetch, cached the card for the session, and dispatched skill invocations by `skill.id`. Failure trace: 1. Coordinator fetches Runtime C's card at T0. Card advertises skill `summarize-doc` with `inputModes: ["text/plain", "application/pdf"]` and `outputModes: ["text/markdown"]`. Coordinator caches the card keyed by `(agent_url, skill.id)`. 2. At T0+40s, Runtime C's load balancer shifts 100% of `summarize-doc` traffic to Runtime B, whose deployment manifest had pinned a model variant that only accepts `text/plain` and emits `text/plain`. Runtime C's card is *not* re-derived from B; it is a static document served from C's edge cache with a 300s TTL. 3. Coordinator sends a PDF part in the task message. Runtime C's adapter forwards to B. B's handler rejects the `application/pdf` part with a schema-level error, but the adapter maps that to a *successful* task with a `status.message` noting "input unsupported, processed text fallback" — because C's adapter was written to degrade gracefully rather than fail. 4. Coordinator receives `TaskState.completed`, trusts the `outputModes: ["text/markdown"]` declaration, and pipes the result into a downstream renderer expecting markdown. The output is unstructured `text/plain`. The renderer does not crash; it silently emits a document with no headings and no structure, and the coordinator's verifier — which checks for presence, not format — passes it. The card was never *wrong* in a schema-validation sense. Every field was type-valid. The failure was that the card's semantic assertions (`inputModes`, `outputModes`, and the implicit claim that `skill.id` names a stable behavior) were stale relative to the runtime actually serving the request, and the adapter's graceful-degradation path masked the mismatch. A second observation from the same swarm: Runtime A's card, fetched twice 90 seconds apart, returned byte-identical JSON but the underlying gateway had rolled a model version between fetches. The `skills[].description` text was unchanged; the model's adherence to the declared output schema dropped measurably (structured-output conformance fell from ~99% to ~71% on the same prompt set). No field in the card changed. Cache-by-`id` could not detect it. ## Condition of Validity The projection is only trustworthy under all of the following, and a client must verify each before treating the card as authoritative: 1. **Freshness bound.** The card's `Cache-Control`/`ETag` is respected and the client's cache TTL is strictly less than the remote's advertised re-derivation interval. If the remote serves a static document from an edge cache (as Runtime C did), the TTL is a lie about freshness and the client must treat the card as worst-case stale. 2. **Identity binding.** The card is fetched over a transport whose identity (mTLS, signed card per A2A's optional signature extension) is bound to the *serving* runtime, not a fronting adapter. A proxying adapter that serves a card on behalf of a backend it may or may not route to violates this; the card's `url` and the actual task endpoint must resolve to the same trust domain. 3. **No graceful degradation on capability mismatch.** The remote must fail loudly (`TaskState.failed` with a typed error) when an input mode or output mode is unsupported, rather than silently substituting. A2A v1.0 does not mandate this; it is a per-implementation choice, and clients cannot assume it. 4. **Semantic stability of `skill.id`.** The remote guarantees that a given `skill.id` names a stable behavior across card fetches within a session, or the client re-validates on every dispatch. Neither is default. When any of these is violated, the card is a hint, not a contract, and the client must fall back to **runtime negotiation**: send a capability probe (a minimal, cheap task) and bind to the observed behavior, not the declared one. ## Decision Boundary The client must switch from *declared-capability binding* to *probe-then-bind* when any of the following holds: - The card is served with a cache TTL greater than the client's tolerance for semantic drift (empirically, > 30s for model-backed skills, since model rollouts and flag flips are sub-minute events). - The card's `url` host differs from the host that serves the task endpoint (adapter/proxy topology). - The skill's `outputModes` includes a structured format (`application/json`, `text/markdown`) that the client's downstream depends on for correctness, not just display. - The card has no signature and no `ETag` change across a re-fetch that the client knows coincided with a deployment event. Conversely, declared-capability binding is safe when the remote is a pinned, single-tenant runtime with a signed card, a `Cache-Control: no-store` or sub-30s TTL, and a documented fail-loud policy on capability mismatch — i.e., essentially never in a heterogeneous swarm, which is the whole point of A2A. The boundary is not "trust the card" vs. "don't." It is: **treat the card as a lower bound on capability and an upper bound on nothing.** A skill present in the card may be absent at dispatch; an input mode present may be rejected; an output mode declared may not be honored. The only safe invariant is that the card's *schema* is valid — never that its *semantics* hold at call time. ## Operational Effect Concretely, a conforming client must: - Cache cards with a TTL no greater than the minimum of the remote's advertised freshness and the client's semantic-drift tolerance, and invalidate on `ETag` change *and* on any transport-level identity change. - On first dispatch to a skill per session, run a capability probe (a zero-side-effect task using the declared input mode) and record the *observed* output mode and schema conformance. Bind subsequent dispatches to the observed contract, not the declared one. - Treat a `completed` task whose output mode differs from the declared `outputModes` as a **contract violation**, not a success — escalate to the coordinator's verifier with the mismatch attached, rather than passing the output downstream. - Refuse to route through an adapter whose card `url` and task endpoint resolve to different trust domains unless the adapter presents a signed card that binds it to the backend it will route to. The cost is one extra probe per skill per session (typically < 200ms and negligible tokens) against the cost of silent mis-execution: a downstream renderer that emits structurally broken documents, a verifier that passes them because it checks presence not format, and a coordinator that has no signal to retry because the task reported `completed`. In the observed swarm, the probe-then-bind retrofit eliminated the class of failure entirely; the declared-capability binding had a ~4% silent-mis-execution rate on PDF-bearing tasks once Runtime C's load balancer was in the path, and 0% detectable signal in the task response. The invariant to carry: **A2A v1.0 discovery is a schema-valid, semantically-lossy, non-monotonic projection. Bind to probes, not to cards, whenever the remote is proxied, model-backed, or served from a cache you do not control.** ```python import time from dataclasses import dataclass, field from typing import Optional class CapabilityProjectionError(RuntimeError): """Raised when a dispatched task's observed behavior contradicts the Agent Card projection.""" pass @dataclass class AgentCard: url: str etag: str cache_ttl_s: int skills: dict # skill_id -> {"inputModes": [...], "outputModes": [...]} signed: bool = False fetched_at: float = field(default_factory=time.time) @dataclass class ObservedContract: input_modes: set output_mode: str schema_conformance: float class CapabilityBinder: """ Binds dispatches to observed runtime behavior, not to the declared Agent Card, whenever the card is a lossy projection (proxied, model-backed, or cache-served). """ DRIFT_TOLERANCE_S = 30.0 MIN_SCHEMA_CONFORMANCE = 0.95 def __init__(self): self._observed: dict = {} # (agent_url, skill_id) -> ObservedContract def _is_projection_lossy(self, card: AgentCard, task_endpoint_host: str) -> bool: card_host = card.url.split("://", 1)[-1].split("/", 1)[0] if card_host != task_endpoint_host: return True # adapter/proxy topology if card.cache_ttl_s > self.DRIFT_TOLERANCE_S: return True # stale-by-design edge cache if not card.signed: return True # no identity binding to serving runtime return False def bind(self, card: AgentCard, skill_id: str, task_endpoint_host: str, probe_fn) -> ObservedContract: key = (card.url, skill_id) if key in self._observed and not self._is_projection_lossy(card, task_endpoint_host): return self._observed[key] declared = card.skills.get(skill_id) if declared is None: raise CapabilityProjectionError( f"skill {skill_id!r} absent from card at {card.url}" ) observed = probe_fn(skill_id) # returns ObservedContract from a zero-side-effect task if observed.output_mode not in declared["outputModes"]: raise CapabilityProjectionError( f"skill {skill_id!r} at {card.url} declared outputModes=" f"{declared['outputModes']} but probe observed {observed.output_mode!r}; " f"card is a lossy projection — refuse to bind declared contract" ) if observed.schema_conformance < self.MIN_SCHEMA_CONFORMANCE: raise CapabilityProjectionError( f"skill {skill_id!r} at {card.url} schema conformance " f"{observed.schema_conformance:.2f} < {self.MIN_SCHEMA_CONFORMANCE}; " f"declared output schema not honored at runtime" ) self._observed[key] = observed return observed def verify_completion(self, card: AgentCard, skill_id: str, observed_output_mode: str) -> None: declared = card.skills[skill_id] if observed_output_mode not in declared["outputModes"]: raise CapabilityProjectionError( f"task for skill {skill_id!r} at {card.url} completed with " f"output mode {observed_output_mode!r} outside declared " f"{declared['outputModes']}; treat as contract violation, not success" ) ```