The basic concepts: how your agent actually works
In this chapter you will learn to
- Picture the four parts of an agent: context, session, memory and notes.
- Catch context drift before it makes the agent sloppy.
- Reset cleanly with a handover instead of starting from zero.
A handful of moving parts, demystified. Get these and the agent stops being a black box.
01The problem
The agent that was brilliant five minutes ago suddenly forgets what you told it. It repeats itself, mixes up a name, or loses the plot halfway through a long chat. It feels broken. It isn't.
Almost every "AI is unreliable" story comes down to not knowing the few simple parts under the hood. Learn them once, and the mistakes become predictable, and easy to dodge.
02The shift
Stop treating the agent as magic. See its four moving parts.
- Context is its short-term memory, the desk it works on. Everything in the current chat sits on that desk.
- Session is the current conversation. One chat, one desk.
- Memory is the longer-term drawer: what it remembers about you between chats, once you set it up.
- Notes are the plain-text notes you keep and hand it: standing instructions and reference it can read.
That's the whole brain. Now the one gotcha that trips everyone up, and how to skip it.
03Watch me do it
Context drift is the gotcha, and I'll save you the pain of learning it the hard way. As a chat gets long, the desk fills up and the agent starts dropping older details. That's when a name slips or it contradicts itself. People call it context drift, or context rot. It's not the agent being dim, it's a full desk.
I learned this the slow way. You don't have to. The fix is simple: don't wait for the drift, stay ahead of it.
- Start fresh on a rhythm, not in a panic. When a chat has done its job, or starts to feel sluggish, open a clean one. A clean desk just works.
- Hand over first, every time. Before you leave the old chat, ask it for a short handover note, then paste that into the new one and carry on without missing a beat.
- Better still, let it warn you. Set it up (see the tip) so the agent tells you when a session's getting long, before a single detail slips.
Write me a handover note I can paste into a fresh chat:
- what we're working on
- where we got to
- the key decisions so far
- what's next
Keep it short.
Memory and notes are how it stops starting cold. I keep a plain-text "how I work" file the agent reads, and chapter 4 shows you how to make yours genuinely good. Anything it should remember for good, I just tell it: "remember this." One agent, good notes and clean handovers cover everything in this guide.
04Your turn
Set up the four parts once.
- 1Stay ahead of driftStart a fresh chat when one's done its job. Don't push a tired one.
- 2Hand over every timeAsk for a handover note, open a new chat, paste it in.
- 3Set your memoryTell it the handful of things it should always know about you and your work.
- 4Keep a notes fileOne plain-text page, "how I work", that you paste in or connect.
Do these and you're driving the agent's brain on purpose, instead of hoping it remembers.
05Keep it safe
- Memory holds what you tell it. Don't save passwords or sensitive client data into a memory you don't fully control.
- Handover notes travel. Keep confidential details out of them unless you genuinely need them in the next chat.
06The payoff
The agent stops "forgetting", because you're managing its desk on purpose. Long jobs, multi-day projects and big tasks all become possible. You can pass the thread from one fresh chat to the next without losing a thing. That's the difference between a clever toy and a tool you actually rely on.