Installation
Put your agent files where scanners look
Choose your platform for exact steps. Every method ends with the same public files AgentReady checks—no SDK and no hidden integration.
Choose your platform
Install on Next.js
For Next.js App Router and Pages Router projects on any compatible host.
- 1
Use the public directory
At the same level as package.json, create public if it does not exist. Add all three downloads plus the merged crawler rules in robots.txt. Next.js serves these files unchanged from the domain root.
Next.js projectyour-next-app/ ├── package.json └── public/ ├── llms.txt → /llms.txt ├── agents.md → /agents.md ├── agent.json → /agent.json └── robots.txt → /robots.txt - 2
Add structured data
App Router: render the script in app/page.tsx for that page, or app/layout.tsx only for site-wide organization schema. Pages Router: render it in the page component with next/head. Escape serialized content so text cannot close the script tag.
app/page.tsx<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(schema).replace(/</g, '\u003c') }} /> - 3
Check middleware and rewrites
Exclude /llms.txt, /agents.md, /agent.json and /robots.txt from authentication middleware, locale redirects and catch-all rewrites so crawlers receive the static files directly.
- 4
Deploy and verify
Deploy production, open all three paths, validate agent.json as JSON and run Verify installation in AgentReady.
AgentReady will check
https://yourdomain.com/llms.txthttps://yourdomain.com/agents.mdhttps://yourdomain.com/agent.jsonJSON-LD on the matching pageWhat you are publishing
AgentReady serves working examples from its own root. Your downloaded files contain your scan results and should replace these examples on your domain.
A concise map of your business, important pages and human contact details.
https://yourdomain.com/llms.txt
text/plain
Rules for agents: permitted actions, boundaries, rate limits and contacts.
https://yourdomain.com/agents.md
text/markdown
Allow AI crawlers in robots.txt
Add these specific permissions before restrictive wildcard rules. Replace the sitemap URL with yours. AgentReady audits all 18 listed bots; firewall and bot-protection rules must allow them too.
User-agent: GPTBot
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: Claude-Web
Allow: /
User-agent: anthropic-ai
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: Perplexity-User
Allow: /
User-agent: Google-Extended
Allow: /
User-agent: Applebot-Extended
Allow: /
User-agent: CCBot
Allow: /
User-agent: Bytespider
Allow: /
User-agent: meta-externalagent
Allow: /
User-agent: Amazonbot
Allow: /
User-agent: cohere-ai
Allow: /
User-agent: DuckAssistBot
Allow: /
User-agent: YouBot
Allow: /
User-agent: Diffbot
Allow: /
Sitemap: https://example.com/sitemap.xmlThe methodology page explains what each bot supports and the effect of blocking it.
Verify the production install
Deploy first, then verify. AgentReady fetches each path from the public internet, rejects homepage-style soft 404s, checks JSON-LD and updates the readiness score. Pro monitoring alerts you if a later deployment removes something.
Catch breakages in CI (GitHub Action)
Add this workflow to your repository. It fails the pull request or deploy if llms.txt turns into an HTML page, agent.json breaks, robots.txt blocks AI crawlers, or the firewall starts rejecting GPTBot. Change SITE_URL to your domain.
# .github/workflows/agentready.yml
name: AgentReady audit
on:
pull_request:
push:
branches: [main]
schedule:
- cron: "0 6 * * 1" # every Monday
jobs:
agent-readiness:
runs-on: ubuntu-latest
env:
SITE_URL: https://your-site.com # change me
steps:
- name: llms.txt is served as plain text
run: |
code=$(curl -s -o llms.txt -w "%{http_code}" "$SITE_URL/llms.txt")
test "$code" = "200" || { echo "llms.txt returned $code"; exit 1; }
if grep -qi "<html" llms.txt; then echo "llms.txt is an HTML page, not a file"; exit 1; fi
- name: agent.json is valid JSON
run: curl -sf "$SITE_URL/.well-known/agent.json" -o agent.json || curl -sf "$SITE_URL/agent.json" -o agent.json && jq . agent.json > /dev/null
- name: robots.txt does not block AI crawlers
run: |
curl -sf "$SITE_URL/robots.txt" -o robots.txt || exit 0
for bot in GPTBot ClaudeBot PerplexityBot Google-Extended; do
if awk -v b="$bot" 'tolower($0) ~ "user-agent: *"tolower(b){f=1;next} /user-agent/{f=0} f && /^disallow: *\/ *$/{exit 1}' robots.txt; then :; else echo "$bot is blocked"; exit 1; fi
done
- name: AI crawlers are not challenged by the firewall
run: |
code=$(curl -s -o /dev/null -w "%{http_code}" -A "GPTBot/1.0" "$SITE_URL/")
test "$code" -lt 400 || { echo "GPTBot gets HTTP $code"; exit 1; }Common install mistakes
- Returning the app’s HTML shell instead of the raw file.
- Putting files under a subpath such as /docs/llms.txt.
- Redirecting to a storage URL instead of serving content at the root path.
- Breaking agent.json syntax during a manual edit.
- Allowing robots.txt while a CDN firewall still challenges AI bots.
Still stuck? Email support@agentready.app or open a ticket on support.