Member-only story
LLM Workflows: From Automation to AI Agents
Patterns, Components, and (Python) Example Code
This is the 3rd article in a series on AI agents. In the previous post, I showed how LLMs can use tools to interact with real-world systems and solve problems without explicit instruction. While this flexibility is powerful, it can come at the cost of control and reliability. Here, I will discuss how we can balance these two properties via LLM workflows. I’ll start with a high-level overview of how to design such systems and finish with a concrete example of implementing an artificial virtual assistant.
A workflow is a set of steps that generate a desired result. For example, my workflow for sending an email typically goes like this.
- Someone sends me an email.
- I read the email.
- If it’s important, I respond. If not, I delete it.
Workflows are central to building automations, which allows us to offload tasks to computers so that we either 1) don’t have to do them ourselves or 2) can do them at super-human…