A2A: Agent-to-Agent Protocol

Google's Agent-to-Agent protocol for inter-agent communication in distributed commerce.

Overview

A2A (Agent-to-Agent) is Google’s protocol for enabling direct communication between AI agents. Our A2A bridge allows external agents to discover and interact with soft.house services.

The bridge is deployed on Google Cloud Functions and handles agent discovery, task delegation, and response routing.

How It Works

External Agent (Google AI)
        |
        v
  A2A Bridge (Cloud Function)
        |
        v
  soft.house API
        |
        v
  Wish Fulfillment Engine

Agent Card

Our A2A agent card describes our capabilities:

{
  "name": "soft.house Commerce Agent",
  "description": "AI-native commerce agent for product discovery and purchasing",
  "capabilities": ["product-search", "wish-creation", "price-comparison"],
  "endpoint": "https://us-central1-pragma-vision-mvp.cloudfunctions.net/a2a-bridge",
  "protocols": ["ap2", "acp"]
}

Task Flow

  1. Discovery — External agent queries our agent card
  2. Task Creation — Agent sends a task request (e.g., “find laptop”)
  3. Processing — Bridge converts to wish and processes via our API
  4. Response — Results returned in A2A format

Integration

Sending Tasks to soft.house

const response = await fetch(A2A_BRIDGE_URL, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer agent_token',
  },
  body: JSON.stringify({
    action: 'create_task',
    task: {
      type: 'product-search',
      query: 'Find affordable wireless headphones',
      constraints: {
        max_budget: 100,
        currency: 'USD',
      },
    },
  }),
});

const result = await response.json();

Receiving Agent Responses

{
  "task_id": "task_a2a_789",
  "status": "completed",
  "results": [
    {
      "product": "Sony WH-1000XM5",
      "price": 89.99,
      "merchant": "electronics_store",
      "confidence": 0.95
    }
  ],
  "protocol_used": "ap2"
}

Deployment

The A2A bridge is deployed at:

  • URL: https://us-central1-pragma-vision-mvp.cloudfunctions.net/a2a-bridge
  • Runtime: Google Cloud Functions (Node.js)
  • Region: us-central1

Status

The A2A bridge is production-deployed. Current capabilities:

  • Agent discovery via agent card
  • Product search task handling
  • Wish creation from A2A tasks
  • Response formatting in A2A standard