models capable of automating a variety of tasks, such as research and coding. However, often times, you work with an LLM, complete a task, and the next time you interact with the LLM, you start from scratch.
This is a major problem when working with LLMs. We waste a lot of time simply repeating instructions to LLMs, such as the desired code formatting or how to perform tasks according to your preferences.
This is where agents.md files come in: A way to apply continual learning to LLMs, where the LLM learns your patterns and behaviours by storing generalizable information in a separate file. This file is then read every time you start a new task, preventing the cold start problem and helping you avoid repeating instructions.
In this article, I’ll provide a high-level overview of how I achieve continual learning with LLMs by continually updating the agents.md file.

Why do we need continual learning?
Starting with a fresh agent context takes time. The agent needs to pick up on your preferences, and you need to spend more time interacting with the agent, getting it to do exactly what you want.
For example:
- Telling the agent to use Python 3.13 syntax, instead of 3.12
- Informing the agent to always use return types on functions
- Ensuring the agent never uses the Any type
I often had to explicitly tell the agent to use Python 3.13 syntax, and not 3.12 syntax, probably because 3.12 syntax is more prevalent in their training dataset.
The whole point of using AI agents is to be fast. Thus, you don’t want to be spending time repeating instructions on which Python version to use, or that the agent should never use the Any type.
Furthermore, the AI agent sometimes spends extra time figuring out information that you already have available, for example:
- The name of your documents table
- The names of your CloudWatch logs
- The prefixes in your S3 buckets
If the agent doesn’t know the name of your documents table, it has to:
- List all tables
- Find a table that sounds like the document table (could be several potential options)
- Either make a lookup to the table to confirm, or ask the user

This takes a lot of time, and is something we can easily prevent by adding the document table name, CloudWatch logs, and S3 bucket prefixes into agents.md.
Thus, the main reason we need continual learning is that repeating instructions is frustrating and time-consuming, and when working with AI agents, we want to be as effective as possible.
How to apply continual learning
There are two main ways I approach continual learning, both involving heavy utilization of the agents.md file, which you should have in every repository you’re working on:
- Whenever the agent makes a mistake, I inform the agent how to correct the mistake, and to remember this for later in the agent.md file
- After each thread I’ve had with the agent, I use the prompt below. This ensures that anything I told the agent throughout the thread, or information it discovered throughout the thread, is stored for later use. This makes later interactions far more effective.
Generalize the knowledge from this thread, and remember it for later.
Anything that could be useful to know for a later interaction,
when doing similar things. Store in agents.md Applying these two simple concepts will get you 80% on the way to continual learning with LLMs and make you a far more effective engineer.
The most important point is to always keep the agentic memory with agents.md in mind. Whenever the agent does something you don’t like, you always have to remember to store it in agents.md
You might think you’re risking bloating the agents.md file, which will make the agent both slower and more costly. However, this isn’t really the case. LLMs are extremely good at condensing information down into a file. Furthermore, even if you have an agents.md file consisting of thousands of words, it’s not really a problem, neither with regard to context length or cost.
The context length of frontier LLMs is hundreds of thousands of tokens, so that’s no issue at all. And for the cost, you’ll probably start seeing the cost of using the LLM go down. The reason for this is that the agent will spend fewer tokens figuring out information, because that information is already present in agents.md.
Heavy usage of agents.md for agentic memory will both make LLM usage faster, and reduce cost
Some added tips
I would also like to add some additional tips that are useful when dealing with agentic memory.
The first tip is that when interacting with Claude Code, you can access the agent’s memory using “#”, and then write what to remember. For example, write this into the terminal when interacting with Claude Code:
# Always use Python 3.13 syntax, avoid 3.12 syntax You will then get an option, as you see in the image below. Either you save it to the user memory, which stores the information for all your interactions with Claude Code, no matter the code repository. This is useful for generic information, like always having a return type for functions.
The second and third options are to save it to the current folder you’re in or to the root folder of your project. This can be useful for either storing folder-specific information, for example, only describing a specific service. Or for storing information about a code repository in general.

Furthermore, different coding agents use different memory files.
- Claude Code uses CLAUDE.md
- Warp uses WARP.md
- Cursor uses .cursorrules
However, all agents usually read agents.md, which is why I recommend storing information in that file, so you have access to the agentic memory no matter which coding agent you’re using. This is because one day Claude Code will be the best, but we might see another coding agent on top another day.
AGI and continual learning
I would also like to add a note on AGI and continual learning. True continual learning is sometimes said to be one of the last hindrances to achieving AGI.
Currently, LLMs essentially fake continual learning by simply storing things they learn into files they read later on (such as agents.md). However, the ideal would be that LLMs continually update their model weights whenever learning new information, essentially the way humans learn instincts.
Unfortunately, true continual learning is not achieved yet, but it’s likely a capability we’ll see more of in the coming years.
Conclusion
In this article, I’ve talked about how to become a far more effective engineer by utilizing agents.md for continual learning. With this, your agent will pick up on your habits, the mistakes you make, the information you usually use, and many other useful pieces of information. This again will make later interactions with your agent far more effective. I believe heavy utilization of the agents.md file is essential to becoming a good engineer, and is something you should constantly strive to achieve.
👉 My Free Resources
🚀 10x Your Engineering with LLMs (Free 3-Day Email Course)
📚 Get my free Vision Language Models ebook
💻 My webinar on Vision Language Models
👉 Find me on socials:
🧑💻 Get in touch
✍️ Medium
Source link
#Maximize #Agentic #Memory #Continual #Learning


%20comparison%20top%20art%20122025%20updated%20SOURCE%20Amazon.jpg?w=150&resize=150,150&ssl=1)






