LLM and agent features¶
These settings change how a model call or an agent run behaves, independent of which operator you use. Each is a parameter on the operator or decorator.
Structured output and XCom:
output_typereturns a typed Pydantic object through XCom instead of a string.Multi-turn sessions and message history:
message_historycarries a conversation across agent runs.Guardrails and capabilities: pydantic-ai capabilities and
pydantic-ai-shieldsguards pass throughagent_params.Code mode:
code_mode=Truelets the model call several tools from one Python snippet instead of one round trip per call.Approval gates for LLM operators:
require_approval=Truepauses an LLM operator until a person approves, edits or rejects the output.Human-in-the-loop (HITL) review for agents:
enable_hitl_review=Trueopens an iterative review loop on an agent, with a chat UI and REST API for the reviewer.
The last two are different tools for different jobs: an approval gate is a one-shot decision on one output, a HITL review is a conversation with a running agent. Each page opens with the other in a see also note.
Making retries cheap with durable=True is a reliability feature and lives under
Reliability and operations.