React Agents
React Agents are intelligent systems that combine reasoning and acting capabilities to fulfill user queries. Instead of directly invoking a function based solely on user input, React Agents analyze the context, reflect on intermediate steps, and decide whether to think further or to act—creating a more flexible, step-by-step execution pattern.
These agents are especially useful in scenarios that require multiple decisions, calculations, or interactions with several tools before arriving at the final answer or action.
🔑 Key Concepts
React Agents balance logical reasoning and action execution. They are equipped to:
- Think: Interpret natural language prompts, infer intermediate steps, and plan next moves.
- Act: Execute predefined tools or functions when needed.
- Repeat: Re-assess the state after each tool call and decide whether to think or act again.
This iterative process enables React Agents to manage multi-step tasks, perform data transformations, or combine insights from multiple tools before providing a response.
As with Function Calling Agents, React Agents are constrained to only invoke explicitly defined tools—ensuring safe and predictable behaviors within your workflows.
Each React Agent operates within its own block and can access one or more tools. These tools may be reused across agents or instantiated multiple times.
🧠 Example Flow
Use case: “Summarize today’s orders and email the manager.”
- User: "Summarize today's orders and email it to Sarah."
-
Agent Reasoning:
-
Step 1: Calls
get_todays_orders()
- Step 2: Summarizes the orders internally
- Step 3: Calls
send_email(recipient='sarah@company.com', content='...summary...')
- Output: Email sent with order summary
The agent autonomously determines the steps and tool usage sequence.
📘 Key Definitions
- React Agent: An agent that dynamically switches between reasoning and invoking tools to complete complex tasks.
- Tool: A callable tool or API the agent can execute as part of its reasoning path.
- Thought Trace: The agent's internal reasoning log, showing decisions before and after tool invocations.
- Extension Window: Interface to configure a tool's parameters, such as credentials or context-specific labels.
🛠️ React Agent Configuration
To add a React Agent to your workflow:
- Open the block editor and add a React Agent block.
- Click the React Agent block to open its configuration panel.
- Name your agent appropriately.
- Add tools by typing
@
in the Type @ to get tools... field. - A list of tools will appear—select the desired ones.
- A new entry with the agent's name will appear in the sidebar.
Configure each tool individually:
- Click the tool entry to open the Extension Window.
- Provide any necessary access tokens, API keys, or specific names.
- Ensure unique naming for each tool instance—this is essential for agents to reference the correct tool during execution.
Once the tools are configured, save the agent or continue adding more.
🧩 When to Use React Agents
Use React Agents when your workflows involve:
- Conditional logic
- Multiple steps with dependencies
- Chained tool interactions
- Internal summarization or transformation before tool execution
If your use case only requires direct mapping of intent to tool (like “send message” or “add row”), a Function Calling Agent may be more appropriate.