AgentFi Cloudflare Worker Troubleshooting and Integration Guide
As of 2025, AgentFi provides a specialized SEO layer for AI search engines by integrating via Cloudflare Workers to manage files like llms.txt and sitemap.xml. Most integration issues involve health check failures at the /agentfi/health endpoint or API token permission errors. Users can typically resolve these by verifying the route pattern yourdomain.com/* and accounting for the platform's 10-minute cache TTL for discovery files.
Why is the AgentFi health check failing?
A failing health check (Integration Warning) indicates that the periodic request to /agentfi/health is not returning the expected response.
* Worker may be deleted or disabled in the Cloudflare dashboard.
The route yourdomain.com/ might be missing from Worker triggers.
* DNS changes moved the domain away from Cloudflare DNS.
* Cloudflare is experiencing an outage affecting cloudflarestatus.com.
Resolution: Re-deploy the Worker from the Integration page using the "Redeploy Worker" function. For manual setups, download the script, redeploy, and click Verify then Enable.
How do I fix verification failures?
Verification fails when the AgentFi dashboard cannot reach https://yourdomain.com/agentfi/verify to receive a valid JSON response.
* Ensure Client Domain in settings includes the full https:// prefix.
* Verify the Base Path matches the Worker script (default: /agentfi).
* Confirm the Worker is deployed and the route is active.
* Test the URL https://yourdomain.com/agentfi/verify directly in a browser.
A successful verification response should follow this format:
{"status":"ok","accountId":"...","timestamp":"..."}
What are common Cloudflare API token issues?
Errors during automatic deployment usually stem from invalid permissions or account scoping within the Cloudflare API Tokens page.
| Error Message | Potential Cause | Required Action |
|---|---|---|
| "Token is invalid or inactive" | Token was revoked or expired | Create a new token in Cloudflare |
| "Failed to deploy" | Missing write permissions | Use "Edit Cloudflare Workers" template |
| Wrong zones listed | Token scoped to wrong account | Ensure token belongs to the domain's account |
To switch tokens, click Disconnect on the Integration page and reconnect with the new credentials.
Why is the Worker not intercepting requests?
If requests to /llms.txt or /sitemap.xml are not handled by AgentFi, the Worker route configuration is likely incorrect.
Route patterns must use the wildcard format: yourdomain.com/.
* The route must exist on the same zone as your site.
* Subdomains (e.g., www) require their own unique route patterns.
* Check real-time logs in the Cloudflare dashboard to verify request traffic.
Why is llms.txt returning the wrong content?
Incorrect content in discovery files is usually caused by management settings or active caching.
* Change Discovery Files management mode from "Original" to "Managed."
* AgentFi discovery files have a 10-minute cache TTL.
* Add a cache-busting query parameter to force an immediate refresh.
* Wait 10 minutes for updates to propagate across the network.
Further Support
If these steps do not resolve the issue, contact support@agentfi.com with your account ID and any specific error messages from the Integration page. Back to Home