{"id":28904815,"url":"https://github.com/iamask/agents-with-cloudflare-tools","last_synced_at":"2026-05-06T08:33:04.229Z","repository":{"id":300182523,"uuid":"1005443392","full_name":"iamask/agents-with-cloudflare-tools","owner":"iamask","description":"Agent build with cloudflare agents sdk and Workers AI","archived":false,"fork":false,"pushed_at":"2025-06-20T08:35:09.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-20T09:37:56.677Z","etag":null,"topics":["agents","cloudflare","cloudflare-workers","durable-objects","workers-ai"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-20T08:34:11.000Z","updated_at":"2025-06-20T08:38:14.000Z","dependencies_parsed_at":"2025-06-20T09:38:11.072Z","dependency_job_id":"55d038b9-ba2b-4f30-b8b7-5394e027110b","html_url":"https://github.com/iamask/agents-with-cloudflare-tools","commit_stats":null,"previous_names":["iamask/agents-with-cloudflare-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iamask/agents-with-cloudflare-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamask%2Fagents-with-cloudflare-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamask%2Fagents-with-cloudflare-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamask%2Fagents-with-cloudflare-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamask%2Fagents-with-cloudflare-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamask","download_url":"https://codeload.github.com/iamask/agents-with-cloudflare-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamask%2Fagents-with-cloudflare-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32684655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T02:33:58.958Z","status":"ssl_error","status_checked_at":"2026-05-06T02:33:39.611Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","cloudflare","cloudflare-workers","durable-objects","workers-ai"],"created_at":"2025-06-21T13:02:33.140Z","updated_at":"2026-05-06T08:33:04.224Z","avatar_url":"https://github.com/iamask.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Chat Agent Starter Kit\n\n![agents-header](https://github.com/user-attachments/assets/f6d99eeb-1803-4495-9c5e-3cf07a37b402)\n\n\u003ca href=\"https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/agents-starter\"\u003e\u003cimg src=\"https://deploy.workers.cloudflare.com/button\" alt=\"Deploy to Cloudflare\"/\u003e\u003c/a\u003e\n\n## Quick Start\n\n1. Create a new project:\n\n```bash\nnpm create cloudflare@latest -- --template cloudflare/agents-starter\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Set up your environment:\n\nCreate a `.dev.vars` file:\n\n```env\n# Cloudflare API Configuration\nCLOUDFLARE_API_TOKEN=\"your_cloudflare_api_token_here\"\nCLOUDFLARE_ZONE_ID=\"your_cloudflare_zone_id_here\"\nCLOUDFLARE_RULESET_ID=\"your_cloudflare_ruleset_id_here\"\n\n# Google Chat Webhook Configuration\nGOOGLE_CHAT_WEBHOOK_URL=\"your_google_chat_webhook_url_here\"\n```\n\n4. Deploy secrets to Cloudflare:\n\n```bash\nwrangler secret bulk .dev.vars\n```\n\n5. Run locally:\n\n```bash\nnpm start\n```\n\n6. Deploy:\n\n```bash\nnpm run deploy\n```\n\n## Available Tools\n\nThe following tools are available in this chat agent:\n\n- **getWeatherInformation** - Get current weather information for a specified city (requires confirmation)\n- **getLocalTime** - Get the local time for a specified location\n- **generateImage** - Generate an image from a text description using Cloudflare Workers AI\n- **searchPokemon** - Search for Pokémon details by name or ID using the PokeAPI\n- **sendWebhook** - Send a message to a configured webhook URL\n- **callDoWorker** - Call the do-worker Cloudflare Worker and return its response\n- **callgraphqlWorker** - Call the graphql worker to get total user agent information\n- **addCloudflareCustomRule** - Create and add custom rules to Cloudflare using the API\n\n## Adding New Tools\n\nAdd new tools in `tools.ts` using the tool builder:\n\n```typescript\n// Example of a tool that requires confirmation\nconst searchDatabase = tool({\n  description: \"Search the database for user records\",\n  parameters: z.object({\n    query: z.string(),\n    limit: z.number().optional(),\n  }),\n  // No execute function = requires confirmation\n});\n\n// Example of an auto-executing tool\nconst getCurrentTime = tool({\n  description: \"Get current server time\",\n  parameters: z.object({}),\n  execute: async () =\u003e new Date().toISOString(),\n});\n\n// Scheduling tool implementation\nconst scheduleTask = tool({\n  description:\n    \"schedule a task to be executed at a later time. 'when' can be a date, a delay in seconds, or a cron pattern.\",\n  parameters: z.object({\n    type: z.enum([\"scheduled\", \"delayed\", \"cron\"]),\n    when: z.union([z.number(), z.string()]),\n    payload: z.string(),\n  }),\n  execute: async ({ type, when, payload }) =\u003e {\n    // ... see the implementation in tools.ts\n  },\n});\n```\n\nTo handle tool confirmations, add execution functions to the `executions` object:\n\n```typescript\nexport const executions = {\n  searchDatabase: async ({\n    query,\n    limit,\n  }: {\n    query: string;\n    limit?: number;\n  }) =\u003e {\n    // Implementation for when the tool is confirmed\n    const results = await db.search(query, limit);\n    return results;\n  },\n  // Add more execution handlers for other tools that require confirmation\n};\n```\n\nTools can be configured in two ways:\n\n1. With an `execute` function for automatic execution\n2. Without an `execute` function, requiring confirmation and using the `executions` object to handle the confirmed action\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamask%2Fagents-with-cloudflare-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamask%2Fagents-with-cloudflare-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamask%2Fagents-with-cloudflare-tools/lists"}