# Create memory

The Create memory step saves one or more memories in the teamspace. Use it to turn workflow output, ticket content, or model summaries into reusable knowledge. It can map a dynamically generated array to as many as 250 memories. New steps select consolidated memories by default. Consolidated memories are available when selected explicitly, but are excluded from the memory library and chat by default. Select **Raw memory** when the workflow is extracting ordinary memories that should appear in both places automatically.

## Configuration[​](#configuration "Direct link to Configuration")

| Field            | Required | Description                                                                              |
| ---------------- | -------- | ---------------------------------------------------------------------------------------- |
| Memory type      | No       | Consolidated by default for new steps. Select Raw memory for normal search and chat use. |
| Items            | No       | A single array variable. The step creates one memory when this field is empty.           |
| Title            | No       | Title mapping for each generated memory. Supports `item` variables.                      |
| Description      | No       | Description mapping for each generated memory. Supports `item` variables.                |
| Evidence text    | No       | Plain text or structured data stored separately from the description.                    |
| Source record ID | No       | Record to associate with every generated memory.                                         |
| Evidence         | No       | Evidence data sources to associate with every generated memory.                          |
| Tags             | No       | Tags to add to every generated memory.                                                   |
| Recorded date    | No       | Date mapping for each memory. Accepts a single date or date-time variable.               |
| Account          | No       | Account to associate with every generated memory.                                        |

## Input Variables[​](#input-variables "Direct link to Input Variables")

Items must be a single reference to an array, for example `{{askAi1.memories}}`. The Title, Description, Evidence text, and Recorded date mappings can use `{{item.property}}` for the current array item and `{{itemIndex}}` for its zero-based position. They can also use ordinary upstream variables. An empty array creates no memories. An empty description is stored; filter unwanted items before this step.

Evidence text can contain plain text or structured values. Objects and arrays referenced through a placeholder are stored as JSON text, keeping extraction data separate from the memory description so later workflows can reuse it.

When Items is empty, the step creates one memory and the mappings behave like ordinary workflow fields. Tags, Evidence, Account, and Source record ID are shared by all memories created during the step.

Relative date filters in Evidence are saved as absolute dates based on the workflow reference time. This keeps the evidence fixed to the data that was available when the memory was created, including when the memory is opened or used in a chat later.

Recorded date only accepts a single variable, for example `{{item.recordedAt}}` or `{{now}}`. The resolved value must be a date or date-time. Date-only values are interpreted in the teamspace timezone and saved as a UTC timestamp. If Recorded date is empty, each memory uses the workflow reference time. This is the selected historical date for a historical run and the execution creation time for a normal run. A memory with a missing or invalid date is reported as a failed item while the step continues with the remaining items.

## Output Variables[​](#output-variables "Direct link to Output Variables")

Use the step slug shown on the card. The examples below use `createMemory1`.

| Variable                                   | Description                                       |
| ------------------------------------------ | ------------------------------------------------- |
| `{{createMemory1.count}}`                  | Number of input items.                            |
| `{{createMemory1.created_count}}`          | Number of memories created successfully.          |
| `{{createMemory1.failed_count}}`           | Number of items that could not be stored.         |
| `{{createMemory1.items}}`                  | Ordered creation result for every input item.     |
| `{{createMemory1.items[0].id}}`            | ID of the first created memory.                   |
| `{{createMemory1.items[0].share_url}}`     | Share link for the first created memory.          |
| `{{createMemory1.items[0].follow_up_url}}` | Follow-up chat link for the first created memory. |
| `{{createMemory1.items[0].status}}`        | `created` or `failed`.                            |
| `{{createMemory1.items[0].error}}`         | Error message when the item could not be stored.  |

## Example[​](#example "Direct link to Example")

Configure Items as `{{askAi1.memories}}`, Title as `{{item.title}}`, Description as `{{item.description}}`, and Evidence text as `{{item.evidence}}`. The step stores one memory for every item returned by the model, serializing structured evidence as JSON. Use `{{createMemory1.failed_count}}` in a later step to report whether any writes failed.

For weekly reports, set Recorded date to `{{endOfLastWeek}}` so the generated memory is stored under the reporting week instead of the day the workflow ran.
