agent architecture lessons from failure

Lovable scraps multi-agent complexity, rebuilds on append-only logs and stateless forks at 1B tokens/min AI Engineer
TL;DW
  • Lovable built sophisticated multi-agent systems in 2023 but failed; GPT-4 era lacked sufficient intelligence. Returned to simpler architecture in late 2024, now successfully running agents at scale with 1B+ tokens/minute in production.
  • Agent runtime separates task history (append-only log inspired by Git) from stateless processes, enabling 700 daily deploys without disrupting long-running agents working 10+ hours.
  • Checkpoint-based computer infrastructure copies full OS, memory, and processes in 230ms; forking is nearly free via copy-on-write RAM, allowing parallel agent exploration.
  • Custom Rust-based dev server (V2 fork) reduced code startup from 40 to 3 seconds and decreased memory footprint by 6.5x versus Node.js V8.
  • Inner feedback loops verify builds, lint/type errors, runtime errors, and browser exploration during agent turns; outer loops use production metrics (conversions, user behavior, A/B tests) between turns.
  • Platform integrates hosting primitives (databases, auth, storage, security scanners) directly accessible to agents, eliminating need to wire separate services.
  • Trajectory system forks agents without duplicating shared history; agents can spawn at any point in task history and communicate with parallel variants solving different approaches.
  • Separating trajectory from LLM prompts enables model-specific optimization: different context lengths trigger different summarization strategies for the same event history.
  • Originally limited agents to 30-minute work windows; removed time bounds after architectural improvements proved reliability for extended autonomous operation.
  • Platform treats agent outputs as business products, not code; capabilities include payments, email, SEO optimization, ad management, and analytics integration within agent control loop.

After a failed 2023 bet on sophisticated multi-agent systems, Lovable rebuilt around a Git-inspired event log, copy-on-write sandbox forking, and a Rust dev server that cut startup from 40s to 3s and memory 6.5×. The architecture now powers 700 deploys daily with 10+ hour agent runs.