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

# TMP for AI Assistants

> How TMP enables monetization of AI chat and assistant surfaces without traditional ad servers.

# TMP for AI Assistants

AI assistants represent a fundamentally new ad surface. There is no impression in the traditional sense — sponsored content is woven into conversational responses. There is no ad server — the platform's language model generates the response. And there is no standard protocol for asking buyers "what should be sponsored in this conversation?"

TMP provides that protocol.

## How It Works Today

Most AI platforms that monetize conversations either:

* Partner with a single ad network and delegate all monetization decisions
* Build proprietary sponsorship logic tied to specific advertisers
* Don't monetize conversations at all

There is no standard way for an AI platform to discover which buyer agents have relevant packages, ask them what to activate for a given conversation context, and incorporate their preferences into the response — all while protecting user privacy.

## Context Match

When a user sends a message in a conversation, the AI platform sends a Context Match request before generating the response:

```json theme={null}
{
  "type": "context_match_request",
  "request_id": "ctx-a1b2c3d4",
  "property_rid": "01916f3a-f8cb-7000-8000-000000000050",
  "property_id": "chatplatform-assistant",
  "property_type": "ai_assistant",
  "placement_id": "chat-inline-recommendation",
  "seller_agent_url": "https://chatplatform.example",
  "artifact_refs": [
    { "type": "custom", "value": "turn:b3c9e2" }
  ],
  "context_signals": {
    "topics": ["479", "483", "592"],
    "taxonomy_source": "iab",
    "taxonomy_id": 7,
    "sentiment": "positive",
    "keywords": ["sneakers", "running", "recommendations"],
    "language": "en",
    "content_policies": ["csbs"],
    "summary": "User asking for sneaker recommendations for running and casual wear"
  },
  "geo": { "country": "US" }
}
```

Conversation turns are ephemeral — there's no public reference a buyer could independently resolve, so `artifact_refs` are typically limited to opaque turn identifiers (e.g., `turn:b3c9e2`). The platform sends `context_signals` with pre-computed classifier outputs (topics, sentiment, keywords, summary) so the buyer can evaluate relevance without seeing the raw conversation. No user identity is present. Platforms can also send the full conversation as an `artifact` for buyers that evaluate content directly — the same artifact schema used for content standards evaluation.

The buyer agent responds with an offer:

```json theme={null}
{
  "type": "context_match_response",
  "request_id": "ctx-a1b2c3d4",
  "offers": [
    {
      "package_id": "pkg-sneaker-reco",
      "brand": { "domain": "apexathletics.example.com", "brand_id": "apex_runners" },
      "price": { "amount": 12.50, "currency": "USD", "model": "cpm" },
      "summary": "Apex Classic Low + Runner X — free shipping this month",
      "creative_manifest": {
        "format_id": { "agent_url": "https://chatplatform.example.com", "id": "sponsored_recommendation" },
        "assets": {
          "headline": { "content": "Trending for spring" },
          "body": { "content": "Apex Classic Low — clean lines, tons of colorways. Free shipping this month." },
          "product_catalog": { "catalog_id": "catalog-sneakers", "ids": ["sku-classic-low", "sku-runner-x"] }
        }
      },
      "macros": {
        "click_url": "https://apexathletics.example.com/classic-low?utm_source=chatplatform"
      }
    }
  ],
  "signals": {
    "segments": ["sneaker_enthusiast"],
    "targeting_kvs": [{ "key": "product_affinity", "value": "sneakers" }]
  }
}
```

The buyer's offer includes `package_id` (required) along with optional fields: `brand`, `price`, `summary`, `creative_manifest`, and `macros`. For an AI assistant, the creative manifest is small enough to send inline in the real-time path. The manifest carries the text the platform can weave into the conversation and the catalog items to reference. The `summary` helps the platform judge relevance before deciding whether to incorporate the sponsored content.

## Identity Match

The platform sends an Identity Match request with a session token and the platform's `seller_agent_url`. The buyer resolves its active package set from `seller_agent_url`; when the platform sends `package_ids` explicitly (as below), composition MUST be independent of the current page — either all-active (every active package for this buyer on the platform) or fuzzed (a random sample padded with synthetic non-existent IDs the buyer silently drops). The page-specific subset is forbidden — it would let the buyer correlate this request with the context match by comparing package sets:

```json theme={null}
{
  "type": "identity_match_request",
  "request_id": "id-e5f6g7h8",
  "seller_agent_url": "https://ai-assistant.example",
  "identities": [
    { "user_token": "tok_session_k2f8", "uid_type": "publisher_first_party" }
  ],
  "package_ids": ["pkg-sneaker-reco", "pkg-fashion-native", "pkg-athletic-wear", "pkg-outdoor-gear", "pkg-accessories-promo", "pkg-seasonal-sale"]
}
```

The buyer responds with the IDs of eligible packages and a TTL. The buyer computes eligibility from frequency caps, audience membership, and other signals — the reasons are opaque to the publisher.

```json theme={null}
{
  "type": "identity_match_response",
  "request_id": "id-e5f6g7h8",
  "eligible_package_ids": [
    "pkg-sneaker-reco",
    "pkg-athletic-wear",
    "pkg-outdoor-gear",
    "pkg-seasonal-sale"
  ],
  "serve_window_sec": 120
}
```

The platform intersects these results locally: only packages that appeared in both the context match offers and the `eligible_package_ids` list are activated.

## Activation

The AI platform incorporates the TMP result into its response generation:

* The offer's creative manifest (headline, body text, catalog items) becomes part of the context available to the language model. The manifest is inline in the offer — no separate fetch needed.
* The platform's own relevance model decides **how** to integrate the sponsored content — as a direct recommendation, a subtle mention, or a separate sponsored card, depending on conversational flow and editorial policy.
* Ineligible packages (from Identity Match) are excluded from the generation context.
* The offer `summary` helps the platform's relevance model decide if the sponsored content fits the conversation.

TMP tells the platform **what** sponsored content is available and relevant. The platform decides **how** to present it. This is the correct separation of concerns — the buyer knows their campaign; the platform knows their user experience.

## Why This Matters

AI assistants are a new ad surface that lacks the infrastructure web and mobile have built over decades. TMP provides:

* **Standard buyer integration**: Any buyer agent that speaks TMP can activate packages on any AI platform that supports TMP. No bespoke integrations per platform.
* **Privacy by default**: The conversation content never leaves the platform as raw text. The buyer sees classified signals and topic IDs. The user's identity is handled in a separate request.
* **Platform editorial control**: The platform decides how to weave sponsored content into the conversation. TMP provides inputs; the platform controls the experience.
* **Multi-buyer support**: A platform can have packages from multiple buyer agents active simultaneously. The TMP Router handles fan-out. The platform handles selection.

## Example Flow

```
User message: "What are the best sneakers for spring?"
  → Platform classifies: topic=shopping.fashion.sneakers, sentiment=positive
  → Platform sends Context Match to TMP Router
  → Router fans out to buyer agents
  → Apex Athletics agent: offer for Classic Low + Runner X, free shipping, inline creative manifest
  → Spring Retailer agent: no offers (context doesn't match fashion-native targeting)
  → Router returns merged response

  → (300ms later) Platform sends Identity Match with ALL buyer's active packages
  → Response: eligible_package_ids includes pkg-sneaker-reco, serve_window_sec: 120
  → Router caches eligibility

  → Platform joins: pkg-sneaker-reco offer is eligible
  → Platform includes offer's creative manifest in generation context
  → Language model generates response:
    "Great question! The Apex Classic Low is trending for spring —
     clean lines, tons of colorways, and they're offering free
     shipping right now. The Runner X is also a solid pick
     if you want more cushion..."
  → Sponsored content label applied per platform policy
```

## Billing and Measurement

**Impression definition.** An impression occurs when the platform's LLM incorporates a creative manifest into its response to the user. This is analogous to a viewable impression on web — the content was rendered and presented.

**Engagement events.** Follow-up questions about the sponsored product ("where can I buy those?", "what colors are available?") are engagement events. The platform tracks these and reports them via `get_media_buy_delivery`.

**Click-through.** If the response includes a product URL and the user navigates to it, this is a click event. The platform tracks click-throughs using the URLs from the creative manifest's assets.

**Billing model.** Most AI assistant packages use CPM (cost per thousand impressions) or CPA (cost per action). The platform reports delivery via `get_media_buy_delivery` like any other surface.

**Measurement challenges.** Unlike web where viewability is standardized (MRC), AI assistant impressions don't have an industry-standard viewability definition yet. AdCP defines an impression as "creative manifest content presented to the user in the LLM's response."

**Frequency counting.** Each impression counts toward the package's cross-publisher frequency cap. The platform reports impressions via delivery reporting; the buyer agent updates its exposure store. A user who sees a recommendation in an AI assistant and then visits a web page will have that AI impression reflected in the Identity Match eligibility check — provided the buyer's exposure store is current.
