Retrieved article excerpt
Open article · Retrieved 2026-11-06T11:21:47.303082+00:00
A garden story
# I gave an agent a lakehouse and control of my garden
Or how to produce a €60 lettuce.
Javier de la Torre·5 November 2026
[The illustrated plan for a three-metre raised vegetable bed (in Spanish): dimensions 300 × 40 × 40 cm, a side section, a shopping list and the assembly steps.](https://jatorre.github.io/garden/img/plan.webp)
[The real bed, built: a narrow raised bed along a brick wall and a reed fence, planted with young cabbage, broccoli and lettuce over a drip line.](https://jatorre.github.io/garden/img/bed-first.webp)
From the agent-assisted plan to the actual two-square-metre garden.
Part IThe garden
I guess this is what a mid-life crisis looks like.
I started gardening.
Nothing serious. I have a small garden at home, and I carved out about two square metres on one side to grow some vegetables. I love seeing things grow and, if I can eat them afterwards, even better. I also thought it would be a nice thing to do with the kids.
Although, as I would later discover, the kids were interested for approximately two hours.
This is not an impressive vegetable garden. We’re talking about a narrow raised bed with cabbage, broccoli, lettuce and spinach: the usual things you plant going into winter.
And how did I decide what to plant? Obviously, I asked Claude.
How deep should the bed be? Claude. What soil should I buy? Claude. How far apart should the broccoli go? Claude. How much should I water it? You get the idea.
[A phone's measuring app showing 3.02 metres along a strip of lawn next to a brick edge and a reed fence.](https://jatorre.github.io/garden/img/measuring-the-strip.webp)
Step zero: the strip available for the bed measured just over three metres.
That was probably the moment things started going wrong. Because I started thinking: what else could an agent decide?
## First, give the agent some senses
Watering was the obvious one. How much water does a vegetable garden actually need?
I could follow a generic schedule (ten minutes every second day, or whatever), but that seemed a bit stupid. Why not measure the moisture in the soil?
So I bought a soil-moisture sensor. Then I thought: what about the water that appears overnight as dew? Leaf-wetness sensor. Temperature? Sensor. Rainfall? Sensor. Solar radiation? Sensor. Wind? Sure, why not.
A few clicks later I had accidentally built a fully instrumented vegetable garden.
[The weather station array, the gateway and five soil probes laid out on a rug before installation.](https://jatorre.github.io/garden/img/sensor-station.webp)
[The Ecowitt app's sensor list, with the first soil channels registered and the rest still learning.](https://jatorre.github.io/garden/img/sensor-app.webp)
[A green soil probe pushed into the raised bed next to the drip line and a young plant.](https://jatorre.github.io/garden/img/sensor-probe-bed.webp)
[A green soil probe in the lawn, beside a wooden fence.](https://jatorre.github.io/garden/img/sensor-probe-lawn.webp)
The sensor pile became real quickly: the weather station, the gateway and soil probes in both the bed and the lawn.
I went with Ecowitt. The sensors are inexpensive and battery powered, and they all talk wirelessly to a small gateway connected to the internet. Installation is ridiculously easy: put the batteries in, push them into the ground, and they show up on the gateway. Today there are eleven: eight soil probes, a weather station, a leaf-wetness sensor and the gateway’s own indoor sensor.
In total I spent something like €300 on sensors for a vegetable garden that, if everything goes perfectly, might one day produce €40 worth of vegetables. We were already approaching the €60-lettuce phase of the project.
Suddenly I could measure my garden better than many factories measure their production lines.
## Of course I mapped the whole thing
I am also a map geek, so there was no chance I was going to leave the sensors as “probe 1”, “probe 2” and “somewhere by the fence”. I opened Google Earth and pinned every soil probe, sprinkler, valve box, the weather station and the camera. Those positions went into a table, `garden.sensor_placements`, next to the readings.
[An aerial view of the lawn with pins for each soil probe, sprinkler, the water valves, the camera and the weather station; the raised bed is a thin red outline along the left edge.](https://jatorre.github.io/garden/img/sensor-map.webp)
Every sensor, sprinkler and valve box, pinned. The raised bed is the thin red outline on the left.
And yes, the map really is that blurry. Zoom in far enough to find a two-square-metre vegetable bed and Google Earth gives you a handful of pixels. Privacy by smallness.
That immediately makes the questions more interesting. Instead of asking “what is soil-ch6 doing?”, I can ask why the north-west corner of the lawn is always wetter, or which end of the bed dries fastest. Every measurement has a real position, so the agent can reason about the garden in space as well as in time.
And this is where I become completely unreasonable. There is probably nothing I would enjoy more than a live moisture surface across my own lawn: a little gradient from dry to wet, showing what is happening between the probes. Eight probes are obviously not enough to know the moisture at every centimetre, but they are enough to start seeing patterns, test some interpolation and tell me where the next probe should go. Completely unnecessary. Obviously essential.
But there was still one big problem. I couldn’t see it.
## So, naturally, I installed a camera
I travel quite a bit. Who was going to tell me whether the plants looked healthy? Certainly not my children.
Now I can watch my two-square-metre farm in glorious 4K, 24 hours a day. Including at night.
Which has already produced one important analytical insight: my neighbour’s cat likes to use the vegetable bed as a toilet.
Agent-driven agriculture was already paying dividends.
[A white Reolink security camera on the wall, looking down at the raised bed of broccoli, cabbage and lettuce with the drip line around it.](https://jatorre.github.io/garden/img/camera.webp)
An ordinary Reolink security camera, pointed at two square metres of vegetables.
Part IIThe lakehouse
## Now I had data. A lot of data.
At this point I had soil moisture, soil temperature, conductivity, leaf wetness, air temperature and humidity, rain, wind, solar radiation, and pictures of the garden.
Great. But now I had another problem: what do I actually do with all of it?
Is 34 % soil moisture good? How quickly is the soil drying? Did yesterday’s watering make any difference? Is the broccoli getting bigger? Should I water today if it might rain tomorrow?
And because I am a data nerd, this time I didn’t ask. I already knew the answer: my vegetable garden needed a lakehouse.
## Getting the data out of the garden
The measurements were sitting inside the Ecowitt app, which wasn’t going to help an agent very much. I needed somewhere for the data to accumulate, somewhere an agent could query the history instead of only seeing the latest value.
This is also, more or less, where LakehouseBox started. The first version of the garden ran on Cloudflare: Iceberg tables in R2, a pipeline per table, a small program to receive the weather station’s posts, and a virtual machine on Google Cloud only to relay the camera’s uploads. It worked, and it was too many pieces for a vegetable bed.
What I wanted was a small lakehouse where data accumulates permanently and where I can simply give an agent access to it, without standing up a warehouse, a database server or a collection of little services around it. That became [LakehouseBox](https://lakehousebox.com). How I built it is another post. The requirement here was simple: a place where my agents could put the data, analyse it, reason over it, look at the pictures, send me an email and adjust the water.
And I wanted all of it to be sovereign, running on European infrastructure. My garden is going to be sovereign. No one is going to touch my lettuce.
What I asked the agent
*Use the LakehouseBox CLI. Create a catalog called garden, create the tables we need for Ecowitt telemetry, and expose a device sink using the Ecowitt preset. Keep it simple: I want the gateway to POST directly into the lakehouse, with no service of mine running in the middle.*
```
lhbox catalog create garden
lhbox sink create --catalog garden --table garden.sensor_readings --name weather_in \
--device --preset ecowitt --strip PASSKEY
```
A device sink is a private address that turns each post into rows of a table. The nice thing about the Ecowitt gateway is that it can post its measurements to a server of your choice, so I pasted the address the agent gave me into the Ecowitt app and pressed Save.
Done.
[The Ecowitt app's Customized upload screen: protocol Ecowitt, host in.lakehousebox.com, a private path hidden, port 80 and an upload interval of 60 seconds.](https://jatorre.github.io/garden/img/ecowitt-app.webp)
The gateway posting straight to LakehouseBox every 60 seconds. The path is private, like a password.
A minute later soil moisture, temperature, conductivity, rain, wind, solar radiation and everything else were landing in an Apache Iceberg table. The gateway sends 62 rows per post, and when I added four more soil probes there was nothing to change: the new channels simply started arriving. Since 18 September the garden has collected a little over four million readings.
[The sensor\_readings table in LakehouseBox: 4,134,892 rows stored in 3.22 MB, in 7 data files and 26 snapshots.](https://jatorre.github.io/garden/img/app-readings.webp)
Four million readings, and the whole table takes 3.22 MB.
And now this is great, because I don’t have to look at any boring dashboards. I can just ask:
- How has the soil moisture changed over the last 24 hours?
- Which part of the garden dries fastest?
- Did this morning’s watering make any difference?
- Is the lawn getting too much water?
[A preview of the sensor\_readings table: one row per sensor and metric, with the indoor gateway and the weather station reporting temperature, humidity, pressure, wind, solar radiation and rain at the same minute.](https://jatorre.github.io/garden/img/app-preview.webp)
The raw table: every sensor, every metric, every minute.
That is much more useful to me than another dashboard full of charts. Each of those questions turns into a query over the same tables. “Did this morning’s watering reach the soil?”, for example, is this:
```
SELECT sensor_id,
round(avg(metric_value) FILTER (WHERE event_time < TIMESTAMPTZ '2026-10-23 06:00+00')) AS before_pct,
round(max(metric_value) FILTER (WHERE event_time >= TIMESTAMPTZ '2026-10-23 06:00+00')) AS after_pct
FROM garden.garden.sensor_readings
WHERE sensor_type = 'soil' AND metric_name = 'moisture'
AND event_time BETWEEN TIMESTAMPTZ '2026-10-23 05:00+00' AND TIMESTAMPTZ '2026-10-23 08:00+00'
GROUP BY 1 ORDER BY 1;
```
On that morning every lawn probe jumped (one from 29 % to 72 %) except `soil-ch5`, the dry corner the agent keeps complaining about. I never write that SQL. The agent does.
## But the agent was still missing something
Numbers don’t tell you everything. A sensor can tell me the soil is at 31 % moisture. It can’t tell me that one of the broccoli plants has collapsed.
That’s what the camera is for: it takes a full-resolution picture of the bed dozens of times a day.
There was one small problem. The camera is a fairly normal security camera. It doesn’t know anything about Iceberg or S3 or agents. It knows FTP.
And LakehouseBox didn’t support FTP.
So we added it.
Not because I had suddenly decided that a lakehouse needed an FTP feature. Because my camera wouldn’t send its pictures any other way.
What I asked the agent
*My Reolink camera can upload periodic images over FTPS. I don’t want a Raspberry Pi or another server at home. Add a write-only drop box to the garden