Highlight

Code Mode: give agents an entire API in 1,000 tokens

Cloudflare introduces Code Mode, a technique to reduce context window usage during agent tool use.

Based on

Code Mode: give agents an entire API in 1,000 tokens

blog.cloudflare.com
Read original article →

Cloudflare's Code Mode collapses the entire Cloudflare API into two tools and 1,000 tokens of context. This reduces the number of input tokens used by 99.9% compared to an equivalent MCP server without Code Mode. The new technique is open-sourced as a Code Mode SDK in the Cloudflare Agents SDK.

Abstract

Cloudflare's Code Mode collapses the entire Cloudflare API into two tools and 1,000 tokens of context. This reduces the number of input tokens used by 99.9% compared to an equivalent MCP server without Code Mode. The new technique is open-sourced as a Code Mode SDK in the Cloudflare Agents SDK.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

code-modecloudflare-apimcp-serveragent-tool-usecontext-window-usageKnowledge GraphsContent EngineeringAI AgentsLarge Language Models
Share

Take the next step

Try CoreModels, talk with our team, or explore more resources.