
The 7 components of an AI agent
A lot is spoken about the importance of prompts and prompt engineering. To make an AI agent do smart work on your behalf, it's true that you do need to give it a good prompt. But there are actually a whole handful of components that go into it!
In this lesson, we'll cover the 7 components you need to enable an AI agent to do intelligent things on your behalf.
The 7 components of AI steps

Prompt
It sounds technical, but the prompt is simply the instructions you give to your AI to tell it what you want to do.
Prompting can be very natural. We've all given instructions to others to ask them to do something, like giving a project to a new hire on your team for example. If you want a task done well and in a certain way, you probably want to mention:
The context about the task they should accomplish
What you want the end state to be
Any instructions about how they should complete the task
You may have seen long, elaborate prompts, but prompting has evolved over time. These days, prompts can often be simple, direct, and short! If you have specific requirements, often it's easier to just include an 1-2 examples of your desired end state rather than describing it in general terms.
Here are some simple prompts.
Example: "Given this email, decide if it's a cold email trying to sell me something."

Example: "Given this new customer who just signed up on our website, decide if they're a good fit for our services."

Example: "Given this brief for a blog post, write the complete blog post."

Data

Data is the specific information that the AI can use to accomplish a specific task. Data is attached to or embedded in the prompt, and it gets sent along with the prompt to the AI when it's time to take action. If you think of your prompt as a template of instructions that's reused every time the AI agent runs, the attached data—like a specific document, profile, or meeting—is what makes the prompt unique every time.
For example, given these prompts:
"Given this email, decide if it's a cold email trying to sell me something" → the email is the data
"Given this new customer who just signed up on our website, decide if they're a good fit for our services" → the data about the customer (pulled from a form, webhook, or LinkedIn lookup, for example) is the data
"Given this brief for a blog post, write the complete blog post" → the brief is the data
Frequently, the data an AI needs to complete a task comes from the event that triggered the agent to wake up in the first place.
Data is important. If you don't give good data, the AI can't possibly do a good job on the task!
Knowledge

Knowledge is the background information or reference material that the AI may need to use to achieve its task.
It's important to distinguish between knowledge and data:
Data is the item being acted upon—like an email or form—and the full data is passed to the AI along with the prompt.
Knowledge is typically a much larger corpus of reference material that the AI can query into as needed. Common examples are all previous support emails, all previous blog posts, or your blog writing style guide.
The reason why knowledge can be so much larger than data is because it relies on a technology called RAG: Retrieval Augmented Generation. With RAG, the AI can query for just the relevant chunk of the knowledge base that it needs to achieve the task, and you don't need to send your entire knowledge corpus along with your prompt (which can get expensive fast).
Knowledge is optional! Sometimes a task requires a lot of reference material. Sometimes it doesn't, and the data included with the prompt is enough. You can add knowledge if it may be needed and leave it up to the AI to make the call.
Tools

Tools are the AI's ability to automatically take action in the outside world as they see fit. Tools are optional, but powerful. Examples of common AI tools include:
Run Google searches
Send emails
Query your CRM
Tools need to be handled with care. A rogue agent with an email-sending tool could send 100 emails on your behalf if you're not careful. When you give an AI tools, you'll definitely want to mention guidelines for using them in your prompt.
In general, you set up tools by specifying what product the AI can use (e.g. apps like Gmail, Airtable, Google, and many many others) and what action can be taken in those apps (sending emails, updating a table, running a search). You can refer to available tools in your prompt, like "Once you've determined whether the email needs a reply, use the email reply tool to send a polite response."
For many products used by tools, you'll need to authorize access to your account so the AI can run the action on your behalf using your credentials. This makes tools powerful—emails can actually come from your real email account, not a generic bot—but again shows that tools need to be set up with care!
Models

The model is the beating heart of your AI agent. You've likely heard of popular models like OpenAI's GPT series, Anthropic's Claude model, and Google's Gemini. There are also specialized models, like AssemblyAI's speech to text, ElevenLabs's text to speech, and Midjourney's image generation model. At the time of writing this at least; new models are coming out all the time!
When you're choosing a model, you might want to think about:
Does it support the modalities or use case I care about? (important for non-text use cases, like audio and video)
Does it have a context window big enough for the data I want?
Is it at the right price point-to-quality ratio for my use case?
One approach to selecting a model is to start with an expense model as you craft a new prompt. If it can do the job, great; you can start optimizing for a cheaper model. But if even an expensive model can't do a great job at a task, then a cheaper model doesn't have much of a chance of producing a better output.
If you're trying to get a higher quality outcome from an AI agent, the model is a good lever to play with. But remember that it's not your only lever: The quality of the prompt and data matter immensely too. Sometimes, you can get a cheaper model to perform just as well as an expensive model if you test your prompt, add better examples, and refine it accordingly.
Output

The output is the result of the AI's actions. This is important to think about when your AI is operating as part of a workflow or agent, as you'll need the right output to use in subsequent steps.
There are two basic types of output:
Text outputs are just that, text. You need text outputs when you want to use the output in an email, document, or text message.
Structured outputs let you define the type of data that needs to be produced (e.g. number, date, text) and any parameters it should have. You need structured data when you want to use the data in a specific way, like mapping it to rows and columns in a database, spreadsheet, or CRM.
For example, let's say you've asked your AI to look at the contents of a PDF invoice and extract the amount, due date, and vendor name to track it in a spreadsheet. You need to make sure your output contains these three fields and are the right data types (number, date, text).
Defining your desired output is helpful for a couple reasons:
It gives the AI additional information beyond the prompt about what it's supposed to achieve—a clear end goal
It tells the AI what the result should look like
It makes the data easier to use in later steps
Human in the loop

If a task if low stakes, or if you know that AI will do a good job, you can just let the AI agent do its work on its own. But if a task is high stakes, or if you're not sure that the AI will do the job right, then you want to have a human in the loop.
Having a human in the loop brings a person in to review the work of AI before further actions are taken. This is useful in high stakes situations like:
Posting on social media from your account
Publishing new blog posts
Sending emails to customers
The human review process can happen in different ways, including:
Approval: Tell the AI yes or no for a given result
Refinement: Give the AI additional information before rerunning the prompt.
Manual editing: Make any necessary edits manually and use the edited result.
When you're setting this up, you'll want to think about who the person should be to review the AI's work, how the person should interact with the output, and whether you want it to happen just initially during training, or if you always want a person involved.
In almost all real-world, high stakes cases, you want a person to be there to correct, train, coach, and adapt the AI and its work.
Now you know

Now you know the seven components that make up the AI aspect of an AI agent! Use and refine these components of your AI agent to make it work for you.
Prompt
Data
Knowledge
Tools
Model
Output
Human in the loop