Ap2 merchant agent

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Ap2 merchant agent is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. Build an AP2 Merchant Agent — the seller-side agent that receives intent mandates, searches product catalogs, creates signed cart mandates, and represents the merchant in agentic transactions. Use when implementing the Merchant Endpoint role.

How to use this skill

Skill file

AP2 Merchant Agent Implementation

Before writing code

Fetch live docs:

  1. Fetch https://ap2-protocol.org/ap2/specification/ for Merchant Endpoint responsibilities
  2. Web-search site:github.com google-agentic-commerce AP2 samples roles merchant_agent for reference implementation
  3. Web-search site:github.com google-agentic-commerce AP2 merchant cart mandate for Checkout Mandate creation
  4. Fetch SDK docs for merchant-side agent patterns

Conceptual Architecture

What the Merchant Agent Does

The Merchant Agent (ME) represents the seller in AP2 transactions:

  1. Receives Intent Mandates from Shopping Agents
  2. Searches product catalog for matching items
  3. Creates Checkout Mandates with specific product offers, prices, and totals
  4. Signs Checkout Mandates with the merchant entity's signature
  5. Handles clarification requests when intent is ambiguous
  6. Supports the payment flow by forwarding to Payment Processor

Agent Card

The Merchant Agent's Agent Card advertises:

Key Responsibilities

Intent Processing
Checkout Mandate Creation
Merchant Signature

The merchant signature is critical:

Escalation Decisions

When facing ambiguous intent, the merchant can:

Catalog Integration

The Merchant Agent needs access to:

Payment Method Advertisement

Checkout Mandates include supported payment methods:

"method_data": [
  {
    "supportedMethods": "https://processor.example.com/pay",
    "data": { "merchant_id": "..." }
  }
]

Multi-Merchant Scenarios

A Shopping Agent may contact multiple merchants:

Best Practices

Fetch the specification for exact Merchant Agent requirements, Checkout Mandate creation process, and signing formats before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.