TypeScriptAI AgentsMCPDeveloper ToolsCode-First

The Industry Agrees: Code-First is the Future of AI Agents, and We've Been Building it Since Day One

October 1, 2025
5 min read
Selina Li
Selina Li
Co-founder and CEO of Bubble Lab
The Industry Agrees: Code-First is the Future of AI Agents, and We've Been Building it Since Day One

The Industry Agrees: Code-First is the Future of AI Agents, and We've Been Building it Since Day One

A recent blog post from the team at Cloudflare, titled "Code Mode: the better way to use MCP," has sparked an important conversation in the AI development community. They've discovered something we at Bubble Lab have believed from our inception: Large Language Models (LLMs) are far more powerful when they write code to interact with tools, rather than calling those tools directly.

This isn't just an interesting technical detail; it's a fundamental architectural shift. And for us, it's a powerful validation of the TypeScript-native foundation upon which Bubble Lab is built.


The Problem with Traditional "Tool-Calling"

The recent standardized approach for giving AI agents capabilities has been "tool-calling" or "function-calling." The agent is presented with a list of tools and, when needed, it generates a structured JSON object to invoke one. As the Cloudflare team rightly points out, this method is deeply flawed:

  1. Poor Training Data: LLMs are trained on a vast corpus of human-written code from across the internet. In contrast, their training on tool-calling is limited to smaller, often synthetic, datasets created by the model's developers.

  2. Scalability Issues: As the number and complexity of tools increase, the LLM's ability to choose and use the correct one diminishes. This creates a bottleneck that limits the sophistication of our agents.

  3. Inefficiency: Chaining multiple tool calls together is a slow and expensive process. The output of one tool has to be fed back into the LLM, processed, and then used to generate the next tool call, wasting tokens and time at every step.

In their words, asking an LLM to use tool-calling is like "putting Shakespeare through a month-long class in Mandarin and then asking him to write a play in it." It's just not going to be his best work.


Cloudflare's Solution: The "Code Mode" Architecture

Cloudflare's elegant solution is to convert tools into a TypeScript API and have the LLM write code that calls that API. This code is then executed in a secure, lightweight V8 isolate. This approach leverages the LLM's greatest strength—its deep, nuanced understanding of programming languages.

This is a brilliant move that pushes the industry in the right direction. It's also the exact philosophy that has driven our work at Bubble Lab from the very beginning.


Bubble Lab: The Code-First Future, Realized

While Cloudflare is introducing this as a powerful new feature, at Bubble Lab, this is our entire platform. We didn't just add a "code mode"; we are fundamentally code-native.

Our platform allows you to describe complex workflows in natural language, and our AI orchestrates our composable "Bubbles" (integrations, tools, and logic) by generating production-ready TypeScript. This isn't a black box. We provide:

  • True Code Ownership: We don't just execute code in a sandbox. Bubble Lab allows you to export your entire workflow as a clean, human-readable TypeScript file. You can check it into git, add it to your CI/CD pipeline, and run it on your own infrastructure. You truly own your work.

  • Full Observability: Production-grade AI systems require production-grade tooling. Our platform offers end-to-end type safety, built-in traceability, and rich logs, giving you the confidence to debug and ship complex agentic workflows.

  • Developer-First Experience: We believe in empowering developers. By embracing a TypeScript-native architecture, we allow you to use the full power of a real programming language—loops, conditionals, error handling, and complex data manipulation—without the token-wasting back-and-forth of traditional tool-calling.

  • Open and Agnostic: Bubble Lab is open-source and model-agnostic. We believe the future of AI shouldn't be locked into a single vendor's ecosystem. You have the freedom to choose the best models and tools for your specific needs.


A Shared Vision

We're thrilled to see a major industry player like Cloudflare so clearly articulate and validate the architectural principles we've been so passionate about. It signals a broader market realization that the path to more powerful, reliable, and scalable AI agents is through code.

The future of AI is not about building more complex no-code abstractions; it's about creating smarter tools that empower developers to build with the languages and workflows they already know and trust.

That future is code-first, and we're proud to be at the forefront of building it. Come build with us.


Follow our journey@bubblelab_ai
Star us on GitHubgithub.com/bubblelabai/BubbleLab

Found this article helpful?