All episodes

Sunil Pai on AI agents, Cloudflare and React

Sunil Pai makes the practical case for AI agents: ordinary business-process automation, running on durable infrastructure close to users, with the complexity hidden well enough that a junior engineer can ship something useful in a day.

Jack Bridger
Episode 13350:29

Sunil Pai works on AI agents at Cloudflare after the company acquired his multiplayer platform, PartyKit. Earlier in his career he worked on React at Meta and rewrote Cloudflare's Wrangler CLI from Rust to TypeScript.

We talk about accessible technology, Cloudflare's long-term infrastructure bets, stateful agents and MCP, why chat will remain an important interface, the vertical opportunities Sunil sees for founders, and how PartyKit's real-time foundations found a second life inside Cloudflare Agents.

The Q&A below is experimental — extracted from the episode transcript with AI. If you spot a mistake, let us know at jack@scalingdevtools.com.

Why did React matter so much to you?

React made sophisticated web development accessible to people who did not need deep opinions about every programming paradigm underneath it. That kind of technology is an amplifier. Its early reception was hostile, but an inventive community formed around simple primitives and helped ordinary developers build very good websites.

What is distinctive about how Cloudflare builds?

The company plays a long game. Workers began with the idea of running JavaScript across Cloudflare's network, then progressed through deliberate stages over years toward a much larger computing platform. Teams work backward from a future solution, but they also ship small, useful, polished pieces and iterate in public rather than waiting for a supposedly finished system.

What is your practical theory of AI agents?

It is business-process automation. Companies constantly translate unstructured information into structured data, transform it and turn it back into reports or actions. Language models are unusually good at those conversions. Agents let that work continue in the background when inputs arrive, with people spending less time copying values, checking routine work and moving information between systems.

Why are Durable Objects a good foundation for agents?

A conventional serverless function handles a request and forgets everything — goldfish technology. A Durable Object has an identity, retains state, can keep working after the browser disconnects, responds to alarms and webhooks, supports WebSockets, starts instantly and sleeps when unused. That makes persistent, scheduled and real-time agents possible without asking every developer to operate a fleet of servers.

What are companies actually building with agents?

Many early uses are lightweight interfaces over existing data: a chat that analyzes information, makes a chart or generates a report instead of a team spending weeks building a dedicated dashboard. The important part is the end-to-end system — state, scheduling, real-time connections, UI and infrastructure — not merely an agent loop in a JavaScript framework.

How do you make that infrastructure accessible?

Names such as Durable Objects do not explain the value. We present an agent container with a place for the React interface, message handling and tools that connect databases or services. A junior engineer can copy the starter, add the tools and see a complete application work. The hard engineering remains underneath; the product story makes it usable.

What changes when MCP connections can be added dynamically?

An agent can gain tools such as email access through a login flow rather than requiring a new software deployment. As SaaS products publish remote MCP servers, chat clients can connect those capabilities at runtime. Persistent connections and authentication make stateful infrastructure useful here, while the interface becomes much more adaptable for users.

Where should founders look for agent opportunities?

Pick a specific, ordinary vertical such as healthcare, hospitality or compliance and learn its workflow deeply. Infrastructure and model companies want vertical products built above them. I would avoid trying to make another broad platform and instead build a focused consumer or developer product whose advantage grows as models, function calling, multimodality and inference prices improve.

What would an AI-native DevTool look like?

It would ship more than a library and conventional documentation. A framework could include instructions for coding agents, semantic search, prompts or a small coding agent, and a remote MCP server. The point is to redesign the experience for how software will be used in the coming year, not bolt AI onto the same product surface.

Why did PartyKit return you to Cloudflare?

PartyKit grew from helping tldraw synchronize a multiplayer canvas on Durable Objects. We reached a working prototype in about a week and a half and production readiness in roughly six weeks. Developers loved the platform, but finding the business model would have required a more vertical product. Cloudflare offered the reach and enterprise motion, while PartyKit's real-time code became part of the foundation powering its agent work.

Keep listening