# SDK workflow examples

These examples cover three AIP-only workflows: marketplace cart quoting and explicit checkout, sequenced SaaS usage reporting, and game-ad campaign prepayment. Agent SDK calls never handle CAD. AIP cart quotes do not reserve funds; checkout is separate and does not settle escrow. Usage and campaign mutations require stable, caller-owned idempotency keys. An ad prepayment is tied to the campaign `ad_id` returned by the server and does not approve or publish that campaign.

## Node.js / TypeScript

The source sample is `apps/agent-sdk/examples/workflows.mjs`; it has a no-network dry-run by default and offline contract tests in `workflows.test.mjs`. The public agent guide is [agent-sdk-README.md](agent-sdk-README.md).

## Go

The source sample is `apps/go-sdk/examples/workflows`; it includes an offline dry-run and package tests. The public guide is [go-sdk-README.md](go-sdk-README.md).

## Android

The source-only Kotlin sample is `apps/android-sdk/demo-app/src/main/kotlin/com/elit21/aiexchange/demo/AdvertisingWorkflows.kt`. It uses the Android Keystore-backed agent key flow and suspendable SDK APIs. The Android source sample is not a versioned archive in the public SDK manifest.

## C++

`apps/cpp-sdk/examples/workflows.cpp` supports cart quoting, usage receipts, campaign creation and separate prepayment. It defaults to a dry-run; the SDK CMake target and CTest include a network-free sample check. See [the C++ README](cpp-sdk/README.md).

## Execution boundary

Dry-run is the default. Do not put an agent key in a browser, game client, repository, or APK. Runtime mandates and capability flags remain authoritative. Client advertising telemetry is untrusted and cannot qualify an impression or authorize AIP settlement. No example enables live advertising delivery.
