L
Leaphealth - OSDocs

AI Aide node

The AI Aide attaches to one action step and fills its fields from an AI flow or AI team just before that step runs.

The AI Aide (code name Think) is not a step of its own. It attaches to one action step with a dashed connector. Just before its host step runs, the aide runs an AI flow or AI team and copies the outputs you choose into the host step's fields. For example, an aide can write a personalised message variable for a Reach step, or suggest a task title and priority for an Engage step.

When to use it

  • A field of a step depends on judgement or free text that an AI flow can produce: a summary sentence, a suggested priority, a chosen template value.
  • The same step should adapt per patient without building many branches.

The aide can attach to these hosts only: Reach, Capture, Engage, Appointment, Connect and Produce.

Attaching an aide

  1. Add an AI Aide from the Aide group of the palette, where it is marked Attachment.
  2. Drag from the aide's handle to the handle at the bottom of the host step. A dashed connector appears.
  3. Each aide attaches to one host, and each host takes one aide. To remove the link, hover over the dashed connector and select its delete icon.

The aide never takes normal connections.

Configuration

Field

What it does

Options and default

Label, Notes

See Label and Notes.

—

Attach

What kind of AI to run. Only AI flows publish an output schema; teams and agents take declared mappings.

Flow (default), Team, Agent — not available yet. A journey with an Agent aide cannot be published.

AI flow / AI team

The flow or team to run.

Your AI flows or teams.

Inputs

Pairs of Input and Expression passed to the flow or team. When you pick a flow, the list starts with that flow's own inputs. Add a pair with Add input.

Start expressions with context., initial., nodes. or patient.; other text is passed as typed.

Outputs to the host

Pairs of Host field and Output path. Add a pair with Add output mapping.

Host fields come from the host step. For a flow, output paths are suggested from the flow. Before the aide is attached, the panel shows Attach this aide to a host node to choose a target field.

On the host step, set each field you want filled to the source AI. The field then shows This field is filled by the attached AI Aide’s mapped output.

Trying an aide before you publish

The ⋮ menu on an aide card offers Dry run. The AI Aide dry run dialog shows which step the aide is Attached to, its Inputs resolved from sample context and Mocked outputs → parent fields. No AI runs during a dry run: the output values are placeholders, so use it to check your inputs and mappings, not the AI's answers.

Outcomes and branches

The aide has no outcomes and no connections of its own. The host step's outcomes are unchanged.

What happens when it runs

  1. The host step is reached, and the aide runs the flow or team with its inputs.
  2. Each mapped output fills the matching field of the host step, for this patient's run only.
  3. The host step runs with those values. The patient or staff see the result of the host step as usual, for example the personalised message.
  4. Later steps can read the aide's outputs from the host step's results. The panel shows how: *Downstream reads: context.nodes.<parent_key>.aide.\**, where the parent key is the host step's name.

If the aide fails, the host step still runs, without the aide's values. Fields left to the aide are then empty, so the host step may fail if one of them is required.

Example

Personalised discharge message.

  1. Reach step discharge_message with a WhatsApp template that has a {{tip}} variable. Set that variable's source to AI.
  2. Attach an AI Aide: Attach Flow, AI flow Discharge tip writer.
  3. Inputs: diagnosis → initial.diagnosis, language → patient.preferred_language.
  4. Outputs to the host: Host field Variable: tip ← Output path tip.
  5. Later steps can read context.nodes.discharge_message.aide.tip.

Tips and limitations

  • Map every output the flow marks as required; the review panel warns about required outputs that are not mapped. Mapping an output the flow does not have stops the journey from being published.
  • Plan for the aide failing: the host step should still make sense without its values.

No failure setting

There is no option yet to stop the host step when its aide fails. The host step always continues without the aide's values.

journeysnodesai aideai flowai teamautomation

Was this page helpful?

Last updated on

On this page