Why it matters

ReAct is the most common agent pattern. Understanding ADK Java's implementation enables real deployment.

Advertisement

The architecture

LlmAgent with tools: reasoning happens via prompt; actions via tool calls.

Iteration: default max iterations; agent terminates when it outputs no tool call.

ReAct in LlmAgentReason (LLM)internal thoughtAct (tool call)structured callObserve (result)tool outputTool calls are structured; ADK dispatches; result becomes next input
ReAct implementation.
Advertisement

How it works end to end

Structured function calling: Gemini and other modern LLMs handle tool calls natively. No text parsing required.

Termination: LLM outputs final response without tool call = done.

Loop safety: max iterations config.