---
title: "Structured note-taking pattern for AI agents | Agentic Pattern Language"
description: "The agent writes notes to a file outside its context window and reads them back later. Sourced from Packer et al., Anthropic, and LangChain."
url: https://agenticpatternlanguage.com/patterns/structured-note-taking/
---

14 [One agent](https://agenticpatternlanguage.com/#one-agent)

# Structured note-taking

The agent writes notes to a file outside its context window and reads them back later.

Also called Agentic memory, Scratchpad, Durable project memory

Packer et al., Anthropic, LangChain, Manus, OpenAI

[How to read this](https://agenticpatternlanguage.com/notation/)

## Part of

* [Agent loop](https://agenticpatternlanguage.com/patterns/agent-loop/)

## Alternatives

* [Compaction](https://agenticpatternlanguage.com/patterns/compaction/)
* [Subagent with its own context window](https://agenticpatternlanguage.com/patterns/subagent-own-context-window/)
* [Todo list](https://agenticpatternlanguage.com/patterns/todo-list/)

## The problem

Each new session starts with no memory of the work so far, and a model does worse as its context grows.

> The core challenge of long-running agents is that they must work in discrete sessions, and each new session begins with no memory of what came before.

Anthropic [Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) Nov 26, 2025

> Model performance tends to degrade beyond a certain context length, even if the window technically supports it.

Manus [Context Engineering for AI Agents: Lessons from Building Manus](https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus)

## Therefore

> Structured note-taking, or agentic memory, is a technique where the agent regularly writes notes persisted to memory outside of the context window. These notes get pulled back into the context window at later times.

Anthropic [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) Sep 29, 2025

> Memory edits and retrieval are entirely self-directed: MemGPT autonomously updates and searches through its own memory based on the current context.

Packer et al. [MemGPT: Towards LLMs as Operating Systems](https://arxiv.org/abs/2310.08560)

> Writing context means saving it outside the context window to help an agent perform a task.

LangChain [Context Engineering](https://blog.langchain.com/context-engineering-for-agents/) Jul 2, 2025

## In use

Claude Code

> Auto memory lets Claude accumulate knowledge across sessions without you writing anything. As it works, Claude saves four kinds of notes for itself.

Anthropic [How Claude remembers your project](https://code.claude.com/docs/en/memory)

Manus

> we treat the file system as the ultimate context in Manus: unlimited in size, persistent by nature, and directly operable by the agent itself.

Manus [Context Engineering for AI Agents: Lessons from Building Manus](https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus)

Derrick Choi of OpenAI, running Codex

> I wrote the spec, plan, constraints, and status in markdown files that Codex could revisit repeatedly. That prevented drift and kept a stable definition of “done.”

OpenAI [Run long horizon tasks with Codex](https://developers.openai.com/cookbook/examples/codex/long_horizon_tasks/) Feb 23, 2026

## Where it breaks

Notes that are never pruned fill up with outdated information.

> Without careful pruning, memory stores will accumulate redundant and outdated information, degrading agent quality over time.

OpenAI [Context Engineering for Personalization - State Management with Long-Term Memory Notes](https://developers.openai.com/cookbook/examples/agents_sdk/context_personalization) Jan 5, 2026

## Sources

1. [MemGPT: Towards LLMs as Operating Systems](https://arxiv.org/abs/2310.08560) Packer et al.
2. [Effective context engineering for AI agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents) Prithvi Rajasekaran, Ethan Dixon, Carly Ryan, and Jeremy Hadfield, Anthropic, Sep 29, 2025
   > Structured note-taking, or agentic memory, is a technique where the agent regularly writes notes persisted to memory outside of the context window.
3. [Context Engineering](https://blog.langchain.com/context-engineering-for-agents/) LangChain, Jul 2, 2025
   > Note-taking via a “ scratchpad ” is one approach to persist information while an agent is performing a task.
4. [Effective harnesses for long-running agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents) Justin Young, Anthropic, Nov 26, 2025
5. [Context Engineering for AI Agents: Lessons from Building Manus](https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus) Yichao 'Peak' Ji, Manus
6. [Run long horizon tasks with Codex](https://developers.openai.com/cookbook/examples/codex/long_horizon_tasks/) Derrick Choi, OpenAI, Feb 23, 2026
   > The most important technique was durable project memory.
7. [Context Engineering for Personalization - State Management with Long-Term Memory Notes](https://developers.openai.com/cookbook/examples/agents_sdk/context_personalization) Emre Okcular, OpenAI, Jan 5, 2026
8. [How Claude remembers your project](https://code.claude.com/docs/en/memory) Anthropic

Added Nov 14, 2026
