The Agentic Future is Code-First: Why We Built Bubble Lab on TypeScript, Not Hype

The Agentic Future is Code-First: Why We Built Bubble Lab on TypeScript, Not Hype
Late last week, the team at Anthropic published a fascinating piece, 'Code execution with MCP: Building more efficient agents'. It's a sharp, insightful article that validates a core philosophy we've held since day one at Bubble Lab: the most powerful, efficient, and scalable way to build AI agents is with code.
The article highlights the growing pains of direct tool-calling protocols like MCP. As the number of tools scales, context windows get clogged with definitions, and intermediate data inflates token counts, leading to slower, more expensive, and less reliable agents. Their proposed solution? Have agents write and execute code to interact with tools.
Reading this felt like seeing our own architectural blueprints described back to us. At Bubble Lab, we didn't just bolt on a code execution module; we built our entire platform on a TypeScript-first foundation. Each integration (including AI agent itself) is a well-crafted TypeScript API that the coding agent can interact with and build workflows off of. This wasn't an accident. It was a deliberate choice to prioritize developer experience, control, and raw capability over the seductive simplicity of a universal, but ultimately limited, protocol.
Why We Skipped the MCP Hype Train
When protocols like MCP emerged, the hype was palpable. A universal standard to connect agents and tools sounds great in theory. But in practice, it introduces a layer of abstraction that, as Anthropic's article points out, quickly becomes a bottleneck.
We saw a different path forward. Instead of teaching an AI to use a limited, high-level tool-calling syntax, why not leverage the most versatile and powerful tool ever created for logical expression: a programming language? For us, TypeScript was the obvious choice.
Anthropic's post outlines several key benefits of the code execution model. Here's how they map directly to the native experience of building with Bubble Lab:
1. Progressive Disclosure & Efficient Tool Loading
Anthropic suggests a file-based system for tools that the agent can explore. In Bubble Lab, this is just called an import statement. Our workflows are TypeScript modules. You only import the libraries and functions you need, keeping your execution context clean and efficient by default. This is a solved problem in software engineering, and we lean on its battle-tested patterns.
2. Context-Efficient Data Handling
The article shows an example of filtering a 10,000-row spreadsheet in code before passing it to the model. With Bubble Lab, this isn't a special feature—it's just JavaScript. You can map, filter, reduce, and transform data of any size or complexity using the full power of the language before ever passing a single token to an LLM. This saves costs and, more importantly, allows for sophisticated data manipulation that would be impossible with simple tool calls.
3. Powerful Control Flow & Logic
Need to implement a loop with a sleep command to wait for a deployment? In Bubble Lab, you write a while loop and use await. Need complex conditional logic or robust error handling? You use if/else and try/catch. These are native language constructs, not cumbersome chains of tool calls. Our visual builder even maps these code structures to an intuitive graph, giving you full observability without sacrificing the power of the underlying code.
4. Inherent Privacy and State Management
With Bubble Lab, your data flows through your TypeScript code in a secure execution environment. You have explicit control over what gets logged or passed to an AI model. State can be managed in variables, written to a filesystem, or passed between functions—all standard practice for any developer. The agent doesn't need to "learn" to persist state; the environment is stateful by design.
The Bubble Lab Way: Code as the Ultimate Agentic Tool
The Anthropic article concludes that while code execution is powerful, it introduces the complexity of managing a secure sandboxed environment. We agree. That's precisely the problem we've focused on solving.
Bubble Lab provides that secure, observable, and developer-first environment out of the box. We give you the full power of TypeScript, a rich visualizer that shows your code's execution in real-time, and the ability to export your entire workflow as clean, runnable code for your own backend.
We believe the future of AI agents isn't about finding the perfect universal protocol. It's about empowering developers with the powerful, flexible, and familiar tools they already use every day. The industry is starting to realize that the best way to build complex, reliable AI systems is to build them like we build any other software: with well-structured, efficient, and maintainable code.
Closing Thoughts
We're thrilled to see leaders like Anthropic championing this approach. It affirms our mission and validates the path we chose. The future of workflow automation is here, and it's written in TypeScript.
Follow our journey → @bubblelab_ai
Star us on GitHub → github.com/bubblelabai/BubbleLab
Found this article helpful?
