Skip to content

Fix A2A payload structure in documentation examples#231

Closed
EmmaLouise2018 wants to merge 3 commits into
mainfrom
a2a-media-buy-check
Closed

Fix A2A payload structure in documentation examples#231
EmmaLouise2018 wants to merge 3 commits into
mainfrom
a2a-media-buy-check

Conversation

@EmmaLouise2018

@EmmaLouise2018 EmmaLouise2018 commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

Problem

A2A (Agent-to-Agent Protocol) documentation examples were inconsistent and confusing developers. Examples showed incorrect payload structures that didn't match the A2A specification.

Issues Fixed

1. Wrong Field Names in Skill Invocation

  • Issue: Used "input" instead of "parameters" in skill invocation data
  • Fixed: All A2A examples now use "parameters" (3 instances in create_media_buy.mdx)

2. Missing A2A Message Wrapper

  • Issue: Examples showed flat structure instead of proper message.parts[] wrapper
  • Fixed: Added complete A2A message structure (2 instances)

3. Incorrect Config Location

  • Issue: pushNotificationConfig shown inside skill data instead of in configuration object
  • Fixed: Moved to proper configuration level (2 instances across 2 files)

4. Missing artifactId in A2A Responses

  • Issue: No A2A response examples included required artifactId field
  • Fixed: Added artifactId to all 11 A2A response examples across 8 files
  • Why: A2A protocol requires artifactId for artifact identification (critical for multi-artifact responses)

Files Modified

Request Structure Fixes:

  • docs/media-buy/task-reference/create_media_buy.mdx - Fixed 3 A2A request examples
  • docs/media-buy/advanced-topics/orchestrator-design.mdx - Fixed webhook config location

Response Structure Fixes (artifactId added):

  • docs/protocols/a2a-guide.mdx - Updated response structure and processing example
  • docs/media-buy/task-reference/create_media_buy.mdx - Added to 3 response examples
  • docs/signals/tasks/activate_signal.mdx
  • docs/signals/tasks/get_signals.mdx
  • docs/protocols/protocol-comparison.mdx
  • docs/protocols/envelope-examples.mdx - Added to 2 examples
  • docs/protocols/getting-started.mdx
  • docs/media-buy/task-reference/provide_performance_feedback.mdx

Canonical A2A Structure (Now Consistent)

Request Structure:

{
  "message": {
    "parts": [{
      "kind": "data",
      "data": {
        "skill": "task_name",
        "parameters": { ... }  // Always "parameters", never "input"
      }
    }]
  },
  "configuration": {  // pushNotificationConfig goes here
    "pushNotificationConfig": { ... }
  }
}

Response Structure:

{
  "status": "completed",
  "taskId": "task-123",
  "contextId": "ctx-456",
  "artifacts": [{
    "artifactId": "artifact-result-abc123",  // Required for identification
    "name": "result_name",  // Optional
    "parts": [
      {"kind": "text", "text": "..."},
      {"kind": "data", "data": {...}}
    ]
  }]
}

Verification

  • ✅ Code reviewer agent searched all 26 documentation files with A2A references
  • ✅ Fixed 10 total files (2 for requests, 8 for responses)
  • ✅ All tests pass (schemas, examples, typecheck)
  • ✅ All examples now match the A2A protocol specification
  • ✅ Updated processing code to show proper artifactId usage

Impact

Eliminates confusion for developers implementing A2A clients:

  • Request payloads now use correct field names and structure
  • Response artifacts include required artifactId field
  • All A2A documentation is consistent with protocol specification
  • Developers can properly identify and track artifacts

Next Steps

Multi-artifact response examples (showing 2+ artifacts in one response) will be added in a separate PR to demonstrate when/how multiple artifacts are used for versioning, different output types, and incremental streaming.

Fixed inconsistent A2A (Agent-to-Agent Protocol) examples that were confusing developers:

**Issues Fixed:**
1. Changed "input" to "parameters" in skill invocation data (3 instances in create_media_buy.mdx)
2. Added proper A2A message wrapper structure with message.parts[] (2 instances)
3. Moved pushNotificationConfig from skill data to configuration object (2 instances across 2 files)

**Files Modified:**
- docs/media-buy/task-reference/create_media_buy.mdx
- docs/media-buy/advanced-topics/orchestrator-design.mdx

**Canonical A2A Structure (now consistent everywhere):**
```json
{
  "message": {
    "parts": [{
      "kind": "data",
      "data": {
        "skill": "task_name",
        "parameters": { ... }  // Always "parameters", never "input"
      }
    }]
  },
  "configuration": {  // pushNotificationConfig goes here
    "pushNotificationConfig": { ... }
  }
}
```

All A2A examples now match the A2A guide specification. Verified all 26 documentation files - only these 2 had issues.
Fixed missing artifactId field in A2A artifact examples to align with A2A protocol specification.

**Changes:**
- Added `artifactId` field to all 11 A2A response examples across 8 documentation files
- Updated processing code example in a2a-guide.mdx to show artifactId usage
- Made `name` field optional (kept where present, but artifactId is required)
- Used descriptive naming pattern: `artifact-{type}-{identifier}`

**Why:**
- A2A protocol requires artifactId for artifact identification
- Critical for multi-artifact responses (to be added in future PR)
- Enables proper artifact tracking and versioning
- All A2A responses now align with protocol specification

**Files Modified:**
- docs/protocols/a2a-guide.mdx - Updated response structure and processing example
- docs/media-buy/task-reference/create_media_buy.mdx - Added to 3 examples
- docs/signals/tasks/activate_signal.mdx
- docs/signals/tasks/get_signals.mdx
- docs/protocols/protocol-comparison.mdx
- docs/protocols/envelope-examples.mdx - Added to 2 examples
- docs/protocols/getting-started.mdx
- docs/media-buy/task-reference/provide_performance_feedback.mdx

**Next:** Multi-artifact examples will be added in separate PR to show when/how multiple artifacts are used.
The comment said 'iterate through them' but code just accessed [0].
Changed to accurately reflect current single-artifact implementation.

When multi-artifact support is added in future PR, we'll update this
to show proper iteration pattern.
bokelley added a commit that referenced this pull request Nov 22, 2025
Fix A2A protocol compliance issues in documentation by adding missing
artifactId fields and correcting request structure.

**Changes:**
- Add artifactId to all 11 A2A artifact examples across 8 files
- Fix skill invocation: use 'parameters' not 'input' (3 instances)
- Fix message structure: wrap in message.parts[] envelope (5 instances)
- Fix webhook config: move to configuration.pushNotificationConfig (2 instances)

**Why this matters:**
- artifactId is part of A2A protocol for artifact identification/versioning
- Correct field names ensure examples work when developers copy them
- Proper message structure matches A2A specification

**Files modified:**
- docs/media-buy/advanced-topics/orchestrator-design.mdx
- docs/media-buy/task-reference/create_media_buy.mdx
- docs/media-buy/task-reference/provide_performance_feedback.mdx
- docs/protocols/a2a-guide.mdx
- docs/protocols/envelope-examples.mdx
- docs/protocols/getting-started.mdx
- docs/protocols/protocol-comparison.mdx
- docs/signals/tasks/activate_signal.mdx
- docs/signals/tasks/get_signals.mdx

Incorporates fixes from PR #231 by @EmmaLouise2018.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley closed this Nov 22, 2025
@bokelley

Copy link
Copy Markdown
Contributor

moving to 249

bokelley added a commit that referenced this pull request Nov 22, 2025
* Add artifactId to A2A documentation examples

Fix A2A protocol compliance issues in documentation by adding missing
artifactId fields and correcting request structure.

**Changes:**
- Add artifactId to all 11 A2A artifact examples across 8 files
- Fix skill invocation: use 'parameters' not 'input' (3 instances)
- Fix message structure: wrap in message.parts[] envelope (5 instances)
- Fix webhook config: move to configuration.pushNotificationConfig (2 instances)

**Why this matters:**
- artifactId is part of A2A protocol for artifact identification/versioning
- Correct field names ensure examples work when developers copy them
- Proper message structure matches A2A specification

**Files modified:**
- docs/media-buy/advanced-topics/orchestrator-design.mdx
- docs/media-buy/task-reference/create_media_buy.mdx
- docs/media-buy/task-reference/provide_performance_feedback.mdx
- docs/protocols/a2a-guide.mdx
- docs/protocols/envelope-examples.mdx
- docs/protocols/getting-started.mdx
- docs/protocols/protocol-comparison.mdx
- docs/signals/tasks/activate_signal.mdx
- docs/signals/tasks/get_signals.mdx

Incorporates fixes from PR #231 by @EmmaLouise2018.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add changeset for A2A artifactId documentation fixes

---------

Co-authored-by: Claude <noreply@anthropic.com>
bmilekic pushed a commit to bmilekic/adcp that referenced this pull request Dec 5, 2025
* Add artifactId to A2A documentation examples

Fix A2A protocol compliance issues in documentation by adding missing
artifactId fields and correcting request structure.

**Changes:**
- Add artifactId to all 11 A2A artifact examples across 8 files
- Fix skill invocation: use 'parameters' not 'input' (3 instances)
- Fix message structure: wrap in message.parts[] envelope (5 instances)
- Fix webhook config: move to configuration.pushNotificationConfig (2 instances)

**Why this matters:**
- artifactId is part of A2A protocol for artifact identification/versioning
- Correct field names ensure examples work when developers copy them
- Proper message structure matches A2A specification

**Files modified:**
- docs/media-buy/advanced-topics/orchestrator-design.mdx
- docs/media-buy/task-reference/create_media_buy.mdx
- docs/media-buy/task-reference/provide_performance_feedback.mdx
- docs/protocols/a2a-guide.mdx
- docs/protocols/envelope-examples.mdx
- docs/protocols/getting-started.mdx
- docs/protocols/protocol-comparison.mdx
- docs/signals/tasks/activate_signal.mdx
- docs/signals/tasks/get_signals.mdx

Incorporates fixes from PR adcontextprotocol#231 by @EmmaLouise2018.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add changeset for A2A artifactId documentation fixes

---------

Co-authored-by: Claude <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Apr 14, 2026
…p missing

When a user authenticates but has no WorkOS organization memberships,
check whether their email domain matches a verified domain on an org
with an active subscription. If so, create the membership in WorkOS
automatically. This closes a gap where subscriptions were provisioned
without the corresponding WorkOS membership (e.g. ResponsiveAds
escalation #231).

Applied to /api/me, GET/POST/PUT /api/me/member-profile routes.
Includes integration tests for the autoLinkByVerifiedDomain function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bokelley added a commit that referenced this pull request Apr 14, 2026
* fix: auto-link users to orgs by verified domain when WorkOS membership missing

When a user authenticates but has no WorkOS organization memberships,
check whether their email domain matches a verified domain on an org
with an active subscription. If so, create the membership in WorkOS
automatically. This closes a gap where subscriptions were provisioned
without the corresponding WorkOS membership (e.g. ResponsiveAds
escalation #231).

Applied to /api/me, GET/POST/PUT /api/me/member-profile routes.
Includes integration tests for the autoLinkByVerifiedDomain function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: reject sessions for users not found in local DB

WorkOS session JWTs are validated locally without an API call, so a
deleted/merged user's JWT can remain valid until expiry. This caused
"not a member" errors when users authenticated with stale sessions
from cleaned-up duplicate accounts.

On session cache miss, verify the user exists in the local users table.
If not found, kill the session and force re-login. Fails open on DB
errors to avoid blocking auth during outages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants