Forge
markdowna5f71db5
1# 2. Memory and context
2
3If the agent has no persistent memory, every session becomes a "new intern."
4Quality fluctuates, style breaks apart, decisions don't accumulate.
5
6## What is the agent's working memory
7
8Working memory is an **exocortex**: external memory outside the context window, but under the agent's control. It's not "the entire chat history" but a compressed layer:
9- project principles,
10- decisions made,
11- constraints,
12- current priorities,
13- validated patterns.
14
15## What to store
16
17Worth storing:
18- facts that are repeatedly needed across tasks;
19- rules that drive decisions;
20- agreements on tone/style/ethics;
21- experiment results (what worked, what didn't).
22
23Not worth storing:
24- throwaway details with no reuse value;
25- emotional "verdicts" without context or confidence assessment;
26- duplicates.
27
28## Format
29
30Good memory is:
31- short,
32- structured,
33- updated after significant shifts,
34- read by the agent at the start of a new session.
35
36## Implementation
37
38Concrete tools for working with memory: `read_agent_notes` (read notes at session start) and `write_agent_notes` (record takeaways after significant steps). This turns memory from an abstraction into a real mechanism the agent invokes itself.
39
40## Minimal cycle
41
421. Completed a step.
432. Verified the result.
443. Added only the transferable takeaway to memory (`write_agent_notes`).
454. In the new session, read memory (`read_agent_notes`) and continued.
46
47## Success criterion
48
49After summarization or a new chat the agent quickly returns to the same quality level, rather than "warming up from scratch."
50
View only · write via MCP/CIDE