From 90ed3090ada84708af29640c14be1002c46f1716 Mon Sep 17 00:00:00 2001 From: harshalmore31 Date: Thu, 7 Aug 2025 09:15:59 +0530 Subject: [PATCH 1/3] updated the cloudflare deployment docs --- docs/swarms_cloud/cloudflare_workers.md | 568 +++++++++--------------- 1 file changed, 219 insertions(+), 349 deletions(-) diff --git a/docs/swarms_cloud/cloudflare_workers.md b/docs/swarms_cloud/cloudflare_workers.md index cc265a77..b8b372d8 100644 --- a/docs/swarms_cloud/cloudflare_workers.md +++ b/docs/swarms_cloud/cloudflare_workers.md @@ -1,405 +1,275 @@ -# Deploy Cron Agents with Swarms API on Cloudflare Workers +# Deploy AI Agents with Swarms API on Cloudflare Workers -Deploy intelligent, self-executing AI agents powered by Swarms API on Cloudflare's global edge network. Build production-ready cron agents that run on automated schedules, fetch real-time data, perform sophisticated analysis using Swarms AI, and take automated actions across 330+ cities worldwide. +Deploy intelligent AI agents powered by Swarms API on Cloudflare Workers edge network. Build production-ready cron agents that run automatically, fetch real-time data, perform AI analysis, and execute actions across 330+ cities worldwide. -## What Are Cron Agents? +## Demo Video -Cron agents combine **Swarms API intelligence** with **Cloudflare Workers edge computing** to create AI-powered systems that: +Watch the stock agent in action: -* **Execute automatically** on predefined schedules without human intervention -* **Fetch real-time data** from external sources (APIs, databases, IoT sensors) -* **Perform intelligent analysis** using specialized Swarms AI agents -* **Take automated actions** based on analysis findings (alerts, reports, decisions) -* **Scale globally** on Cloudflare's edge network with sub-100ms response times worldwide +![Demo GIF](https://github.com/harshalmore31/Swarms-CloudFlare-Deployment/blob/main/stock-agent-demo.gif) -## Architecture Overview +> **Note**: The demo video shows the complete workflow from data fetching to AI analysis and report generation. + +## Overview + +This integration demonstrates how to combine **Swarms API multi-agent intelligence** with **Cloudflare Workers edge computing** to create autonomous AI systems that: + +- ⚑ **Execute automatically** on predefined schedules (cron jobs) +- πŸ“Š **Fetch real-time data** from external APIs (Yahoo Finance, news feeds) +- πŸ€– **Perform intelligent analysis** using specialized Swarms AI agents +- πŸ“§ **Take automated actions** (email alerts, reports, notifications) +- 🌍 **Scale globally** on Cloudflare's edge network with sub-100ms latency + +## Repository & Complete Implementation + +For the **complete working implementation** with full source code, detailed setup instructions, and ready-to-deploy examples, visit: + +**πŸ”— [Swarms-CloudFlare-Deployment Repository](https://github.com/The-Swarm-Corporation/Swarms-CloudFlare-Deployment)** + +This repository provides: +- **Two complete implementations**: JavaScript and Python +- **Production-ready code** with error handling and monitoring +- **Step-by-step deployment guides** for both local and production environments +- **Real-world examples** including stock analysis agents +- **Configuration templates** and environment setup + +## Available Implementations + +The repository provides **two complete implementations** of stock analysis agents: + +### πŸ“‚ `stock-agent/` - JavaScript Implementation +The original implementation using **JavaScript/TypeScript** on Cloudflare Workers. + +### πŸ“‚ `python-stock-agent/` - Python Implementation +A **Python Workers** implementation using Cloudflare's beta Python runtime with Pyodide. + +## Stock Analysis Agent Features + +Both implementations demonstrate a complete system that: + +1. **Automated Analysis**: Runs stock analysis every 3 hours using Cloudflare Workers cron +2. **Real-time Data**: Fetches market data from Yahoo Finance API (no API key needed) +3. **News Integration**: Collects market news from Financial Modeling Prep API (optional) +4. **Multi-Agent Analysis**: Deploys multiple Swarms AI agents for technical and fundamental analysis +5. **Email Reports**: Sends comprehensive reports via Mailgun +6. **Web Interface**: Provides monitoring dashboard for manual triggers and status tracking + +## Implementation Comparison + +| Feature | JavaScript (`stock-agent/`) | Python (`python-stock-agent/`) | +|---------|----------------------------|--------------------------------| +| **Runtime** | V8 JavaScript Engine | Pyodide Python Runtime | +| **Language** | JavaScript/TypeScript | Python 3.x | +| **Status** | Production Ready | Beta (Python Workers) | +| **Performance** | Optimized V8 execution | Good, with Python stdlib support | +| **Syntax** | `fetch()`, `JSON.stringify()` | `await fetch()`, `json.dumps()` | +| **Error Handling** | `try/catch` | `try/except` | +| **Libraries** | Built-in Web APIs | Python stdlib + select packages | +| **Development** | Mature tooling | Growing ecosystem | + +## Architecture ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Cloudflare β”‚ β”‚ Data Sources β”‚ β”‚ Swarms API β”‚ -β”‚ Workers Cron β”‚ β”‚ β”‚ β”‚ β”‚ -β”‚ "0 */3 * * *" │───▢│ Yahoo Finance │───▢│ Multi-Agent β”‚ -β”‚ β”‚ β”‚ Medical APIs β”‚ β”‚ Intelligence β”‚ -β”‚ scheduled() β”‚ β”‚ News Feeds β”‚ β”‚ Autonomous β”‚ -β”‚ Global Edge β”‚ β”‚ IoT Sensors β”‚ β”‚ Actions β”‚ +β”‚ Workers Runtime β”‚ β”‚ β”‚ β”‚ β”‚ +β”‚ "0 */3 * * *" │───▢│ Yahoo Finance │───▢│ Technical Agent β”‚ +β”‚ JS | Python β”‚ β”‚ News APIs β”‚ β”‚ Fundamental β”‚ +β”‚ scheduled() β”‚ β”‚ Market Data β”‚ β”‚ Agent Analysis β”‚ +β”‚ Global Edge β”‚ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` -**Key Benefits:** +## Quick Start Guide -* **24/7 Operation**: Zero human intervention required -* **Global Edge Deployment**: Cloudflare's 330+ city network for ultra-low latency -* **Swarms AI Intelligence**: Live data analysis with specialized AI agents -* **Automated Decision Making**: Smart actions based on Swarms agent insights -* **Enterprise Reliability**: Production-grade error handling and monitoring +Choose your preferred implementation: -## Quick Start: Deploy Stock Analysis Cron Agent +### Option A: JavaScript Implementation -Create your first financial intelligence cron agent powered by Swarms API and deployed on Cloudflare Workers edge network. +```bash +# Clone the repository +git clone https://github.com/The-Swarm-Corporation/Swarms-CloudFlare-Deployment.git +cd Swarms-CloudFlare-Deployment/stock-agent -### 1. Cloudflare Workers Project Setup +# Install dependencies +npm install +``` + +### Option B: Python Implementation ```bash -# Create new Cloudflare Workers project -npm create cloudflare@latest stock-cron-agent -cd stock-cron-agent +# Clone the repository +git clone https://github.com/The-Swarm-Corporation/Swarms-CloudFlare-Deployment.git +cd Swarms-CloudFlare-Deployment/python-stock-agent -# Install dependencies for Swarms API integration +# Install dependencies (Wrangler CLI) npm install ``` -### 2. Configure Cloudflare Workers Cron Schedule +### 2. Environment Configuration + +Create a `.dev.vars` file in your chosen directory: + +```env +# Required: Swarms API key +SWARMS_API_KEY=your-swarms-api-key-here + +# Optional: Market news (free tier available) +FMP_API_KEY=your-fmp-api-key + +# Optional: Email notifications +MAILGUN_API_KEY=your-mailgun-api-key +MAILGUN_DOMAIN=your-domain.com +RECIPIENT_EMAIL=your-email@example.com +``` + +### 3. Cron Schedule Configuration -Edit `wrangler.jsonc` to set up cron execution: +The cron schedule is configured in `wrangler.jsonc`: ```jsonc { - "$schema": "node_modules/wrangler/config-schema.json", - "name": "stock-cron-agent", - "main": "src/index.js", - "compatibility_date": "2025-08-03", - "observability": { - "enabled": true - }, "triggers": { "crons": [ - "0 */3 * * *" // Cloudflare Workers cron: analysis every 3 hours + "0 */3 * * *" // Every 3 hours ] - }, - "vars": { - "SWARMS_API_KEY": "your-swarms-api-key" // Your Swarms API key } } ``` -### 3. Cloudflare Workers + Swarms API Implementation +Common cron patterns: +- `"0 9 * * 1-5"` - 9 AM weekdays only +- `"0 */6 * * *"` - Every 6 hours +- `"0 0 * * *"` - Daily at midnight -Create `src/index.js`: +### 4. Local Development -```javascript -export default { - // Cloudflare Workers fetch handler - Web interface for monitoring - async fetch(request, env, ctx) { - const url = new URL(request.url); - - if (url.pathname === '/') { - return new Response(` - - -

Stock Cron Agent

-

Status: Active |

-
- - - - `, { - headers: { 'Content-Type': 'text/html' } - }); - } - - if (url.pathname === '/execute') { - try { - const result = await executeAnalysis(null, env); - return new Response(JSON.stringify({ - message: 'Autonomous analysis executed successfully', - timestamp: new Date().toISOString(), - result - }), { - headers: { 'Content-Type': 'application/json' } - }); - } catch (error) { - return new Response(JSON.stringify({ - error: error.message, - timestamp: new Date().toISOString(), - system: 'autonomous-agent' - }), { - status: 500, - headers: { 'Content-Type': 'application/json' } - }); - } - } - - return new Response('Autonomous Agent Endpoint Not Found', { status: 404 }); - }, - - // Cloudflare Workers cron handler - triggered by scheduled events - async scheduled(event, env, ctx) { - console.log('πŸš€ Cloudflare Workers cron triggered - executing Swarms AI analysis'); - ctx.waitUntil(executeAnalysis(event, env)); - } -}; +```bash +# Start local development server +npm run dev -// Core function combining Cloudflare Workers execution with Swarms API intelligence -async function executeAnalysis(event, env) { - console.log('πŸ€– Cloudflare Workers executing Swarms AI analysis...'); - - try { - // Step 1: Autonomous data collection from multiple sources - console.log('πŸ“Š Executing autonomous data collection...'); - const marketIntelligence = await collectMarketIntelligence(); - - const validData = Object.keys(marketIntelligence).filter(symbol => !marketIntelligence[symbol].error); - if (validData.length === 0) { - throw new Error('Autonomous data collection failed - no valid market intelligence gathered'); - } - - console.log('βœ… Autonomous data collection successful: ' + validData.length + ' sources'); - - // Step 2: Deploy Swarms AI agents for autonomous analysis - console.log('🧠 Deploying Swarms AI agents for autonomous intelligence generation...'); - const swarmConfiguration = { - name: "Autonomous Market Intelligence Swarm", - description: "Self-executing financial analysis and decision support system", - agents: [ - { - agent_name: "Autonomous Technical Intelligence Agent", - system_prompt: "You are an autonomous technical analysis AI agent operating 24/7. Provide: Real-time trend identification and momentum analysis, dynamic support/resistance level calculations, technical indicator signals (RSI, MACD, moving averages), autonomous price targets and risk assessments, and self-executing trading signal recommendations. Format your analysis as a professional autonomous intelligence briefing for automated systems.", - model_name: "gpt-4o-mini", - max_tokens: 2500, - temperature: 0.2 - }, - { - agent_name: "Autonomous Market Sentiment Agent", - system_prompt: "You are an autonomous market sentiment analysis AI agent. Continuously evaluate: Real-time market psychology and investor behavior patterns, volume analysis and institutional activity detection, risk-on vs risk-off sentiment shifts, autonomous sector rotation and leadership identification, and self-executing market timing recommendations. Provide actionable intelligence for autonomous decision-making systems.", - model_name: "gpt-4o-mini", - max_tokens: 2500, - temperature: 0.3 - } - ], - swarm_type: "ConcurrentWorkflow", - task: `Execute autonomous analysis of real-time market intelligence: ${JSON.stringify(marketIntelligence, null, 2)} Generate comprehensive autonomous intelligence report including: 1. Technical analysis with specific autonomous entry/exit recommendations 2. Market sentiment assessment with timing signals for automated systems 3. Risk management protocols for autonomous execution 4. Self-executing action recommendations 5. Key monitoring parameters for next autonomous cycle Focus on actionable intelligence for autonomous trading systems and automated decision making.`, - max_loops: 1 - }; - - // Execute Swarms API call from Cloudflare Workers edge - const response = await fetch('https://api.swarms.world/v1/swarm/completions', { - method: 'POST', - headers: { - 'x-api-key': env.SWARMS_API_KEY, - 'Content-Type': 'application/json' - }, - body: JSON.stringify(swarmConfiguration) - }); - - if (!response.ok) { - const errorText = await response.text(); - throw new Error('Swarms API autonomous execution failed: ' + response.status + ' - ' + errorText); - } +# Visit http://localhost:8787 to test +``` - const analysisResult = await response.json(); - const intelligenceReport = analysisResult.output; - - console.log('βœ… Autonomous Swarms AI analysis completed successfully'); - console.log('πŸ’° Autonomous execution cost: ' + (analysisResult.usage?.billing_info?.total_cost || 'N/A')); - - // Step 3: Execute autonomous actions based on intelligence - if (env.AUTONOMOUS_ALERTS_EMAIL) { - console.log('πŸ“§ Executing autonomous alert system...'); - await executeAutonomousAlerts(env, intelligenceReport, marketIntelligence); - } +### 5. Deploy to Cloudflare Workers - return { - success: true, - analysis: intelligenceReport, - symbolsAnalyzed: validData.length, - cost: analysisResult.usage?.billing_info?.total_cost || analysisResult.metadata?.billing_info?.total_cost, - executionTime: new Date().toISOString(), - nextExecution: 'Scheduled for next autonomous cron trigger', - autonomousSystem: 'Swarms AI Agents' - }; - - } catch (error) { - console.error('❌ Autonomous analysis execution failed:', error.message); - return { - success: false, - error: error.message, - executionTime: new Date().toISOString(), - autonomousSystem: 'Error in autonomous pipeline' - }; - } -} +```bash +# Deploy to production +npm run deploy -// Autonomous market intelligence collection -async function collectMarketIntelligence() { - const targetSymbols = ['SPY', 'QQQ', 'AAPL', 'MSFT', 'NVDA', 'TSLA']; - const marketIntelligence = {}; - - console.log('🎯 Executing autonomous multi-source data collection...'); - - const dataCollectionPromises = targetSymbols.map(async (symbol) => { - try { - const controller = new AbortController(); - const timeout = setTimeout(() => controller.abort(), 10000); - - // Autonomous data collection from Yahoo Finance API - const response = await fetch( - 'https://query1.finance.yahoo.com/v8/finance/chart/' + symbol, - { - signal: controller.signal, - headers: { - 'User-Agent': 'Mozilla/5.0 (autonomous-swarms-agent) AppleWebKit/537.36' - } - } - ); - clearTimeout(timeout); - - if (!response.ok) { - throw new Error('Autonomous data collection failed: HTTP ' + response.status); - } - - const data = await response.json(); - const chartResult = data.chart.result[0]; - const meta = chartResult.meta; - - if (!meta) { - throw new Error('Invalid market intelligence structure received'); - } - - const currentPrice = meta.regularMarketPrice; - const previousClose = meta.previousClose; - const dayChange = currentPrice - previousClose; - const changePercent = ((dayChange / previousClose) * 100).toFixed(2); - - console.log('πŸ“ˆ ' + symbol + ': $' + currentPrice + ' (' + changePercent + '%) - Autonomous collection successful'); - - return [symbol, { - price: currentPrice, - change: dayChange, - change_percent: changePercent, - volume: meta.regularMarketVolume || 0, - market_cap: meta.marketCap || 0, - pe_ratio: meta.trailingPE || 0, - day_high: meta.regularMarketDayHigh, - day_low: meta.regularMarketDayLow, - fifty_two_week_high: meta.fiftyTwoWeekHigh, - fifty_two_week_low: meta.fiftyTwoWeekLow, - currency: meta.currency || 'USD', - market_state: meta.marketState, - autonomous_collection_time: new Date().toISOString(), - data_quality: 'high' - }]; - - } catch (error) { - console.error('❌ Autonomous collection failed for ' + symbol + ':', error.message); - return [symbol, { - error: 'Autonomous collection failed: ' + error.message, - autonomous_collection_time: new Date().toISOString(), - data_quality: 'failed' - }]; - } - }); +# Your agent will be live at: https://stock-agent.your-subdomain.workers.dev +``` - const results = await Promise.allSettled(dataCollectionPromises); - results.forEach((result) => { - if (result.status === 'fulfilled' && result.value) { - const [symbol, data] = result.value; - marketIntelligence[symbol] = data; - } - }); +## API Integration Details - const successfulCollections = Object.keys(marketIntelligence).filter(k => !marketIntelligence[k]?.error).length; - console.log('πŸ“Š Autonomous intelligence collection completed: ' + successfulCollections + '/' + targetSymbols.length + ' successful'); +### Swarms API Agents - return marketIntelligence; -} +The stock agent uses two specialized AI agents: -// Autonomous alert and notification system -async function executeAutonomousAlerts(env, intelligenceReport, marketIntelligence) { - if (!env.MAILGUN_API_KEY || !env.MAILGUN_DOMAIN || !env.AUTONOMOUS_ALERTS_EMAIL) { - console.log('⚠️ Autonomous alert system not configured - skipping notifications'); - return; - } +1. **Technical Analyst Agent**: + - Calculates technical indicators (RSI, MACD, Moving Averages) + - Identifies support/resistance levels + - Provides trading signals and price targets + +2. **Fundamental Analyst Agent**: + - Analyzes market conditions and sentiment + - Evaluates news and economic indicators + - Provides investment recommendations + +### Data Sources + +- **Yahoo Finance API**: Free real-time stock data (no API key required) +- **Financial Modeling Prep**: Market news and additional data (free tier: 250 requests/day) +- **Mailgun**: Email delivery service (free tier: 5,000 emails/month) + +## Features + +### Web Interface +- Real-time status monitoring +- Manual analysis triggers +- Progress tracking with visual feedback +- Analysis results display + +### Automated Execution +- Scheduled cron job execution +- Error handling and recovery +- Cost tracking and monitoring +- Email report generation + +### Production Ready +- Comprehensive error handling +- Timeout protection +- Rate limiting compliance +- Security best practices + +## Configuration Examples - try { - // Autonomous detection of significant market movements - const significantMovements = Object.entries(marketIntelligence) - .filter(([symbol, data]) => data.change_percent && Math.abs(parseFloat(data.change_percent)) > 3) - .map(([symbol, data]) => symbol + ': ' + data.change_percent + '%') - .join(', '); - - const alertSubject = 'πŸ€– Autonomous Market Intelligence Alert - ' + new Date().toLocaleDateString(); - - const alertBody = ` - - -

πŸ€– Market Intelligence Alert

-

Date: ${new Date().toLocaleString()}

-

Movements: ${significantMovements || 'Normal volatility'}

- -

Analysis Report:

-
${intelligenceReport}
- -

Powered by Swarms API

- - - `; - - const formData = new FormData(); - formData.append('from', 'Autonomous Market Intelligence '); - formData.append('to', env.AUTONOMOUS_ALERTS_EMAIL); - formData.append('subject', alertSubject); - formData.append('html', alertBody); - - const response = await fetch('https://api.mailgun.net/v3/' + env.MAILGUN_DOMAIN + '/messages', { - method: 'POST', - headers: { - 'Authorization': 'Basic ' + btoa('api:' + env.MAILGUN_API_KEY) - }, - body: formData - }); - - if (response.ok) { - console.log('βœ… Autonomous alert system executed successfully'); - } else { - console.error('❌ Autonomous alert system execution failed:', await response.text()); +### Custom Stock Symbols + +Edit the symbols array in `src/index.js`: + +```javascript +const symbols = ['SPY', 'QQQ', 'AAPL', 'MSFT', 'TSLA', 'NVDA', 'AMZN', 'GOOGL']; +``` + +### Custom Swarms Agents + +Modify the agent configuration: + +```javascript +const swarmConfig = { + agents: [ + { + agent_name: "Risk Assessment Agent", + system_prompt: "Analyze portfolio risk and provide recommendations...", + model_name: "gpt-4o-mini", + max_tokens: 2000, + temperature: 0.1 } - - } catch (error) { - console.error('❌ Autonomous alert system error:', error.message); - } -} + ] +}; ``` -## Production Best Practices +## Cost Optimization + +- **Cloudflare Workers**: Free tier includes 100,000 requests/day +- **Swarms API**: Monitor usage in dashboard, use gpt-4o-mini for cost efficiency +- **External APIs**: Leverage free tiers and implement intelligent caching + +## Security & Best Practices -### 1. **Cloudflare Workers + Swarms API Integration** +- Store API keys as Cloudflare Workers secrets +- Implement request validation and rate limiting +- Audit AI decisions and maintain compliance logs +- Use HTTPS for all external API calls -* Implement comprehensive error handling for both platforms -* Use Cloudflare Workers KV for caching Swarms API responses -* Leverage Cloudflare Workers analytics for monitoring +## Monitoring & Observability -### 2. **Cost Optimization** +- Cloudflare Workers analytics dashboard +- Real-time performance metrics +- Error tracking and alerting +- Cost monitoring and optimization -* Monitor Swarms API usage and costs -* Use Cloudflare Workers free tier (100K requests/day) -* Implement intelligent batching for Swarms API efficiency -* Use cost-effective Swarms models (gpt-4o-mini recommended) +## Troubleshooting -### 3. **Security & Compliance** +### Common Issues -* Secure Swarms API keys in Cloudflare Workers environment variables -* Use Cloudflare Workers secrets for sensitive data -* Audit AI decisions and maintain compliance logs -* HIPAA compliance for healthcare applications +1. **API Key Errors**: Verify environment variables are set correctly +2. **Cron Not Triggering**: Check cron syntax and Cloudflare Workers limits +3. **Email Not Sending**: Verify Mailgun configuration and domain setup +4. **Data Fetch Failures**: Check external API status and rate limits + +### Debug Mode + +Enable detailed logging by setting: +```javascript +console.log('Debug mode enabled'); +``` -### 4. **Monitoring & Observability** +## Additional Resources -* Track Cloudflare Workers performance metrics -* Monitor Swarms API response times and success rates -* Use Cloudflare Workers analytics dashboard -* Set up alerts for system failures and anomalies +- [Cloudflare Workers Documentation](https://developers.cloudflare.com/workers/) +- [Swarms API Documentation](https://docs.swarms.world/) +- [Cron Expression Generator](https://crontab.guru/) +- [Financial Modeling Prep API](https://financialmodelingprep.com/developer/docs) -This deployment architecture combines **Swarms API's advanced multi-agent intelligence** with **Cloudflare Workers' global edge infrastructure**, enabling truly intelligent, self-executing AI agents that operate continuously across 330+ cities worldwide, providing real-time intelligence and automated decision-making capabilities with ultra-low latency. \ No newline at end of file From d36c45ae2df351df225a3ec5e05a2182b322221b Mon Sep 17 00:00:00 2001 From: harshalmore31 Date: Thu, 7 Aug 2025 09:39:48 +0530 Subject: [PATCH 2/3] fixed demo video ! --- docs/swarms_cloud/cloudflare_workers.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/swarms_cloud/cloudflare_workers.md b/docs/swarms_cloud/cloudflare_workers.md index b8b372d8..e018fad1 100644 --- a/docs/swarms_cloud/cloudflare_workers.md +++ b/docs/swarms_cloud/cloudflare_workers.md @@ -6,7 +6,9 @@ Deploy intelligent AI agents powered by Swarms API on Cloudflare Workers edge ne Watch the stock agent in action: -![Demo GIF](https://github.com/harshalmore31/Swarms-CloudFlare-Deployment/blob/main/stock-agent-demo.gif) + > **Note**: The demo video shows the complete workflow from data fetching to AI analysis and report generation. From e01bd8df2701da219aa68ada8465715b94132140 Mon Sep 17 00:00:00 2001 From: harshalmore31 Date: Thu, 7 Aug 2025 09:42:24 +0530 Subject: [PATCH 3/3] updates --- docs/swarms_cloud/cloudflare_workers.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/swarms_cloud/cloudflare_workers.md b/docs/swarms_cloud/cloudflare_workers.md index e018fad1..7c50f7bf 100644 --- a/docs/swarms_cloud/cloudflare_workers.md +++ b/docs/swarms_cloud/cloudflare_workers.md @@ -2,15 +2,17 @@ Deploy intelligent AI agents powered by Swarms API on Cloudflare Workers edge network. Build production-ready cron agents that run automatically, fetch real-time data, perform AI analysis, and execute actions across 330+ cities worldwide. -## Demo Video + ## Overview