How to Connect Cloudflare to an AI Agent, Step by Step
· DoubleX
Quick answer
To connect Cloudflare to an AI agent, add the Cloudflare connector on the Connectors screen, authorize your account, choose whether it is personal, team or company-wide, and limit the agent's actions. In DoubleX Agentes, you can start read-only and require confirmation before any change.
Cloudflare usually holds things that are costly to get wrong: DNS records, Workers and account settings. Connecting it to an AI agent is worth doing, but the order matters. This guide covers only the connection itself: preparing, adding the connector, choosing who uses it, and keeping the agent on a short leash from day one.
What can the Cloudflare connector let an agent do?#
The Cloudflare connector lets an agent manage your Cloudflare account, DNS, Workers and other Cloudflare resources. A connector is a system linked to the platform, and the agents you allow can use its tools.
In practice, that means an agent can look up how a domain is configured, review DNS records, or check the Workers in your account. What it may actually do is up to you: you choose the allowed actions, and you can leave anything that changes data turned off.
What should you prepare before connecting?#
Have three things ready: a DoubleX Agentes account, access to the Cloudflare account you want to connect, and a decision on who will use the connection and which actions are acceptable.
- An account. Creating one is free and needs no card. You are asked for your company's segment, what you want to improve and where your information lives.
- Cloudflare access. Use a login that can see the zones and Workers the agent should work with. Avoid connecting with more access than the task needs.
- A first use case. For example, "list the DNS records for our main domain" or "show which Workers exist in the account". A small, read-only case is the safest start.
How do you add the Cloudflare connector on the Connectors screen?#
Open the Connectors screen, add Cloudflare, authorize your account and attach the connector to an agent. The steps below follow the real flow.
- Sign in to DoubleX Agentes, or create your account if you do not have one.
- Create the agent that will work with Cloudflare, or use the team of agents generated by the diagnostic.
- Go to Connectors and choose Cloudflare from the list (it is in the development category).
- Follow the authorization prompts to link your Cloudflare account.
- Choose the scope of the connection: personal, team or company (explained below).
- Open the agent and select which connectors it can use, then pick the allowed actions for Cloudflare.
- Send a first request on the Tasks screen to confirm everything works.
Connection credentials, such as tokens and keys, are stored encrypted with AES-256-GCM.
If you want to manage connectors through code instead, see the Connectors API documentation.
Personal, team or company connection: which should you choose?#
Choose personal if only you will use the connection, team if a specific group needs it, and company if it should be available across the organization. The scope decides who can rely on the connection.
| Scope | Who it applies to | Good fit for |
|---|---|---|
| Personal | Only you | Testing, or an account tied to your own login |
| Team | A defined team | An infrastructure or platform group sharing the same agents |
| Company | The whole company | A shared setup that several areas rely on |
For Cloudflare, starting personal or with a small team is a sensible default. You can widen it later once the agent has proven itself. Roles (owner, administrator, member) and sharing by person, team or company help you keep control over who can do what.
How do you limit the agent to read-only actions and require confirmation?#
For each agent, you choose which systems it uses and, within each system, which actions it may run. Turn off every action that changes data and keep only reading. Before the agent sends, deletes or changes anything, it asks for confirmation and shows what it did step by step.
A conservative setup for a first week:
- Allow actions that read DNS records, zones and Workers.
- Leave actions that create, edit or delete records turned off.
- Keep confirmation on for anything that could change a system.
- Give the agent only the connectors it needs for the job.
To see what a connected agent can do with DNS and Workers once the connection is safe, read Cloudflare with an AI agent: DNS, Workers and example requests.
How do you test the connection and check the task history?#
Send a simple, read-only request to the agent on the Tasks screen, then open the task to see every tool the agent used and the result. Each request becomes a task with a full history: who asked, what was done and when.
Requests you can copy for a first test:
- "List the DNS records for example.com and group them by type."
- "Show me the Workers in our Cloudflare account."
- "Summarize how our main domain is configured in Cloudflare, without changing anything."
- "Check whether example.com has any records that look duplicated and explain why."
In the task history, confirm that the agent used only the Cloudflare tools you allowed and that the answer matches what you see in Cloudflare. If something is off, adjust the instructions or the allowed actions and test again. For a broader walkthrough of the platform, see the Quickstart.
Frequently asked questions#
Do I need to know how to code to connect Cloudflare?#
No. You add the connector on the Connectors screen and describe what you need in your own words. Developers who prefer it can also use the REST API, CLI or MCP server.
Can the agent change my DNS records?#
Only if you allow it. You choose the actions per agent, and actions that change data can stay off, leaving the agent read-only. Even when enabled, the agent asks for confirmation before changing anything.
Is my company's data used to train AI models?#
No. Company content is not used to train models, and requests only go to AI providers that do not use what they receive for training. There is also a zero-retention option on the Models screen.
Who can use the Cloudflare connection?#
That depends on the scope you pick: just you, a team or the whole company. Roles and sharing settings let you narrow it further.
How do I see what the agent did?#
Open the task on the Tasks screen. Its history shows the request, each tool the agent used and the result.
Can I run Cloudflare checks on a schedule?#
Yes. You can set up a routine that runs at a time you choose, such as every Monday morning. It runs with the permissions of the person who created it. See Triggers for the details.
Related guides
- How to Connect Box to an AI Agent: Step-by-Step GuideLearn how to connect Box to an AI agent: set up the connector, limit it to read-only, choose who can use it, and check the history of your first request.
- How to Connect Jam to an AI Agent: Step-by-Step GuideLearn how to connect Jam bug reports to an AI agent in DoubleX Agentes: set up the connector, pick who can use it, limit permissions, and run a first test.