Agent Architecture: How Agents Choose and Orchestrate Tools
In LVD an agent is an explicit configuration, not just a prompt. How its parts fit together and how it picks, sequences and recovers tool calls.
An agent that behaves well in a demo can drift quietly in production. A prompt tweak changes how often it offers refunds, a model upgrade shifts its phrasing, a persistent user finds a way to talk it into something odd. Nobody notices until a screenshot circulates. Two habits prevent that: watching the agent continuously, and bounding what it is allowed to do.
The book groups monitoring into four parts. The first is performance metrics: how quickly the agent answers (tracked at the median and at the slow tail), how often its tool calls succeed, how many user intents are fully resolved, how often conversations are escalated to a human, and how many turns a resolution takes.
The second is conversation analytics. Logs are mined for the intents people raise and how that mix shifts over time, the points where users abandon or show frustration, the tool sequences that go with satisfied customers, and the effect of prompt variants on completion.
The third is tool-usage tracking. Every call is recorded with its parameters (sensitive fields redacted), its outcome, its latency and the conversation context that triggered it. The fourth is anomaly detection: alerts on a sudden jump in escalations, a spike in tool failures, or unusual invocation patterns that could signal prompt injection or a degraded system.
The most useful idea here is that tool telemetry assigns blame. The book reads a tool that is rarely used as a documentation gap, and a tool with a high error rate as a schema or implementation problem. Neither is an "agent problem" in the vague sense. They point at different layers.
Take a ride-hailing assistant. If riders keep asking to cancel but cancel-ride is almost never called, the skill probably does not describe when cancellation applies, which is a Skills layer fix. If estimate-fare fails often, no amount of prompt editing will help; the trouble is in the schema or the tool underneath. Good observability turns "the bot seems off" into a ticket for the right team.
Guardrails constrain behaviour so that it cannot be harmful, unauthorised or expensive. The book covers four kinds.
Notice where the book puts the access boundary. It is enforced by authorisation below the agent, not requested in the prompt. That distinction is worth carrying everywhere. A rule that exists only as a sentence in a system prompt is a polite request, and prompts are exactly what teams retune every day. A rule enforced in a lower layer holds even when the prompt changes, the model is swapped or a user pushes back.
The same reasoning explains why confirmation has a screen-side half. The agent raises the request, but a person has to see it and answer it, which is covered in agent-facing UI.
Measure what the agent does, route each symptom to the layer that owns it, and put hard limits somewhere the prompt cannot erase. For the structure of the agent itself, read agent architecture and tool selection, and for how the MCP side of these boundaries works, see MCP authentication and best practices.