Concepts · Humans and machines
How Soar represents current state as working memory elements, updates that state across decisions, and distinguishes selected actions from observed results.
Review pending. Report issues to editor@achiral.ai.

What Is Soar Working Memory?
Soar working memory is a structured representation of the agent's current problem-solving situation. It holds information that productions can test, including goals, observations, retrieved knowledge, and the current operator. The Soar architecture manual describes how that representation changes as the agent runs.
The architecture overview introduced the cycle of inspecting a state, selecting an operator, and applying it. This chapter examines the state itself. We will use Susan's failed password reset as an illustrative case, separating what the agent knows from what it has requested and what has actually happened.
Describe objects with working memory elements
A working memory element, or WME, has three parts: an identifier, an attribute, and a value. Several WMEs with the same identifier describe one object. A value can refer to another identifier, connecting objects into a graph. The manual's syntax guide explains how these structures are represented and matched.
| Part | Role | Example |
|---|---|---|
| Identifier | The object being described. | S1, a state. |
| Attribute | A property of that object. | task. |
| Value | The property's value or a reference to another object. | password-reset. |
A simplified view of Susan's case could look like this:
(S1 ^task password-reset
^user Susan
^last-result failed
^failure-code unknown
^code-request-pending false)Each attribute-value pair describes another WME on S1. These application-specific labels illustrate a state; they are not a complete Soar program. An actual model would also need rules for creating and changing the elements.
The fields distinguish two situations that could otherwise look identical in a conversation history: the code is unknown and has not been requested, or the code is unknown because the agent is waiting for Susan's reply.
Track what a decision changes
Productions match against working memory. When the decision procedure selects an operator, the state links to an object describing that operator. For example, the selected operator might appear as:
(S1 ^operator O1)
(O1 ^name ask-for-failure-code)That selection identifies what the agent intends to apply. It does not establish that a message was delivered or that Susan answered.
In the illustrative support workflow, confirmation that the request was sent would justify setting code-request-pending to true. A later reply could supply the code and clear the pending flag. A failed delivery would require a different update. Those observations should determine the case state, rather than the agent recording its intended result as a completed action.
Retain and remove elements deliberately
Working memory does not empty at the end of every decision cycle. Elements have different persistence rules, described in the manual's production actions and persistence section.
Elements with instantiation support, called i-support, depend on matching production instantiations. They can retract when that support disappears. Elements created through operator application can receive operator support, or o-support, and persist after the creating production stops matching. They remain subject to explicit removal and removal when they become unlinked from a state. External input also changes as the environment updates it.
For an AI workflow, the practical question is which events justify keeping or removing a field. Susan's pending-request flag should survive unrelated processing while the agent waits. It should change when the reply arrives or the request is cancelled. A failed reset should remain part of the history without necessarily remaining the current result after a successful retry.
A representation needs rules for these transitions. Giving a field a meaningful name does not make its contents stay current automatically.
Bring long-term knowledge into the current task
Soar's semantic memory supports retrieval of long-term declarative knowledge into working memory. Its episodic memory records configured episodes of top-state working memory and supports later retrieval.
For Susan's case, a recovery policy and a record of an earlier reset could both inform the current state. They answer different questions: what the process requires, and what happened previously. A retrieved account of an earlier failure should not silently overwrite a newer confirmed result.
The Semantic and Episodic Memory chapter develops that distinction. Working memory is where the retrieved information becomes available to the current reasoning, alongside observations and the task's progress.
Use the structure to inspect an agent's next step
An AI builder can borrow the idea of an explicit current state without implementing Soar. A model prompt might include a selected view of that state, but the prompt's text alone does not define how fields are supported, updated, or removed.
The comparison with ACT-R buffers also has a limit. Both architectures expose information for current processing, but Soar working memory is a graph of objects and attributes rather than a collection of single-chunk module buffers. It should not be described as a fixed-capacity tray.
For the support workflow, a useful inspection is whether the state distinguishes “code unknown,” “code requested,” and “code received.” If those states collapse into one another, the agent can repeat a question or proceed without evidence. Continue with Operators in Soar to see how that state constrains possible actions.
Sources
- The Soar Architecture: Working Memory: working-memory structure, sources, and removal of elements.
- Syntax of Soar Programs: identifier-attribute-value structures and production conditions.
- Semantic Memory in Soar: retrieval of long-term declarative knowledge.
- Episodic Memory in Soar: episode recording and retrieval.
Go back to What Is Soar Cognitive Architecture?, continue with Operators in Soar, or return to the Concepts hub.