Free Intro Class
    Botspot Logo

    agenthub · transform.compose_message

    Compose Message

    Assemble the canonical messages array — system, then history, then the current user turn — from three independent sources.

    category Transformin system · history · userout messagesexecution syncmodel cost none

    Why the node earns its place

    It exists so Prompt Template, Memory Fetch and Chat Input can each stay focused on one job. The system prompt comes from one, the prior turns from another, the current text from a third, and this node is the only place that knows what order a model expects them in.

    How it works at run time

    1. 1
      Take system as the system message when present.
    2. 2
      Append history — prior turns, as Memory Fetch emits them.
    3. 3
      Append the current user text last.

    What you wire

    Inputs

    • system
      string
    • history
      array
    • user
      string

    Outputs

    • messages
      array

    Configuration

    Nothing to configure — this node has no settings of its own.

    What usually goes wrong

    Watch for this

    If the model complains about an empty messages array, the missing piece is usually user — Chat Input resolved nothing and emitted an empty string. Check there before rewiring this node.

    Behaviour & provenance

    buildersChat & voice agents, Image workflows, Video workflows, Automations
    routesno
    side effectsnone — computes only
    replay safetynot applicable
    talks tonothing outside the run
    holdsno credentials