The key differentiators between AI Agents or Bots and Agentic Workflows are the self-reasoning, self-correcting, and autonomous nature of the former.
As per HuggingFace's definition: "An Agent framework is a layer on top of an LLM to make said LLM execute actions (like browse the web or read PDF documents), and organize its operations in a series of steps."
We are privileged to live in the AI era, where we have the rare opportunity to learn through comparison, iteration, and outcome refinement. Inspired by LinkedIn posts, I used a ChatGPT prompt to craft a Mermaid Sequence Diagram, later visualized through Mermaid itself.
The sequence highlights queries to SAP and Salesforce—real use cases that only begin to explore the potential of enterprise-grade applications. Note that connecting AI with tools via APIs isn't exclusive to AI; this capability has long been available in advanced RPA solutions and now AI Workflows.
The diagram below depicts a sequence of interactions between different components of a system involving an AI agent, to fulfill a user request. It illustrates the workflow and decision-making process, including data retrieval and error handling.
- User — Initiates the process with a request.
- Interface — The user's point of interaction with the system.
- Agent — An AI agent that receives the user's request and orchestrates the subsequent steps.
- LLM — A core component used for reasoning, analysis, and generating responses.
- Reasoner — A module responsible for generating reasoning steps and evaluating options based on the LLM's output.
- Tools — External systems or modules used by the agent (e.g., data retrieval tools).
- Enterprise Data — The data sources used by the system (e.g., SAP, Salesforce).
- User Request — The user initiates a request through the interface.
- Request Forwarding — The interface forwards the request to the agent.
- Deliberation Loop (LLM & Reasoner) — The LLM analyzes the context, the Reasoner generates steps, the LLM evaluates options and proposes an action plan.
- Data Retrieval — The agent uses tools to query SAP and Salesforce and receives responses.
- Complex Decision — The LLM evaluates the retrieved data, refines its decision in a loop, and produces a recommendation.
- Action Execution — The agent executes the recommended actions.
- System State Update — The system's state is updated based on the executed actions.
- Outcome — Success — A confirmation is sent back to the user through the interface.
- Outcome — Error — An error notification triggers analysis, a recovery plan, and a status update to the user.
- Iterative Reasoning — The "Decision Refinement" loop highlights the iterative nature of the decision-making process.
- Data Integration — The diagram shows integration with enterprise data sources like SAP and Salesforce.
- Error Handling — The inclusion of an "Error Case" demonstrates the system's ability to handle errors and recover.
- AI-Driven Decision Making — The central role of the LLM and Reasoner emphasizes the AI-driven nature of the process.
In essence, this diagram illustrates how an AI agent uses reasoning, data retrieval, and iterative refinement to fulfill user requests in a complex enterprise environment.