What is context in AI, and why it lives in the agent's folder

Elias Iliopoulos2 min readΕλληνικά

Context is everything you wish the AI knew to do your work properly, and that you are tired of typing out every time. Who the company is, what it sells, to whom, who does what on the team. People say ‘you need the context’. In an AI agent, that context lives inside its folder.

The things you are tired of repeating

Think about how you work with a chat. You explain your company, your audience, the tone you want. You get good work out of it. Next week you open a new conversation and it has forgotten everything. Either you type it all again, or you dig for the old conversation where you told it. Half the time you saved is gone right there.

An agent finds it all in the folder. The AGENTS.md file tells it who it is and where to look, and next to it sit the files with what it needs: the product descriptions, the company’s tone, the clients, past campaigns. You open a session and the context is already there.

The generic marketing agent

Take a marketing agent with no context. It is very smart, it knows everything about marketing in general, and it can do nothing for you. It does not know which company it works for, what it sells or what it is promoting. It does not know whether it is advertising alcohol or children’s clothes, two completely different worlds with different rules and different audiences.

Now put it in a folder with one file about the company, one about the audience, one about the tone and the results of the last few campaigns. You ask for ‘three posts for this week’s offer’ and it knows what you sell, to whom and in what voice. The model is the same. What changed is the context.

When the session’s memory fills up

Every session has a limit on how much text fits in the model’s working memory. This is called the context window. Everything the agent reads, everything you write and everything it answers goes in there. In a long session, with lots of files and lots of back and forth, it fills up. Then the agent starts forgetting what you said at the start, or gets muddled.

The fix is simple: new job, new session. Since the important context lives in the folder, you lose nothing. The agent starts fresh and reads only what it needs.

This is also why a clean folder matters. Old files, duplicate versions, instructions that no longer apply: the agent reads all of it and it takes up room in its memory. A tidy folder means less reading, more accurate answers and a smaller bill, because usage is measured in tokens. You will find context, context window and token in the AI agent glossary too.

Part of your context is how a job gets done. That goes in a skill: Skills, the intern you teach once.

Next lessonWhat is an AI agent skill? The intern you teach once