Chapter 55: Deployment Architecture

"An agent becomes interesting at the exact moment the world refuses to be a dataset."

A Patient Embodied AI Agent
Big Picture

Deployment Architecture matters because embodied intelligence is a closed loop. The agent must turn partial observations into useful state, choose actions under uncertainty, and learn from the consequences in a physical or simulated world.

Remember This Chapter

The core move is to connect deployment architecture to action. A static model can be accurate and still be useless if it cannot support timely, safe, and recoverable behavior.

Chapter Overview

Chapter 55 turns deployment into a first-class scientific object. The topic is not "how to ship code" in the abstract; it is how to preserve timing contracts, safety invariants, evidence trails, and rollback authority once a learned policy leaves the notebook and enters a robot, a fleet, or a production facility.

The theory thread formalizes timing budgets, compute partitioning, observability, and recovery state machines. The practical thread maps those ideas onto ROS 2 lifecycle nodes, TensorRT and ONNX Runtime, OpenTelemetry, Prometheus, MLflow or DVC, signed update channels, and fleet middleware such as Open-RMF. The reader should leave with a deployment blueprint that supports both research reproducibility and operational control.

Prerequisites

Readers should be comfortable with Python, tensors, and the perception-action loop. When the chapter uses geometry, control, or probability, the relevant appendices provide a compact refresher.

Chapter Roadmap

Tooling Note

This chapter uses the right-tool principle. Build the mechanism once, then reach for maintained tools such as control barrier functions, reachability tools, runtime monitors, structured logging, and evaluation dashboards when the task moves from learning exercise to working system.

Hands-On Lab: Build a Deployable Robot Service

Duration: about 60 to 120 minutesDifficulty: Intermediate to Advanced

Objective

Wrap a perception-to-action policy in a deployable architecture with explicit rate contracts, observability, degraded-mode behavior, and rollback evidence. The artifact is a runnable service plus one evaluation bundle that contains timing traces, monitor transitions, and a canary rollout report.

Steps

  1. Write a deployment manifest that names sensors, topics, controller rate, policy rate, watchdogs, and fallback actions.
  2. Implement a baseline local service with a fixed-rate controller and a slower learned policy.
  3. Add structured telemetry for queue delay, inference latency, stale command count, and safety transitions.
  4. Run one nominal panel, one latency-stress panel, one network-loss panel, and one rollback drill.
  5. Publish one artifact bundle containing config, logs, plots, replay instructions, and a short deployment decision memo.

What's Next?

Continue with Section 55.1: From notebook to robot, where the chapter moves from motivation to the first concrete idea.

This chapter is written for readers who need deployment to remain legible under pressure. Read each section twice: first to understand the mechanism, then to ask which artifact you would need six months later when a regression, incident, or compliance review demands a precise answer.

Chapter Tool Map
Tool or LibraryWhere It Pays Off
ROS 2 lifecycle nodesModel startup, readiness, shutdown, and degraded states explicitly.
ONNX Runtime or TensorRTMeasure and enforce inference latency envelopes on edge hardware.
OpenTelemetry plus PrometheusTrace cross-process timing, queue growth, and error surfaces.
MLflow or DVCBind deployed model ids to evaluation panels and rollback points.
Open-RMFCoordinate multi-robot facility workflows, chargers, doors, and elevators.
Chapter Lab Extension

Extend the lab by adding a shadow deployment path and a canary rollout gate. Save one folder containing the deployment manifest, versioned metrics, rate histograms, incident replay notes, and at least two labeled recovery traces.

The chapter works well as a focused systems week in an advanced course. The recommended sequence is: define the deployment contract, instrument the baseline, inject timing or network faults, inspect rollback evidence, then discuss how operational discipline changes which model claims can be believed.

For deployment architecture, the practical stack should be introduced as a control problem plus an operations problem. ROS 2, container orchestration, telemetry pipelines, model registries, signed updates, and fleet middleware are not side topics. They determine whether the learned component can act safely, be debugged quickly, and be reverted when the world changes faster than the model.

Readiness Check

Before leaving the chapter, the reader should be able to state one theory claim, one implementation claim, one evaluation claim, and one realistic failure mode. If any of those four are missing, the chapter should be revisited through the lab.

Teaching Takeaway

A strong session ends with a deployment bundle: one manifest, one timing trace, one perturbation panel, one rollback criterion, and one replayable failure. That bundle is what turns deployment from folklore into engineering.

Bibliography & Further Reading

Foundational Papers, Tools, and References

Sutton, R. S., and Barto, A. G.. "Reinforcement Learning: An Introduction." (2018). http://incompleteideas.net/book/the-book-2nd.html

A foundation for value functions, policy gradients, exploration, and the RL framing used throughout the book.

Todorov, E., Erez, T., and Tassa, Y.. "MuJoCo: A physics engine for model-based control." (2012). https://mujoco.org/

The simulator lineage behind much modern robot learning, now extended through MJX and Warp workflows.

Brohan, A. et al.. "RT-1: Robotics Transformer for real-world control at scale." (2022). https://arxiv.org/abs/2212.06817

A landmark in large-scale robot policy learning with transformer policies.

Brohan, A. et al.. "RT-2: Vision-Language-Action Models Transfer Web Knowledge to Robotic Control." (2023). https://arxiv.org/abs/2307.15818

A central reference for connecting web-scale VLM knowledge to robot actions.

Open X-Embodiment Collaboration. "Open X-Embodiment: Robotic Learning Datasets and RT-X Models." (2023). https://arxiv.org/abs/2310.08864

The cross-embodiment data and transfer reference used by the data chapters.

Chi, C. et al.. "Diffusion Policy: Visuomotor Policy Learning via Action Diffusion." (2023). https://arxiv.org/abs/2303.04137

The practical diffusion policy reference for imitation learning and continuous action generation.

Hafner, D. et al.. "Mastering Diverse Domains through World Models." (2023). https://arxiv.org/abs/2301.04104

DreamerV3, a modern reference for latent world models and imagination-based control.

Hugging Face. "LeRobot." (2024). https://github.com/huggingface/lerobot

The open robot-learning stack used for datasets, policies, demos, and low-cost embodied AI workflows.

Official documentation and source repositories for Deployment Architecture.

Use official docs to check install commands, current APIs, and version caveats before applying Deployment Architecture in a lab or project.