Agent Frameworks interview question

Agentic AIAgent FrameworksCloud & GCPmedium

A bank's document pipeline in Google's Agent Development Kit (ADK) must always run extract → validate → summarise, in that order. It is built as an LlmAgent coordinator with the three agents as sub_agents and an instruction to use them in order, but traces show the validator is sometimes skipped. What is the best fix?

  1. AKeep the LlmAgent coordinator but set its temperature to 0, because deterministic decoding makes the coordinator transfer to its sub-agents in the same order on every run.
  2. BWrap the three agents in a ParallelAgent, because running them at the same time guarantees that none is skipped, and the summariser can read the others' results when they finish.
  3. CWrap them in a LoopAgent with three iterations, because each iteration hands control to the next sub-agent in the list, which enforces the order without relying on the LLM.
  4. DRun them under a SequentialAgent, which executes its sub-agents in a fixed order without an LLM choosing, and pass results through session state with each agent's output_key.
Show the answer and explanation

Correct answer: D, Run them under a SequentialAgent, which executes its sub-agents in a fixed order without an LLM choosing, and pass results through session state with each agent's output_key.

Explanation Agent Frameworks

Google's Agent Development Kit (ADK) offers two ways to coordinate sub-agents:

LlmAgent with sub_agentsWorkflow agents
Who picks the next agentthe model, by transferring control to a sub-agentcode: the agent type fixes the flow
Order guaranteednoyes
Types–SequentialAgent (in order), ParallelAgent (concurrently), LoopAgent (repeat)

"Use them in order" is still a request to the model, so a step can be skipped whenever the model decides it is unnecessary. A SequentialAgent runs its sub-agents one after another, every time, without an LLM making the orchestration decision; the sub-agents themselves can still be LLM agents.

Data moves through session state: give the extractor output_key="extracted" so its final response is saved to state["extracted"], and reference {extracted} in the validator's instruction; do the same for the summariser.

Why the alternatives fail:

  • Temperature 0 makes decoding greedier but does not turn an LLM routing decision into a guarantee.
  • ParallelAgent runs its sub-agents concurrently, so the summariser cannot wait for validated data. Parallel branches also share session state, so they need distinct keys.
  • LoopAgent runs all its sub-agents in order on each iteration and repeats until a maximum number of iterations is reached or a sub-agent escalates; three iterations would run the pipeline three times (one iteration would merely imitate a SequentialAgent). It suits generate-and-critique loops.

Recent ADK 2.x releases deprecate these three classes (they still run) in favour of a graph-based Workflow, whose edges fix the order in the same way. The principle is unchanged: when order is a requirement, enforce it in code rather than in a prompt.

Interview tip: "deterministic where you can, LLM-driven where you must" is a good one-line summary.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Agentic AI questions

  1. A bank moves its claims-triage planner from a general chat model to a reasoning model. The old prompt says "Think step by step", lists a fixed 10-step script…
  2. In LLM applications, what is an AI agent?
  3. Why do long-running agents checkpoint (persist) their state after each step?
  4. During an outage, a retailer's inventory API answers every request with HTTP 503. The shopping assistant reaches it through the three layers below; assume the…
  5. After one chat, a grocery-delivery assistant's memory extractor proposed the candidate long-term memories below. Which write policy keeps later recall precise?