# Use with AI agents

Source: https://docs.mirafive.io/ai-agents

> Give a coding agent these docs as Markdown, a ready setup prompt per SDK, or live access to your analytics through the MCP server.

Every page here is written so a coding agent can follow it as well as a person. This page shows how to hand the docs to an agent, and where the agent-specific parts live.

## Docs as Markdown

| URL | What it is |
| --- | --- |
| `https://docs.mirafive.io/llms.txt` | Index of every page with a one-line summary, in the [llms.txt](https://llmstxt.org) format |
| `https://docs.mirafive.io/llms-full.txt` | Every page in one Markdown file |
| `https://docs.mirafive.io/<page>.md` | One page as Markdown, e.g. [`/sdks/react.md`](https://docs.mirafive.io/sdks/react.md). The home page is `/index.md` |

Each HTML page also links its Markdown twin with `<link rel="alternate" type="text/markdown">`, and the buttons under every page title copy it or open it in Claude or ChatGPT.

For a single integration, give the agent the page for your SDK, not `llms-full.txt`. One page holds everything needed to set it up.

## Setup prompts

Every SDK page ends with a **Set up with an AI agent** section: a prompt with the exact steps, the environment variables, what not to do, and how to verify the install. Copy it into Claude Code, Cursor, Codex or any other coding agent.

| Stack | Prompt |
| --- | --- |
| Script tag | [/sdks/script-tag#set-up-with-an-ai-agent](https://docs.mirafive.io/sdks/script-tag#set-up-with-an-ai-agent) |
| React | [/sdks/react#set-up-with-an-ai-agent](https://docs.mirafive.io/sdks/react#set-up-with-an-ai-agent) |
| Next.js | [/sdks/nextjs#set-up-with-an-ai-agent](https://docs.mirafive.io/sdks/nextjs#set-up-with-an-ai-agent) |
| Laravel | [/sdks/laravel#set-up-with-an-ai-agent](https://docs.mirafive.io/sdks/laravel#set-up-with-an-ai-agent) |
| Other | The last section of each page under [SDKs](https://docs.mirafive.io/sdks) |

## Rules an agent must follow

These hold for every SDK. Put them in your agent's project instructions (`CLAUDE.md`, `AGENTS.md`, `.cursorrules`) if it works on your integration regularly.

```md title="AGENTS.md"
## MIRA FIVE analytics

- Docs: https://docs.mirafive.io/llms.txt (append .md to any docs URL for Markdown).
- Browser code uses the website key (public, mf_…) from the framework's public env var.
  Server code uses MIRAFIVE_SECRET_KEY. Never import the secret key into browser code.
- Keep the default consentless mode unless the site already has a consent manager.
  Do not add cookie banners, cookies or other analytics libraries.
- Event names: 1–128 characters, no leading `$` (reserved for MIRA FIVE).
- Verify an install by the network request POST https://events.mirafive.io/v1/batch/… answering 202.
```

## Analytics for agents

The docs teach an agent to install MIRA FIVE. To let an agent **read** your analytics (where buyers came from, which pages convert, what changed last week), connect it to the [MCP server](https://docs.mirafive.io/mcp). It works with Claude, ChatGPT, Cursor and any client that speaks the Model Context Protocol. The [REST API](https://docs.mirafive.io/rest-api) serves the same data to scripts.
