Seyed Masoud Hosseini · Overview · Study log · Ideas · Transcript · RSS feed
LLM Agents · Lecture 7 of 12 · 1:10:56
Lecture 7: AI Agents for Enterprise Workflows
Study guide
What this lecture covers
This lecture, given by two researchers from ServiceNow Research, looks at how LLM agents can automate everyday enterprise work: the huge volume of small, non-routine tasks that are individually too unique to script but collectively represent enormous effort. It distinguishes API-calling agents (which use formal tool specifications) from web agents (which interact with pages the way a human would, by clicking and filling forms), and walks through a running example of an IT help-desk ticket to show where automation could help.
The lecture then presents two concrete research contributions: Tape Agents, an open-source framework that logs all agent thoughts and actions to a structured "tape" so agent behavior can be audited, optimized, and distilled into cheaper models; and WorkArena, a benchmark built on the real ServiceNow product that measures how well agents handle realistic workplace tasks. It closes with a broader look at how AI agents might reshape knowledge work. After watching, you should understand the difference between API and web agents, what a tape-based agent architecture buys you, and why current web agents still fail badly on complex, multi-step enterprise tasks.
Key ideas
- API-calling agents vs. web agents: API agents use a formal set of tool endpoints and exchange structured text; web agents perceive a browser (HTML, accessibility tree, or screenshots) and act by clicking, typing, and navigating like a human.
- The "grains of sand" problem: enterprise automation has already solved high-volume, predictable tasks (like onboarding workflows); agents' opportunity is the long tail of low-volume, one-off tasks that are too unique to script.
- Tape: a structured log of every thought, action, and environment response across all agents in a system, treated as a data object that downstream algorithms can process for auditing, optimization, or distillation.
- GREAT attributes: the quality dimensions (grounded, responsive, accurate, disciplined/transparent, helpful-ish) used to evaluate conversational agents built with Tape Agents.
- Distillation via tapes: recording traces from an expensive large model (e.g. Llama 3.1 405B) and using them to fine-tune a much smaller model (Llama 8B) that matches its quality at a fraction of the cost.
- WorkArena: an open-source benchmark of about 600 work-related tasks run on real ServiceNow developer instances, spanning simple UI interactions (level 1) up to complex, multi-step workflows requiring navigation and planning (level 3).
- BrowserGym and AgentLab: companion tooling for standardizing web agent observation/action spaces across benchmarks, and for debugging and running large-scale reproducible experiments.
Walkthrough
Defining API and web agents (5:07)
The lecture defines LLM agents as systems with a degree of autonomy that can plan, act in an environment, receive feedback, and pursue goals over multiple steps, distinguishing them from older, narrow reinforcement-learning agents. It splits LLM agents into API-calling agents, which use formally specified tool endpoints, and web agents, which navigate pages directly. A running example follows an IT ticket from employee John through an agent named Sandy resolving it manually, illustrating how many small manual steps remain even with existing generative AI help, and how automation has progressed from scripted RPA to conversational workflows to agentic workflows.
Tape Agents framework (17:21)
The lecture introduces Tape Agents, released as open source, aiming to combine the software-engineering strengths of frameworks like LangGraph and AutoGen with the optimization strengths of frameworks like DSPy. The core abstraction is the tape: a structured, shared log of thoughts and actions across potentially multiple agents and sub-agents, updated as an orchestrator dispatches actions to the environment and receives observations back. Because the tape is a data structure, it enables auditing, prompt optimization, and distillation of large "teacher" agents into smaller "student" agents.
Distillation case study (27:31)
Using a case study on an assistant that helps fill out complex work-request forms, the lecture describes generating tapes from a very large, expensive Llama 3.1 405B agent and using them to fine-tune an 8B model, evaluated on the GREAT quality attributes (grounded, responsive, accurate, disciplined, helpful). The resulting small model matched the quality score of the large model and a zero-shot GPT-4o baseline while costing roughly 300 times less per million conversation turns.
Building and evaluating web agents (32:42)
The second half of the lecture, presented by the co-speaker, covers web agents in depth. It shows that a minimal web agent can be built by prompting an LLM with a task description, the page's HTML, and an allowed action space, then executing chosen actions through browser automation tools like Playwright. A demo shows GPT-4 filling out an expense report, but the lecture stresses this is brittle and slow (demos were sped up 8x), motivating the need for rigorous benchmarks.
Benchmarks and the WorkArena results (37:46)
The lecture surveys web agent benchmarks: simple synthetic tasks (MiniWoB), trace-based benchmarks scored against human action traces, and live benchmarks that check end states instead (WebArena, Visual WebArena). It introduces WorkArena, built on real ServiceNow developer instances with roughly 600 tasks split into three difficulty levels. Reported results show human evaluators scoring about 94% on the harder levels, while the best tested agent scored 42.7% on level 1 and dropped to near zero on levels 2 and 3, with failures attributed mainly to poor long-term planning and hallucinated UI controls.
Tooling, challenges, and the future of knowledge work (50:55)
The lecture describes BrowserGym (a standardized observation/action interface unifying multiple benchmarks) and AgentLab (tooling for debugging agent runs and ensuring reproducible experiments amid constantly changing websites and models). It lists open challenges: long-context understanding of huge pages, long-term planning without visibility into later pages, learning from demonstrations, multimodality, cost/latency, and safety against prompt injection from malicious page content. It closes by imagining a future multi-agent version of the earlier IT-ticket example, and discusses using databases like O*NET alongside benchmarks like WorkArena to estimate how much of real jobs' tasks agents could eventually automate.
Before you watch
- Familiarity with the basic LLM agent loop (plan, act, observe, iterate) from earlier lectures in this course is assumed.
- Some exposure to prompt optimization concepts (as in the DSPy lecture) helps with the Tape Agents discussion, though it is not required.
Check your understanding
- What distinguishes an API-calling agent from a web agent in this lecture, and what are the tradeoffs between them?
- What is a "tape" in the Tape Agents framework, and why does treating it as data (rather than just a log) matter?
- How did the case study achieve a roughly 300x cost reduction while preserving quality, and what was used to measure that quality?
- What was the gap between human and agent performance on WorkArena level 2 and 3 tasks, and what two failure modes does the lecture attribute this to?
- Name two open challenges for web agents raised at the end of the lecture and explain why each makes reliable deployment harder.
← Lecture 6: Agents for Software Development · Lecture 8: Neural and Symbolic Decision Making →
