← Back to concept explainers

Concept Fable

Working memory

Conclusion first:Working Memory is the state an Agent temporarily holds and operates on in the current task, including goals, constraints, recent observations, tool results, intermediate artifacts, hypotheses, and next-step plans. It usually lives in the context window, scratchpad, state object, or workflow state. An enterprise Agent's working memory needs to be structured and continuously updated; otherwise long processes will repeat actions, forget constraints, and confuse old results with new ones.

Working Memory · Agent state

Read the story first. There is no rush to give a definition here; let the question grow on its own first.

Fable

The clock repairer with too small a workbench

The clockmaker's desktop was small, with room only for a few gears, a blueprint and an oil lamp. The warehouse had many parts, but when actually working, only a limited number of things could be placed in front of him.

The young apprentice repaired a large clock for the first time and put all the parts on the table. The tabletop was immediately packed full, screws rolled into the pile of gears, and the fine spring that was supposed to be replaced could not be found. The more complete the set of things, the more muddled the hands.

The master told him to keep only the few items currently needed. The apprentice walked to the other end—the table was too empty—and halfway through the repair discovered the gear-pitch notes from the old blueprints were missing, so he had to stop and search the warehouse.

The first remedy was to permanently place commonly used parts on the desk. A few days later, the desktop became a small warehouse again; some parts were important yesterday but in the way today. A fixed list can't keep up with the task at hand.

The master taught him to change the dial step by step: when removing the casing, keep only the screw box and marker tags; when adjusting the balance wheel, place the beat gauge; before reassembly, bring back the original diagram and checklist. With each step, clear away what is no longer needed.

The apprentice gradually discovered that the small desktop is neither a warehouse nor empty space. It is responsible for temporarily holding the information most needed for the current judgment, letting hands, eyes, and mind work in the same place; put the wrong thing there, and at best you slow down, at worst you load the wrong thing.

Afterward he repaired clocks more steadily. True skill is not just remembering a lot, but knowing what to put in front of you right now, when to take it away, and when to go back to the warehouse to gather evidence anew.

Later, when the master tested the apprentice, he did not ask how many part names he could recite, but looked at what was on the table when he reached a certain step. One extra item would disrupt him, one missing item would halt him, one wrong item would make him install it backwards. Managing a small tabletop determines whether complex work can be steadily advanced in the moment. The old master later also taught him to pause before key steps and ask whether the tabletop supported the next cut. If the answer was no, tidy up first before starting. Complex work often fails because the information right in front of you is misaligned; only when the small tabletop is well managed can the skills stored in the distant warehouse be brought out. Later, the more skilled the apprentice became, the cleaner his tabletop was, because he knew that clean did not mean less, but exactly right. This saying was later written into the newcomers' handbook, reminding everyone to look at the on-site cost first before talking about saving effort. And precisely because of this reminder, when they later encountered similar difficult problems, people would not rush to apply old methods. They learned to first ask which step bears the risk, then decide whether to let go, tighten up, or rearrange the process.

Reveal

This story is about: working memory

Working Memory is the state an Agent temporarily holds and operates on in the current task, including goals, constraints, recent observations, tool results, intermediate artifacts, hypotheses, and next-step plans. It usually lives in the context window, scratchpad, state object, or workflow state. An enterprise Agent's working memory needs to be structured and continuously updated; otherwise long processes will repeat actions, forget constraints, and confuse old results with new ones.

What matters is that it is not just a term, but a structural problem that repeatedly appears in real AI / Agent systems. Understanding it lets you judge when to add a model, when to change a process, and when to add governance.

Metaphor mapping

  • Clock repair desk: working memory in the current context
  • Gears, Notes, Observations: Goals, constraints, tool results, and intermediate states
  • Pile everything onto the table: stuff the context without structure
  • A bigger table: the naive fix of simply expanding the context window
  • Partitioned tray: structured working memory
  • Update the tray after each completed step: status refreshes with the execution loop
  • Final insight: working memory focuses on the actionable state of the current task, not on storing everything long-term

Andy Ren Xu's judgment

The practical value of this concept is that it helps you break "AI features that look smart" into deliverable, verifiable, and governable units of work.

scratchpadcontext windowagent loopmemorytask state
京ICP备2026014272号