> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privetag.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform Overview

> Understanding the PriveTag B2A Platform architecture

# B2A Platform Overview

The PriveTag B2A (Business-to-AI Agent) Platform is designed to make AI assistants smarter about travel recommendations.

## What is B2A?

<Info>
  **B2A** = Business-to-AI Agent

  Unlike B2B (business-to-business) or B2C (business-to-consumer), B2A focuses on serving AI agents as the primary client.
</Info>

## Architecture

```mermaid theme={null}
graph TB
    subgraph "AI Agents"
        A1[ChatGPT]
        A2[Claude]
        A3[Custom LangChain]
        A4[Other AI]
    end

    subgraph "PriveTag B2A Platform"
        API[B2A API]
        CP[Context Pipeline]
        GT[Ground Truth Engine]
        INV[Inventory Hub]
    end

    subgraph "Data Sources"
        NFC[NFC Verification]
        VENUES[Venue Partners]
        WEATHER[Weather API]
    end

    A1 --> API
    A2 --> API
    A3 --> API
    A4 --> API

    API --> CP
    API --> GT
    API --> INV

    NFC --> GT
    VENUES --> INV
    WEATHER --> CP
```

## Core Components

### 1. B2A API

The entry point for AI agents to interact with PriveTag:

* **`/recommend`** - Context-aware activity recommendations
* **`/execute_booking`** - Real-time booking with voucher delivery
* **`/inventory`** - Availability and flash deals

### 2. Context Pipeline

Processes multiple data signals to understand user needs:

<CardGroup cols={3}>
  <Card title="User Profile" icon="user">
    Travel type, interests, budget, nationality
  </Card>

  <Card title="Environment" icon="cloud-sun">
    Weather, time of day, location
  </Card>

  <Card title="History" icon="clock-rotate-left">
    Past bookings, preferences
  </Card>
</CardGroup>

### 3. Ground Truth Engine

What makes PriveTag unique:

```mermaid theme={null}
graph LR
    A[AI Recommends] --> B[User Books]
    B --> C[User Visits]
    C --> D[NFC/QR Scan]
    D --> E[Ground Truth]
    E --> A
```

**Ground Truth** = Verified user behavior, not assumptions.

### 4. Inventory Hub

Real-time connection to activity providers:

* Direct venue partnerships
* External APIs (Klook, Viator, GetYourGuide, KKday)
* Flash deals and exclusive rates

## Why B2A?

### Problem: AI Hallucination

Traditional AI assistants often:

* ❌ Recommend closed businesses
* ❌ Quote wrong prices
* ❌ Suggest unavailable activities
* ❌ Give outdated information

### Solution: Ground Truth Data

PriveTag's B2A API provides:

* ✅ Verified, real-time data
* ✅ Actual availability
* ✅ Current pricing
* ✅ Recommendations based on real visits

## Data Flow Example

```mermaid theme={null}
sequenceDiagram
    participant User
    participant AI
    participant PriveTag
    participant Venue

    Note over User,AI: User asks for recommendations

    User->>AI: "What should we do in Bangkok today?"
    AI->>PriveTag: POST /recommend (family, Bangkok, lat/lon)

    Note over PriveTag: Context Pipeline processes:
    Note over PriveTag: 1. Family travel type
    Note over PriveTag: 2. Current weather (sunny, 32°C)
    Note over PriveTag: 3. Time of day (afternoon)
    Note over PriveTag: 4. Ground Truth: families like X

    PriveTag-->>AI: Ranked recommendations + context_log_id

    AI-->>User: "Here are family-friendly options..."

    Note over User,AI: User selects an activity

    User->>AI: "Book Safari World for tomorrow"
    AI->>PriveTag: POST /execute_booking

    PriveTag->>User: Voucher email with QR

    Note over User,Venue: On visit day

    User->>Venue: Shows QR code
    Venue->>PriveTag: Scans QR
    PriveTag->>PriveTag: Records Ground Truth
    PriveTag->>AI: Webhook: qr_verified

    Note over PriveTag: Ground Truth improves future recommendations
```

## Integration Options

<CardGroup cols={3}>
  <Card title="REST API" icon="code" href="/api-reference/b2a/overview">
    Direct HTTP integration
  </Card>

  <Card title="MCP Server" icon="plug" href="/b2a-platform/mcp-integration">
    Native Claude integration
  </Card>

  <Card title="LangChain" icon="link" href="/b2a-platform/langchain">
    LangChain tool package
  </Card>
</CardGroup>

## Key Metrics

| Metric                | Value         |
| --------------------- | ------------- |
| Booking Success Rate  | 99%           |
| Voucher Delivery Time | \< 30 seconds |
| Ground Truth Coverage | 85%+          |
| API Uptime            | 99.9%         |

## Supported Regions

Currently serving Southeast Asia:

| Country        | Coverage                                    |
| -------------- | ------------------------------------------- |
| 🇹🇭 Thailand  | Bangkok, Phuket, Chiang Mai, Pattaya, Krabi |
| 🇻🇳 Vietnam   | Ho Chi Minh, Hanoi, Da Nang, Nha Trang      |
| 🇮🇩 Indonesia | Bali, Jakarta, Yogyakarta                   |
| 🇲🇾 Malaysia  | Kuala Lumpur, Penang, Langkawi              |
| 🇸🇬 Singapore | Full coverage                               |

## Next Steps

<CardGroup cols={2}>
  <Card title="Context Pipeline" icon="diagram-project" href="/b2a-platform/context-pipeline">
    Understand how context is processed
  </Card>

  <Card title="Ground Truth" icon="check-double" href="/b2a-platform/ground-truth">
    Learn about verified behavior data
  </Card>
</CardGroup>
