Two New ChatGPT Plugins from Cloudflare

Cloudflare has released two ChatGPT plugins: one that brings real-time Internet data from Cloudflare Radar into conversations, and a retrieval plugin that lets developers query the latest Cloudflare documentation. Both are built on Cloudflare Workers, and the docs plugin doubles as an open source example for building ChatGPT plugins on the platform.

Cloudflare Radar Plugin

The Radar plugin connects ChatGPT to the public Cloudflare Radar API, which tracks global Internet traffic patterns. Because Cloudflare Radar is entirely built on Workers and exposes a well-documented OpenAPI specification, the team had most of the components needed to ship a plugin quickly.

The main work involved enriching the API schema with natural-language descriptions and query examples so ChatGPT could understand how to call each endpoint. The team added an OpenAI manifest endpoint and an enriched OpenAPI schema to describe the plugin’s capabilities and data. Interestingly, the process of writing these descriptions for ChatGPT also improved their readability for human developers.

To make this reusable, Cloudflare incorporated the necessary additions into itty-router-openapi, its own OpenAPI 3 schema generator for Workers. That library now supports OpenAI manifest endpoints, routes, and related options, meaning anyone can build a ChatGPT plugin on top of Workers using the same tooling.

Using the Plugin

The Cloudflare Radar plugin is available to non-free ChatGPT users or those on OpenAI’s plugin waitlist. After installing it from the ChatGPT Plugin store, you can ask questions about Internet data in natural language, like:

  • "What is the percentage distribution of traffic per TLS protocol version?"
  • "What's the HTTP protocol version distribution in Portugal?"

Once ChatGPT has context, you can vary the requests:

  • “How about the US in the last six months?”

Or combine topics, which causes ChatGPT to make multiple API calls and merge the results:

  • “How do HTTP protocol versions compare with TLS protocol versions?”

If you’re out of ideas, ask “What can I ask the Radar plugin?” or “Give me a random insight.” The plugin handles country and date filters expressed in natural language, and because it pulls live data, it can go beyond ChatGPT’s September 2021 knowledge cutoff.

Cloudflare Docs Plugin

The Cloudflare Docs plugin is a ChatGPT Retrieval Plugin that provides up-to-date answers from Cloudflare’s developer documentation. It’s designed for developers using ChatGPT to help build on Cloudflare, ensuring that generated code and advice reflect current documentation and best practices rather than the model’s training cutoff.

How It Works

The plugin runs entirely on Workers and uses KV as a vector store. When ChatGPT sends a POST request to the plugin’s /query endpoint, the Worker converts the query into an embedding vector via the OpenAI embeddings API. It then finds the most relevant document snippets using cosine similarity, where semantically similar text yields a high similarity score.

The index is built by converting every document in Cloudflare’s developer documentation on GitHub into embedding vectors and storing them in KV. The entire documentation compresses to under 5MB as vectors, making fetch operations fast. Cloudflare notes it has also explored larger vector stores, including a demo with 1 million vectors on Durable Object storage, with more open source libraries planned.

A separate “Scheduler” Worker keeps the index current via Cron Triggers, Queues, and Durable Objects. On a configurable schedule (for instance, hourly), it checks GitHub’s API for changed content, then sends document paths to a Queue. Workers batch-process these messages, fetch the content, convert it to embeddings, and use a Durable Object to coordinate the batches before storing the combined vectors in KV — ready for the plugin to query.

This architecture demonstrates Workers handling not just front-facing HTTP APIs but also scheduled batch processing. Setup instructions are available in the example repository, and the plugin serves as a reference for building similar retrieval plugins on the Workers platform.