First Steps with AI Agents and Multi-Agent Workloads
Introduction
It’s difficult to have a conversation about AI applications without talking about the idea of an AI completely taking over all aspects of a workflow. As discussed in Chapter 1, AI agents are LLMs with prompts that explain how they should behave, along with tools that affect and describe an external environment. ChatGPT, for example, is an agent: It is one of OpenAI’s LLMs and has a prompt telling it things like its knowledge cutoff as well as tools to perform web searches and log information about its users for future use. Agents often also have at least a concept of conversation and memory—even if that concept is a “stateless system” that retains no information from previous messages, meaning the conversation you had yesterday with an agent will be completely forgotten by the next time you talk to it. Figure 4.1 is repeated from Chapter 1, visualizing the core components of what makes an agent an agent.
Figure 4.1 Agents are allowed to make their own decisions about which tools to call to affect their environment and get information.
For our first agent case study, let’s take the SQL generation workflow we’ve been working on in the past few chapters and turn it into an agent. We can then see what we gain and what we lose from this approach.
