Sign In
Back to Visual Labs
Lab 17 · Agentic Runtime Lab
Deterministic Tool-Calling Sandbox
ReAct Protocol Invariant

Interactive Agent Loop & Tool-Calling Debugger

Experience the anatomy of production tool-augmented LLM agents in real time. Step through the 7-phase ReAct execution pipeline (User Intent → ReAct Thought → Tool Call Generation → Schema Validation → Tool Execution → Observation → Reflection & Synthesis). Inject live Byzantine failures like HTTP 429 rate limits, malformed JSON arguments, hallucinated parameters, execution timeouts, and deadlock loops to observe automated recovery and circuit breakers.

Scenario
Weather Forecast & Flight Assistant
Status
Paused
Context Tokens
380 (4.6%)
Latency
0 ms
Est. Cost
$0.00114
7-Phase Execution Pipeline·Step 1 of 13
↻ ReAct Multi-Turn Loop
1. IntentUser InputActive (380t)
2. ThoughtReAct ReasoningPending
3. Tool GenJSON-RPC CallPending
4. Schema GateZod ValidatorPending
5. ExecutionAPI SandboxPending
6. ObservationTool OutputPending
7. SynthesisReAct ReflectionPending
1. User Intent Ingestion

Ingesting user prompt, parsing operational constraints, and initializing ReAct context buffer.

Context Window380 / 8,192 tok
Est. Cost$0.00114
Scenario Presets:
Speed:

Chaos Engineering Failure Injection Deck

Byzantine Fault Simulation

Inject real-world protocol failures and verify how agentic self-correction mechanisms recover.

IDLE

HTTP 429 Rate Limit

Provider Quota Exhaustion

Forces tool API gateway to return 429 Too Many Requests with Retry-After header.

Calculates exponential backoff with random jitter before retrying.
IDLE

Malformed JSON Arguments

Syntax Delimiter Truncation

Simulates LLM producing unclosed brackets or invalid escape characters.

AST parser catches SyntaxError; initiates JSON repair self-correction turn.
IDLE

Hallucinated Parameter

Unregistered Key Injection

Injects fabricated arguments (e.g. bypass_auth, superuser) absent from tool schema.

Zod validator rejects unknown keys and returns schema error observation.
IDLE

5s Execution Timeout

RPC Gateway Deadline Breach

Simulates tool hanging past the 5,000ms hard execution deadline.

AbortSignal fires AbortError; triggers fallback to stale cached replica.
IDLE

Deadlock Circuit Breaker

Infinite Cycle Interception

Forces agent into identical repeated thoughts and tool calls.

Trips circuit breaker after 3 identical consecutive actions to stop token waste.
Preset:Weather Forecast & Flight Assistant

Context Window Utilization

Dynamic tracking of prompt inputs, tool schemas, reasoning thoughts, and tool observations.

380/ 8,192 tokens
4.6% Used
Input Tokens
380
System prompt + User + Tools
Output Tokens
0
Thoughts + Tool Calls + Output
Estimated Cost
$0.00114
Model compute charges
Total Latency
0 ms
Cumulative LLM + Tool RPC
Circuit Breaker:ARMED (Nominal Safety)
Retries: 0Deadlock Cycles: 0/3

Guided Chaos Engineering Experiments

1

HTTP 429 Rate Limit

Arm HTTP 429 Rate Limit in the chaos deck. During tool dispatch, the gateway responds with HTTP 429 and a Retry-After header. The runtime calculates exponential backoff with jitter and retries safely.

Verifies Exponential Backoff
2

Malformed JSON Syntax

Arm Malformed JSON Arguments. The model generates truncated arguments missing trailing delimiters. The schema gate flags a SyntaxError and invokes AST jsonrepair self-correction.

Verifies AST Self-Correction
3

Hallucinated Parameters

Arm Hallucinated Parameter. The tool call injects unauthorized parameters (`_unauthorized_bypass_auth`). The strict Zod validator rejects the payload and returns schema violation feedback.

Verifies Strict Zod Boundary
4

Deadlock Circuit Breaker

Arm Deadlock Circuit Breaker. The agent simulates a repetitive loop with identical action signatures. After 3 identical cycles, the circuit breaker trips to arrest infinite token consumption.

Prevents Runaway Token Cost
Mechanism Reference · Agentic RuntimesInteractive Browser Simulator

How Interactive Agent Loop & Tool-Calling Debugger Lab Works

Production AI agent runtimes model multi-step tool execution as bounded finite-state supersteps rather than unbounded while-loops. By persisting deterministic checkpoints between model turns, normalizing malformed JSON tool arguments, and enforcing step and token budgets, runtimes recover cleanly from transient tool failures without infinite retry loops.

Frequently Asked Engineering Questions

Why do naive autonomous agent loops fail in production?
Unbounded loops silently accumulate context tokens, repeat deterministic tool errors after hitting identical states, and trigger cascading latency and token-cost blowups without circuit breakers.
What role do durable checkpoints play in agent loops?
Checkpointing serialized state after every superstep lets long-running workflows pause for human approval, survive worker crashes, and resume deterministically without re-executing earlier side-effecting tool calls.
How should malformed tool arguments be handled?
Schema validators return structured validation errors as observation messages back to the model with bounded retry limits instead of crashing the entire orchestration runtime.
Master This Simulator In
Free · Verifiable Credential

FS-301Agentic Systems Engineer

Engineer bounded tool-using systems with explicit workflows state protocols evaluation observability security and human control.

27 concepts~29h self-paced
Start Free Course
Weekly Engineering Dispatch

Get the weekly systems teardown

One technical note per week covering inference bottlenecks, retrieval harnesses, and commit-pinned teardowns.