Why it matters

Understanding LlmAgent config is central to ADK development. Get it right and agents behave; get wrong and they don't.

Advertisement

The architecture

Config: name, model, description, instruction, tools, sub_agents, output_key.

Instruction: prompt template for the LLM. Placeholders filled from session state.

LlmAgent configModel + instructionLLM setupTools + sub-agentscallable + delegatedOutput configstructured resultInstructions drive LLM behavior; tools enable actions; sub-agents enable delegation
LlmAgent parameters.
Advertisement

How it works end to end

Model selection: Gemini variants (Flash for speed, Pro for capability).

Tools: function decorators or explicit tool classes.

Sub-agents: agent tree; parent can transfer control.

Output schema: enforce structured output via Pydantic model.