Skip to content

Build Memory Context Node

AI/Memory

Assembles retrieved memory records into a token-budgeted context string for injection into agent system prompts

memory_build_contextllm
Inputs4
Outputs3
Security exposure9/10
Packagellm

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

SecurityAttack surface and exposure impact.
9/10High
PrivacyPotential sensitivity of processed data.
7/10High
PerformanceRuntime or resource pressure.
9/10High
GovernancePolicy, audit, or compliance impact.
8/10High
ReliabilityOperational stability considerations.
9/10High
CostExternal or compute cost impact.
10/10High

Input Pins

4

Input

Execution
exec_in

Trigger

Memory Config

Struct
memory_config

MemoryConfig for token budget

MemoryConfigMemoryConfig7 fields
databaseNodeDBConnectionrequired
cache_keystringrequired
embedding_modelCachedEmbeddingModelrequired
cache_keystringrequired
model_typeBitTypesrequired
enum "Llm", "Vlm", "Tts", "Stt"...
max_context_tokensinteger:uint32required
format uint32min 0
recall_strategyRecallStrategyrequired
enum "RecentFirst", "Relevance", "Hybrid"
recall_top_kinteger:uint32required
format uint32min 0
auto_compressbooleanrequired
compress_thresholdinteger:uint32required
format uint32min 0
Schema enforced

Memories

Struct Array
memories

Array of memory records from Search Memory node

objectobject0 fields
No named fields in this schema.

Header

String
header

Optional header text prepended to the context block

Default [Memory Context]

Output Pins

3

Done

Execution
exec_out

Fires when context assembly completes

Context Text

String
context_text

Assembled memory context string, ready for system prompt injection

Token Estimate

Integer
token_estimate

Approximate token count of the assembled context

Node Info

Internal name
memory_build_context
Category
AI/Memory
Version
1