pub fn create_react_agent(
model: Arc<dyn BaseChatModel>,
tools: Vec<Arc<dyn BaseTool>>,
config: Option<ReActAgentConfig>,
) -> Result<ReActAgent, GraphError>Expand description
Create a ReAct agent with the given model and tools.
This builds a graph with the following structure:
START → agent → [tools_condition] → tools → agent (loop)
→ END§Arguments
model- The chat model to use for generating responsestools- The tools available to the agentconfig- Optional configuration for the agent
§Returns
A compiled agent graph that can be invoked.