Sunil Pai from Cloudflare discusses "Code Mode," an approach to interacting with AI agents where the model generates executable code (such as JavaScript) instead of relying on traditional JSON-based tool calling. This shift allows for more efficient, stateful, and complex system interactions.
Speaker info:
Sunil Pai created Partykit, the open source tool for real-time multi-player apps. For his day job, he builds AI Agents at Cloudflare.
- https://sunilpai.dev/
- blog.cloudflare.com/author/sunil/
- linkedin.com/in/sunil-pai-a47732253/
Timestamps
0:00 Introduction and speaker background
1:16 What is "Code Mode"?
1:31 Limitations of traditional tool calling at scale
2:03 The shift to generating executable code
3:01 Scaling API usage at Cloudflare
4:05 Why code generation is more efficient
5:28 Live demonstration of the Mythical server
7:20 A new way of interacting with systems
9:09 Example: The Kenton canvas and tic-tac-toe anecdote
11:46 New software architecture: The "Harness"
13:28 Observability and security in sandboxed environments
14:15 Long-running workflows and generative UI
16:41 Future outlook: Building for the next generation of users
17:50 The resurgence of capability-based security
18:33 Conclusion and final thoughts