Brief Summary
This video explains the significant difference between traditional workflow automations and AI agents, particularly in customer support. It uses a real-world example from the speaker's business, Blot, to visually demonstrate how AI agents offer more flexibility and power compared to hard-coded workflows. The video also addresses the challenges in adopting AI agents, including the probabilistic nature of LLMs, cost, security, and interoperability.
- AI agents dynamically plan and execute tasks, adapting to various scenarios without manual hard-coding.
- Traditional workflow automations require predefined paths and manual handling of edge cases, making them less flexible and more time-consuming.
- Challenges in AI agent adoption include the probabilistic nature of LLMs, cost, security concerns, and interoperability issues.
Introduction: AI Agents vs. Workflow Automations
The video introduces the concept of AI agents and compares them to traditional workflow automations. It highlights that while workflow automations have been the norm for decades, AI agents offer a more powerful and flexible approach. The speaker aims to explain the difference using a real-life example from their business, Blot, focusing on customer support. The video will visually demonstrate the contrast between building workflow automations and AI agents, emphasizing the advantages of AI agents and discussing the challenges of their broader adoption.
Traditional Workflow Automations
Traditional workflow automations involve creating multi-step workflows to stitch together APIs and automate tasks. These are known as robotic process automation (RPA) in enterprise settings and workflow automation in SMBs, utilizing tools like Zapier, Make, Naden, and Pipere. However, building and maintaining these hard-coded workflows is slow, brittle, and requires repetitive code to handle numerous possibilities and edge cases. The speaker illustrates this with an example showing multiple branches of logic depending on the use case.
AI Agents: A New Approach
AI agents offer a contrasting approach by allowing users to connect tools once and then instruct the agent in plain English. The agent dynamically plans actions, determines the order, and recovers from errors without manual hard-coding. The speaker uses their Stripe AI agent in N8N as an example. This shift from hard-coded branches to AI agents is crucial for achieving faster, more flexible, and more powerful AI automation.
Real-World Example: Customer Support in Blot
The speaker uses their AI app, Blot, to illustrate the difference between workflow automations and AI agents in customer support. They use Intercom, a support tool with a workflow builder, to handle billing-related questions. The example focuses on a refund workflow where customers who accidentally upgrade during a free trial might request a refund. The workflow includes messages explaining the free trial terms and options for the customer, such as requesting a refund, applying a promo code, messaging the founder, or acknowledging the information.
Refund Flow: Workflow Automation vs. AI Agent
The refund flow begins when a customer selects "I still want a refund." The system processes the request and calls the Stripe AI agent in N8N. The key point is that canceling a subscription and refunding the last charge requires only one step with the AI agent. In contrast, traditional workflow automation would involve multiple steps, such as retrieving customer information, making custom API calls to Stripe, getting a list of customer charges, calling the refund endpoint, summarizing changes with ChatGPT, and sending the summary back to the support tool.
Additional Use Cases and Limitations of Workflow Automations
The speaker explains that handling additional use cases, such as applying a promotion code or canceling an expired subscription, requires building separate workflow automations or adding branching logic to the existing workflow. The Stripe API is extensive, and there are numerous combinations of actions that can be taken. The weakness of traditional workflow automations is that each workflow path must be hard-coded, and edge cases must be handled manually by the developer team.
AI Agent Implementation: Stripe AI Agent
The speaker demonstrates how their AI agent handles the same use cases. The AI agent has a web hook and a prompt that defines its task: to analyze requests using a set of tools. The AI agent formulates a plan, follows it, and summarizes its actions. To set up the AI agent, the speaker attaches the necessary tools, such as API calls to get customer information, retrieve charges, cancel subscriptions, refund charges, and apply promo codes. With access to these tools, the AI agent can perform any combination of actions without hard-coding each path.
AI Agent in Action: Canceling Subscriptions and Applying Discounts
The speaker illustrates how the AI agent simplifies tasks in the Intercom workflow builder. For canceling a subscription and refunding a charge, the instruction to the AI agent is simply "cancel subscription and refund last charge." For applying a discount, the instruction is "apply this particular promotion code to their active subscription." The AI agent understands these natural language instructions and performs the actions accordingly. The speaker also shows how to view previous runs of the AI agent in N8N, including the exact steps taken to handle each request.
AI Agent Decision-Making and Execution
After setting up the tools, the AI agent dynamically analyzes the task, plans the next steps, and decides which tools (API calls) to use. It orchestrates everything in a logical sequence to accomplish the task. Once the planning is complete, the AI agent executes each action and reflects on the result. If something fails, it tries again or attempts a different approach. The AI agent uses only the relevant tools for each task, avoiding unnecessary API calls. The key advantage is that the speaker does not have to hard-code these steps; the AI agent dynamically decides what to do based on the task and available tools.
Customer Summary and AI Agent Prompt
The final step involves outputting a summary of the AI agent's actions, which is returned to Intercom and forwarded to the customer. This summary is not hard-coded; the AI agent generates it using ChatGPT based on the actions it took. The AI agent's prompt includes the task to summarize the actions, and the summary varies depending on the request, such as applying a promotion code, handling an incomplete subscription, or canceling and refunding an active subscription.
Best Practices: Guard Rails for AI Agents
The speaker discusses best practices for building AI agents, emphasizing the importance of guard rails due to the probabilistic nature of LLMs. Guard rails tell the AI agent to only perform specific actions or to seek human approval before making high-risk decisions. In the speaker's setup, they control the message passed to the AI agent, preventing customers from directly interacting with it for sensitive use cases like billing and subscriptions.
Challenges in Production and Future of AI Agents
The speaker addresses the challenges in deploying AI agents in production, noting that it is still early days for widespread adoption. Key challenges include the probabilistic nature of LLMs, cost and performance issues, security concerns, and interoperability. The probabilistic nature of LLMs requires guard rails and LLM operations. Cost and performance are affected by the latency of each API call. Security is a major concern, requiring secure credentials and the enforcement of least privilege. Interoperability can be improved through model context protocol (MCP), which enables AI agents to connect securely and efficiently to various services. Despite these challenges, the speaker is optimistic about the future of AI agents, highlighting their power to dynamically decide actions and handle edge cases.