For the past few years, much of the enterprise AI conversation has focused on making AI better at answering questions. Organizations have adopted Retrieval-Augmented Generation (RAG) to connect large language models with internal documents, policies, and business knowledge, making responses more relevant and grounded.
But expectations are changing.
Businesses no longer want AI that simply explains how something should be done. They want AI to get things done, from resolving customer complaints and processing refunds to updating records and executing workflows.
This is where AI agents come into the picture. Unlike traditional chatbots that primarily respond to questions, AI agents can use tools, interact with enterprise applications, make decisions within defined boundaries, and execute tasks on behalf of users. But understanding what needs to be done and executing it correctly are two very different things.
Consider a customer who asks an online retailer to cancel one item from an order containing three products. The AI agent retrieves the correct cancellation policy, confirms eligibility, and proceeds with the request.
Everything appears to be working correctly.
Except the agent selects the wrong operation and cancels the entire order.
The system processes the cancellation, and the agent confidently reports success. From a technical perspective, the tool call succeeded. From the customer's perspective, the outcome is completely wrong.
This fictional scenario illustrates a fundamental shift in enterprise AI. With traditional read-only RAG applications, AI primarily provides information. With agents, AI can directly change business records and trigger operational consequences.
The shift from RAG to agents is not simply about adding tools to an LLM. It changes how AI applications must be designed, integrated, tested, and operated.
When AI moves from answers to actions, Architecture must evolve
RAG and agents are not competing technologies. Agents often use retrieval to access trusted policies, customer information, and business context. Retrieving the correct information does not guarantee that an agent will execute the correct action.
Traditional RAG architectures typically focus on retrieval quality, context management, response generation, and groundedness. Agentic systems introduce additional engineering responsibilities: deciding which actions to execute, integrating with business APIs, managing execution state, and handling failures across multiple steps.
An agent processing an order cancellation, for example, must do more than understand the policy. It must identify the correct item, verify ownership, select the appropriate operation, and confirm that only the intended change occurred.
This requires a different architectural approach.
The LLM can interpret requests and determine appropriate next steps, but critical business rules, permissions, and transaction constraints should be enforced by deterministic application components.
The model provides intelligence, while the surrounding architecture provides control and reliability.
When correct decisions still produce wrong outcomes
Not every agent failure begins with an incorrect model response. Sometimes, the problem lies in how actions are executed.
Imagine an agent processing a refund. It sends the request to a payment service, which successfully completes the transaction. However, the response is lost because of a network timeout.
The agent assumes the refund failed and retries.
The customer receives two refunds.
The decision was correct, the API functioned as expected, yet the business outcome was still wrong.
This is a familiar challenge in distributed systems, but it becomes particularly important when AI dynamically selects and executes operations.
Engineering teams must design agentic workflows with persistent execution state, controlled retries, idempotency mechanisms, timeouts, and recovery strategies. RFC 9110 explains why non-idempotent requests should not be automatically retried unless repetition is known to be safe, or it can be confirmed that the original request was never applied.
For multi-step workflows, developers must also consider partial failures. What happens if an order cancellation succeeds but the refund fails? Can the process safely resume? Does recovery require another business transaction?
An execution checkpoint can preserve progress, but it cannot automatically reverse changes already made in external systems.
These are not problems that better prompts or more capable models can solve on their own. They require reliable workflow orchestration and sound software engineering.
Security must be enforced beyond the model
As agents gain access to enterprise tools, security becomes more complex. An agent connected to customer databases, payment services, email platforms, or internal applications may have the ability to perform actions with real business consequences.
OWASP's guidance on Excessive Agency identifies excessive functionality, excessive permissions, and excessive autonomy as important sources of risk. For example, an agent responsible for retrieving customer orders should not automatically receive permission to modify or delete those orders.
Another challenge is prompt injection. An agent may encounter malicious instructions embedded in emails, documents, or external tool responses. Research such as AgentDojo demonstrates how manipulated tool responses can redirect agent behavior.
Engineering teams must therefore treat external content as untrusted, expose narrowly scoped tools, validate tool inputs, and enforce authorization in downstream systems.
The fundamental principle is simple: an LLM should not determine its own permissions.
Why orchestration and state management matter
A simple chatbot typically processes a request and generates a response. An agent may need to execute several dependent steps before completing a task.
Not every step needs another LLM call.
A reliable architecture should use deterministic workflows where the process is known and apply AI reasoning where interpretation, context understanding, or flexible decision-making adds value. Engineering teams also need to manage what happens between steps. Execution state must survive interruptions, tools may become unavailable, and long-running workflows may require human approval.
In multi-agent systems, shared state and validated handoffs become particularly important. An incorrect assumption made by one agent can otherwise influence several subsequent actions.
The goal is a workflow that stays consistent, recoverable, and within its authorized boundaries.
Observability must go beyond traditional logs
When a traditional application fails, engineering teams examine logs, exceptions, and transaction records.
Agentic applications require additional visibility.
What information influenced the agent? Which tool did it select? What permissions were checked? Did another agent contribute to the decision? What changed specifically in the business system?
Consider the refund scenario. Teams should be able to connect the customer request, retrieved policy, selected tool, approval record, payment transaction reference, and final account status. Without this chain of evidence, identifying the cause of an incorrect action becomes difficult.
However, tracing an execution is not the same as explaining why the model made a particular decision. Observability records must therefore be complemented by evaluation and business outcome validation.
This makes end-to-end traceability, monitoring, and failure investigation essential parts of production agent engineering.
Testing must extend beyond response accuracy
Traditional RAG evaluation commonly measures retrieval relevance, groundedness, and response accuracy. Agentic applications require a broader engineering validation approach.
Returning to the cancellation example, testing should establish whether the agent selected the correct item, invoked an authorized operation, avoided modifying other records, and produced the expected final order state. It should also examine what happens when APIs time out, records change during execution, requests are repeated, or misleading information enters the workflow.
Research such as τ-bench demonstrates the value of evaluating agents against expected database states and measuring reliability across repeated executions. AI assurance complements these engineering practices by providing systematic evaluation of whether the complete system behaves safely, reliably, and as intended.
The objective is to show that an agent performs consistently under realistic production conditions, not just once.
Building production-ready agents
Moving an agent from proof of concept to production requires more than selecting a capable model and connecting a few tools.
A practical approach is to begin with a clearly bounded workflow, limited permissions, and measurable success criteria. Developers can then introduce execution controls, state management, monitoring, and automated evaluation before increasing autonomy.
Human oversight should be designed according to the risk of the action. High-impact operations may require human-in-the-loop approval before execution, while suitable lower-risk workflows can operate with human-on-the-loop monitoring and intervention.
Clear governance is equally important. Every agent should have defined ownership, permitted capabilities, and operational accountability.
As agents evolve, adding a new tool, changing permissions, or introducing another agent can affect the behavior of the entire system. These changes must be tested and validated before deployment.
Production readiness should therefore be treated as a continuous engineering discipline, not a one-time release milestone.
Engineering for reliable action
Moving from RAG to agents is a significant step in enterprise AI development.
RAG remains an important foundation, providing agents with trusted knowledge and business context. But once AI begins taking actions, the engineering challenge extends far beyond retrieval and response generation.
The success of agentic AI will depend not only on how capable the underlying models become, but also on how effectively engineering teams design the systems around them.
Building an intelligent agent is one challenge. Building one that acts reliably, safely, and consistently in production is another.
