Illegal Agents Playground v1 is OUT 🎉 Create an Agent now →
Logo/Docs
Playground/Learn

Learn about AI Agents

The ingredients that make up an AI agent.

What makes up an AI Agent

Image

An AI Agent is a combination of an Large Language Model (LLM), a series of Tools for the Agent to use, like Model Context Protocol (MCPs) that connect the LLM to external cloud applications, and a framework that orchestrates that together, like Mastra. Once you have these three things, you can input natural language into the Agent, and it can do things for you utilizing tools, and following it's master Prompt

Personality Prompt

The master prompt gives guidance to the LLM on how to act. This gives a basis for the Agent's personality, how they perform a task, and how frequently they may respond to tasks. Here is an example prompt:

You are Terry, the brittish butler who went to Oxford University.  You are a useful butler 
who is kind, and helpful for anybody who needs any help around the manor.  You use your
knowledge of english literature to help put context to your statements.

You do not use swear words, and you do not speak in short 2-3 word sentences. 
 
You are very good at searching the internet for book quotes, and you 
typically do when you want to make an example out of it.

This Prompt has 3 segments.

  • The first segment starts with a role for the agent to assume, and it also give some positives about what the agent would do in a situation
  • The second segment gives the do-nots. These are things the Agent should avoid doing.
  • The third segment talks about how it uses the tools available to them.

You can also experiment with the prompt as well. Prompt Engineering is an emerging art, and is important for controling the behaivor of your agent. If you see results that you do not want your agent to do, just add it to the do not section, and use natural language. The more description you use, the more control you'll have over your agent, and will improve the quality of the experience.

Mastra

Mastra is an agent framework written in Typescript. It's designed to orchestrate the multiple pieces of software your agent needs to be an AI Agent. Because it's Node.JS based, it runs in the browser, doesn't need to be compiled, and automatically updates as you update your parameters of your agent. This gives you nearly instantanious feedback each time you iterate on the prompt or MCP input of the agent.

You can Deploy Mastra yourself, but we've taken out the command line part by just building it into Illegal Agents Playground. Easy!

MCPs

Model Context Protocol, or MCPs are the tools that an agentic framework uses to reach out to external APIs. It's done in a generic way so that it can be implemented once in the MCP, and every agent framework that understands MCP can use it without extra code.

On a technical level, an MCP describes tools, and then has code for what the tool does. A tool could be as simple as sending a message through Discord's API, or it could be as complicated as a complex system for doing multiple actions.

MCP is an open source spec built by Anthropic. The small MCP you build today could be used in a much larger project provided you have an open source license for the code. Many people post their MCPs on github as open source, and are valueable for budding programmers to get noticed in the emerging Agentic AI space.

Cloud API Keys

Many MCPs will require some keys to the external API. This is because each service you connect to needs structured data before it can communicate back. We've written some guides for how to get API keys for popular services like Discord, x, and Telegram over on this page. However you should look at the documentation for the API you're trying to connect to if you wish to make your own MCP.

How is this guide?

On this page

Facing an issue? Join our Discord, or reach out to us on email.