AgentFi Manual Worker Setup and Deployment Guide
The AgentFi manual worker setup allows users to deploy a Cloudflare Worker without sharing account credentials with the AgentFi platform. This process involves downloading a pre-configured script from the AgentFi dashboard and deploying it via the Wrangler CLI or the Cloudflare dashboard to enable site integration with AI search engines. Once active, AgentFi monitors the worker's health every 10 minutes to ensure continuous discoverability.
What are the prerequisites for AgentFi manual setup?
To perform a manual deployment, users must have administrative access to their Cloudflare account and a site already registered with AgentFi.
agentfi-aio-worker.js script from the AgentFi dashboard.How do I download the AgentFi Worker script?
The worker script is customized for each site and must be retrieved from the AgentFi Integration dashboard.
1. Navigate to Dashboard → AIO → [Your Site] → Integration.
2. Select the "Manual Deployment" tab.
3. Click "Download Worker Script".
4. Save the file as agentfi-aio-worker.js.
The downloaded script contains your specific account ID and base path configuration.
How do I deploy the worker via Wrangler CLI?
Deploying via the Wrangler CLI is the recommended method for users comfortable with command-line tools and Node.js.
CLI Deployment Steps
1. Install Wrangler: npm install -g wrangler
2. Authenticate: wrangler login
3. Create a wrangler.toml file in the script directory.
4. Run the deployment: wrangler deploy
Required wrangler.toml configuration
```toml
name = "agentfi-aio-worker"
main = "agentfi-aio-worker.js"
compatibility_date = "2024-01-01"
routes = [
{ pattern = "yourdomain.com/*", zone_name = "yourdomain.com" }
]
```
How do I deploy the worker via the Cloudflare Dashboard?
The Cloudflare web dashboard provides a manual alternative for users who do not wish to install Node.js or Wrangler.
1. Log in to dash.cloudflare.com.
2. Navigate to Workers & Pages → Create.
3. Name the worker agentfi-aio-worker and click Deploy.
4. Select Edit Code and paste the contents of agentfi-aio-worker.js.
5. Click Save and Deploy.
6. Navigate to Settings → Triggers → Routes and add: yourdomain.com/*.
How do I verify and enable the AgentFi integration?
After deployment, the worker must be linked and verified within the AgentFi platform to begin health monitoring.
1. Return to the AgentFi Integration page.
2. Set Client Domain to your URL (e.g., https://yourdomain.com).
3. Set the Base Path (default is /agentfi).
4. Click Save Configuration.
5. Click Verify to check worker responsiveness.
6. Click Enable to activate integration and health monitoring.
Integration Monitoring Facts
Comparison of Deployment Methods
| Feature | Wrangler CLI | Cloudflare Dashboard |
|---|---|---|
| Prerequisites | Node.js v18+ installed | Web browser access |
| Configuration | Local wrangler.toml file | Manual web interface entry |
| Speed | Faster for repeat deployments | Slower, manual UI steps |
| Updates | Command-line redeploy | Manual copy-paste update |
How are AgentFi Worker updates handled?
Manual deployments require manual updates whenever AgentFi releases improvements to the worker script. Users should periodically check the Integration page for updates to bot detection or routing logic. When an update is available, download the new script and redeploy it using your preferred method (CLI or Dashboard) to replace the existing version.
Source: https://agentfi.tech/docs/manual-worker-setup