
Welcome to this special edition of Loop!
This is your in-depth guide into emerging technologies and how you can apply them at work.
HIGHLIGHTS
What is an AI agent?
What can AI agents do?
How companies are using AI agents to improve productivity
The benefits, limitations, and risks you need to keep in mind
My process for creating agents and identifying use cases
Template that allows you to build your own social media agent - even if you have no coding experience
Let's jump in!


AI agents are an emerging technology and there's some confusion over how people can actually implement them.
This guide will explain what AI agents actually are, how people are already using them to simplify tasks, and how you can do the same.
I've written this guide to allow anyone to create their own agents, regardless of how technical they are - so don't worry if this is new for you.

Essentially, this is a bot that can autonomously solve tasks and decide when it should take an action.
The agent will figure out the steps that are required and then start the process. It can do this completely independently, or it can ask for your feedback on how it should progress.

To power these agents, we use a combination of tools – with Large Language Models (LLMs) used to restrict the agent and provide it with the intelligence needed to make decisions.
We also provide them with access to APIs and sections of code, which they can decide to use when necessary.
These are incredibly capable tools and allow us to do things that simply aren't possible with ChatGPT.


I outlined just some of the things that agents can do, but we need to make the agents more capable and provide them with tools.
You can add a wide range of functionality to the agents, such as:
Executing code
Web scraping
Calling APIs
Query databases
Search for files
Or they can even control your computer
When we provide the agents with these options, we are allowing it to decide when each tool should be used. This is quite different to how we have traditionally built software, as we are giving more control to the agent.
Before this, we had to be very specific about how our software should work and use a step-by-step approach - which involved a lot of planning and development time. It also restricted the number of problems that we could solve, since we had to account for every possible scenario.

Agents completely flip this on its head and instead allow us to create more flexible solutions. Of course, we shouldn't use AI agents for every situation, but they're a good choice when we can't predict the user's request.

It can be difficult coming up with ideas on how to use agents, since it's a brand new technology.
Below are some examples of how AI agents are being deployed by others:
Company | Use Case | Description |
---|---|---|
Klarna | Customer service | Multiple agents are used to handle requests from Klarna's users. |
Anthropic | Software development | |
Uber | Software testing | Automatically generates unit tests for their huge code base. |
GPT Researcher | Research | |
Replit | Software development | Develops an initial plan for how the agent should tackle the problem. |
Vodafone | Information retrieval | Agent is connected to the company's data on Sharepoint and can analyse thousands of files. |
OpenAI | General tasks | General agent that is run from the ChatGPT website. |


There are several advantages to using agents when compared to using Large Language Models (LLMs) on their own:
Incredibly flexible – you can let them work out the steps needed; we don't need to define every stage in the process – like you would when chaining prompts.
Better results – by splitting a task among several agents, they are more focused than when you only use one LLM.
Groups of agents – several agents can communicate with each other and decide which agent is best-suited for the task.
Generate, check, and improve – an agent can generate the first draft, ask other agents to review it and provide feedback, and then use their responses to improve the content.
Multiple models – you can use a mixture of models from different vendors, such as OpenAI, Anthropic, and Mistral.
Humans are in-the-loop – you can intervene and tell the agents to go down a different path.


As with any technology, there are limitations in what you can do. Many of the issues that we have with LLMs can also be applied to AI agents, since they are underpinned by these models:
Hallucinations - Large Language Models can occasionally make up information. At first glance, their response looks believable - but it isn't true at all.
Limited understanding - while these systems can process and generate text that seems intelligent, they don't truly comprehend the meaning behind the words in the way humans do. As a result, it's pretty easy to misdirect and confuse them.
Biased training data - AI companies have used social media posts and books to train these models, which will often contain different biases. This means the AI can unintentionally reproduce or amplify these biases in its responses.
Small context windows - LLMs often struggle to maintain context over long interactions and may forget important details that you mentioned earlier in a conversation. To deal with this, I recommend that you divide your task into smaller pieces and assign multiple agents - which will lead to much better results.

Since AI agents can act on their own and execute code, they also pose new risks that we need to consider:
Human oversight - should a human review the agents' output and be able to stop them?
With most agent frameworks, you can tell the agents to ask a human for advice before they progress.Misuse - have you added restrictions to prevent your agents being used for another purpose?
For example, users could re-direct your agents and ask them to generate misinformation. Microsoft and AWS offer services that check for abusive prompts and can block them. You should also consider logging how users are prompting the agents, so that abuse can be spotted.Malicious code - if you have allowed your agents to execute code on a computer, have you ensured that the device doesn't contain confidential information?
For example, users could ask your agents to execute malicious code and wipe the computer - or extract confidential files. You should ensure that the agents are running on a container and can't interact with important files.Lack of explainability - can you explain and understand how the agents reached a decision?
Do we know why the agents have gone off-course and did the wrong action? You should consider logging the messages that are sent between the agents, as this will give you insight into their discussions and why they made a decision.Looped conversations - have you restricted the number of messages between the agents?
It's incredibly rare, but agents can sometimes get into a loop and constantly message each other. To prevent this, you should use the latest LLMs, avoid using small language models, and set a hard limit on the number of messages between agents. This will automatically break any message loops that occur and prevent unnecessary costs.
The above isn't an exhaustive list, but they're worth considering to ensure that your project is ready for deployment.


Now that we have a better understanding of what agents are, what they're capable of doing, and how others are using them - along with their benefits and limitations - we're in a good position to create our own agents.
When I'm coming up with ideas for agents and developing my own, I follow this process:
Decide on a task you want to automate and simplify
If you're unsure and need inspiration, you can look at the examples above from other companies
Think about what the agent needs to do
Does it need to analyse a small or large amount of text?
Should it have access to tools?
Do you just need one agent or multiple agents?
Get started and explore different ideas
The best way to learn is to get started
I've included a template in the next section, which will help you to try different ideas
Build on your idea and keep improving it
Learn from techniques and tools that others are using
Read documentation about the AI agent framework


To help you get started and explore some ideas, I've created a template that will guide you through the process - regardless of your technical background.
Plus, it's completely free to use. The notebook will help you to get setup and create your agent within 5 minutes.
In our template, we will create an agent that can generate social media posts and automatically improve them - until the content matches your brand guidelines.
Here's an example of what the agent can do:

Notice how the agent generated a Tweet for our brand, reviewed the response, saw that our Tweet was too casual, and then immediately improved it for us.
Our agent was able to do all of this within seconds and we didn't have to lift a finger.
To get started, use the link below and follow my guide. I'll explain the entire process and suggest how you can customise the agent for your own work.

There’s been a lot of talk recently about AI agents and how they can be used, but not enough resources that go beyond the headlines, so I hope you found this guide useful.
Please let me know how you get on with the social media agent and any changes you’ve made for your use case.
Or if you’ve already deployed agents within your company, I’d love to hear about it and how you adopted the technology. As always, you can reply directly to this email and I’ll get back to you.
Have a good week!
Liam
Feedback
How did we do this week?

Share with Others
If you found something interesting in this week’s edition, feel free to share this newsletter with your colleagues.
About the Author
Liam McCormick is a Senior AI Engineer and works within Kainos' Innovation team. He identifies business value in emerging technologies, implements them, and then shares these insights with others.