Skip to content
Visual explainer 2h to learn 5 steps

Model call, workflow or ADK agent: choosing the right shape

Choose between a single model call, a deterministic workflow and a tool-using agent for a requirement and justify it on reliability, cost and latency.

By Invicly Tech, , in Google ADK with Python for AI Agents. About 11 minutes to read.

Topic 1 of 29

In short

Not every AI feature needs an agent. A single model call suits one well-defined transformation, a deterministic workflow suits steps you already know in advance, and a tool-using agent suits requests where the model must decide which lookups to make. Picking the simplest shape that meets the requirement keeps the system cheaper, faster and easier to test.

Think of it like this: A model call is a vending machine, a workflow is an assembly line, and an agent is a shop assistant who decides which shelves to check.

Explained simply

When people hear about AI agents, they often want one for everything. But an agent is only one of three common shapes. The simplest is a single model call: you send a prompt and get one answer back. The next is a workflow: your own code runs fixed steps in a fixed order, and some steps may call a model. The third is an agent: the model itself decides which tools to call and when to stop.

Each step up gives more flexibility and costs more. An agent that looks up a ticket needs at least two model calls: one to ask for the tool and one to write the answer from the tool's result. Every call adds waiting time and tokens, which are the units model providers charge for. More decisions made by the model also means more ways for the answer to change from one run to the next.

A good rule is to choose the least autonomous shape that still meets the requirement. If you can write the steps down in advance, use a workflow. If the task needs no outside data, try one model call. Use an agent when requests vary so much that you cannot list the lookups ahead of time.

In this path you build a support assistant that answers from product docs and reads ticket status. Some questions need the docs, some need a ticket, some need both, and some need neither. That variety is why an agent can be justified here. You will still compare it with a workflow version in the capstone.

Press Play on a diagram to walk through it one step at a time.

CompareThree shapes for the same support request
Single model call
  • One prompt in, one answer out
  • Lowest latency and cost
  • Easy to test with fixtures
  • Cannot look anything up by itself
Deterministic workflow
  • Your code fixes the order of steps
  • Each step can call a model or a tool
  • Same path every time
  • Breaks when requests vary a lot
Tool-using agent
  • Model chooses tools at run time
  • Handles varied requests
  • More model calls per request
  • Needs limits, traces and evaluation
FlowChoosing the shape
  1. 1
    Write the requirement

    Inputs, outputs, data needed

  2. 2
    Fixed steps known?

    If yes, a workflow is enough

  3. 3
    Needs outside data?

    If no, try one model call

  4. 4
    Model must choose lookups?

    Only then use an agent

  5. 5
    Record the decision

    One line with the reason

MapSignals that point to each shape
Requirement
  • Single model call
    • No outside data
    • One transformation
    • Strict latency budget
  • Workflow
    • Steps known in advance
    • Business rules in code
    • Must be repeatable
  • Agent
    • Requests vary widely
    • Lookups depend on the question
    • Can tolerate extra calls

In depth

Reliability versus autonomy

Reliability means the system gives a correct, safe answer in the same way each time. Autonomy means the model chooses the path. The two pull against each other. With a workflow, a test that passes today passes tomorrow because the path cannot change; only the model's wording varies. With an agent, the model may pick a different tool, pass different arguments or call a tool twice, so you need more tests and hard limits.

This does not make agents bad. It means autonomy is a cost you pay for flexibility, and you should be able to say what you get for it. A useful test is to write down five real requests and the steps each needs. If every list is the same, autonomy buys nothing.

  • Workflow: fixed path, easy to test, rigid
  • Agent: flexible path, needs limits and evaluation
  • Hybrid: a workflow where one step is a small agent

Estimating cost and latency per shape

You can estimate cost before writing code. Count model calls per request and the tokens each call sends and receives. A single call sends the prompt once. A workflow sends one prompt per model step, but each prompt can be small because your code passes only what that step needs. An agent resends the instructions, the conversation history and every tool result on each step, so input tokens grow with every tool call.

Latency follows the same pattern. If one model call takes about 1 second and a tool takes 200 ms, an agent with two tool calls in sequence waits for three model calls and two tools: around 3.4 seconds. A workflow can run independent lookups in parallel and finish with one model call. These numbers are illustrative; measure your own in traces.

LayersWhat one agent step sends to the model
  1. 1
    Instructions

    Sent on every step

  2. 2
    Tool declarations

    Names, parameters and descriptions

  3. 3
    Conversation history

    Grows each turn

  4. 4
    Tool results so far

    Grows each tool call

  5. 5
    New user message

    Small compared with the rest

Spotting unnecessary autonomy

Some warning signs show that an agent is the wrong choice. The agent always calls the same tool first. The instructions say things like "always call X, then Y". The tool list has only one tool. The output must follow strict business rules, such as a refund policy, that code can apply exactly. In each case, move the fixed part into code and keep the model for the part that truly needs language skills, such as summarising or wording a reply.

The reverse also happens: a workflow with many if-else branches trying to guess what the user wants. When the branching keeps growing, a small agent with two or three well-described tools may be simpler.

  • Same first tool every time: make it a workflow step
  • Strict rules: apply them in code
  • Exploding branches: consider a small agent

How ADK maps to the three shapes

ADK covers all three. An LlmAgent (also exported as Agent) with no tools is effectively a single model call with session history. Workflow agents such as SequentialAgent, ParallelAgent and LoopAgent run sub-agents in a fixed pattern, and ADK 2.x adds graph workflows, where agents, tools and functions run as nodes connected by edges. An LlmAgent with tools is the classic tool-using agent. Because they share the same runner, sessions and events, you can start with one shape and change it later without rewriting your serving or test code.

Learn it in 5 short steps

About 25m each. Track them with a timer in your plan.

  1. 1
    Compare the three shapes on one task~25m
  2. 2
    Weigh reliability against autonomy~25m
  3. 3
    Estimate cost and latency per shape~25m
  4. 4
    Spot when autonomy is unnecessary~25m
  5. 5
    Write a one-line shape decision~25m

Key points

  • Start with the simplest shape that meets the requirement and only add autonomy when it pays for itself.
  • Each extra model call adds cost, latency and another place where the answer can vary.
  • Workflows give repeatable paths; agents give flexibility at the price of predictability.
  • ADK supports all three: a plain LLM agent with no tools, workflow agents and graph workflows, and tool-using agents.
  • Write the shape decision down so later reviewers can check it against real traces.

Key terms

Tap a card to flip it. 0/5 known

Examples

Summarise a support ticket thread

Requirement: given the full text of one ticket thread, write a three-line summary for the next support engineer. Step 1: list the inputs. The text is already provided, so no lookup is needed. Step 2: list the steps. There is one: summarise. Step 3: choose. A single model call fits; an agent would add a planning call and nothing else. Step 4: record the decision: single call, because the input is complete and the output is one transformation.

Answer free-form customer questions

Requirement: answer questions about product features and ticket status. Step 1: sample five questions. Two need docs only, one needs a ticket only, one needs both, one needs neither. Step 2: try a workflow that always fetches docs and the ticket. It wastes a lookup on most requests and needs a ticket ID that many messages lack. Step 3: choose an agent with two read-only tools and a cap on tool calls. Step 4: record it and plan to compare with a router workflow later.

text
Decision: tool-using agent (2 read-only tools, max 4 tool calls)
Reason: lookups depend on the question; 3 of 5 sample requests
need a different set of tools.
Revisit: if traces show the same tool first in over 90% of runs.

Quick reference

  • Pick the least autonomous shape that meets the requirement
  • Single call: no lookups, one transformation, lowest cost
  • Workflow: steps known in advance; code decides the order
  • Agent: the model chooses tools; add limits, traces and evaluation
  • Each tool call adds at least one more model call
  • Agent input tokens grow with history and every tool result
  • Same first tool every run? Move that step into code

Common mistakes

  • Building an agent for a task with one fixed lookup, which adds model calls and no benefit.
  • Judging the shape on a demo prompt instead of on the full range of real requests.
  • Forgetting that tool results are sent back to the model, which adds input tokens on every step.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1Which requirement is best served by a single model call?

Question 2

2Why does a tool-using agent usually have higher latency than a workflow doing the same lookups?

Question 3

3Traces show the agent calls get_order first on every request. What should you consider?

Question 4

4Which ADK building block runs sub-agents in a fixed order?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    For each requirement, choose a shape and give one reason: (a) classify an email as billing or technical, (b) look up an order and then a shipment for every request, (c) answer open questions that may need docs, orders or neither.

  2. Exercise 2medium

    Estimate model calls and rough latency for an agent that calls two tools in sequence, assuming 1 s per model call and 0.2 s per tool. Then estimate a workflow that runs both tools in parallel and makes one model call.

  3. Exercise 3hard

    Write a one-page shape decision for the support assistant in this path: requirement, five sample requests with the lookups each needs, the chosen shape, the limits you will set, and the signal that would make you switch.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

Is an agent always better than a workflow?
No. An agent is more flexible but slower, costlier and harder to test. Use one only when the steps truly depend on the request.
Can I mix workflows and agents in ADK?
Yes. A workflow can include an LLM agent as one step, and ADK 2.x graph workflows let agents, tools and plain functions be nodes in the same graph.
How do I know my cost estimate is right?
Treat it as a starting guess, then read token counts and timings from real traces of representative requests and update it.

Go deeper

ShareXLinkedInWhatsApp