AI agents are programs where LLM outputs control the workflow.
An AI solution is one that involves any of these:
- Multiple LLM calls
- LLM with the ability to use tools
- An environment where LLMs interact
- A planner to coordinate activities
- Autonomy
Agentic Systems
Anthropic distinguishes two types:
- Workflows: Systems where LLMs and tools are orchestrated (planned, organized, and coordinated very carefully—often from behind the scenes—to achieve a highly specific and desired outcome) through predefined code paths. It follows a predefined, step-by-step sequence of operations (like a recipe).
- Agents: Systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.
Workflow
They have 5 design patterns:
- Prompt Chaining: Decompose into fixed small tasks. (Input goes from one LLM to the next in a linear manner).
- Routing: Direct an input into a specialized sub-task, ensuring separation of concerns. (Input goes to one LLM, and then the LLM decides which model to select next).
- Parallelization: Breaking down tasks and running multiple tasks concurrently. (Input goes to a program, the code decides to send it to multiple LLMs for parallelization, and then an aggregator aggregates the output).
- Orchestrator-Worker: Complex tasks are broken down dynamically by an LLM and combined by a synthesizer.
- Evaluator-Optimizer: LLM output is validated by another LLM.
Agents
- Open-ended
- Feedback loop
- No fixed path (dynamic, no fixed steps)
- Note: They are less predictable, having no predictable paths, output, or cost. Thus, use monitors and guardrails.
A human feeds an input to the LLM, and then the LLM interacts with the environment and gets feedback from the environment.