Repository navigation
feat(protocol): a canonical attribution-probe/v1 extension - #17
Merged
Merged
Conversation
The A2A validator asks an agent which project and task attribution it last sent
upstream, through urn:agentenv:attribution-probe/v1 at POST /ext/attribution-probe.
Hand-written agents advertise it, but an AgentEnvAgent cannot: reserved
urn:agentenv: URIs must use a canonical SDK definition, and there was none, so the
runtime attribution check could only record "skipped".
ATTRIBUTION_PROBE_V1 has one runtime-owned, bodyless operation, probe, answered with
AttributionProbeResponse: {last_seen_attribution: {project_id?, task_id?},
last_seen_at_utc?}, the shape the validator already reads. The SDK records nothing
itself; only the agent knows what it sent.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
earakely-scale
requested review from
a team and
polakamtejas
as code owners
September 30, 2026 18:21
The probe test now sends a message through the A2A endpoint before reading the updated answer, so it fails if running a task stops updating what the probe reports. The README notes that the answer is agent-wide rather than per caller, and that the route carries no access check of its own. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The probe's answer was a closed {project_id, task_id} model, which put one
deployment's attribution vocabulary into the protocol. AgentEnv's cost attribution
is already an open dict of string dimensions that the framework threads without
reading, leaving each backend to pick the keys it understands. The probe now does
the same: last_seen_attribution is a dict[str, str] of whatever dimensions the
agent last sent with a model request, and LastSeenAttribution is gone. The
validator keeps reading project_id and task_id out of it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…be answer Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The A2A validator checks runtime attribution by asking an agent which project and task identifiers it last sent upstream, through
urn:agentenv:attribution-probe/v1atPOST /ext/attribution-probe. Hand-written agents advertise that extension. AnAgentEnvAgentcannot: reservedurn:agentenv:URIs must use their canonical SDK definition, and this one had none, so for SDK-built agents the check could only record "skipped".This adds the canonical definition:
ATTRIBUTION_PROBE_V1has one runtime-owned operation,probe: a bodylessPOST /ext/attribution-probe.AttributionProbeResponse,{last_seen_attribution: {<dimension>: <value>}, last_seen_at_utc?}.last_seen_attributionis an opendict[str, str], like AgentEnv's cost attribution (agent_env.attribution.Attribution). The protocol assigns no keys; each deployment forwards whatever dimensions its model gateway understands. The validator keeps reading theproject_idandtask_idthe control plane configures, so its check is unchanged.STANDARD_EXTENSIONSand exported fromagentenv_protocol.a2a_agent.MCP_CONFIG_V1, including that the answer is agent-wide and the route carries no access check of its own.It is additive. No existing operation, route or card entry changes, and the plugin-API check reports no break.
Tests
packages/agentenv-protocol/tests/test_a2a_agent.py:probereturns the dimensions the agent last sent in a real task, including arbitrary ones, and{}before any are sent;packages/agentenv-protocol/testshas 288 passing; the relatedtst/unitA2A and validator tests have 227 passing.🤖 Generated with Claude Code
The PR is not ready to merge because the Explorer can reject an embedded task or run the wrong task after browser navigation.
What we checked:
Summary
Adds a canonical attribution probe that SDK-built agents can expose through the A2A protocol. The agent supplies the attribution it last sent; the SDK defines the response but does not record attribution itself.
probeoperation and response type to the shared extension catalog.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR H[Host or task URL] --> P[Explorer task runner] P --> A[Task API] A --> R[Run] R --> V[Run viewer]Reviews (5) · Last reviewed commit: "Merge main into the attribution-probe ex..."