One thing I've been thinking about is how much people rely on system prompts to control AI agent behavior. You can write detailed instructions, define boundaries, and provide examples, but what happens when the model ignores an instruction, calls the wrong tool, or produces an output that looks valid but is actually incorrect? I'm curious how experienced builders are handling this at the architecture level. A few things I'd love to understand: - Structured outputs: Do you rely on JSON schemas and strict validation, or do you add another validation layer before executing actions? - Guardrails: How do you prevent an agent from triggering sensitive actions without checking permissions or business rules first? - Tool execution: Do you let the LLM decide which tools to call freely, or do you constrain tool access based on the current workflow state? - Observability: How do you trace the model's inputs, tool calls, outputs, latency, and token usage across a multi-step execution? - Fallbacks: When the model produces an invalid response or confidence is insufficient, do you retry, switch models, or route the task to a human? My current thinking is that prompts should guide behavior, but deterministic code should enforce critical business rules. I'd love to hear how you guys approach this in production, especially when building agents that interact with CRMs, booking systems, or other external services.