re_act
ReAct (Reason + Act) pattern for intelligent agents
What it does
The re_act plugin implements the ReAct pattern:
Plan (after_user_input)
Before taking any action, the agent plans what to do based on user input and available tools.
Reflect (after_tools)
After each tool execution, the agent reflects on results and decides next steps.
Quick Start
main.py
Python REPL
Interactive
How it works
1. Planning Phase
After receiving user input, the plugin generates a brief plan:
main.py
2. Reflection Phase
After tools execute, the plugin reflects on results:
main.py
Combined with Eval Plugin
For debugging and testing, combine with the eval plugin:
main.py
Events Used
| Event | Handler | Purpose |
|---|---|---|
after_user_input | plan_task | Generate initial plan |
after_tools | reflect | Reflect on tool results |
Source
connectonion/useful_plugins/re_act.py
main.py
