agenthub · workflow.invoke
Run another workflow as a single step and get its output back. The invoked workflow stays independently publishable instead of being copy-pasted.
Why the node earns its place
The modularity primitive. It is the deterministic counterpart to calling an agent as a tool, but for a private sub-module it runs the child in-process rather than round-tripping through the gateway — no HTTP hop, no subscription gate, and the child's cost folds into the parent's run and is settled once rather than charged per leg.
Which release of the child runs is decided at publish, not here: publishing freezes the pointer, so the child cannot drift under a parent that was tested against it.
How it works at run time
output {ok, result, error, leg_costs} — the full envelope
text the child's reply, or null when it produced noneWhat you wire
Configuration
| Key | Type | Default & options | What it does |
|---|---|---|---|
| target_agent_id * | string | — | The workflow (agent) to invoke. |
| version | string | default "production" | 'production' (default) tracks the invoked workflow's live release; a concrete release_id pins it. Frozen at publish. |
What usually goes wrong
Watch for this
Wire text into Outcome rather than digging the reply out of the envelope. It is null — not an empty string — when the child produced nothing, so a failure reads as a failure instead of sending a silent empty message.
Behaviour & provenance