11 min read

Agentic workflows in enterprise: patterns and anti-patterns

When agents pay off in corporate processes and when a deterministic workflow is enough: architecture, typical failures and a rollout checklist.

Victor Buzin · Founder & Principal Engineer, AnetLab
16+ years in enterprise development: .NET, AI/LLM systems, RAG, MCP. Author of the material and the practices behind it.

Why agentic workflows matter for enterprise

Agentic workflows combine a reasoning LLM, tool call execution, retrieval and policy controls to automate multi-step tasks with less human involvement. In enterprise this usually means moving from chat assistants to systems that can:

  • classify and route requests,
  • assemble context from corporate sources,
  • call APIs and internal services,
  • hand the task to a human when needed,
  • and produce an auditable result.

On paper this looks simple. Inside a real organization you also get latency budgets, access control, compliance, change management, dependency sprawl and uneven readiness for autonomy. So the architecture has to optimize for reliability first, and novelty second.

A useful mental model: an enterprise agent is not a single prompt. It is a workflow runtime. The model is only one component of a wider control plane.

If you design everything as “LLM plus tools”, you will almost inevitably get problems like:

  • uncontrolled fan-out of tool calls,
  • duplicated actions,
  • context drift,
  • uncontrolled cost,
  • and results that downstream systems cannot trust.

Below are the patterns that help keep agentic workflows operationally sane.


A practical reference architecture

Diagram brief: A layered diagram showing:

  • Channel layer: web app, Teams/Slack, API, ticketing system
  • Orchestration layer: policy engine, planner, state machine, retry controller, human approval gate
  • Model layer: LLM, small classifier model, embedding model
  • Knowledge layer: RAG index, document store, vector DB, metadata catalog
  • Tool layer: CRM, ERP, email, internal APIs, MCP servers
  • Governance layer: authN/authZ, audit logs, prompts registry, safety filters, secrets management
  • Observability layer: traces, metrics, cost tracking, evaluation harness

A practical enterprise architecture for an agentic system usually splits responsibilities like this:

  1. Intent capture — take the request from the user or the system.
  2. Policy check — decide whether the task is allowed, how risky it is and whether approval is needed.
  3. Context assembly — collect the relevant data from retrieval systems and business APIs.
  4. Planning — break the work into bounded steps.
  5. Execution — call tools with explicit arguments.
  6. Verification — check the result, find anomalies, compare against the rules.
  7. Escalation or completion — hand over to a human or finish the action.
  8. Audit and learning — keep the traces for evaluation, compliance and improvements.

This architecture has to be explicit. If the orchestration is hidden inside a single prompt, you lose control over safety, observability and the ability to iterate.


Six architectural patterns

1) Retrieve-then-act

This is the safest default for enterprise workflows. The agent first assembles authoritative context through RAG, structured queries or an API lookup, and only then decides what to do.

Best fit for: support triage, policy lookup, contract summarization, internal knowledge assistants, incident response prep.

Why it works: the model is less likely to hallucinate actions when it has the right facts before planning.

Design notes:

  • Prefer structured retrieval for operational facts.
  • Keep the context limited to the minimum necessary evidence.
  • Record which sources influenced the action.

Common implementation choice: a retrieval pipeline plus deterministic business rules plus an LLM for synthesis.


2) Planner-executor split

The planner produces a bounded plan, the executor runs one step at a time.

Best fit for: multi-step operations, cross-system fulfillment, onboarding, procurement workflows, internal ops automation.

Why it works: splitting planning from execution reduces accidental tool chaining and makes failures easier to localize.

Design notes:

  • Make the planner output machine-readable.
  • Limit each step to a single intent.
  • Re-plan after tool results if the state has changed substantially.

Example of the shape:

  • Planner: “collect the customer record, check the entitlement, prepare the response, request approval if the refund is above the threshold”.
  • Executor: runs each step with explicit preconditions.

This pattern is useful when the LLM needs reasoning but must not be allowed to improvise the execution path on its own.


3) Human-in-the-loop approval gates

High-risk actions must pass an approval gate before execution.

Best fit for: financial actions, external communications, data deletion, access grants, production changes, legal or compliance-sensitive tasks.

Why it works: it combines machine speed with accountable human judgment.

Design notes:

  • Define the risk thresholds in advance.
  • Show the human a concise evidence bundle, not the entire raw prompt.
  • Record the approver identity and the rationale.

Do not use approval gates as a patch for bad automation design. A gate has to protect a bounded process, not rescue a chaotic system.


4) Event-driven agent orchestration

Instead of waiting for a user request, the system reacts to events: a ticket was created, a contract expired, a data quality job failed, a KPI went past a threshold.

Best fit for: operations, customer success, compliance monitoring, ITSM, supply chain alerts.

Why it works: many enterprise workloads are event-native already.

Design notes:

  • Use durable queues and idempotent handlers.
  • Encode the event metadata so that the agent understands urgency and ownership.
  • Separate detection from action to avoid noisy auto-remediation.

This pattern combines well with policy rules and bounded automation.


5) Tool-calling with a narrow capability surface

Give the agent only the tools it actually needs, and expose them through small, sharp interfaces.

Best fit for: production systems where reliability matters more than flexibility.

Why it works: fewer tools means less ambiguity, a smaller blast radius and an easier security review.

Design notes:

  • Wrap internal services behind stable contracts.
  • Validate every tool input.
  • Design tools around business verbs, not around raw infrastructure primitives.

For example, create_support_case is better than execute_generic_api_request.

Narrow tool surfaces are especially useful when integrating through MCP, because they push you toward reusable, versioned tool definitions instead of ad hoc prompt glue.


6) State-machine governed autonomy

Use an explicit state machine to control which actions are allowed at each stage.

Best fit for: onboarding, claims handling, case management, procurement, compliance workflows.

Why it works: state machines make autonomy legible. They state explicitly what the agent may do next and which conditions must hold.

Design notes:

  • Model the states, transitions, guards and terminal outcomes.
  • Keep the LLM as a decision-support component inside the state machine, not above it.
  • Store the state externally so the work can continue after a failure.

For enterprise this is often the most convenient pattern when you need deterministic control with a touch of reasoning.


Five anti-patterns to avoid

1) Unbounded autonomous loops

If the agent can think, call tools and retry forever without a budget, it will eventually create cost, delay or damage.

Symptoms: runaway API calls, repeated retries, duplicated tickets, a long tail of latency.

Fix: step limits, timeouts and budget caps.


2) Prompt-as-orchestrator

A huge prompt that holds all the orchestration logic is fragile and hard to test.

Symptoms: hidden dependencies, unreadable logic, version drift and trial-and-error debugging.

Fix: move the control flow into code or a workflow engine; leave the prompt for reasoning.


3) Tool sprawl without governance

Every team adds its own wrappers, naming conventions and permissions model.

Symptoms: duplicate capabilities, inconsistent schemas, security exceptions and unclear ownership.

Fix: standardize the tool contracts, register the capabilities centrally and apply consistent authz/audit logging.


4) No verification layer

An agent that performs actions without checking the outputs is dangerous in any enterprise environment.

Symptoms: invalid records, silent partial failures and weak confidence in the automation.

Fix: add schema validation, post-action checks, business rule validation and anomaly detection.


5) Treating autonomy as a binary

Teams often ask whether a system is “agentic” or “not agentic”. In practice autonomy is a spectrum.

Symptoms: over-automation in risky areas or under-automation where the risk is low.

Fix: assign autonomy levels by workflow step, data sensitivity and business impact.

Good enterprise design lets some steps be fully automated while others require approval or deterministic handling.


Decision matrix: what to use when

Scenario Recommended pattern Autonomy level Main reason Best guardrail
Internal knowledge Q&A Retrieve-then-act Low Facts first, actions second Source citation and confidence threshold
Ticket triage and routing Event-driven orchestration Low to medium High volume, repeatability Idempotency and queue retries
Refund request handling Planner-executor split Medium Several steps, clear policy Approval above a threshold
Access provisioning State-machine governed autonomy Medium Strict lifecycle and audit needs Role-based policy checks
Customer-facing email drafting Human-in-the-loop gate Low External impact, tone matters Human approval before send
Cross-system fulfillment Tool-calling with narrow capability surface Medium API-heavy, bounded actions Tool allowlist and input validation

How to use the matrix:

  • If the task is mostly informational — start with retrieve-then-act.
  • If the task touches several systems — separate planning from execution.
  • If the action is irreversible or externally visible — add an approval.
  • If the process has lifecycle states — model them explicitly.

The most common mistake is trying to apply one pattern to every workflow. Mature enterprise programs combine them.


How Agent Shaker fits in

Agent Shaker can be used as a practical accelerator for prototyping and operationalizing agentic workflows in an enterprise environment. Its natural role is not to replace the architecture but to standardize part of the workflow surface.

Typical points of natural fit:

  • defining repeatable agent flows,
  • packaging tool integrations,
  • experimenting with prompt and policy variants,
  • creating reusable templates for orchestration.

Used well, Agent Shaker helps you move from ad hoc experiments to governed workflows. It is especially useful when you need to compare patterns side by side, test tool boundaries and keep implementation consistency between teams.

Agent Shaker is an open-source platform for orchestrating agents that we build at AnetLab. It gives you a single layer over models and tools: running scenarios, comparing configurations side by side, tracing calls to MCP servers and reproducible runs. The repository is open — take it as a starting point and build your own setup on top.


Implementation checklist

Before launching an enterprise agent workflow, check the following:

  • The business outcome is clearly defined.
  • The workflow has a bounded autonomy level.
  • Every external tool has a stable contract.
  • Authentication and authorization are enforced.
  • Prompts, policies and tool schemas are versioned.
  • There is a retrieval strategy for authoritative data.
  • Every action is logged with trace IDs.
  • There is a retry policy and a step budget.
  • High-risk actions require approval.
  • Outputs are validated before downstream use.
  • The team has an evaluation harness.
  • Ownership for failures is documented.

If any of this is missing, the workflow is most likely not ready for production autonomy.


FAQs

1) What is an agentic workflow in an enterprise context?

It is a workflow where an AI system can reason about a task, assemble context, choose tools and execute bounded steps under a control policy.

2) How is it different from a chatbot?

A chatbot mostly answers messages. An enterprise agentic workflow can perform multi-step work, interact with systems and produce auditable outcomes.

3) Do all enterprise agent systems need full autonomy?

No. Most production systems need selective autonomy depending on risk, impact and data sensitivity.

4) Where do RAG and MCP fit in?

RAG is usually used to ground the agent in authoritative enterprise knowledge. MCP is often used to expose tools and services through standardized interfaces.

5) What is the biggest architectural mistake?

Treating the prompt as the whole system. Real agentic workflows require orchestration, policy, verification and observability outside the model.

6) Do you need an agent for every automation task?

No. Use an agent where reasoning, context selection or dynamic planning add value. Where the process is already well-defined, deterministic automation is better.

7) How do you control cost?

Set step budgets, route simple requests to smaller models or rules, cache the retrieval results and limit unnecessary tool calls.



CTA

If your team is evaluating agentic workflows in enterprise systems, start with one bounded use case and design the orchestration layer before scaling autonomy.

Agent Shaker can help standardize the workflow surface, reduce implementation drift and speed up experimentation with governed agent patterns.

Try Agent Shaker or tell us about your task — we will build the solution for your setup, not for a ready-made template.

Read also

Request

Discuss the task

Leave your name and email — I reply within one working day. If the task is urgent, write directly toproject@anetlab.ru.