The Prompt Engineering You're Not Doing

What agentic robotics means for building automation

Todd Deshane · April 2026 · 6 min read

Last week, Jim Fan at NVIDIA open-sourced something called CaP-X. The short version: you type a task description in plain English, and the system generates robot control code that runs on a physical arm. No task-specific training. A 7B open-source model. Results that transfer from simulation to real hardware.

The robotics community called it "vibe agents alive in the physical world." Fan described 2026 as robotics' NLP-2018 moment — the year before everything accelerated.

I've been running the same pattern on buildings for months. Not robot arms — sump pumps, HVAC systems, smart plugs. The same underlying idea: describe what you want in natural language, let the model generate the control logic, run it on cheap hardware at the edge.

Here's what I think most people are missing about what this means.

The Pattern Behind CaP-X

Code-as-Policies is not a new idea. The original paper — Google Brain, 2022 — showed that large language models could write Python code that controlled robot arms if you described tasks conversationally. The insight was simple: LLMs already know how to write code. If your robot has a Python API, you don't need task-specific training. You need a good prompt.

What CaP-X adds is scale and rigor. A 7B model (open-source, runs locally) fine-tuned with reinforcement learning over 50 iterations jumps from 20% to 72% task success. A benchmark suite across 187 manipulation tasks. A training-free harness that lets the model match expert-level performance on most tasks before fine-tuning even starts.

The key result: programs synthesized in simulation transfer to real robots with minimal sim-to-real gap. You don't need a real robot to train on a real robot.

The Building Is Already a Robot

About a year ago, I deployed edge AI on a building with a sump pump problem. The pump was running correctly by standard metrics — no fault codes, no tripped breakers — but the power draw pattern told a different story. The float switch was sticking intermittently. Not enough to fail. Enough to burn out the motor over time.

The system caught it at 3am during a storm. It didn't just alert me — it ran 97 automated recovery cycles over the course of the night. No flood. No motor replacement. No plumber at 2am.

What made that possible wasn't a sophisticated robot. It was a $25 smart plug, a local AI model watching the power draw, and an automation layer that could issue commands when the model flagged an anomaly. In CaP-X terms: sensors as perception APIs, smart plugs as actuation APIs, and an LLM-generated policy that ran when the model detected the right condition.

That's not a stretch. That's the same architecture, applied to a different physical domain.

What "Prompting Your Building" Actually Looks Like

The CaP-X demo that got the most attention was controlling a robot arm by saying "pick up the red block and place it on the blue tray." The arm did it. No hand-coded motion planning. No task-specific dataset. A natural language instruction generated the control code.

Here's what the equivalent looks like for building automation:

"Run the HVAC pre-warm cycle 45 minutes before the first calendar booking on weekdays, but skip it if the outdoor temperature is above 65 degrees."

That's a natural language instruction. A capable LLM generates the Home Assistant automation YAML. You review it, deploy it. Done.

The difference is that most building automation practitioners don't think of what they're doing as prompt engineering. They think of it as writing automations. But the frontier is clearly moving: as models get better at understanding physical system state and generating reliable control logic, the gap between "describe it in English" and "it runs on hardware" closes.

I've been using this approach informally — describing the behavior I want, having a model generate the automation, testing it against real sensor data before deploying. The CaP-X framework is what happens when this pattern gets formalized, benchmarked, and turned into an open-source tool with reproducible results.

Why a 7B Model Is Enough

One of the most practically important results in the CaP-X paper is the model size. CaP-RL achieves 72% task success with a 7B parameter model. That runs on a Mac Mini. It runs on a Jetson T4000 ($1,999, 70 watts). It runs on hardware that costs less than a month of enterprise building management system fees.

This matters because the economics of edge AI are finally working. The model that controls your building doesn't need to live in a data center. It can live in a small box in your server room, run 24/7 on power you're already paying for, and make decisions without a network round-trip.

No cloud dependency. No vendor subscription that can be discontinued. No data leaving the building. The intelligence is yours.

The practical version: If you're deploying Home Assistant + a local LLM on a building today, you're running the same architectural pattern that NVIDIA just open-sourced for robotics. The difference is one of domain, not approach. The tools are converging.

The 50-Iteration Fine-Tune

The CaP-RL result that surprised me most: 50 training iterations. Not 50,000. Not months of data collection. Fifty iterations to go from 20% to 72% task success.

For a building practitioner, translate that to: six weeks of anomaly data is enough to fine-tune a model that understands your specific building's behavior patterns. The sump pump we monitored has seasonal behavior — wet springs, summer lulls, fall anomalies when leaves clog the drainage. Six weeks of power draw data covers enough of that pattern to meaningfully calibrate a local model.

The same principle applies to HVAC: occupancy patterns, outdoor temperature correlations, weekend vs. weekday deltas. Fifty training iterations on real building data is achievable. You don't need three years of historical records to start getting value from fine-tuning.

What Changes Next

The CaP-X release is a framework. Over the next 12-18 months, community tooling will make it easier to apply this pattern to non-robotics physical domains — including building automation. The Home Assistant community already has LLM integrations. The gap between "control a robot arm" and "control an HVAC system" is mostly a matter of adapter APIs and domain-specific training data.

Meanwhile, the hardware wave that I wrote about last week keeps landing. Texas Instruments acquired Silicon Labs. MediaTek refreshed its entire IoT line for on-device inference. The $25 smart plug is on a trajectory to run local anomaly detection natively.

The convergence looks like this: an agentic framework for generating control logic from natural language, running on local hardware that's getting meaningfully more capable every 18 months, deployed on sensor networks that cost less than a building HVAC service contract.

That's not a research preview. That's a deployment path that exists today, with today's technology. The CaP-X release just confirmed that the pattern is real and reproducible, not a one-off.

The Prompt You Should Start With

If you're running Home Assistant or a similar open-source building automation platform, try this exercise: describe your three most common manual interventions in plain English. The thing you do when the building is occupied after hours. The thing you do when the weather shifts unexpectedly. The thing you check first thing Monday morning.

Now ask a capable LLM to generate the automation that would handle each of those cases. Review the output. Refine it. Test it against historical data before deploying.

That's prompt engineering for physical systems. It's not as dramatic as a robot arm picking up a block, but the stakes are real — and so is the value when it works at 3am during a storm.

Ready to make your building agentic?

We deploy edge AI on buildings using off-the-shelf sensors, local models, and no cloud lock-in. Under $500 to start. Your building already has the data. We help you use it.

See What We Build

Related: Making a sump pump agentic | How edge AI prevented a basement flood | When robots get foundation models, buildings get baselines | The edge AI hardware wave has arrived