I previously explored agentic AI, focusing on autonomous AI decision-making by agents. Anthropic (the company behind Claude) recently shared their insights on agent development in their essay “Building effective agents”. Anthropic’s essay serves as a good reminder about what agentic AI is and I’ll share my takeaways here.
What are agents?
At Anthropic, the definition of agentic systems comprises both fully autonomous systems and predefined automated workflows. However, the essay makes an important architectural distinction between workflows and agents:
- Workflows are systems where LLMs and tools are orchestrated through predefined code paths.
- Agents, on the other hand, are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.
Building on this distinction, there’s a great post by Alexandre Kantjas in which he outlines the main differences between workflows and AI agents, as well as their respective strengths and weaknesses:
- AI workflows are automations that are best for executing predefined steps and logic, calling LLMs via API to automate specific tasks. Workflows are typically used to automate repetitive processes like order processing or managing customer accounts.
- AI agents are programs designed to perform predefined tasks autonomously. These programs are best for non-deterministic, adaptive tasks, with the agent adapting its behaviour in response to changing conditions or real-world events.
Building blocks, workflows, and agents
Anthropic’s essay explores these common patterns for agentic systems:
- Building block: the augmented LLM — The augmented LLM is an LLM enhanced with augmentations such as retrieval (finding relevant info from a collection of data sources), tools, and memory. These capabilities enable data models to generate their own search queries and determine what information to retain.
- Workflow: prompt chaining — Prompt chaining breaks down a task into a sequence of steps where each LLM processes the output of the previous one. Prompt chaining can be used for tasks such as writing a document outline, checking that the outline meets set criteria and then writing the document based on the outline (see below diagram as a nice example of a prompt chaining workflow).
- Workflow: Routing — Routing classifies and input so that it can direct it to a specialised followup tasks. Workflows need to allow for separation of concerns and specialised prompts so that the right sequence can be applied to the correct input.
- Workflow: Parallelisation — Parallelisation happens when LLMs work simultaneously on a task and have their outputs aggregated programmatically. Parallelisation, manifests in two key variations: (1) voting — running the same task multiple times to get diverse outputs and (2) sectioning — breaking a task into independent subtasks run in parallel. In the essay, Anthropic shares examples where parallelisation can be useful. You can for example use voting when reviewing a piece of code for vulnerabilities, where several different prompts review and flag the code if they find a problem. Sectioning can be useful in a scenario where one model instance processes user queries whilst another model instance screens the queries for inappropriate content or requests.
- Workflow: Orchestrator-workers — In the orchestrator-workers workflow, a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesises their results.
- Workflow: Evaluator-optimiser — In the evaluator-optimiser workflow, one LLM call generates a response while another provides evaluation and feedback in a loop. This workflow can be be particularly effective when it uses clear evaluation criteria, and when iterative refinement after evaluation — by a human or an LLM — provides measurable value.
- Agents — Autonomous agents are typically just LLMs using tools based on environmental feedback in a loop. The essay explains how agents begin their work with either a command from, or interactive discussion with, the human user. Once the task is clear, agents plan and operate independently. During execution, it’s crucial for agents to gain “ground truth” from the environment at each step (such as tool call results or code execution) to assess its progress. Agents can then pause for human feedback at checkpoints or when encountering blockers.
- Tools — Anthropic’s essay also touches on the importance of tool use by agents. Tool use in agentic AI is a design pattern that allows AI agents to use external resources to perform specific tasks (e.g. calling a search engine to conduct a web search). To enable tool use, AI agents are given functions that they can request to to call to gather information, take action, or manipulate data.
Main learning point: Workflows and agents are two different things. AI workflows are automations that are best for executing predefined (and predictable) steps whereas agents respond to dynamic events and conditions.
Related links for further learning:
- https://www.linkedin.com/pulse/determinism-ai-navigating-predictability-flexibility-scott-cohen-3oqze/
- https://www.automationanywhere.com/rpa/agentic-workflows
- https://www.gartner.com/en/articles/intelligent-agent-in-ai
- https://aws.amazon.com/bedrock/agents/
- https://medium.com/@elisowski/ai-agents-vs-agentic-ai-whats-the-difference-and-why-does-it-matter-03159ee8c2b4
- https://www.ibm.com/think/topics/ai-workflow
- https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/chain-prompts
- https://medium.com/@slhebner/causality-in-agentic-ai-1d9b8b852b34
- https://www.moveworks.com/us/en/resources/blog/improved-ai-grounding-with-agentic-rag
- https://www.deeplearning.ai/the-batch/agentic-design-patterns-part-3-tool-use/