Adrian Cockcroft explores the transition from cloud-native to AI-native development, sharing practical approaches for managing swarms of autonomous agents using tools like Cursor and Claude Flow. This comprehensive guide covers best practices, real-world experiments, and patterns for building AI-driven development platforms in the Python ecosystem.
From Cloud-Native to AI-Native: Directing Agent Swarms for Python Development

The software development landscape is undergoing another profound transformation. Just as we adapted to cloud-native architectures over the past decade, we now face the emergence of AI-native development. Adrian Cockcroft, renowned for his work as Netflix's cloud architect and former Amazon VP, shares his insights on directing swarms of autonomous agents for software development in a recent presentation at QCon San Francisco.
The Evolution from Cloud to AI
Looking back at 2010, Cockcroft recalls the skepticism surrounding Netflix's migration to AWS. "Most people said, 'You guys are crazy. What are you trying to doing running an enterprise on a cloud?'" Today, we've seen cloud computing mature from credit-card purchases to enterprise-grade platforms. Now, we're witnessing a similar transition in AI-driven development.
"I retired from Amazon in 2022," Cockcroft explains. "One of the reasons that I didn't do much coding in the late years was because my RSI, my arms hurt too much. Too much keyboard time was a bad thing. Now with these nice AI tools, I just have to type something in and watch it for a while while I'm trying to learn guitar or watching a YouTube video."
This personal experience mirrors a broader industry shift: the physical limitations of traditional development are giving way to new possibilities with AI assistance.
The Director Approach to Agent Management
Cockcroft's approach to managing AI agents is likened to a director managing a team of human developers:
"If you're a director, you don't read code. You have a team of people. You're trying to do something for your business. You don't watch everything they do. The way I'm using these coding agents is like a director-level manager. The agents build things I didn't ask for. Sometimes they're things I didn't know to ask for. I still have to keep nagging them to say, no, I really want you to run all the tests."
This "director-level" approach acknowledges that while AI agents can produce remarkable results quickly, they still require guidance and oversight to ensure they're building what's actually needed.
Practical Tools for AI-Assisted Development
Cursor: The Interactive Coding Environment
Cursor has become Cockcroft's primary tool for data science and Python development:
"Cursor is a pretty nice tool. I have a license for that. That's been my main coding tool for the data science-y stuff I do. This is mostly manipulating CSVs and doing a bunch of analysis, observability analysis. It's single-threaded, so you watch everything go by. You can see what it's doing."
The interactive nature of Cursor allows developers to observe the agent's work in real-time, which is particularly valuable for learning and debugging.
Claude Flow: The Agent Framework
For more complex projects, Cockcroft turns to Claude Flow, an agent framework developed by Reuven Cohen (an early cloud pioneer):
"Claude Flow basically takes each copy of Claude, gives each one a different MCP server that personalizes it to be a coder or a developer or an architect or a researcher or a Hive queen who's a line manager or whatever, or a backend tester, a DevOps one. A DevOps one will just know how to go build everything into a Dockerfile and do the builds and all that stuff. They communicate via shared memory and to-do lists."
This framework enables parallel processing with specialized agents, each focusing on a specific aspect of development. The result is significantly better behavior on large projects:
"Why is that? It's because they're working in parallel, so stuff happens even faster. Also, because each agent is single-minded, it's easier to focus, it's just doing one job. Then they check on each other's work. You've got a coder who's writing the code. There's a tester that's writing the tests. There's another agent running the tests."
Best Practices for AI-Assisted Python Development
Start with Python
nCockcroft emphasizes Python's advantages for AI-assisted development:
"Start with Python. It just works. It's the thing that you're most likely to get work. I have an allergic reaction to JavaScript and TypeScript, and maybe some people are more into that than I am. What I've seen is TypeScript builds and builds, and there's a hairball that's hard to understand, whereas Python tends to stay more structured, so you get a bit more maintenance. The Python code almost always just works first time."
Python's readability and consistent structure make it particularly well-suited for AI code generation and modification.
Language Porting Made Easy
nOne of the most powerful applications of AI agents is language porting. Cockcroft shares an example of converting R code to Python:
"I was doing some analytics in R. I've known R for a long time, and I was trying to do this analysis code. I spent quite a bit of time figuring out exactly what the analysis was. Then I wanted to give it to somebody else to run. In the R environment, you have to install RStudio, and it's a big mess and whatever. I said, make a Python version of this. Five minutes later, I had the Python version, sent it to them. They could run it. It did all the same thing as the R version."
This capability dramatically reduces the friction of adopting new technologies or sharing code across teams with different language preferences.
Behavior-Driven Development (BDD)
Cockcroft advocates for using BDD as a structured approach to guide AI agents:
"I go one step beyond that and use behavior-driven development. The BDD tests are actually a much nicer structure for driving the behavior. When you do a BDD, you structure your test as, given this setup, when this happens, then this should happen. When you structure that way, it gives the agent more structure. It's harder to fake the results. Everything basically comes into place."
This approach produces more reliable results by providing clear behavioral specifications that AI agents can follow precisely.
Context Blocks for Code Maintenance
nTo prevent agents from reintroducing bugs or going in circles, Cockcroft recommends maintaining context blocks:
"What I tell it to do is maintain a context block at the beginning of each piece of code. When it reads a source code file, the first thing it does when it reads the file is it finds 100 to 200 lines block comment that says everything that it knows about that code. It maintains it. It writes it in there. You just say, put some context block in there. It lists what this does, the APIs, the version history, and tell it to maintain that every time it changes the code."
This practice helps agents understand the codebase more effectively, especially when switching between different AI tools or resuming work after interruptions.
The Tidy-First Approach
Kent Beck's "tidy-first" approach is particularly valuable when working with AI-generated code:
"You do a little bit of coding. Maybe you spend like an hour generating some new code. Then you spend the rest of the day tidying it up, making sure it's got tests, cleaning it up, getting rid of all those doc files that it sprinkled all over the directories as it was writing it, making sure every error, every logging entry, all the warnings have gone away."
This two-phase approach balances rapid prototyping with code quality, leveraging AI for speed while maintaining human oversight for quality.
Building AI-Native Development Platforms
nCockcroft predicts a fundamental shift in how organizations approach development:
"What I think you're doing now is you're going to need to build a development service, a platform that operates development. You're going to move your headcount from application development largely to platform development. That platform's going to do policy, security, guardrails, pre-built components, all of those things."
This AI-native development platform would enable product managers to spin up developer agents to build features or experiments in hours rather than weeks:
"When a product manager wants to run an experiment or wants to build a feature, they'll actually use the platform. They'll spin up a bunch of developers to go build the next version of it or iterate on it, or whatever. That'll take an hour or so, something like that."
However, these platforms will differ significantly from current cloud platforms:
"However, this platform is not at all like the cloud platforms we've been doing recently. It's incredibly fast changing. It's incredibly chaotic, poorly understood. The tooling and the best practice will change every month."
Real-World Examples
The Hello World of LLMs: Building MCP Servers
Cockcroft identifies building MCP (Model Context Protocol) servers as the "Hello World" program for LLM development:
"The Hello World program is, build me an MCP server for this. This is the simple, repeatable exercise that you can go play around with. If there's a piece of knowledge or something or a tool or whatever, tell it to build an MCP server. Whatever you've got that's some complicated thing, you can build an MCP server, then you attach that server to one of the agents, and it will figure out how to use whatever that thing is."
He demonstrates this by creating an MCP server from his own content, enabling him to query his knowledge base locally rather than through external services.
The House Management Knowledge Graph
One of Cockcroft's most ambitious projects is a knowledge graph for managing his house's IoT devices:
"I figured I wanted a knowledge graph of everything in my house shared as an MCP server so that I could talk to it via an LLM. I was chatting to Reuven Cohen about this. He said, I'll show you how to use Claude Code to do this. I wrote this up as a blog post last June. I built 150,000 lines of Python that day."
This project evolved into a sophisticated system with a Python server, a protocol, and a client that synchronizes knowledge graphs between devices:
"What I built was this server, a protocol, and a client that lazily synchronize knowledge graphs. It decided, without me even telling it, to use vector clocks and a whole bunch of stuff. There's a last write wins and a bunch of stuff. It's tested, and it's got 225 tests. It's as tested as I could make it. It's as tidy as I could make it."
The system includes enterprise-quality features like authentication, audit logging, rate limiting, and guest mode access.
Re-coding a Big Project from TypeScript to Python
Cockcroft is currently leading the conversion of a 150,000-line JavaScript/TypeScript project to Python:
"There was a startup I'm working with. Their idea was that they wanted to build a demo of their app so when they went for funding, they'd have it running. I said, that's about a week or so's work for somebody that's full-time. Chris Fregly... built this thing. It's a pretty sophisticated app. He built it mostly in TypeScript, and now he's done with it, and he's off doing something else. Ok, I don't want to have to deal with this thing in TypeScript. I just said, translate the whole thing into Python."
This project demonstrates AI's capability to handle large-scale language migration while maintaining functionality and test coverage.
Challenges and What's Missing
Despite the impressive capabilities, several challenges remain:
The Need for Director Agents
nCockcroft identifies the need for higher-level management agents:
"I'm doing really too many repetitive, mindless management tasks. It's like the director says, make all 100% of the tests pass. It keeps saying, I'll make 90% of the tests pass. No, I want 100%. How many times have I told you I want 100%? What's the point of only having 90% of the tests passing? Tidy it up. Yes, I do want you to keep going until you finish."
The solution may be specialized "director" agents that handle management tasks:
"I think we need this systemic platform for managing agent development. This is going to emerge organically probably in the next few months, because everything tends to take a few months. Basically, this breaking down tasks, managing to guardrails and policies, and then automating the need for development management away."
Enterprise Constraints
nOrganizations face significant challenges in adopting these approaches:
"This is a reason why enterprises are going to have trouble doing this kind of coding. This laptop is a Nubank laptop, and it's very locked down, and it goes to sleep after three minutes, and it locks screens, and it goes to sleep, and you can't turn off the going to sleep thing unless you watch a YouTube video on it."
Enterprise environments often restrict the necessary freedoms for AI agents to operate effectively.
Environmental Considerations
nCockcroft addresses concerns about the environmental impact of AI development:
"There's a lot of fuss about there's all this energy being put into data centers. How much energy am I using to write this code if I hired human engineers to write it? What is that comparison?"
His analysis suggests that AI-assisted development may actually be more environmentally friendly:
"A human developer in the U.S., your carbon footprint is about 20 tons a year... That's about 10 kilograms of carbon dioxide per hour... A million tokens is about what Claude does in an hour, roughly... Even if you just say it's 10 times less efficient, it's still 5,000 times better than using Claude from carbon footprint point of view. It's running at 100 times the speed, or it's really running at 1,000 times the speed, but most of the tokens are being wasted because it's rummaging around rereading the same things."
The Path Forward
nCockcroft concludes with a call to action for developers:
"The future is here, it's just unevenly distributed. There's way too much happening. It's going far too fast. It's very confusing. It's very complicated. Every month, there's a new, better way to do AI... If you're not experimenting continuously with these tools, you'll get stuck in some dead end, and everyone else will have disappeared off into the distance."
He emphasizes the importance of hands experimentation and sharing knowledge:
"I think this is something you have to do in-house wherever you are. Then the key thing here is to share what you've learned. I put most of my code up as just open source on GitHub for people to look at if they want to."
As we transition from cloud-native to AI-native development, the principles remain consistent: automation, platform engineering, and continuous improvement. The tools are changing, but the goal remains the same: delivering value faster and more reliably.
For those looking to explore these technologies, Cockcroft recommends starting with practical experiments: "The Hello World of LLMs is to build an MCP server for this. This is the simple, repeatable exercise that you can go play around with."

References
- Cursor Editor - The AI-powered code editor Cockcroft uses for Python development
- Claude Flow - The agent framework for orchestrating multiple Claude instances
- MCP (Model Context Protocol) - The protocol for connecting AI agents to tools and data
- Adrian Cockcroft's GitHub - Where Cockcroft shares his experimental projects and code
This article is based on Adrian Cockcroft's presentation "Directing a Swarm of Agents for Fun and Profit" at QCon San Francisco 2026. For the full presentation transcript, visit the InfoQ page.

Comments
Please log in or register to join the discussion