How does an agentic loop coordinate reasoning, external tool execution, and reflective state transitions?
Agentic loops interleave cognitive reasoning traces with external actions, allowing large language models to inspect environmental feedback before deciding the subsequent step. In this simulator, each step processes a structured phase (such as planning, tool invocation, or evaluation), updates running token consumption, and accumulates simulated latency. The Cytoscape-rendered graph highlights active state transitions and targeted nodes as execution progresses toward completion or error handling.
This workbench operates entirely in browser memory using deterministic, hardcoded scenario steps. It does not invoke live LLM inference APIs, execute real shell commands, or dynamically evaluate natural-language critique models. Slider adjustments modify illustrative telemetry limits and error injection flags rather than changing real-time network latency or neural model weights.
Select the 'Step Loop' button on the default 'ReAct + Reflection Loop' preset. The active phase transitions from INIT to STEP 1, highlighting the agent core node and web search path while rendering the first trace card (920 tokens, 320 ms latency, 1 tool call). Clicking 'Step Loop' again advances to Step 2, updating cumulative metrics to 2,060 tokens and 770 ms latency across two tool calls.
The ReAct paradigm enables language models to interleave reasoning traces ('Thought') with execution calls ('Action') and external feedback ('Observation'). By explicitly logging its reasoning prior to taking an action, an agent tracks operational plans and interprets external observations from APIs or retrieval tools. ReAct: Synergizing Reasoning and Acting in Language Models
In question-answering and decision-making environments, interleaving thought steps with structured tool calls mitigates hallucination and reduces error propagation compared to isolated chain-of-thought prompting alone. ReAct: Synergizing Reasoning and Acting in Language Models
The interactive graph canvas visualizes the state machine using Cytoscape.js, an open-source graph theory and visualization library in JavaScript that supports directed graph layouts, dynamic class toggling, and interactive viewport operations. Cytoscape.js: Graph Theory Library for Visualisation and Analysis
During execution, node styling and edge highlighting reflect the active operational state, dynamically switching classes between normal, active, and error states as defined in the layout configuration. Cytoscape.js: Graph Theory Library for Visualisation and Analysis
Explains the foundational architecture of interleaving reasoning traces with tool-calling actions and observations.
Documents Cytoscape.js graph manipulation, node and edge selectors, classes, and layout behaviors.
The default ReAct preset contains four stored steps. Step Loop reads the next fixture, adds its token and latency values and renders a trace card. Token counters sum nine hundred twenty, eleven hundred forty, eight hundred eighty and nine hundred to three thousand eight hundred forty. After the first two steps, the counter is two thousand sixty. These are fixture counters, not measured model usage; no real search, SEC extraction or calculator service executes. The configured context window is eight thousand. Three thousand eight hundred forty divided by eight thousand produces forty eight percent, capped at one hundred for the display. Latency sums three hundred twenty, four hundred fifty, fifty and one hundred eighty to one thousand milliseconds. Three steps have an active tool label, so the call counter reaches three. Neither latency nor tokens are observed from an actual tool run. Scores zero point six five and zero point seven two are below zero point eight, but the executable step method never branches on that threshold. It advances the index even on an injected or random failure. Error injection substitutes an HTTP five hundred message while still adding the same fixture tokens and latency; the claimed fallback retry is text only. Completion follows fixture exhaustion or the iteration limit. This source-grounded simulation does not establish financial facts, real reflection recovery, or live agent execution.