# Use the docs with AI agents

> Machine-readable entry points and a rules file that help coding agents integrate AdQuest correctly.

Source: https://dashboard.adquest.batriders.ir/docs/ai-agents · Audience: Developers · Section: Resources

## Entry points

Every page is built from the same source as this site, so the Markdown never differs from what you read here.

| Address | What it is | Use it when |
| --- | --- | --- |
| https://dashboard.adquest.io/llms.txt | An index of every page with one line each. | Always start here. The agent chooses what to load. |
| https://dashboard.adquest.io/llms-full.txt | Every page as Markdown in one file. | Your tool indexes documentation, or the context is large enough. |
| https://dashboard.adquest.io/docs/quickstart.md | One page as Markdown. Add .md to any docs address. The home page is /docs.md. | The agent needs one topic. |
| https://dashboard.adquest.io/openapi.json | The partner API as OpenAPI 3.1, with parameters, authentication and examples. | You generate a client or check a parameter. |
| @adquest/sdk type definitions | The .d.ts files shipped in the package (dist/index.d.ts and dist/react/index.d.ts). | The agent needs an exact method signature. It can read them in node_modules. |

## Add a rules file to your project

Copy this into the file your agent reads: AGENTS.md, CLAUDE.md or a rules file such as .cursor/rules. It points the agent at the docs and prevents the most common mistakes.

**AGENTS.md**

```markdown
# AdQuest integration rules

- Read https://dashboard.adquest.io/llms.txt first. Any docs page is available as Markdown by adding .md.
  The API contract is https://dashboard.adquest.io/openapi.json.
- The Secret Key (aqs_) is server-only. Never put it in browser code, an app bundle, a URL or a NEXT_PUBLIC_ variable.
- Create participant sessions on the backend only, after verifying the user with our own sign-in.
  A participant token lasts 15 minutes. Refresh it through the backend.
- Do not grant a reward in our product from a widget callback. Grant it only after a verified server
  result or a signed webhook.
- Send a unique idempotency_key for each lottery purchase. Reuse it only to retry the same purchase.
- Verify webhook signatures on the raw body (X-AdQuest-Signature-V2) and ignore repeated
  X-AdQuest-Event-Id values.
- Send the same locale (en or fa) to the session request and to the widget.
- The API URL ends in /api/v1. The SDK adds /platform.
```

> **Warning: Do not paste secrets into a prompt.** Keep the Secret Key and webhook signing secret in environment variables. An agent never needs their values to write the integration.

## Use it in your tools

- Tools that read AGENTS.md or CLAUDE.md pick up the rules automatically. Others accept the same text as a rules file.
- In a chat or terminal agent, give the address of llms.txt in your first message and name the page you want, for example: read https://dashboard.adquest.io/docs/webhooks.md, then write a receiver for my app.
- In tools that index documentation by address, add llms-full.txt as a documentation source.
- Ask the agent to type-check its code against @adquest/sdk before it finishes. The SDK is fully typed.

## Next steps

- [Quickstart](https://dashboard.adquest.batriders.ir/docs/quickstart): The shortest path to a working widget.
- [Complete example: Next.js](https://dashboard.adquest.batriders.ir/docs/examples): A session route, a widget and a webhook receiver.
- [API reference](https://dashboard.adquest.batriders.ir/docs/api-reference): Every route, generated from the OpenAPI contract.
