Sanitize user prompts before sending to the model.
This hook is called before the model processes the input. It extracts the latest user message and sanitizes it using Model Armor.
| Name | Type | Description |
|---|---|---|
state* | lc_agents.AgentState | Current agent state containing messages. |
runtime* | Runtime | Runtime object containing context and configuration. |