Free Intro Class
    Botspot Logo

    agenthub · memory.fetch

    Memory Fetch

    Pull the session's prior turns out of the memory service and inject them into the messages array.

    category Memoryin messagesout messages · itemsexecution asyncmodel cost none

    Why the node earns its place

    The read half of session memory, for graphs that want the pieces separately rather than fused into LLM with Memory. The graph owns when memory is read; the memory service stays deliberately dumb and only stores turns.

    How it works at run time

    1. 1
      Fetch up to limit prior messages for this session.
    2. 2
      Inject them as one collapsed system message, or as raw prior turns, per inject_as.
    3. 3
      On any failure, return empty and continue.

    What you wire

    Inputs

    • messages *
      array

    Outputs

    • messages
      array
    • items
      array

    Configuration

    KeyTypeDefault & optionsWhat it does
    limitnumberdefault 10Max prior messages to fetch
    inject_asstringdefault "system" system · prependsystem: collapse history into one system message before the incoming messages. prepend: insert raw history messages before the incoming messages.

    What usually goes wrong

    Watch for this

    An empty result is indistinguishable from a memory service failure by design — both are swallowed so the chat path is never blocked. If recall is silently absent, confirm the run actually carries a session id.

    Behaviour & provenance

    buildersChat & voice agents
    routesno
    side effectsnone — computes only
    replay safetynot applicable
    talks tothe memory service
    holdsno credentials