BaseAgent and implement a single method:
AgentTool call astream() on sub-agents, yielding AGENT_MESSAGE and TOOL_RESPONSE events throughout execution.
LlmAgent
The primary agent. Uses LangChainBaseChatModel with a manual tool-call loop.
Dynamic instructions
Theinstructions parameter accepts either a plain string or an instruction provider - a callable that receives a ReadonlyContext and returns a string:
ReActAgent
A structured-reasoning variant that forces the LLM to emit explicit thought steps viawith_structured_output() before acting. Extends LlmAgent - supports instructions, planner, callbacks, and all other LlmAgent features.
instructions are appended to the built-in ReAct system prompt under an “Additional instructions” section. Planners work the same way - their output is appended after the instructions.
Yields events with types: AGENT_START -> AGENT_MESSAGE (thoughts/actions) -> TOOL_RESPONSE (observations) -> … -> AGENT_MESSAGE (final answer) -> AGENT_END.