When you want to make your AI agent behave and follow the rules, you need to give it some guidelines to work from. Enter AGENTS.md
, a standardized way of giving instructions to an AI agent that can drastically improve performance, code quality and ultimately, product quality.
If you’re working in one of the vibe coding platforms like Replit or Lovable, you can use this to your advantage to help the platform write better code for you that’s more secure and more stable.
Here’s how to do it ⬇️
Step One
Create a new file in the root of your project called AGENTS.md
The “root” of your project is simply the folder that everything is contained in. If you’re doing this in Replit, you’d click on New File in the Files menu on the right:
This gives you a new Markdown file, which is just a text file, where you’ll write your agent instructions.
Step Two
Put Your Global Agent Instructions In AGENTS.md
Now, with this file in your project, you can start adding some instructions that will give the agent guidelines to follow. It’ll look something like this:
Adding instructions for the agent is as simple as just writing text. As it gets larger and larger, you can use Markdown to structure the file to make it easier to read and organize.
Using an AGENTS.md
file in your vibe coding project can make a huge difference in the security and reliability of the app you’re building with it. For more information on AGENTS.md,
check out the official website for this standard.