Skip to content
tezvyn:

Describe a ReAct agent architecture for multi-step dependent tool calls

Source: research.googleMediumHow cards are made

Describe a ReAct agent architecture for multi-step dependent tool calls
Summary

Designing loops that interleave reasoning and tool use across steps.

Key points

Sketch ReAct's thought-action-observation cycle; keep state in an append-only trajectory; re-plan after each observation.

What's really being asked

This question probes whether you understand that complex agentic tasks require an iterative loop rather than a single forward pass. The interviewer wants to see that you know how to ground an LLM in external tools, maintain working memory across dependent steps, and recover from unexpected observations.

The full answer

First, describe the ReAct loop as an interleaving of reasoning traces and actions. The LLM generates a thought about what it needs to know, then emits an action such as a tool call, receives an observation from the environment, and repeats. Second, explain state management through an append-only trajectory or scratchpad. Every thought, action, and observation is concatenated into the context window so the model has a complete working memory. Third, clarify decision making. The next action is chosen by the LLM itself based on the full trajectory and a system prompt or few-shot examples that define available tools. Fourth, address dependency handling. The agent does not pre-commit to a fixed sequence; it waits for the flight search observation before it can reason about calendar slots. Fifth, mention failure modes. If a flight is unavailable, the reasoning trace updates and the agent selects a different action.

The mistakes people make

Proposing a static DAG or workflow engine that locks in all tool calls before execution. Treating tool use as a single batch of parallel function calls. Storing state only in external variables without feeding observations back into the LLM context. Assuming the LLM plans the entire itinerary in one shot without grounding in live data.

What usually comes next

How do you prevent an infinite loop or runaway context window? What happens when the observation is too large to fit in the prompt? How would you add human-in-the-loop approval for expensive actions like booking? Can you compare ReAct with plan and execute or tree of thought approaches?

A concrete example

For the San Francisco trip, the agent first thinks it needs flight options and emits a search_flights action. The observation returns three itineraries. The next thought reasons about price and timing, then emits a select_flight action. After confirmation, the agent thinks about calendar availability and calls add_to_calendar. If the flight search returns no results, the thought updates to consider different dates, and the next action is another search. The trajectory at every step includes the prior thoughts and observations so the model never loses context.

Interview question

How does a ReAct agent handle a tool call that requires data returned by a previous tool?

  • a.It interleaves reasoning, action, and observation in a loop, appending each step to a shared trajectory.Correct
  • b.It batches all dependent tool calls together in a single parallel request to minimize latency.
  • c.It pre-computes a static DAG of all tool calls before execution begins.
  • d.It stores observations in external variables and prompts the LLM once with a final summary.
Why?

ReAct agents rely on an iterative thought-action-observation loop with an append-only trajectory so the LLM can dynamically replan after each live observation. A static DAG fails because it locks in execution order before any results are known, preventing adaptation to unexpected outputs.

Just read this? Test yourself on what you have been reading.

Read the original → research.google

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on llms — each one lists the topics its interview covers.

See open roles