All nodes/AI/Agent State

Agent Memory

Long-term structured agent memory: stores key-value data between calls. The agent can read, modify and delete values via built-in tools. Connected via link_extension.

Agent MemoryTS
ToolsAgent
Set memoryMemory

Type in the graph: agent_memory

ToolExecStateful

An error branch can be enabled (expose_error_output) to handle failures on their own path.

Try it

Minimal working workflow

Entry
Agent MemoryTS
Exit
  • Execute + Data
  • Data
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

Runs as pasted

When to use it

Agent Memory is a long-lived dictionary of facts the model keeps for itself: a customer’s name, an order id, the stage of a scenario. It does not hold the conversation — that is what Buffer, Window and Summary memory are for. What separates it from variables is who writes: a variable is written by a node at a moment you chose, this is written by the model whenever it decides to.

How it works

The stored dictionary is injected into the system prompt as a <memory> block before every request, so the model always sees it and never has to ask. It changes it with the agent_memory_set, agent_memory_delete and agent_memory_clear tools; which of them exist is the Enabled Tools field, and turning Expose Tools to LLM off makes the memory read-only reference material.

Values live at dotted paths — client.name, order.items.0. Intermediate dictionaries are created on the way, so nothing has to be declared up front.

Scope decides the lifetime: thread (the default) survives across the messages of one conversation, session lasts one execution, call starts empty every turn. The key is the pair “node + thread”, so two memory nodes in a graph hold different dictionaries. See Variables and memory for the wider picture.

Remember attachments is a separate mechanism: the node keeps references to files the agent received (8 most recent by default) and re-inlines the three freshest into the context on later turns; the rest are listed by name only. The files themselves are not copied.

Common mistakes

  • Wiring the output into the agent’s Memory port. This node speaks over an extension link and belongs in the Extensions port of AI Agent. The Memory port accepts only the three conversation-memory nodes.
  • Expecting it to run as a graph step. It has no Run input — it lives as a satellite of the agent. The Set memory port appears only when “Set memory from input” is on, and firing it replaces the whole dictionary.
  • Reading the memory through nodes.<id>.output. To hand the dictionary to the graph, turn on Memory output and draw an edge from the Memory port.
  • Leaving the clear tool with the model. agent_memory_clear wipes everything in one call; if that is not wanted, remove it from Enabled Tools.
  • Storing there what the graph needs. A condition or a query field is safer in a variable: it is typed, and its value does not depend on whether the model remembered to write it down.

Inputs

PortWirePayloadNotes
ToolstoolsExtensionlink_extension

accepts many edges

Set memorymemory_inExecute + Dataexecute_dataobject

shown when overwrite_from_input = true

Outputs

PortWirePayloadNotes
AgentoutputExtensionlink_extension
Memorymemory_outDatadataobject

shown when expose_memory_output = true

Configuration

FieldTypeDefaultDescription
Enabled Toolsenabled_toolsarray<string>["set","delete","clear"]

Which memory tools are available to the LLM

Memory outputexpose_memory_outputbooleanfalse

Show a data output port that emits the current memory dict.

Expose Tools to LLMexpose_toolsbooleantrue

Allow LLM to call memory tools (set, delete, clear)

Format memory tools in Catch Tool Callformat_in_catchbooleantrue

Use short readable lines for memory tool calls in the Extra stream

Initial Memory Stateinitial_memoryobject{}

Initial state for agent memory (key-value pairs)

Max re-inlined attachmentsmax_reinlined_attachmentsinteger3

How many of the most recent remembered attachments to re-inline into the context each run. Files beyond this are only listed by name.

Max remembered attachmentsmax_remembered_attachmentsinteger8

How many attachment references to retain (newest kept).

Set memory from inputoverwrite_from_inputbooleanfalse

Show a memory (ED) input port whose firing fully replaces the stored memory, plus a 'History set' exec output that fires once written.

Remember attachmentsremember_attachmentsbooleanfalse

Persist references to attachments the agent receives and re-inline the most recent ones into the model context on later turns/sessions.

Scopescopestringthread

thread: persists between chat messages · session: lives for one execution · call: fresh each time

Options: thread — Thread, call — Call, session — Session

Shared fields

Every node has these three — the platform adds them, not the node author.

  • expose_error_output — When enabled, show an execution output to connect nodes that run if this step fails.