Orchestration · Software component
ReAct Agent Controller
Software componentOrchestrationOrchestration & Toolsarc:ReActController
An agent controller that interleaves explicit Thought, Action, and Observation steps in a loop, choosing each tool call dynamically from prior observations until an answer or iteration limit.
Responsibility. Drives adaptive reason-act-observe cycles for one agent.
Also known as: ReAct agent, Reasoning + Acting loop, AgentExecutor (LangChain), Zero-shot ReAct agent, Conversational ReAct agent, Chat-optimized zero-shot ReAct agent, Agent-driven chaining, Memory-augmented ReAct agent, Agentic RAG agent, AgentExecutor
Variant of Agent Controller abstract
When to choose. Choose when solution paths are unpredictable and require adaptive investigation (research, debugging, non-standard support); avoid for simple deterministic, latency-critical, budget-constrained, or formally verified tasks.
Relationships
is configured by structural
invokes dependency
- Agent Action Output Parser Ch2.3
- Answer Synthesizer abstract Ch2.1
- Asynchronous Tool Dispatcher Ch4.2
- Code Range Annotator Ch4.4
- Dense-Sparse Hybrid Retriever Ref7.07
- Full Conversation Buffer Ch2.3
- LLM Inference Service Ch2.2 Ch3.4 +2
- LLM Provider Adapter Ch2.3
- Memory Retriever Ch5.7
- OpenAI-Compatible Inference API Ref7.07 Ref7.13
- Reasoning Engine Ch2.6 Ch5.1
- Retriever abstract Ref7.14
- Tool Executor Ch2.1 Ch2.3 +1
- Tool Parameter Normalizer Ch3.6
- Tree Search Controller abstract Ch5.2
- Vector Retriever abstract Ch2.1 Ch2.2
is invoked by dependency
reads dependency
- Conversation State Store abstract Ch2.1
- Working Memory Buffer abstract Ch1.2 Ch2.3
writes dependency
- Conversation State Store abstract Ch2.1 Ch3.6
- Working Memory Buffer abstract Ch1.2 Ch2.3
emits telemetry to dynamic
receives data from dynamic
is constrained by control
is guarded by control
is evaluated by assurance
is monitored by assurance
alternative to variability
Design guidance
- MUST enforce an iteration limit to prevent infinite loops.
- SHOULD validate tool outputs (e.g., units, failures) before reasoning on them to avoid error propagation.
- SHOULD NOT be used where straightforward tool calling suffices.
- SHOULD NOT be used for 'try again with feedback' loops; encoding cycles in prompts is brittle and scales poorly.
- SHOULD run without conversation memory only when queries are independent; conversational interfaces need memory to resolve follow-up references.
- SHOULD use chat-message-formatted prompts with chat-tuned models, especially for tools with multi-parameter schemas.
- SHOULD migrate to a graph-based orchestrator when the workflow needs iteration loops, structured state beyond conversation history, conditional branching on tool results, or step-level state inspection and replay.
- SHOULD log reasoning steps to a file or monitoring system in production rather than the console.
- SHOULD overlap tool latency with preparation of the next reasoning step so the GPU is not idle during tool calls.
- SHOULD decide per query whether to call the retrieval tool or answer directly, avoiding unnecessary retrievals (Ref7.07).
- SHOULD cap reasoning iterations (e.g., max_iterations=10) to bound latency and cost (Ref7.07).
Quantitative guidance
As stated by the sources; verify before use.
- A task needing one API call in a simple approach may demand five to ten calls in ReAct (Ch1.2).
- A 10-step workflow needs ~10 reasoning calls in ReAct vs. 1 planning call plus 10 executions in Plan-and-Execute (Ch1.2).
- LangChain AgentExecutor handles a simple web-search QA agent in roughly 30 lines of code with no state schema (Ch2.1).
- Hand-writing the ReAct loop takes approximately 150-200 lines; AgentExecutor abstracts it (Ch2.3).
- Chat-optimized zero-shot prompts typically reduce token usage by 15-25% versus standard zero-shot prompts (Ch2.3).
- Web-search research assistant with memory: about 40 lines in LangChain versus roughly 55-80 lines in LangGraph (Ch2.3).
- Five-step ReAct workflows with 200 ms API calls waste ~1 s of idle GPU per request if tools block (Ch4.2).
Classification
- Patterns
- ReAct (Thought-Action-Observation)Dynamic tool selectionGrounding through observationZero-shot ReAct (stateless)Conversational ReAct (memory-enabled)Chat-message-formatted ReAct promptOverlap tool execution with next-step prompt preparationTree-of-Thought invoked as a specialized reasoning tool for decisions needing lookaheadMemory-augmented ReAct (retrieve episodes on each Thought step)Agentic RAG (retrieve-or-respond decision per query)
- Technologies
- LangChainLangChain AgentExecutorNemotron Nano 9B V2Llama Nemotron
- Quality attributes
- Flexibility (ISO/IEC 25010)Transparency and accountability (NIST AI RMF: accountable and transparent)Maintainability (ISO/IEC 25010)
- Risks mitigated
- Premature conclusions without evidenceSpeculative reasoning chains unsupported by facts
Sources
- Ch1.2: T. Nguyen, "Core Agent Patterns," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.2. ISBN: 9798244538229.
- Ch2.1: T. Nguyen, "Framework Landscape and Selection," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.1. ISBN: 9798244538229.
- Ch2.2: T. Nguyen, "LangGraph," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.2. ISBN: 9798244538229.
- Ch2.3: T. Nguyen, "LangChain Sequential Frameworks," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.3. ISBN: 9798244538229.
- Ch2.6: T. Nguyen, "Tool Integration and Function Calling," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 2.6. ISBN: 9798244538229.
- Ch3.4: T. Nguyen, "Tuning Model Parameters for Production Performance," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.4. ISBN: 9798244538229.
- Ch3.6: T. Nguyen, "Trace Analysis and Execution Debugging," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.6. ISBN: 9798244538229.
- Ch4.2: T. Nguyen, "Deployment and Scaling," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 4.2. ISBN: 9798244538229.
- Ch4.4: T. Nguyen, "Performance Profiling and Optimization," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 4.4. ISBN: 9798244538229.
- Ch5.1: T. Nguyen, "Chain-of-Thought (CoT) Fundamentals," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.1. ISBN: 9798244538229.
- Ch5.2: T. Nguyen, "Tree-of-Thought (ToT) Fundamentals," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.2. ISBN: 9798244538229.
- Ch5.7: T. Nguyen, "Episodic Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.7. ISBN: 9798244538229.
- Ch10.5: T. Nguyen, "Human-over-the-Loop," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 10.5. ISBN: 9798244538229.
- Ref7.07: E. Li, V. Bellotti, R. Kraus, and R. Kao, "Build a retrieval-augmented generation (RAG) agent with NVIDIA Nemotron," NVIDIA Technical Blog, Sep. 23, 2025. [Online]. Available: https://developer.nvidia.com/blog/build-a-rag-agent-with-nvidia-nemotron/
- Ref7.13: NVIDIA, "Llama Nemotron," NVIDIA NeMo Framework User Guide, v25.09. Accessed: Sep. 27, 2026. [Online]. Available: https://docs.nvidia.com/nemo-framework/user-guide/25.09/llms/llama_nemotron.html
- Ref7.14: "NVIDIA Agentic AI Platform Ecosystem Integration," unpublished reference note (14-NVIDIA-Ecosystem-Integration.md), Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam supplementary materials, 2026. unpublished note