[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/ai-gateway/integrations/coding-agents/ [Back]  [Original]

Coding agents Cloudflare AI Gateway docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /AI Gateway
  3. /Integrations
  4. /Coding agents

Coding agents

Last updated Jul 2, 2026Copy as MarkdownView as MarkdownAgent setup
OverviewWhy route a coding agent through AI GatewaySet up your agentProtect sensitive code with DLPVerify it works

Coding agents send model requests to a provider on your behalf. By pointing the agent at AI Gateway instead of the provider, you observe and control that traffic without changing how you work.

Why route a coding agent through AI Gateway

Routing a coding agent through AI Gateway gives you:

  • Observability view every request, token count, and latency in the dashboard.
  • Caching return cached responses for repeated prompts.
  • Rate limiting cap request volume with rate limiting.
  • Cost tracking attribute spend across sessions and models.
  • Data Loss Prevention scan prompts and responses for secrets, credentials, and other sensitive data with DLP.

Set up your agent

Follow the setup guide for your coding agent:

Protect sensitive code with DLP

Coding agents routinely send source code, configuration files, and snippets to model providers. That traffic can include API keys, customer data, or other sensitive material. Because AI Gateway sits between the agent and the provider, you can inspect and control it without changing the agent.

Data Loss Prevention (DLP) scans request and response bodies against detection profiles and either flags or blocks matches. Use it to catch secrets, credentials, or regulated data leaving (or returning to) the agent.

Note

Many coding agents stream responses by default. When DLP response scanning is enabled, AI Gateway buffers the full provider response before returning it, which increases time-to-first-token. If you need low-latency streaming, set the DLP policy Check to Request only, or use a separate gateway for latency-sensitive traffic. Refer to streaming behavior.

Verify it works

After you configure a tool, confirm that traffic reaches AI Gateway.

  1. Send a prompt from the coding agent.

  2. In the Cloudflare dashboard, go to the AI Gateway page.

    Go to AI Gateway ↗
  3. Select your gateway, then select Logs. Confirm that the request appears with its model, token count, and latency.

For more information on logs, refer to Logging.

PreviousSet up Workers AI with AI GatewayNextClaude Code

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page