Chapter 9. AI Agents in the Lakehouse
In the previous chapters, you worked with models, prompts, and retrieval pipelines as individual building blocks. This chapter shifts the unit of design from a single model call to a larger, stateful system. In an agentic system, the model is only one component. Around it sit memory, tool interfaces, execution logic, and control policies that let the system pursue a goal over multiple steps.
This distinction matters in the Lakehouse. Many enterprise tasks cannot be completed with a single prompt, no matter how well written. Answering a business question may require retrieving documentation, querying governed data, running calculations, checking results, and assembling a final explanation. Those tasks benefit from a system that can decompose work, choose actions, and adapt as new information arrives.
An AI agent is therefore best understood as an orchestrated application built around a model, not as a model in isolation. The Lakehouse provides the ingredients that such systems need in production: governed data, metadata, scalable compute, durable storage, and observability.
In this chapter, you will learn the core concepts behind AI agents, the memory strategies that make them usable over time, and the execution patterns most relevant to Lakehouse workloads. The chapter concludes with a hands-on example in which we build a diagnostic analytics agent in the Lakehouse, combining the orchestration patterns, memory strategies, and tool interfaces ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access