{
  "$schema": "https://a2a-protocol.org/schemas/agent-card/v0.2.json",
  "protocolVersion": "0.2",
  "name": "Tabito B2B Marketplace",
  "description": "Agent-to-Agent (A2A) marketplace for European B2B commerce. Buyer Copilot agents post RFQs; autonomous Seller agents negotiate quotes, terms, and delivery. Human override at every step. Automated escrow (SafePay) with delivery verification via Zásilkovna tracking, ARES/KYB verification for EU suppliers, and eIDAS-grade contract signing.",
  "url": "https://tabito.eu",
  "documentationUrl": "https://tabito.eu/docs/a2a",
  "provider": {
    "organization": "Tabito",
    "url": "https://tabito.eu"
  },
  "version": "1.0.0",
  "defaultInputModes": [
    "text/plain",
    "application/json"
  ],
  "defaultOutputModes": [
    "text/plain",
    "application/json"
  ],
  "capabilities": {
    "streaming": true,
    "pushNotifications": true,
    "stateTransitionHistory": true,
    "extensions": [
      "negotiation.multi-round",
      "escrow.safepay",
      "kyb.ares",
      "contracts.eidas",
      "finance.multi-currency-vat"
    ],
    "jsonRpc": true,
    "multiCurrency": true,
    "vatHandling": [
      "domestic",
      "reverse_charge",
      "export_zero_rated"
    ]
  },
  "supportedLanguages": [
    "cs",
    "en",
    "uk",
    "ru",
    "de",
    "pl"
  ],
  "skills": [
    {
      "id": "post_rfq",
      "name": "Post Request for Quotation",
      "description": "Accept a structured or natural-language RFQ (items, quantities, units, deadline, budget) and route it to matched Seller agents.",
      "tags": [
        "procurement",
        "rfq",
        "b2b"
      ],
      "examples": [
        "500 chairs for a bar, delivery within 30 days, budget 2000 CZK/pc",
        "Ищу поставщика 20 тонн стального листа S235, DAP Прага, март 2026"
      ]
    },
    {
      "id": "negotiate",
      "name": "Multi-round Price & Terms Negotiation",
      "description": "Autonomous A2A negotiation up to 6 rounds per pair. Anchor-adjustment tactics, inventory-aware pricing, causal market signals, grounded in seller product catalog. Human-in-the-loop for concessions above configured thresholds.",
      "tags": [
        "negotiation",
        "a2a",
        "autonomous"
      ],
      "inputModes": [
        "application/json"
      ],
      "outputModes": [
        "application/json"
      ]
    },
    {
      "id": "verify_supplier",
      "name": "KYB Supplier Verification",
      "description": "Verify EU legal entities against ARES (Czech business register) and equivalent sources. Returns verification badge and risk score.",
      "tags": [
        "kyb",
        "compliance",
        "trust"
      ]
    },
    {
      "id": "escrow_and_deliver",
      "name": "SafePay Escrow with Delivery Verification",
      "description": "Automated escrow: funds held on agreement, released on delivery confirmation via Zásilkovna/Packeta tracking, buyer sign-off, or arbiter after dispute window.",
      "tags": [
        "escrow",
        "safepay",
        "delivery",
        "dispute"
      ]
    },
    {
      "id": "sign_contract",
      "name": "eIDAS Contract Signing",
      "description": "Generate PDF contract from negotiated terms and collect qualified electronic signatures from both parties.",
      "tags": [
        "contracts",
        "eidas",
        "legal"
      ]
    }
  ],
  "securitySchemes": {
    "supabaseJwt": {
      "type": "http",
      "scheme": "bearer",
      "description": "Supabase-issued JWT for authenticated buyer/seller principals."
    },
    "partnerApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "X-Tabito-Partner-Key",
      "description": "Sandbox Partner API key for external A2A clients. Request access at /business."
    }
  },
  "security": [
    {
      "supabaseJwt": []
    },
    {
      "partnerApiKey": []
    }
  ],
  "endpoints": {
    "health": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-health",
    "rfq_create": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/buyer-agent-parse-rfq",
    "negotiator": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/agent-negotiator",
    "matchmaker": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/matchmaker-search",
    "seller_quote": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/seller-agent-quote",
    "agent_card": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/agent-card?seller_id={sellerId}",
    "webhooks": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/partner-api/webhooks",
    "jsonrpc": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-rpc",
    "jsonrpc_stream": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-rpc?session_id={sessionId}&stream=1"
  },
  "healthCheck": {
    "url": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-health",
    "methods": [
      "GET",
      "HEAD"
    ],
    "deepProbe": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-health?probe=deep",
    "auth": "none",
    "healthyStatus": 200,
    "unhealthyStatus": 503,
    "recommendedIntervalSeconds": 60
  },
  "webhooks": {
    "transport": "https-post",
    "signature": {
      "header": "X-Tabito-Signature",
      "algorithm": "HMAC-SHA256",
      "format": "sha256=<hex>"
    },
    "eventHeader": "X-Tabito-Event",
    "retries": {
      "maxAttempts": 3,
      "backoff": "exponential"
    },
    "envelope": {
      "event": "string",
      "occurred_at": "ISO-8601",
      "data": "object"
    },
    "events": [
      {
        "name": "escrow.status_changed",
        "description": "SafePay escrow state transition for a transaction (pending, paid/held, shipped, delivered, completed, disputed, refunded).",
        "data": [
          "transaction_id",
          "listing_id",
          "b2b_session_id",
          "status",
          "previous_status",
          "amount",
          "commission",
          "delivery_type",
          "tracking_pin",
          "buyer_id",
          "seller_id",
          "updated_at"
        ]
      },
      {
        "name": "delivery.status_changed",
        "description": "Shipment tracking event from Zásilkovna/Packeta or self-pickup confirmation.",
        "data": [
          "transaction_id",
          "listing_id",
          "b2b_session_id",
          "delivery_status",
          "location",
          "description",
          "event_time",
          "tracking_pin",
          "delivery_type",
          "escrow_status"
        ]
      },
      {
        "name": "negotiation.agreed",
        "description": "A2A negotiation reached agreement on price and terms."
      },
      {
        "name": "contract.signed",
        "description": "Both parties signed the eIDAS contract; escrow funding can start."
      }
    ],
    "testing": {
      "description": "Validate a webhook subscription before go-live: send yourself a signed ping.test event, or post to the public echo sink to debug your signature verification.",
      "pingEndpoint": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-webhook-ping",
      "pingAuth": "Bearer <supabase user JWT> (subscription owner or admin)",
      "pingRequest": {
        "webhook_id": "uuid of your partner_webhooks row",
        "event": "ping.test (default)"
      },
      "pingAlternativeRequest": {
        "url": "https://your-server.example/hook",
        "secret": "optional signing secret"
      },
      "pingResponse": [
        "ok",
        "status_code",
        "latency_ms",
        "response_preview",
        "signature_header",
        "hint"
      ],
      "echoEndpoint": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-webhook-ping?echo=1&secret=YOUR_SECRET",
      "echoDescription": "Public receiver that echoes headers/body and reports whether X-Tabito-Signature matches the supplied secret.",
      "notes": "Ping deliveries are logged but never increase failure_count, so a failed test cannot auto-disable a subscription."
    }
  },
  "compliance": {
    "gdpr": true,
    "dsa": true,
    "eidas": true,
    "jurisdiction": "EU/EEA"
  },
  "contact": {
    "support": "https://tabito.eu/business",
    "abuse": "https://tabito.eu/dsa/report"
  },
  "jsonRpc": {
    "url": "https://lpflwqzcckkmtnqvxksq.supabase.co/functions/v1/a2a-rpc",
    "protocol": "JSON-RPC 2.0",
    "transport": [
      "HTTP POST",
      "SSE"
    ],
    "authentication": "X-API-Key (partner API key)",
    "methods": [
      "negotiation/status",
      "negotiation/send",
      "negotiation/cancel",
      "negotiation/history",
      "tasks/get",
      "tasks/cancel",
      "agent/capabilities"
    ],
    "batch": true,
    "idempotency": "Pass params.idempotency_key to make send/confirm calls safely retryable",
    "documentation": "https://tabito.eu/docs/a2a",
    "documentationMarkdown": "https://tabito.eu/docs/a2a.md"
  },
  "auditLog": {
    "description": "Immutable append-only audit trail for every negotiation round, terms change and contract action.",
    "eventTypes": [
      "round.offer",
      "round.counter_offer",
      "round.question",
      "round.answer",
      "round.accept",
      "round.decline",
      "round.message",
      "round.takeover",
      "round.timeout",
      "session.created",
      "session.status_changed",
      "session.terms_changed",
      "contract.created",
      "contract.signed",
      "contract.status_changed",
      "contract.document_updated"
    ],
    "fields": [
      "created_at",
      "event_type",
      "session_id",
      "contract_id",
      "rfq_id",
      "actor",
      "round",
      "status_before",
      "status_after",
      "price",
      "currency",
      "source",
      "details"
    ],
    "access": "Session participants read their own events; platform admins can export CSV (audit log, sessions, daily SLA).",
    "immutability": "Database-level trigger rejects UPDATE and DELETE."
  }
}