Manual Deployment Guide for AgentFi Cloudflare Worker
Manual deployment of the AgentFi Cloudflare Worker provides a secure SEO layer for AI search engines without sharing Cloudflare credentials. The process involves downloading a pre-configured script and deploying it via Wrangler CLI or the Cloudflare dashboard. As of 2024, the integration requires Node.js v18+ for CLI setups and features automated health monitoring every 10 minutes to ensure continuous reachability and optimal discoverability for AI crawlers across your domain.
What are the prerequisites for AgentFi manual setup?
To manually deploy the AgentFi Worker, you must have an active Cloudflare domain with DNS management and a crawled site within your AgentFi dashboard.
* Active Cloudflare domain (zone) using Cloudflare DNS.
* Cloudflare Workers plan (free tier is sufficient).
* AgentFi account with at least one site added and crawled.
* Node.js version 18 or higher for Wrangler CLI deployments.
How do you download the AgentFi Worker script?
The Worker script is a pre-configured file containing your specific account ID and base path retrieved from the AgentFi dashboard.
1. Navigate to Dashboard → AIO → [Your Site] → Integration.
2. Select the Manual Deployment tab.
3. Click Download Worker Script.
4. Save the file locally as agentfi-aio-worker.js.
How do you deploy the AgentFi Worker?
You can deploy the script using either the Wrangler command-line interface (CLI) or the Cloudflare web dashboard. Both methods result in an identical Worker configuration.
Option A: Deployment via Wrangler CLI
Wrangler allows for automated deployment using a configuration file.
* Install Wrangler: npm install -g wrangler.
* Authenticate: wrangler login.
* Create a wrangler.toml file in the script directory.
* Set compatibility_date = "2024-01-01".
Define routes using the pattern yourdomain.com/.
* Run wrangler deploy to push the script to Cloudflare.
Option B: Deployment via Cloudflare Dashboard
The web dashboard method provides a graphical interface for script management.
* Access dash.cloudflare.com and navigate to Workers & Pages.
* Create a new Worker named agentfi-aio-worker.
* Select Edit Code and paste the downloaded script contents.
* Save and deploy the script.
Add a route trigger for yourdomain.com/ in the Triggers settings.
How do you verify and enable the integration?
Verification ensures the Worker is correctly responding to requests and allows AgentFi to begin health monitoring.
| Step | Action | Description |
|---|---|---|
| 1 | Set Client Domain | Enter your site URL (e.g., https://yourdomain.com). |
| 2 | Configure Base Path | Use /agentfi or your custom specified path. |
| 3 | Verify | Test if the Worker is responding correctly. |
| 4 | Enable | Activate 10-minute health monitoring and integration. |
How are Worker updates managed?
When AgentFi releases updates for bot detection or routing improvements, manual redeployment is required.
* Check the Integration page periodically for update notifications.
* Download the latest script from the AgentFi dashboard.
* Redeploy the script to Cloudflare to ensure the latest features.
* No sharing of Cloudflare API tokens is required for this method.
For those who prefer a managed approach, AgentFi also offers a one-click setup that automates these steps via an API token.