← Back to context

Comment by stevenslade

2 months ago

I’d been wondering how conversation history actually works in these agent loops — the LLM itself has no memory, so whatever “history” exists is just text you keep feeding back in.

At a high level it seems to usually be one (or a mix) of:

- full transcript appended every turn

- sliding window of the last N turns / tokens

- older turns summarized into a rolling memory

- structured state (goals, decisions, progress) rendered into the prompt

- external storage + retrieval (RAG-style) to pull in only relevant past info

Under the hood I’m sure it gets more complex, but the core idea is pretty simple once you strip away the mystique: memory = prompt assembly.