The next evolution of Software Factories: Learning Labs

Agents & AI systemsessay
A software factory turns a spec into code. A learning lab uses traces, tests, and failures from that run to improve the agent's memory, harness, or weights.

In a blog post about "An IDE for Ideas" from from Feb 2025, I wrote,

Our current chat UX is outdated. It’s a clunky back and forth that won’t scale for complex or long running tasks. We need a new framework — one that treats coding tasks like data pipelines, with built in measurement, monitoring, and auto recovery.

With @pidotdev, @claudeai and @openai codex, managed agents, cloud CIs, software factories having become du jure, software engineers are no longer judged by the code they write, but the harnesses they build to produce and improve their code.

But what's next for engineers? Consider what's happening already,

We're moving away from treating models as fixed artifacts surrounded by "programmable" scaffolding to looking at the entire system as something we can experiment on and improve. The lines between model training, building harnesses, and software engineering are blurring!

A software factory takes a spec and produces software.

A learning lab should do something more interesting - it should take the experience of producing software, and improve the system that produced it.

Consider an agent using Qwen3.5 that repeatedly produces incorrect code because it misunderstands the way an API works. Today,

  • It writes tests, analyzes those tests, figures out whats failing
  • Updates the code based on this, and then re-runs everything
  • Stores this instruction in an agents.md file and moves on

But that same agent using the same model outside of that agents.md context will make the same mistake. What if this could be used to update the Qwen model itself?

The learning lab would take the task, execution traces, tool calls, code changes et al, and test which intervention works, verify that it can generalize, and then retains the improvement in some way.

This requires a different kind of infrastructure -- execution traces become experimental evidence, evals become the means of selecting improvements, and memory becomes a core mechanism to change future behavior. The entire system becomes the main object of experimentation, rather than a loose collection of prompts and tools that engineers modify by intuition.

The most interesting question here is - what should an agent learn, and where should that learning live? Not every failure when writing code or executing a workflow needs a model weight update. Some failures will need better code, others more precise memory, or an update to the harness itself. An improvement at one thing though, may make another thing worse.

I've set up a personal, agent assisted research lab called Hex where agents can examine their own execution histories, identify recurring failures, propose changes to their memory, harnesses or model weights, and test whether those changes actually improve performance on unseen tasks.

In my next post, I'll walk through the architecture of the lab, the research questions I'm starting with, and the experiments I want to run.

A software factory produces software. A learning lab should produce a better software factory.

Originally posted on X.