Welcome to First Time Founders. I'm Ed Elson. 7.5 billion. That is how much money has poured into AI coding startups in just the past 3 months. And it's not that hard to see why. Across the industry, developers are embracing generative AI to speed up their work. It's efficient. It's impressive. But it's still under the careful watch of human engineers.
Well, my next guest wondered if AI could do more. What if it could handle routine tasks like debugging or migrations on its own? What if it could be autonomous? To turn that idea into reality, he launched an AI startup which uses agents to handle the mundane work that developers would rather skip, with a $50 million investment from Sequoia, JP Morgan, and Nvidia. His company is reshaping the future of software development. This is my conversation with Matan Grinberg, co-founder and CEO of Factory. All right, Matan Grinberg, thank you for joining me.
Thank you for having me. How are you?
I'm good. We should probably start off by saying we go way back. We're good friends from college. I knew you back in college. I knew you when you were studying physics. You were a budding physicist. I mean just for those listening, Matan was basically the smartest guy I knew in college. And then you go on and you're I know you were getting your PhD in physics and then eventually you tell me, 'No, I'm actually starting an AI company.' And now here you are and you're running one of these top AI startups figuring out how to automate coding. Let's just start with like how did we get here? How do we go from Princeton physics going to be a physicist and then now you're an AI person?
Yeah. So obviously that was not the arc that I think I was expecting either. Probably goes back to 8th grade which is why I got into physics in the first place. Spite is a very big motivator for me. And in 8th grade, my geometry teacher told me to retake geometry in high school. And I was like, screw that. Like, what? Like, I'm good at math. I don't need to do that. And so in the summer between 8th and 9th grade, my first order on Amazon ever was textbooks for algebra 2, trigonometry, pre-calculus, calculus 1, 2, 3, differential equations.
Yeah, exactly. And so I spent the whole summer studying those textbooks. And going into freshman year of high school, I took an exam to pass out of every single one of those classes. So I had credit for all of them. And then I went to my dad and I was like, 'What's the hardest math?' And he said, 'String theory, which is actually physics. It's not math.' And I was like, 'Okay, I'm going to be a string theorist.' And then basically for the next like 10 years of my life, that was all I really cared about. I didn't really pay attention much to anything about like finance, entrepreneurship, like anything like that. And obviously I came to love it, but I realized that I didn't really want to spend my entire life doing that. Taking 10 years to realize that is a little bit slow, but I had a bit of an existential crisis of you know like what is it? What should I do? Almost joined Jane Street in a classic like ex-physicist like what should I do? Decided not to because I feel like that's the thing like you know once you go there you kind of don't move on from that. So ended up taking some classes at Berkeley in AI. Really fell in love in particular with what was called program synthesis. Now they call it code generation. And the math from physics made it such that like jumping into the AI side was relatively straightforward. Did that for about a year and then realized that the best way to pursue code generation was not through academic research but through starting a company.
And so then the question was like okay well I know nothing about entrepreneurship. I've been a physicist for 10 years. What should I do? And this was just after COVID but I remember on YouTube in my recommended algorithm I saw a podcast on Zoom with this guy whose name I remembered from a paper that I wrote at Princeton. This guy used to be a string theorist but it was a podcast and it was like a Sequoia investor like talks you know everything from like crypto to physics and I was like what the hell is this? And I remember watching the interview and the guy seemed relatively normal like had social skills which is rare for someone who had published in string theory.
That was the other interesting thing about you is you're kind of a social person who's also this physics genius which again is quite rare but so you found someone in common.
Yeah. So, so found someone who I was like, 'Okay, you know, maybe there was someone else who has this similar background.' And I remembered the name correctly and so I looked him up and saw that he was a string theorist who ended up you know getting his degree then joining Google Ventures being one of the first checks into Stripe then one of the first checks into like SpaceX on the way he had built and sold a company for a billion dollars to Palo Alto Networks and I was just like this is an insane trajectory. So sent him a cold email and I was just like, 'Hey, I'm Matan. I studied physics at Princeton, wrote a paper with this guy named Juan Maldacena, who's like a very famous string theorist.' And I was like, 'Would love to talk.' What was supposed to be a 30-minute meeting ends up being a three-hour walk. And we walk from Sand Hill all the way to Stanford campus and then back.
And funny enough, on the walk, so we realized that we had a lot of like very similar reasons for getting into physics in the first place, similar reasons for wanting to leave as well. And this was in April of 2023, so just after the Silicon Valley Bank crisis. And also very soon after the Elon Twitter acquisition and after the conversation, he was basically like, 'Matan, you should 100% drop out of your PhD and you should either join Twitter right now because if you voluntarily go to Twitter of all times now, that's just badass. Looks great, you know, on your resume, or you should start a company.' And I knew what the answer was, but didn't want to like corrupt what was an incredible meeting. So, I was like, 'Okay, thank you so much. I'm going to go think about it.'
The good advice for meetings, don't give your answer right away.
Take some time, come back.
Yeah. And so, crazy thing, the next day I go to a hackathon in San Francisco. In this hackathon, I run into Eno. We recognized each other at this hackathon. We were like, 'Oh, hey, like, you know, I remember you.' We ended up chatting and realizing that we were both really obsessed with coding for AI. And then that day we started working on what would become Factory. He had a job at the time. I was a PhD student, so I could spend whatever time I wanted on it. And over the next 48 hours, we built the demo for what would become Factory. Called up Sean and I was like, 'Hey, I was thinking about what you said. I have a demo I want to show you.' And so we got on a Zoom, I showed it to him. He was like, 'This is all right.' And I was like, 'All right, like I think this is pretty sick. Like I don't know.' He's like, 'Okay, would you work on it full-time?' And I was like, 'Yeah, 100%.' And he was like, 'Okay, drop out of your PhD and send me a screenshot.' And I was just like, 'Fuck it.' Okay. So, go to the like Berkeley portal like fully unenroll and withdraw. Didn't tell my parents. Obviously sent him a screenshot. He's like, 'Okay, you have a meeting with the Sequoia Partnership tomorrow morning. Like, be ready to present.'
Wow. So, now backed by Sequoia, you just raised your Series B. You are one of the top AI coding startups but there are a lot of AI coding companies. We spoke with one a while ago which was Cognition which eventually became Windsurf, it got folded into Google in this kind of controversial situation. Point being there are people who are doing this. What makes Factory different? What made it different from the get-go and what makes it different now?
Our mission from when we first started is actually the exact same that it is today, which is to bring autonomy to software engineering. I think when we first started in April of 2023, we were very early. And what I've come to realize is that, and this is kind of a little bit of a trite statement, but being early is the same as being wrong. And we were wrong early on in that the foundation models were not good enough to fully have autonomous software development agents. And so in the early days, I think the important things that we were doing was building out an absolutely killer team, which we do have, and everyone that we started with is still here, which has been incredible, and having a deeper sense of how developers are going to adopt these tools. So that was kind of in the early days. And I think something that we learned that still to this day, I don't really see any other companies focus on is the fact that coding is not the most important part of software development. In fact, as a company gets larger and as the number of engineers in a company grows, the amount of time that any given engineer spends on coding goes down because there's all this organizational molasses of like needing to do documentation and design reviews and meetings and approvals and code review and testing. And so the stuff that developers actually enjoy doing, namely the coding, is actually what you get to spend less time on.
And then there are these companies emerging saying, 'Hey, we're gonna automate that one little thing that you sometimes get to do that you enjoy. You don't get to do that anymore. So your life as a developer is just going to be reviewing code or documenting code,' which it just I think really misses the mark on what developers in the enterprise actually care about. And I think the reason why this happens is because a lot of these companies have like in their composition the best engineers in the world graduating from you know the greatest schools and they join startups and at a startup if you're an engineer all you do is code and so there's kind of this mismatch in terms of empathy of what the life of a developer is. Because you know if you're a developer at one of these hot startups yes coding speed that up great but if you're a developer at some 50,000 engineer org coding is not your bottleneck. Your bottleneck are all these other things. And with us focusing on that full like end-to-end spectrum of software development, we end up kind of hitting more closely to what developers actually want.
Microsoft, I know I think Satya Nadella said something like 30% of code at Microsoft is being written by AI right now. I think Zuckerberg said that he's shooting for I think half of the code at Meta to be written by AI. You're basically saying what software developers want is not for someone to be doing the creative part, but they want someone or an agent or an AI to be doing the boring drudge work. What does that drudge work actually look like? You said sort of reviewing code, documenting code. In what sense is Factory addressing that issue?
Even the idea of like 30% of code is AI written, I think is a very non-trivial metric to calculate because if you have AI generated like 10 lines and you manually go adjust two of them, do those two count as AI generated or not. So there's some gray there, but it's just a very hard it's hard to calculate. And so even if you were trying to be as rigorous as possible, I don't know how you come up with a very concrete number there, right? But regardless I think that directionally it's correct that the number of lines of code that's AI generated is you know strictly increasing. The way that Factory helps, so I guess generally like the software development life cycle very high level looks like first understanding right so you're trying to figure out what is the like lay of the land of our current codebase let's say or our current product then you're going to have some planning of whether it's like a migration that we want to do or a feature or some customer issue that we want to address. Then you're going to plan it out, create some design doc. You're going to go and implement it. So you're going to write the code for it. Then you're going to generate some tests to verify that it, you know, is passing some criteria that you have. There's going to be some human review. So they're going to check to make sure that this looks good. And then you might update your documentation. And then you kind of push it into production and, you know, monitor to make sure that it doesn't break.
In an enterprise all of those steps take a really really long time because there's you know the larger your org if it's 30 years old there are all these different interdependencies and like imagine you're a bank and you want to ship a new feature to your like mobile app there are so many different interdependencies that any given change will affect. So then you need to have meetings and you need to have approvals from this person and this person needs to find the subject matter expert for this part of the codebase and it ends up taking months and months. And so where Factory helps is a lot of the things that don't seem like the highest leverage are what they spend a lot of time on. So like that testing part or the review process or the documentation or even the initial understanding. I cannot tell you how many customers of ours have a situation where there was like one expert who's been there for 30 years who just retired. And so now there's like literally no one who understands a certain part of their codebase.
And so getting some new engineer to go in and do that. There's no documentation. So now that engineer has to spend 6 months writing out docs for this like legacy codebase which is you know engineers spend years of their lives becoming experts. The highest lever use of their time is not writing documentation on existing parts of the codebase. In this world where like an org has Factory fully deployed, that engineer can just send off an agent. Our agents are called droids. So they send off a droid to go and generate those docs, ask it questions, get the insight as if it was a subject matter expert that's been there for 20 years. So they can go and say, 'Okay, here's how we're going to design a solution. Here's how we're going to fix whatever issue is at hand.'
These droids, your agents that you call droids, I think one of the big differentiators that I've seen is that they are fully autonomous. They're doing basically everything on their own. In contrast to something like Copilot, which is by definition working alongside you to help you figure things out, you guys are saying, 'No, these things can be completely on their own, totally autonomous. Literally, you've got robots just doing the work for you.' Why is that the way to go with AI at a high level?
So this is true for code, but I would also say for knowledge work more broadly. But for code in particular, we're going from a world where developers wrote 100% of their code to a world where developers will eventually write 0% of it. And we're basically changing the primitive of software development from like writing lines of code, writing functions, writing files to the new primitive being a delegation, like delegating a task to an agent. And so the new kind of important thing to consider is you know you can delegate a task but if it's very poorly scoped the agent will probably not satisfy whatever criteria you had in your head. And so if this new primitive is delegation, your job as a developer is to get good at, how can I very clearly define what success looks like, what I need to get done, what the testing it should do, like what are organizations contributing guidelines are, let's say. And so with this as the new primitive, the job of the developer is now okay, if I set up the right guidelines and I tell this agent to go, it now has the information it needs to succeed on its own.
And this is very similar to like human engineer onboarding. Like when you onboard a human engineer into your organization, what do you do? You don't just throw them into the codebase. You'll say, 'Hey, here's what we've built so far. Here's how we build things going forward. Here's our process for deciding on what features to build. Here's our coding standards.' So you have like a long onboarding process, then you give them a laptop so they can actually go and write the code and test it and run it and mess around with it before they actually submit it. And so we need to do similar things with agents where we give them this thorough onboarding process. You give it an environment where it can actually test the code and you know mess around with the code to see if it's working. And having that laptop now it has this like autonomous loop that it can go through where it tries out some code runs it. Oh that failed. Let me go iterate based on that. Now we do have not like fully autonomous droids but the point is that giving people access to this they can set up droids to fully generate all of their docs for them. So now as an engineer that's just something you don't need to worry about the highest lever use of your time instead behavior change towards delegation that's like the kind of biggest thing that we work with enterprises on.
I think delegation is the right word but it's also kind of a scary word because delegation implies I mean the way that we work today you delegate to other people whose jobs are to do all of the things that you're describing. There are some companies that say AI is going to be your partner and work alongside you. You're saying actually no, this is just going to do the work, i.e. it would replace people. And this is obviously a big debate in AI, the automation debate, what happens to the 4 and a half million software engineers. What is your viewpoint on this automation debate and the idea that AI is going to take your job?
At a high level, I will say AI will not replace human engineers. Human engineers who know how to use AI will replace human engineers who don't. And I think the reason AI will not replace human engineers is because basically there's like a bar for how big a problem needs to be in order for it to like be economically viable for someone to implement a software solution to it. And suppose it used to be a billion dollars and then slowly it's gone down to $100 million or $10 million. Like these are like the TAMs of the problem that makes it economically worthwhile to build up a team of software engineers to work on a problem.
What AI does is it lowers that bar. So now in a world where before you could only economically viably solve a problem that's worth $10 million. Now maybe it's $100,000. Now maybe it's like large enterprises can actually make a lot of custom software for any given customer of theirs. It means that the leverage of each software developer goes up. It does not mean that the number of software engineers go down. It would mean that if there was only one company in the world that had access to AI because then they have access to AI, they can use AI while no one else does and now they have way more leverage. So they can beat their competitors while having less humans. But the reality is now is if there are two companies and they're competing, one has a thousand engineers, the other has a thousand engineers. They both get AI. So now they have the equivalent output of 100,000 engineers. They're not going to start firing engineers because now one company is going to be way more productive than the other. They'll deliver a better product, better solution, lower cost to their customers and then they're going to succeed. So then this other company is going to be incentivized then to have more engineers, right?
So I think that's one side of it. I think the other is like we have really bad prediction on what we can do with these tools because right now like humanity has only seen what loosely 100,000 software engineers working together can build. That might be like let's say the cloud providers. Those are some of like the largest engineering orgs, something that took let's say 100,000 engineers to build. We don't even know what the equivalent of 10 million human software engineers could build. Like we can't even conceive of like what software is so intricate and complicated that it would take that many engineers to build. And I kind of refuse to believe that 100,000 is the limit. There's no interesting software after that.
Yeah. I'm really glad you brought up the point of the danger here is that one company would own all of the AI. Like the problem isn't value creation. I mean what we're describing is technology bringing the costs down and therefore creating more incentives to build more value creation which can only be a good thing unless it is in some way hijacked and you don't have a system of capitalism where companies are really competing with each other and forcing each other to iterate and also that includes many different players who can participate in that value creation. And when I look at the AI space right now. Just as an example, when we interviewed and spoke with what is now Windsurf and I asked the founders this question of like how do you compete with big tech and they explained how they're going to do it and how they're going to take big tech on and then what do you know Google buys them. And I look at the same thing with like Scale AI which was you know one of the biggest AI startups Alexander Wang was this incredible thought leader and then what do you know he gets I mean they get an investment which turns into he's now an employee at Meta and now he's building you know like Meta social media AI and it all seems as though AI is being kind of overridden or taken over by big tech through these investments which then turn into these sort of acqui-hires and it does make me concerned that all of the power and all of the value is accruing into one place and it's the same players that we've had over the past 20 years. So how do you think about that? Do you think about this possibility that maybe big tech comes in and says we need your software, we need your people, we're going to acquire you and do you worry about that concentration of power in AI?
I think it's a very like top-of-mind thing for people is like even from the investor side is it going to be the incumbents that win or will it be you know insurgents or however you want to you know the startups that can come and you know kind of claw their way into like surviving without without acquisition. I think the answer is always founder and company dependent. Like I think some examples that come to mind are like Airbnb and Uber. These are companies where there wasn't a very obvious gap in the market such that anyone could start a company like Airbnb or Uber and just you know succeed. Like I think it took a lot of very intentional and very relentless work in the face of tons of adversity to actually make those companies viable and successful. And I think in a lot of these cases it is the choice of the founders or the companies to either continue or you know proceed to joining big tech. And I think at the end of the day just it really does depend on like how relentless are you willing to be to actually fight that fight because I think both of those acquisitions were optional.
Like I don't think they were like back against the wall had no other choice. I think it was like for whatever reason and I don't know the exact details of either of these situations but it was like you know what based on the journey so far let's elect to do this.
Presumably because they were offered so much money I mean when I look at Meta hiring all of these AI geniuses and I assume this is probably a concern for Factory and many other AI startups what if Meta just hires our people and I wonder if it's because these companies are so dominant they have so much money that they're like here here's a billion dollars and it's hard to say no to.
Totally. Yeah. But I think if you like went back in time and you offered like let's say Travis Kalanick a lot of money, he'd say no. Yeah. Because he was relentless like that was the mission. And I think similarly at Factory we are super focused on people that are very mission-driven. If you want to make a ridiculous amount of money, you can go to Meta, you can go to, you know, one of those places. The people who have joined our team have chosen this mission with this team in particular because of that reason. And I think that's what it takes ultimately at the end of the day because we do not want to be acquired. We do not want to be part of big tech because I think they don't have the tools to solve the problem in the way that we want to solve it.
Yeah. It sounds like what AI needs in order for there to be like real competition is you need a founder who wants to go to Batman, who wants to fight essentially, who doesn't want to get, I guess, in bed with big tech. But I mean, one of the big themes that we've been seeing with AI recently is of course this circular financing stuff where these companies are investing and then the money comes back to them when they buy their products and it's hard to see the competition actually happening when you see everyone kind of collaborating with each other. How do you think about that? And how do people in Silicon Valley, I mean, you're very tapped into Silicon Valley, Sequoia, one of the top firms, one of your investors. How do people view that in Silicon Valley right now? And are they concerned about it?
People definitely make a lot of jokes about like the circular investing and that sort of thing. I mean, on one hand, I get it because there is a lot of interdependency of all these companies and there is a lot that they can do together, which I think on one hand is a good thing. On the other hand, it's a little bit inflationary to some like valuations or like revenue numbers or these types of things. I think on the net AI will be so productive that it won't matter that much. But short term it is a little bit like eyebrow raising I guess but at the end of the day it's like if you're let's say a foundation model company you need to get the direct deal with Nvidia because you want the GPUs. So you kind of it's just one of those things that you kind of have to do. And I don't I guess I'm not sure what an alternative would look like in a dynamic where you have four or five foundation model companies who are let's ignore Google because they can make their own stuff, but who are really competing over the GPUs in order to make the next best models.
We're back with First Time Founders. In terms of AI legislation, there seems to be a lot of debate right now on how do you regulate AI and California is trying to be a leader in regulating. What are your views on AI regulation? Are people going over the top trying to regulate? Is it warranted? How do you think about that?
Maybe just to draw some parallels. In my mind, I view things like climate regulation, nuclear regulation, and AI regulation to be similar in that they are global. And local regulation doesn't really matter. Like for example, pick any one of those three. If you make rules about in California, you can't have a gas car or you can't build like nuclear weapons or you can't build AI to the extreme in California, that doesn't really matter because that says nothing about the rest of the world. And if the rest of the world does it, it affects what happens in California. For climate, for nuclear, for AI. And so I think for AI in particular, the regulation that is interesting is less like I honestly like I think California just it doesn't matter regulating AI state by state at least at the macro level. Maybe it's like in terms of usage for like interpersonal things, sure. But in terms of like training models, the relevant stage there in my mind is the global stage. And how does it affect
Like US regulation versus European regulation versus China, let's say, from what I've seen thus far, the time spent on state regulation is kind of wasted. At least as it relates to foundation models. I think there is a concern probably in Silicon Valley that everyone's so afraid of AI. I mean, I've seen these surveys that, you know, I think more than half of Americans are more worried about AI than they are excited. I guess that's something to philosophically tackle on your end because you're building it. But then I would imagine that in Silicon Valley there's this feeling of everyone's just too scared because they've watched all these movies and they've watched the Terminator and so these people are getting too worried about it to the point that we're regulating in a way that actually doesn't make sense.
It's pretty interesting. I think two things come to mind. So one, there's the classic phenomenon of, you know, you're a startup, you want no regulation, then you become big, then suddenly you want regulation. And we've seen that happen with I think basically every foundation model company which is always a shame to see. And then the second and this is more just like a comment on the Silicon Valley and some of the culture there. I know so many people who work at the foundation model labs who don't have savings. Like they just do not believe in putting any money in their 401k. They spend it all because of this vision of something's coming. Which is very weird. But then there are equally as many who work at these who are like, you know, these guys kind of drank too much of the Kool-Aid.
It's really important to have these conversations and think about these things because I think it actually reminds me a lot of thinking about in theoretical physics like thinking about the big bang and black holes in the universe. The first time you think about it, it's kind of like a scary existential crisis. What is everything? We're in such a large universe, nothing has meaning, whatever. I think thinking about AI getting exponentially better kind of leads to similar existential questions like what are we, what value do humans have if there's going to be something that's smarter than any one of us. And then you have the maturity of like wait, intelligence is not why humans have value, that's not the source of intrinsic value. We don't think someone's more valuable because they're smarter. So having these conversations and thought processes is I think very important for both people working in AI and people who aren't. But yeah, there's some pretty weird people who kind of are really in the bubble inundated in it and who kind of get these interesting worldviews of like, you know, the singularity is coming so I want to spend everything that I have now. Yet at the same time if they think it's not going to be good they remain working on it.
So these AI engineers who are not saving any money, they're doing it because they think the end of the world is coming or because they think that there's going to be some transformative event that will make them really rich? Like is it more of a doomer perspective or?
It's a pretty big mix. Some people think we will just become in a world where we're post-economic and just money will be irrelevant for anyone. There's some base level whether it's some UBI type thing or some have the doomer perspective. It's pretty bizarre.