---
title: "AI & Agents"
source: https://docs.myappaffiliate.com/ai
docs: "MyAppAffiliate — Developer Documentation"
index: https://docs.myappaffiliate.com/llms.txt
---
# AI & Agents

These docs are built to be read by a model as easily as by a person. Every page has a
plain-markdown twin, the whole site is published as an `llms.txt` index, and the setup
sections carry prompts written for coding agents.

## Copy a page into a chat

Every page has a **Copy page** button in the top right of the content.

- **Copy page** — puts the page on your clipboard as clean markdown (front matter,
  headings, code, tables) ready to paste as context.
- **View as Markdown** — opens the raw `.md` source.
- **Open in ChatGPT / Open in Claude** — starts a conversation prefilled with a prompt
  that tells the model to fetch this page's markdown and use it as the source of truth.

## Prompts for coding agents

Install and setup sections carry a **prompt card** — a ready-made instruction block for
Claude Code, Cursor, Codex or any other coding agent. It already points at this page's
markdown, so the agent works from the real API instead of guessing.

**Prompt for an AI coding agent**

```text
Integrate MyAppAffiliate into my project.

Documentation (read these first, they are the source of truth):
- Page: https://docs.myappaffiliate.com/ai.md
- Full docs index: https://docs.myappaffiliate.com/llms.txt

Task: Integrate MyAppAffiliate into my project: pick the right SDK for my stack, install and configure it, attribute the referral, identify the user, and connect the purchase webhook that reports revenue.

Rules:
- Follow the documented API exactly — no invented method names, endpoints, parameters or field names.
- Match the conventions already used in my codebase.
- Ask me for my SDK key and API base URL instead of guessing, and never hard-code secrets — read them from config/environment.
- Tell me afterwards which steps I still have to do by hand (dashboard settings, capabilities, webhook configuration).
```

Copy it, paste it into your agent, and let it read the docs before it writes code.

## Machine-readable URLs

| URL | What it is |
|---|---|
| `https://docs.myappaffiliate.com/llms.txt` | Curated index of every page, [llmstxt.org](https://llmstxt.org) format |
| `https://docs.myappaffiliate.com/llms-full.txt` | The entire documentation in one file |
| `<any page>.md` | That page as plain markdown — e.g. [`/sdk-ios.md`](https://docs.myappaffiliate.com/sdk-ios.md) |

The home page is `/index.md`. Each HTML page also advertises its twin with
`<link rel="alternate" type="text/markdown">`, and the site points at its index with
`<link rel="describedby" href="/llms.txt">`, so crawlers and agents can discover both
without being told.

```bash
# Point any agent at the whole corpus
curl https://docs.myappaffiliate.com/llms.txt

# Or one page
curl https://docs.myappaffiliate.com/sdk-ios.md
```

## Rules we ask models to follow

The generated prompts and the `llms.txt` preamble both state the same constraints, and
they are worth repeating if you write your own:

- Treat these pages as the source of truth. If an SDK method, endpoint path or webhook
  field is not documented here, it does not exist.
- Never hard-code an SDK key or API base URL — read them from config or environment.
- The user id passed to `identify()` **must** be the same id sent to RevenueCat or
  Stripe. Almost every broken integration is a mismatch between those two.
- Attribution and commission are money-path code. Ask before changing behaviour, and
  say which steps still need a human (dashboard settings, Apple capabilities, webhook
  registration).
