Setting intelligence free takes three things: a durable agent runtime (inboxes, Git-inspired forkable histories, stateless workers), forkable checkpointed computers with copy-on-write memory, and verification feedback loops — plus model intelligence that only became sufficient after 2023.
GPT Engineer was the first version of Lovable's product, released in 2023. It used a chat interface in which each user message triggered a single LLM call to generate a one-page application, with a preview of the result.
Lovable is an AI-powered website and application development platform hosted at lovable.dev. It generates full-stack web applications from natural-language instructions and provides an environment for iterating on code and building consumer or enterprise software.
Vite is frontend tooling for modern web projects, developed in the vitejs organization. It combines a development server that extends native ES modules with fast Hot Module Replacement and a build command that bundles code with Rolldown into optimized static assets for production. It provides a JavaScript and plugin API with full typing support, and is distributed under the MIT license.
Searchable transcript of What it takes to set intelligence free — Fabian Hedin, Lovable — AI Engineer (22:26). Search for a phrase, then click its timestamp to jump straight to that moment in the video.
Captions sourced from the original video on YouTube, published by AI Engineer. The video, its captions and all related intellectual property remain the property of their respective owners; AINotes claims no ownership. Provided for research, accessibility and search — see the Transcript Notice and Copyright Policy.
00:01 [music] >> Welcome everyone. Glad to be here. I'm Fabian, co-founder and CTO of Lovable. And we spent the last few years or so building a platform to let anyone create software and then operate that and deploy that software. And the the topic of today is what it takes to set intelligence free. And really for us this takes us back to when we when we started three years ago.
00:41 And I have to say I have a bit of a complicated relationship with agents. And I'll tell you why. We almost failed as a company because we thought back in 2023 that hey, we these agents are the future, so let's build for them now. I think they we kind of turned out to be true that they were the future, but we were definitely wrong on the now piece in 2023.
01:07 So this was back in kind of GPT-4 days. And at the at that time the intelligence was simply not there to have more of these kind of complex agentic systems. But now it is, right? Now now the intelligence is actually at a place where where you can really build out more complicated systems around them. And so I'll give you kind of a quick background story here of of our journey in in working with intelligence or or these LLMs.
01:39 And so back in 2023 we built the first version of our product. We called it GPT Engineer back then. And really the UI was very similar to what it is today where you kind of have a chat and in this preview. But the AI at that point was quite simple. We just had a prompt and a one LLM call per user message. Very simple. It worked fine. But you could kind of build one page apps and and simpler applications with this.
02:11 And then we thought, okay, this intelligence is going to keep on evolving, so we have to be ready for for it as it evolves. And so we thought, let's go out and build this agentic framework. And so we we went and we built this very sophisticated, dare I say, beautiful framework for for agents to work. And we had kind of this one main agent that would talk to the user, and that agent would spawn other agents, like an implementation agent here in the example.
02:39 And each agent could have a speciality. This agent would kind of specialize in the first generation of an app, and then you would have like a front-end agent and a back-end agent. And they would all talk to each other, send messages back and forth. And we thought, oh, this is beautiful, and there was papers around this and how well this could work. And in the end it it didn't work at all.
02:58 We just made the product worse. We we definitely failed [clears throat] [laughter] on this one. But luckily, before we ran out of money, we figured out like, hey, let's go back to a simpler system again. So in late 24 we went back to a much simpler system where it was a bit of a shame where we had like some some smaller LLMs doing some knowledge retrieval and then really just one main LLM kind of writing to the user and and writing the code in the same message.
03:26 And this worked great. It was very responsive for for users in the UI, and it was reliable, and users were kind of in it and in iterating with with the model. And so close that down. But now it's time again. We're back. We're so back. Agents this time, they work. And we're running them in production over a billion tokens per minute on on on these systems that I'm going to talk about.
03:56 But first, just looking at, okay, what is actually lovable? So uh if you simplify the UI, and this was same back in 2023 as it is today, uh to the left we have a chat where humans come in and they kind of describe their their intents to to build or whatever they want to do, and to the right you have a preview, uh which is the output or or the outcomes of of what you're building.
04:20 Um and this back in 2023 you could do simpler things with, right? But now we've really seen working at this layer of abstraction you're able to build very complex things, right? And I think we've even seen uh a lot of tooling meant for for developers for example moving to this type of interface where you're not really looking at the code every day and so on and you're getting kind of abstracted and working on on be architecture or looking at some kind of output of of what you're doing.
04:49 And um this is something that we've always believed in and it's been kind of a core thesis behind Lovable that you won't have to care about the code in in the same way uh that you had had to do before. And I think today we're kind of in this almost a bit in between I think in the industry where you know some people might say oh you don't have to care about code at all and some people might have different opinions um um I of course like growing up coding and these things you get a bit attached, uh but in the end what
05:18 matters is is actually not the code. Um sorry I thought we removed that last part but what what matters is is the outcomes, right? Um and so um the outcomes what is that? Well for for our users the outcomes is um creating a business and monetizing and creating value for for others in in in some type of way. And I'll kind of quickly go over um what we build as a platform to to enable this before I go in kind of on the uh on the technical side of this talk.
05:51 So if you if you look at Lovable the first thing that that you can say about the platform is that we have this agent and like any other agent it can do quite arbitrary things and it's quite specialized at at building software and it has access to a browser so it can verify what it's building and it connects to to GitHub and you know it writes code that and you can do whatever you want with that code.
06:16 So so that's kind of your basic coding coding agent. And the the other pieces of the platform is is kind of cloud and and business piece of the platform. And so the cloud part of the platform is is about just giving kind of these hosting primitives just seamlessly to to this agent. And so we we built out databases of authentication, storage, all the types of backend compute and security scanners and like backups and logs for all of these things and all of it can be inspected by by the agent.
06:49 And this just makes it seamless to to build things. you don't have to kind of go to different services to set this together. We just kind of provide you these primitives. So that's still around building software and hosting this, right? But then the last piece is around these business capabilities where again the output of what our users are doing on Lovable, we don't see that output as code.
07:10 The output is is a product or or a business. And if you want to succeed as a business, you need to do more things than just write code, right? And so we we we we help our users with receiving payments, sending emails, optimizing SEO, doing ads on on Google and Meta, and kind of analyzing what is happening with the product through through analytics and you can look at kind of conversions and and optimize these sort of things.
07:37 And the agent is in the loop in all of this, right? So that's kind of our capability offering, you could say. And again, the core part of this is an agent that all of these capabilities are built for. And at some point in Lovable's history, we used to limit our agents to work for only 30 minutes because we thought they weren't reliable to to work for a longer amount of time.
08:03 But now we've changed this to really be without any any sort of bound in terms of the length an agent can work. And so you can imagine agents working for for 10 hours plus. Um, and so I'll I'll go into some of the things that we've done in our architecture to to enable this. And so the first piece is really around the agent runtime itself and how how we enable that to to run for a longer amount of time.
08:27 And the second piece is the computer where each of these agents are actually doing their work, running a dev server, and actually verifying what it's doing. And so so the last piece then is the verification itself where if you want an agent to to work for a long amount of time, you need to make sure that you have these feedback loops in place so that it's not kind of going off in in in the wrong direction.
08:52 Um, and so if we start by looking at the agent runtime itself, you can imagine that you have really three different sources that can interact with an agent. So it can be yourself kind of prompting this or a human. It could be other agents and it could also be just a system on on a schedule waking up. And the way we chose to architect this is that for for each agent we have a separate inbox where any of these sources would kind of send in messages.
09:23 And so you might have a message here like what's the status. And you can imagine you have this agent and this agent is kind of an always on agent that that might be working, right? And so you can imagine it has done like three actions here, a request, a tool call, and it got some some result. And then at this point the agent is ready to actually receive messages.
09:41 So since anyone can drop a message into this inbox, the agent then can copy that itself into its own what we call a trajectory. Basically it's a task history. And this is the type of interaction that I think you're familiar with if if you're using agents overall. So that's kind of the the first design principle behind this agent runtime. I'll go through a few more here.
10:06 And so um the the trajectory in which the the agent is working in, which is kind of the history of what has happened so far, um and really the basis for any sort of of memory for for for the agent, right? Um and we designed this trajectory with really Git as inspiration. And so the trajectory, what is it? It's an append-only log where each event points towards a parent, the previous event.
10:36 Um and because of this, you get a nice capability just like in Git where you can fork things, right? So you can have two events pointing to the same parent, which essentially creates a fork. Um and because of that, you can kind of spin up parallel agents at at any point of time in the history without having to duplicate all of the kind of the shared history.
10:59 Um and semantically, it's a bit unclear what would happen if you merge this. So unlike Git, we cannot merge agent directories, but we can kind of spawn them out, right? And these agents can can talk to each other. Um the other thing that we made sure to design for is that this agent trajectory, it includes kind of the full history and everything that happens with the agent.
11:23 And so every tool call, a bunch of other things happening on the platform, if a tool call like failed or succeeded, um a bunch of things that might not be fully relevant for a prompt. But then what we've done is make sure that we have this append-only log. And and from that, we can actually build a prompt that we would feed into into the actual LLM.
11:44 And you might ask, why why why would you want to do this? Well, one one reason is that when you build a prompt, you if you have a long history, you probably want to do some sort of compaction and you want to summarize part of that history in in the earlier steps, for example. But this summarization would differ. For example, if you use different models with different context lengths, you would probably think differently about when you should summarize and not.
12:08 And so by separating the the prompt from the actual task history, we're able to render prompts for for any type of model or or any type of task that that we can kind of find the best and optimal prompt for. So to show this event history in in progress, we have this debug tool here. So here it's just recording of me dragging this slider in our UI and you can see on the right that the UI is kind of updating as I'm as I'm dragging this along and you have 156 events here and one each of those is an event in this event
12:43 history. And you can see how how the UI can render kind of any point in history and this is just showcasing that at any point in time we have full control of of say the UI or or anything else happening on the this platform thanks to this history kind of detailing everything that has happened. Then the last piece I'll go over here on the on the on the runtime itself is that the process that is running these agents, they're separate from from the actual task history.
13:14 And so the process is almost entirely stateless in that between each each call, each tool call, each turn, it will actually just persist into the task history. And so you can have a process come and go. And and then the question is why why do we care about this? Well, at Labbable this system we deploy to it 700 times per day. So that's about once every two minutes.
13:39 And you can imagine if you have a agent working for for 10 hours, you want to not disrupt that agent when it's working, right? This this agent is doing something for for a customer. But at the same time we want to make sure that this agent is running on the latest deploy. And it might be a new feature or something like that, but it might also be like a security vulnerability in in the Linux kernel.
14:05 And it's like okay, we need to update this ASAP. And and so to do that thanks to this separation between the actual history and and the processes, we can actually make sure that we have one one agent that is working on one task, but we can have different processes taking up and actually doing the compute behind that work. So so this task can keep on working while we have different deploys working on it, be it for 10 hours or or even longer, right?
14:35 So that's the agent runtime. The second piece of of this platform, right, is the is the computer. So this is where the work is actually happening. And we've been through a lot of iterations and a lot of vendors kind of working with providing these sandboxes for for the computer for for the agent to work in. And we've landed in in the system that we've worked really hard now to develop, which is checkpointing a computer.
15:03 And so you can imagine you come to you start a new project. We have this common what we call a golden checkpoint, which contains the OS and the system services. It has common tools installed and a dev server that is ready to start. And this checkpoint it includes everything on disk, memory, and also running processes. And and so when you start a new project, you get all of that for free.
15:25 And all of that is copied over in about 230 milliseconds. And so once you start a project, you you might have some specific code and and some dependencies within that project. And that is also checkpointed as you go. And and so each time the the agent is running and it finishes a turn, we will actually save a checkpoint of that computer. And and from that we're able to again like very quickly subsecond spin that computer up whenever you need it.
15:58 That means we can save on on resources by kind of spinning this down if you leave for say 10 minutes or or so and come back, we can just spin it up extremely quickly so you don't even notice this. And even kind of requests in transit will will not even be dropped in in this setup. The other thing we can do thanks to this checkpointing is that just like the trajectory itself in the aided runtime, we can also fork the computer.
16:25 And when we do this, we have for example we have a feature in in level that is called drafts where you kind of work in different environments of what you're doing and and to support that we need to fork the computer that you're working in. And here we have kind of the example of doing two at the same time and you can imagine doing hundreds of these, right?
16:50 And so we've we've had to do some optimizations to make this feasible to to actually run. So one of these optimizations is copy on write on the RAM itself. And so creating one of these forks of our computer is is basically free in terms of of the RAM that it's using. But as soon as you start writing in in a process to to RAM, we will kind of copy that page over and only then will you start having to allocate new memory.
17:21 And and there's another optimization here also which is that each of these sandboxes they require a few hundreds of megabytes of memory. But and that would take a few seconds to stream in if you have it in like cold object storage and then it has to go to disk and then then into memory of this this VM. But thanks to being able to stream the memory, we can actually boot up the the machine before all of the memory is is actually ready on it.
17:50 So the the memory the OS uses comes first and then like some processes and so on will will start to work as soon as the memory gets here. And this also shapes off some some extra startup time. And then we started asking ourselves, how can we make this even more efficient and even more faster for our users? And so you might be familiar with V8. This is great dev server that most of the meta frameworks out there in the JavaScript ecosystem is using.
18:15 And so we we took that and we forked it and we rewrote it in in Rust. And that made our code starts two times faster, and we went from getting this preview from 40 seconds to three seconds. And the main kind of thing that we made faster is that V2 uses Node.js, and we're able to like drop that dependency of V itself and just have this Rust binary. So that made the memory footprint be 6.5 times less in these machines.
18:42 And by taking control of the applications that we're running in these computers, we're also able to control kind of how we write to memory. And so when we control how we write to memory, we're even more optimizing, if you remember back to the kind of the copy-on-write solution when we're drafting different different computers. And so we're able to run this extremely efficiently so that we can run lots and lots of agents in in parallel and kind of have agents explore different solutions to solving a bug or improving the
19:11 performance of of your applications and and so on. And so this has been fun. [laughter] But the last piece now is is about verification. And of course this kind of computer and this dev service a big piece of being able to verify what an agent is doing. And if you look at verification, you can think of these feedback loops, right? That the agent needs to get information.
19:35 It took an action. Was this a good action or was it a bad action? And you can think of it as this inner loop and this outer loop. So this inner loop is during the turn of the agent. And you have kind of obvious things such as like the is the build working? Do we have lint errors or type errors in the code that we're running? And then you can check for runtime errors in in the preview that you're running.
19:54 You can also have within this computer a headless browser where the agent can go in and kind of explore the the web app it's it's building or whatever it's building, right? And and a bunch of other things that we're using to help verify within the turn of an agent. But then you also have this outer loop which is kind of between each turn. And a turn you can think of like when the agent is yielding to you as a user.
20:18 And between each turn you might get some info on on the product itself from production from your users, right? And so you can look at how your visitors are behavior behaving, what users are telling you online. You can do automatic A B tests and actually see change some copy and see if it's improving conversion and so on. And then you can also take these business metrics and remember this goes back to kind of the capabilities I showed you.
20:42 By having control over these things we can make sure that we can optimize how the agent is is getting this outer feedback loop so we can make sure that if you're running payments we can actually track those transactions and conversions and make sure that the agent can actually help you optimize not only the the code, right? But the business strategy around around your product.
21:08 And so those are really the the three things that that we've been working for and we'll continue to kind of build out these these capabilities and these architecture around really orchestrating these LLMs into into agents. And so this agentic system that we're building it's running billions of tokens per minute and these computers, right? We can spawn up with each agent and we can have multiple agents use one computer and now we're kind of back to this quite beautiful setup where you have agents talking to agents and
21:41 they're orchestrating and and this time it's it's actually working and it's working at scale thanks to some of these optimizations. And so if you're curious to try this out you can head to lab.dev and you'll you'll see our preview spinning up and so on but you'll get a very simple and a nice interface and you won't have to care about all of this stuff. Thank you so much. It's been pleasure and yeah hope you hope you learned something. Thanks so much.