What it takes to set intelligence free — Fabian Hedin, CTO, Lovable
Description
Lovable nearly failed after building a sophisticated multi agent framework, Fabian Hedin says. At CODE Summit 2026, its CTO explains what changed: durable agent runtimes, Git inspired histories and forkable computers that support long running coding agents. Sandbox checkpointing, copy on write memory, a Rust rewrite of Vite and verification feedback loops connect reliable software generation to product and business outcomes. Speaker info: - https://x.com/FabianHedin - https://www.linkedin.com/in/fabian-hedin-2377b0144 - https://github.com/lovablelabs/oj Timestamps: 0:00 - Why Lovable's first agent framework failed 3:52 - Building products and business outcomes 7:48 - Removing the limits on agent runtime 8:51 - Inboxes and agent communication 10:06 - Git inspired histories and agent forks 11:10 - Separating prompts from task history 13:03 - Stateless workers and uninterrupted deployments 14:30 - Checkpointing computers and fast resume 16:16 - Forking sandboxes and copy on write memory 18:02 - Rewriting Vite in Rust 19:13 - Inner verification and feedback loops 20:07 - Product feedback and business metrics
Summary
Generated by gpt-5.6-terraAt-a-Glance
- Verdict: Watch fully
- Core thesis: Long-running production agents become viable not through elaborate multi-agent choreography alone, but through durable event histories, stateless/resumable execution, cheap checkpointed computers, and continuous verification loops.
- Why it matters: Lovable offers a concrete control-plane architecture for agents that can run for 10+ hours, survive frequent deployments, fork into parallel workspaces, and optimize business outcomes rather than merely emit code.
- Best use: Use this as an architecture reference for designing durable agent runtimes and isolated execution environments; extract the event-log, checkpointing, and verification patterns rather than treating it as a generic coding-agent pitch.
Executive Summary
Fabian Hedin frames Lovable's current agent system as the second attempt after an early failure. In 2023, the company built a sophisticated hierarchy of communicating specialist agents around GPT-4, but it made the product less reliable because model capability was insufficient. Lovable recovered by reverting to a simpler late-2024 chain: lightweight retrieval plus one primary model that both communicated with the user and wrote code. His central argument is that agents now work because model intelligence has crossed a threshold, but production reliability still depends on the surrounding systems.
Lovable's platform is built around an agent that can write and verify software, plus tightly integrated cloud primitives—database, authentication, storage, compute, security scanning, backups, and logs—and business capabilities such as payments, email, SEO, advertising, analytics, and conversion measurement. The strategic distinction is that Lovable regards the output as a business or product, not code; the agent should eventually improve commercial outcomes as well as implementation quality.
The runtime design treats an agent's full history as an append-only, Git-like event log, while rendering model-specific prompts separately from that source-of-truth history. Agents receive human, agent, or scheduled-system messages through individual inboxes; the process executing work is largely stateless and can be replaced without losing the task. This enables long-running work to persist while Lovable deploys roughly 700 times per day.
The execution layer is a checkpointed computer rather than an ephemeral sandbox. A reusable golden checkpoint containing an OS, tools, services, and ready dev server can be copied in about 230 ms; project state is checkpointed after agent turns and restored in under a second. Copy-on-write memory and streamed memory loading make large-scale environment forks economical. Finally, Lovable closes the loop through in-turn technical checks—build, lint, types, runtime, and browser validation—and between-turn product feedback such as user behavior, A/B tests, transactions, and conversions. The claimed scale is billions of tokens per minute.
Key Takeaways
- Claim: The right agent architecture is capability-gated: Lovable's first multi-agent design failed because 2023-era models could not reliably support complex orchestration, while a simpler system worked until model capability improved. | Evidence: Lovable initially used a primary agent that spawned specialized implementation, frontend, and backend agents that communicated with one another; Hedin says it 'didn't work at all' and worsened the product. In late 2024 it reverted to smaller models for retrieval plus one main model for user communication and coding, which was responsive and reliable. | Implication: Do not begin with specialist-agent hierarchies by default. Establish a strong single-agent baseline, then add parallelism or delegation only where it produces measurable gains in quality, latency, or task coverage. | Caveat: This is a company-specific retrospective rather than a controlled comparison, so it does not establish that multi-agent architectures are generally inferior; the point is that orchestration complexity must match model reliability.
- Claim: A durable append-only task history should be the agent's source of truth, while the LLM prompt should be a separately rendered, model-specific view of that history. | Evidence: Lovable represents a trajectory as an append-only event log whose events point to parents, inspired by Git. It records tool calls, results, failures, and platform events, then compacts or renders the appropriate prompt separately depending on model context length and task needs. | Implication: For an agent control plane, preserve raw execution provenance independently of prompt construction. This supports auditability, replay/debugging, changing models or context windows, and branching work without treating a single conversation transcript as canonical state. | Caveat: Lovable can fork histories but says the semantic meaning of merging divergent agent trajectories remains unclear, so it does not attempt Git-style merges.
- Claim: Long-running agents require execution processes to be replaceable and mostly stateless, with durable state persisted between calls and turns. | Evidence: Lovable separates the agent process from its trajectory; between calls, tool calls, and turns, the process persists state into task history. Hedin says this lets agents continue tasks lasting 10 hours or longer despite roughly 700 production deployments per day, including urgent security updates. | Implication: Design agents as resumable workflows rather than resident processes. A deployment, worker crash, scaling event, or security patch should transfer execution to a new worker without corrupting or abandoning customer work.
- Claim: Checkpointed execution environments make persistent agent computers fast enough and cheap enough to support interactive work and extensive branching. | Evidence: A common 'golden checkpoint' includes the OS, system services, installed tools, and ready dev server; Lovable reports copying it to a new project in about 230 ms. It checkpoints project-specific state after each agent turn, restores it in sub-second time, and uses copy-on-write RAM so forks consume material additional memory only after writes. | Implication: If agents need browsers, dev servers, or stateful tools, optimize environment lifecycle as a first-class product constraint. Checkpoints, lazy restoration, and copy-on-write forking can be more useful than repeatedly rebuilding disposable sandboxes. | Caveat: The stated latency and resource results depend on Lovable's purpose-built environment and workload; they are not automatically transferable to arbitrary container or VM stacks.
- Claim: Owning the critical execution stack can yield compound gains in agent latency, memory use, and parallel-search capacity. | Evidence: Lovable forked Vite and rewrote it in Rust, removing its Node.js dependency. Hedin reports preview startup improving from 14 seconds to 3 seconds and a 6.5x lower memory footprint; controlling memory-write behavior further improves copy-on-write efficiency across forked environments. | Implication: Profile the few components that dominate agent-loop latency or environment cost. If a generic dependency constrains throughput at scale, selectively replacing it can unlock more parallel agents and a materially better user experience. | Caveat: This level of infrastructure specialization has significant engineering cost and is justified mainly when development-server startup and sandbox density are core bottlenecks.
- Claim: Verification must operate both inside an agent turn and across turns using real production and business feedback. | Evidence: Lovable's inner loop checks builds, lint/type failures, runtime errors, and uses a headless browser to inspect the app. Its outer loop incorporates visitor behavior, user feedback, automatic A/B tests, payment transactions, conversion data, and analytics available through Lovable's integrated platform. | Implication: Do not define agent success as a completed tool call or syntactically valid code. Build layered evaluators that connect execution correctness to user-visible behavior and, where authorized, to commercial outcomes. | Caveat: Business-metric optimization can create harmful local optimization if metrics, experiment guardrails, permissions, or rollback controls are poorly designed; the talk does not detail governance for autonomous changes.
- Claim: The platform's strategic abstraction is an outcome-producing business, not a code generator. | Evidence: Beyond code generation and GitHub/browser access, Lovable exposes hosting, databases, authentication, storage, security scanners, backups, logs, payments, email, SEO, Google and Meta ads, and analytics to the agent. Hedin argues users care about monetization and value creation rather than code itself. | Implication: Agent products gain leverage when the agent has controlled access to the full action-and-feedback surface around an objective. Tool integration should be selected around the end-state the operator wants, not around a narrow generation task.
Detailed Brief
Runtime interaction and observability model
- Claims: Each agent has a distinct inbox that can receive messages from humans, other agents, or scheduled system triggers.; The agent decides when to incorporate inbox messages into its own trajectory, allowing an always-on worker to accept new inputs without making its live process the system of record.; The complete event history can drive a debug interface that reconstructs UI and platform state at prior points in execution.
- Evidence: The talk illustrates an incoming 'what's the status?' message being copied into an agent's trajectory after the agent has completed actions and is ready to receive it.; A demonstrated debug view contains 156 events and updates the UI as a slider moves through historical states.
- Caveats: The transcript does not explain inbox prioritization, concurrency handling, idempotency, or authorization boundaries when humans, schedulers, and agents all write to the same task.
- Implications: A replayable event stream is useful not only for model context but also for operations: incident analysis, customer support, state inspection, and deterministic reconstruction of what an agent did.
Execution-environment lifecycle optimizations
- Claims: Lovable can suspend inactive computers and restore them quickly enough that users need not experience a noticeable restart.; Memory streaming allows boot to begin before an entire sandbox image has arrived from storage, prioritizing memory needed immediately.; Environment forks support parallel drafts and can support many alternative agent approaches to the same bug or performance problem.
- Evidence: Hedin gives the example of spinning down a machine after roughly 10 minutes of inactivity while preserving in-flight requests during the checkpointing setup.; He notes that sandbox images require hundreds of megabytes of memory, which would otherwise take seconds to fetch from cold object storage, write to disk, and load into a VM.
- Caveats: The presentation provides no pricing, failure-rate, isolation/security, or storage-retention details for checkpoint persistence at the claimed scale.
- Implications: For interactive agent products, perceived responsiveness is an architectural requirement: cold-start avoidance, suspension, and restoration should be measured alongside model latency.
Notable Concepts & Terms
- Trajectory: Lovable's durable agent task history: an append-only event log containing actions, tool results, failures, and other platform events.
- Prompt rendering: The practice of deriving a model- and task-specific context window from canonical task history rather than storing the prompt itself as durable memory.
- Git-like branching: Events share parent history, enabling agent branches to begin from the same prior state without duplicating all historical context; Lovable explicitly avoids merging branches.
- Golden checkpoint: A prebuilt computer snapshot containing the OS, services, tools, and a ready development server, used as the fast starting point for new projects.
- Copy-on-write RAM: Forked computers initially share memory pages and allocate copies only on modification, reducing the cost of parallel draft environments or agent exploration.
- Inner and outer verification loops: Inner-loop checks validate technical execution during a turn; outer-loop feedback uses production behavior and business metrics between turns to guide subsequent work.
- Stateless agent process: A replaceable worker that persists task state externally after calls and turns, allowing deployments and failures without losing long-running work.
- Outcome-oriented agent platform: Lovable's view that the agent should build and optimize a monetizable product using integrated technical and commercial capabilities, not simply generate code.
Operator Notes / Why Ken Should Care
- Adopt an append-only event schema for agent runs that captures inputs, model decisions, tool calls, outputs, errors, approvals, and environment checkpoints; make prompt assembly a derived function rather than persisted state.
- Set a resilience requirement for any long-running agent: work must survive worker replacement, deployments, and retries without duplicate side effects; test this through forced interruption scenarios.
- Evaluate checkpointable execution environments for tool-using agents that need browsers, shells, dev servers, or persistent workspaces; benchmark restore time, fork cost, and storage overhead before committing to generic sandbox vendors.
- Add a two-tier evaluation design: deterministic technical checks during execution, then explicit product or business feedback signals between runs, with approval gates and rollback rules before allowing autonomous production changes.
- Avoid adding multi-agent delegation until a single-agent workflow has measurable bottlenecks; require each additional agent role to justify its coordination cost with a defined success metric.
- Investigate the unresolved branch-merge problem before exposing parallel agent drafts as a general workflow; favor comparison, selection, or human-approved adoption of a branch over automatic semantic merging.
Source/Metadata
- Title: What it takes to set intelligence free — Fabian Hedin, CTO, Lovable
- Transcript words: 5878
- Duration seconds: 1345
- Timestamp note: No usable timestamps or chapter markers were present. The supplied transcript also repeats a substantial portion of the latter half and includes minor extraction artifacts.
Transcript
resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant resonant The topic of today is what it takes to set intelligence free. Really, for us, this takes us back to when we started three years ago. I have to say that I have a complicated relationship with agents. And I'll tell you why. We almost failed as a company because we thought back in 2023 that agents are the future, so let's build for them now. I think we turned out to be true that they were the future, but we were definitely wrong on the now piece in 2023. So this was back in GPT-4 days. And at that time, the intelligence was simply not there to have more of these complex agentic systems. But now it is. Now the intelligence is actually at a place where you can really build out more complicated systems around them. And so I'll give you a quick background story here of our journey in working with intelligence or these LLMs. 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 have a chat and this preview. But the AI at that point was quite simple. We just had a prompt and a response, one LLM call per user message. Very simple. It worked fine. But you could build one-page apps and simpler applications with this. And then we thought, okay, this intelligence is going to keep on evolving. So we have to be ready for it as it evolves. And so we thought, let's go out and build this agentic framework. And so we went and we built this very sophisticated, beautiful framework for agents to work. And we had 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. And each agent could have a speciality. This agent would specialize in the first generation of an app. And then you would have a frontend agent and a backend agent. And they would all talk to each other, send messages back and forth. And we thought, oh, this is beautiful. And there were papers around this and how well this could work. And in the end, it didn't work at all. We just made the product worse. We definitely failed on this one. But luckily, before we ran out of money, we figured out, 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 chain where we had some smaller LMs doing some knowledge retrieval. And then really just one main LM writing to the user and writing the code in the same message. And this worked great. It was very responsive for users in the UI. And it was reliable. And users were iterating with the model. And so let's 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 these systems that I'm going to talk about. But first, just looking at what is actually lovable? So if you simplify the UI, and this was the same back in 2023 as it is today, to the left we have a chat where humans come in and they describe their intent to build or whatever they want to do. And to the right you have a preview, which is the output or the outcomes of what you're building. And this back in 2023 you could do simpler things with, right? But now we've really seen working at this layer of abstraction, we're able to build very complex things, right? And I think we've even seen a lot of tooling meant 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 attracted and working on the architecture or looking at some output of what you're doing. And this is something that we've always believed in. And it's been a core thesis behind Lovable that you won't have to care about the code in the same way that you had to do before. And I think today we're in this almost in between, I think, in the industry where some people might say, oh, you don't have to care about code at all. And some people might have different opinions. And I, of course, growing up coding and these things, you get a bit attached. But in the end, what matters is actually not the code. Sorry, I thought we removed that last part. But what matters is the outcomes, right? And so the outcomes, what is that? Well, for our users, the outcomes is creating a business and monetizing and creating value for others in some type of way. And I'll go over what we build as a platform to enable this before I go on the technical side of this talk. So if you look at Lovable, the first thing 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 building software. And it has access to a browser so it can verify what it's building. And it connects to GitHub. And it writes code. And you can do whatever you want for that code. So that's your basic coding agent. And the other pieces of the platform is this cloud and business piece of the platform. And so the cloud part of the platform is about giving these hosting primitives seamlessly to this agent. And so we built out databases, authentication, storage, all the types of back-end compute and security scanners and backups and logs for all of these things. And all of it can be introspected by the agent. And this just makes it seamless to build things. You don't have to go to different services to set this together. We just 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 the output of what our users are doing on Lovable, we don't see that output as code. The output is a product 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 help our users with receiving payments, sending emails, optimizing SEO, doing ads on Google and Meta, and analyzing what is happening with the product through analytics. And you can look at conversions and optimize these sort of things. And the agent is in the loop in all of this, right? So that's our capability offering, you could say. 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 work for a longer amount of time. But now we've changed this to really be without any sort of bound in terms of the length an agent can work. And so you can imagine agents working for 10 hours plus. And so I'll go into some of the things that we've done in our architecture to enable this. And so the first piece is really around the agent runtime itself and how we enable that to run for a long amount of time. And the second piece is the computer where each of these agents are actually doing their work, running a dev server, and then actually verifying what it's doing. And so the last piece then is the verification itself where if you want an agent 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 going off in the wrong direction. 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 prompting this or a human. It could be other agents. And it could also be just a system on a schedule waking up. And the way we chose to architect this is that for each agent, we have a separate inbox where any of these sources would send in messages. 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 an always on agent that might be working, right? And so you can imagine it has done three actions here, a request, a tool call, and it got some result. And then at this point, the agent is ready to actually receive messages. 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 task history. So it can be yourself prompting this or a human. It could be other agents. And it could also be just a system on a schedule waking up. And the way we chose to architect this is that for each agent, we have a separate inbox where any of these sources would send in messages. 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 an always on agent that might be working, right? And so you can imagine it has done three actions here, a request, a tool call, and it got some result. And then at this point, the agent is ready to actually receive messages. 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. It's task history. And this is the type of interaction that I think you're familiar with if you're using agents overall. So that's the first design principle behind this agent runtime. I'll go through a few more here. And so the trajectory in which the agent is working in, which is the history of what has happened so far, and really the basis for any sort of memory for the agent, right? And we designed this trajectory with 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. 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. And because of that, you can spin up parallel agents at any point of time in the history without having to duplicate all of the shared history. And semantically, it's a bit unclear what would happen if you merge this. So unlike Git, we cannot merge agent trajectories, but we can spawn them outright and these agents can talk to each other. The other thing that we made sure to design for is that this agent trajectory includes the full history and everything that happens with the agent. And so every tool call, a bunch of other things happening on the platform if a tool call failed or succeeded, and a bunch of things that might not be fully relevant for a prompt. But then what we've done is to make sure that we have this append only log. And from that, we can actually build a prompt that we would feed into the actual LLM. And you might ask, why would you want to do this? Well, one reason is that when you build a prompt, if you have a long history, you probably want to do some sort of compaction. You want to summarize part of that history 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 or not. And so by separating the prompt from the actual task history, we're able to render prompts for any type of model or any type of task that we can find the best and optimal prompt for. So to show this event history in progress, we have this debug tool here. So here it's just a recording of me dragging this slider in our UI. And you can see on the right that the UI is updating as I'm dragging this along. And you have 156 events here. And each of those is an event in this event history. And you can see how the UI can render any point in history. And this is just showcasing that at any point in time, we have full control of the UI or anything else happening on this platform, thanks to this history detailing everything that has happened. The last piece I'll go over here on the runtime itself is that the process that is running these agents is separate from the actual task history. And so the process is almost entirely stateless in that between each call, each tool call, each turn, it will actually just persist into the task history. And so you can have a process common goal. And then the question is, why do we care about this? Well, at Lovable, this system, we deploy to it 700 times per day. So that's about once every two minutes. And you can imagine if you have an agent working for 10 hours, you want to not disrupt that agent when it's working, right? This agent is doing something 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 the Linux kernel. And it's like, okay, we need to update this ASAP. And so to do that, thanks to this separation between the actual history and the processes, we can actually make sure that we have 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 this task can keep on working while we have different deploys working on it, be it for 10 hours or even longer, right? So that's the agent runtime. The second piece of this platform, right, 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 working with providing these sandboxes for the computer for the agent to work in. And we've landed in the system that we've worked really hard now to develop, which is checkpointing a computer. And so you can imagine you come to Lovable, 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 includes everything on disk, memory, and also running processes. And so when you start a new project, you get all of that for free. And all of that is copied over in about 230 milliseconds. And so once you start a project, you might have some specific code and some dependencies within that project. And that is also checkpointed as you go. And so each time the agent is running and it finishes a turn, we will actually save a checkpoint of that computer. And from that, we're able to, again, very quickly, sub-second, spin that computer up whenever you need it. That means we can save on resources by spinning this down if you leave for, say, 10 minutes or so and come back. We can just spin it up extremely quickly so you don't even notice this. And even requests in transit will not even be dropped in this setup. The other thing we can do thanks to this checkpointing is that just like the trajectory itself in the agent runtime, we can also fork the computer. And when we do this, for example, we have a feature in Lovable that is called drafts where you work in different environments of what you're doing. And to support that, we need to fork the computer that you're working in. And here we have the example of doing two at the same time. And you can imagine doing hundreds of these, right? And so we've had to do some optimizations to make this feasible to actually run. So one of these optimizations is copy on write on the RAM itself. And so creating one of these forks of a computer is basically free in terms of the RAM that it's using. But as soon as you start writing in a process to RAM, we will copy that page over. And only then will you start having to allocate new memory. And there's another optimization here also, which is that each of these sandboxes require a few hundreds of megabytes of memory. And that would take a few seconds to stream in if you have it in cold object storage. And then it has to go to disk and then into memory of this VM. But thanks to being able to stream the memory, we can actually boot up the machine before all of the memory is actually ready on it. So the memory that always uses comes first. And then some processes and so on will start to work as soon as the memory gets there. And this also shaves off 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 Vite. It's this great dev server that most of the meta frameworks out there in the JavaScript ecosystem is using. And so we took that and we forked it and we rewrote it in Rust. And that made our code starts two times faster when we went from getting this preview from 14 seconds to three seconds. And the main thing that we made faster is that Vite uses Node.js. And we were able to drop that dependency off Vite itself and just have this Rust binary. So that made the memory footprint be 6.5 times less in these machines. And by taking control of the applications that we're running in these computers, we're also able to control 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 copy on write solution when we're drafting different computers. And so we're able to run this extremely efficiently so that we can run lots and lots of agents in parallel and agents can explore different solutions to solving a bug or improving the performance of your applications and so on. And so this has been fun. And that made our code start two times faster when we went from getting this preview from 14 seconds to three seconds. The main thing that we made faster is that Vite uses Node.js. We were able to drop that dependency off Vite itself and just have this Rust binary. So that made the memory footprint be 6.5 times less in these machines. And by taking control of the applications that we're running in these computers, we're also able to control 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 copy on write solution when we're drafting different computers. And so we're able to run this extremely efficiently so that we can run lots and lots of agents in parallel and have agents explore different solutions to solving a bug or improving the performance of your applications and so on. And so this has been fun. But the last piece now is about verification. And of course, this computer and this dev service is 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? The agent needs to get information. 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 obvious things such as 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 the preview that you're running. You can also have within this computer a headless browser where the agent can explore the web app it's building or whatever it's building, right? 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 between each turn and the turn you can think of as when the agent is yielding to you as a user. And between each turn, you might get some info on the product itself from production from your users, right? And so you can look at how your visitors are behaving, what users are telling you online. You can do automatic A-B tests and actually 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 the capabilities I showed you. By having control over these things, we can make sure that we can optimize how the agent 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 code, right, but the business strategy around your product. And so those are really the three things that we've been working on. And we'll continue to build out these capabilities and this architecture around really orchestrating these LMs into agents. And so this agentic system that we're building is 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 back to this quite beautiful setup where you have agents talking to agents and they're orchestrating. And this time 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 level.dev and you'll see our previews spinning up and so on. But you'll get a very simple and nice interface and you won't have to care about all of this stuff. Thank you so much. It's been a pleasure. And yeah, I hope you learned something. Thanks so much. Thanks for having me. But then what we've done is to make sure that we have this append only log. And from that, we can actually build a prompt that we would feed into the actual LLM. And you might ask, why would you want to do this? Well, one reason is that when you build a prompt, if you have a long history, you probably want to do some sort of compaction. You want to summarize part of that history 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 or not. And so by separating the prompt from the actual task history, we're able to render prompts for any type of model or any type of task that we can kind of find the best and optimal prompt for. So to show this event history in progress, we have this debug tool here. So here it's just a 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 dragging this along. And you have 156 events here. And each of those is an event in this event history. And you can see 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, say, the UI or anything else happening on this platform, thanks to this history kind of detailing everything that has happened. The last piece I'll go over here on the runtime itself is that the process that is running these agents, they're separate from the actual task history. And so the process is almost entirely stateless in that between each call, each tool call, each turn, it will actually just persist into the task history. And so you can have a process common goal. And then the question is, why do we care about this? Well, at Lovable, this system, we deploy to it 700 times per day. So that's about once every two minutes. And you can imagine if you have an agent working for 10 hours, you want to not disrupt that agent when it's working, right? This agent is doing something 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 the Linux kernel. And it's like, okay, we need to update this ASAP. And so to do that, thanks to this separation between the actual history and the processes, we can actually make sure that we have 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 this task can keep on working while we have different deploys working on it, be it for 10 hours or even longer, right? So that's the agent runtime. The second piece of this platform, right, 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 the computer for the agent to work in. And we've landed in the system that we've worked really hard now to develop, which is checkpointing a computer. And so you can imagine you come to Lovable, 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 so when you start a new project, you get all of that for free. And all of that is copied over in about 230 milliseconds. And so once you start a project, you might have some specific code and some dependencies within that project. And that is also checkpointed as you go. And so each time the agent is running and it finishes a turn, we will actually save a checkpoint of that computer. And from that, we're able to, again, very quickly, sub-second, spin that computer up whenever you need it. That means we can save on resources by kind of spinning this down if you leave for, say, 10 minutes 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 not even be dropped in this setup. The other thing we can do thanks to this checkpointing is that just like the trajectory itself in the agent runtime, we can also fork the computer. And when we do this, for example, we have a feature in level that is called drafts where you kind of work in different environments of what you're doing. 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? And so we've had to do some optimizations to make this feasible to actually run. So one of these optimizations is copy and write on the RAM itself. And so creating one of these forks of a computer is basically free in terms of the RAM that it's using. But as soon as you start writing in a process to RAM, we will kind of copy that page over. And only then will you start having to allocate new memory. And there's another optimization here also, which is that each of these sandboxes require a few hundreds of megabytes of memory. 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 into memory of this VM. But thanks to being able to stream the memory, we can actually boot up the machine before all of the memory is actually ready on it. So the memory that always uses comes first. And then some processes and so on will start to work as soon as the memory gets there. And this also shaves off 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 Vite. It's this great dev server that most of the meta frameworks out there in the JavaScript ecosystem is using. And so we took that and we forked it and we rewrote it in Rust. And that made our code starts two times faster when we went from getting this preview from 14 seconds to three seconds. And the main kind of thing that we made faster is that Vite uses Node.js. And we were able to drop that dependency off Vite itself and just have this Rust binary. So that made the memory footprint be 6.5 times less in these machines. 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 computers. And so we're able to run this extremely efficiently so that we can run lots and lots of agents in parallel and kind of have agents explore different solutions to solving a bug or improving the performance of your applications and so on. And so this has been fun. But the last piece now is about verification. And of course, this kind of computer and this dev service is 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. 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 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 the preview that you're running. You can also have within this computer a headless browser where the agent can go in and kind of explore the web app it's building or whatever it's building, right? 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 the turn you can think of like when the agent is yielding to you as a user. And between each turn, you might get some info on the product itself from production from your users, right? And so you can look at how your visitors are behaving, what users are telling you online. You can do automatic A-B tests and actually 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. By having control over these things, we can make sure that we can optimize how the agent 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 code, right, but the business strategy around your product. And so those are really the three things that we've been working for. And we'll continue to kind of build out these capabilities and this architecture around really orchestrating these LMs into agents. And so this agentic system that we're building is 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 they're orchestrating. And this time 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 level.dev and you'll see our previews spinning up and so on. But you'll get a very simple and nice interface and you won't have to care about all of this stuff. Thank you so much. It's been a pleasure. And, yeah, I hope you learned something. Thanks so much. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Thanks for having me, my goodness. Textning.nu