Skip to content
Giminger ConsultingDE

Workflow or agent: choosing the right architecture

Key takeaway

A workflow follows fixed, pre-programmed steps in which a language model handles individual tasks. An agent decides on its own which tools to use and in what order. For most start-up features a workflow is more reliable and cheaper; an agent pays off only when the path to a solution genuinely varies from case to case.

Lessons in this path
  1. Workflow or agent: choosing the right architecture
  2. Connecting tools: tool calling and the Model Context Protocol
  3. Running agents in production: limits, approvals and costs

What exactly is an AI agent?

An AI agent is a program in which a language model works in a loop: it receives a goal, decides on the next step, calls a tool, reads the result and decides again until the goal is reached or a stop condition applies. Tools can be a database query, a web search, creating a ticket or sending an email.

The term is used very loosely in the market. Many products marketed as “agents” are really workflows with a model at certain steps. That is not a weakness; on the contrary, fixed sequences are easier to test, explain and price.

For founders the distinction also matters commercially. Investors and customers increasingly ask what a product actually decides on its own. If you can clearly describe where the model acts and where fixed rules apply, you come across as more credible than someone who labels everything an “agent”.

When is a workflow better and when an agent?

The decision mainly depends on how predictable the solution path is. If you can write down the steps, build a workflow. If the steps depend on information that only emerges during processing, an agent may make sense.

Decision aid: workflow or agent
CriterionWorkflowAgent
Solution pathAlways the same or few variantsStrongly case-dependent
Cost of errorsHigh, e.g. payments, contractsLimited or protected by approval
Cost predictabilityImportantFluctuation acceptable
Typical exampleRead, check and book an invoiceInvestigate a bug cause across several systems

Start with the simplest design that solves the task. More autonomy is an option for later, not a starting point.

Which building blocks does every agent architecture have?

Regardless of framework, whether you work directly with a model provider’s API or use libraries such as LangGraph, the OpenAI Agents SDK, the Claude Agent SDK, Pydantic AI or Mastra, agents consist of the same parts. If you understand these parts, you can compare frameworks and switch if necessary.

  • Instructions: the agent’s role, goal, rules and limits.
  • Tools: clearly described functions with fixed input schemas.
  • State and memory: what the agent keeps within a task and beyond.
  • Stop conditions: maximum steps, time and cost budgets.
  • Approval points: places where a person must confirm.
  • Logging: every step stored in a traceable way.

Going deeper: patterns between workflow and agent

Between a rigid workflow and a free agent there are proven intermediate forms. With routing, a model classifies the request and forwards it to a specialised flow. With chaining, one step produces a draft and a second checks it. With the orchestrator pattern, a model splits a task into subtasks and distributes them while the merge remains controlled. These patterns often deliver most of an agent’s value with much better testability.

Multi-agent systems in which several agents communicate with each other are rarely the right starting point for start-ups. Every additional handover is a source of errors and increases cost and latency. They become useful when subtasks are truly independent and can run in parallel, for example in broad research.

Example: support triage as a workflow instead of an agent

A fictional SaaS start-up for shift planning wants “an agent for support”. Analysing a hundred tickets shows that roughly two thirds fall into four categories, each with a fixed solution path, such as resetting a password or explaining an export.

The team therefore first builds a routing workflow: a model classifies, drafts are generated from the knowledge base for the four categories, and everything else goes to a person. Only for the remaining complex cases, such as integration errors, does it later test an agent with read access to logs and account data that proposes a diagnosis but changes nothing.

Common mistakes

  • Building an agent although the steps can be fully written down.
  • Starting with a multi-agent system before a single flow runs reliably.
  • Defining no stop conditions, so loops run up costs.
  • Choosing the framework before the task and the cost of errors are clear.

Frequently asked questions

Do I need an agent framework?

Not necessarily. Simple agents can be built directly on the API in a few dozen lines. Frameworks help with state, resumption and observability, but tie you to their abstractions.

Are agents more expensive than workflows?

Usually yes, because they need several model calls per task and the number of steps varies. Measure cost per completed task, not per call.

Can I move from a workflow to an agent later?

Yes, if the tools are cleanly encapsulated. Functions that a workflow calls can later be used by an agent. That is why it pays to build tools with clear interfaces from the start.

Try it yourself

Take a planned AI feature and write down its steps as concretely as possible. Mark the points where the next step genuinely depends on the content.

Check your result

You can justify whether the feature becomes a workflow, an intermediate pattern or an agent, and you have named stop conditions and approval points.

Official documentation and sources

Practical guides and references