Free Intro Class
    Botspot Logo

    agenthub · variable.set

    Save Variable

    Store a value under a name for the rest of the run, and read it anywhere by that name — no data edge needed to each consumer.

    category Transformin valueout outputexecution syncmodel cost none

    Why the node earns its place

    The write half of the blackboard. Instead of routing one value along edges to every node that needs it, save it once; downstream nodes read it by name through their context-key fields. Data stops being trapped in the edge topology — produce once, reference everywhere.

    It also forwards its input unchanged, so it drops into an existing path without breaking it: a Condition downstream still sees the original envelope, not just the saved field.

    How it works at run time

    1. 1
      Take the wired value.
    2. 2
      If path is set, pull that nested field out of it to save — this changes only what is stored.
    3. 3
      Write it into the run's variable bag under name.
    4. 4
      Forward the original input unchanged on output.

    What you wire

    Inputs

    • value *
      any

    Outputs

    • output
      any

    Configuration

    KeyTypeDefault & optionsWhat it does
    name *stringVariable name to store under (e.g. 'member_name'). Read it later via a *_context_key field.
    pathstringOptional dotted path to pull a nested field out of the wired value to SAVE (e.g. 'record.name'). Empty saves the whole value. This only changes what's stored — the node still forwards the ORIGINAL input unchanged, so a downstream `if` on `found` still works. After a Test Run you can pick this from the observed shape.

    What usually goes wrong

    Watch for this

    Ordering still comes from edges. A node that reads the variable must run after this one, or it races an empty bag and reads nothing. Wire this node into the path rather than hanging it off to the side, or gate its readers behind it.

    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