> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nora.my/llms.txt
> Use this file to discover all available pages before exploring further.

# Attach memory

> Connect memory to a Flow or Agent block

export const DocImage = ({src, alt, width, caption}) => <Frame caption={caption}>
    <img src={src} width={width} style={{
  padding: "8px",
  boxSizing: "border-box"
}} alt={alt} />
  </Frame>;

Memory can be connected to a Flow or to an Agent block.

## Choosing where to connect

Connect to a Flow and every Agent in that Flow reads and writes the same memory together. Connect to an Agent block and only that Agent reads and writes it.

| Where | Use it for                                    |
| ----- | --------------------------------------------- |
| Flow  | Memory the workflow shares                    |
| Agent | Memory or settings only a specific Agent uses |

You can also use both. For example, connect a memory that shares customer context to the Flow, and attach a separate diagnostic memory that remembers improvement patterns to one Agent.

## Connect to a Flow

To share memory across the whole workflow, connect the memory space to the Flow from the space's Settings tab.

1. Open the memory space.
2. Go to the **Settings** tab in the detail panel.
3. Under **Flow binding**, select the Flow to connect this memory space to.
4. Click the \[Save] button: every Agent in the connected Flow now reads and writes this memory space together.
5. To **disconnect**, select **Not bound · attach per-agent** under Flow binding.

<DocImage src="/images/docs/memory-flow-binding-settings-en.png" width="620" alt="Flow binding and scope settings in a memory space's Settings tab" />

## Attach to an Agent

When a memory should be used by only one Agent, or when Agents in the same Flow need different memory spaces, connect the memory spaces each Agent block needs.

1. Open the Inspector of the Agent block and go to its **Memory** tab.
2. Click the \[Add memory] button to open the memory picker, then select the memory spaces you need from the list. You can select several, and search works too.
3. Click the \[Add] button to connect the selected memory spaces.
4. To **detach**, hover over the memory space in the **Attached** list on the **Memory** tab and click the × button.

<DocImage src="/images/docs/memory-agent-add-en.png" width="560" alt="Memory picker on the Agent's Memory tab with a Wiki memory space selected" />

For each connected memory space, you can adjust its preset and runtime settings.

<DocImage src="/images/docs/memory-agent-space-settings-en.png" width="620" alt="Agent Memory tab showing the preset, calls, cost, on-failure, and retries settings for an attached memory space" />

* **Preset** Choose the retrieval method for the connected memory space.
* **Calls** Set how often this memory space is called within one run.
* **Cost** Set the cost cap this memory space can spend.
* **On failure** Choose whether a failed memory call stops the run or is skipped.
* **Retries** Set how many times to retry after a failed memory call.
