Uniform context-in/context-out interface for workflow participants.
Every participant in a composition — actions, agents, nested workflows — implements this behaviour. Nodes form an endomorphism monoid over context maps, composed via Kleisli arrows.
Return Types
{:ok, context}— success with implicit outcome:ok{:ok, context, outcome}— success with explicit outcome for FSM transitions{:error, reason}— failure with implicit outcome:error
Directive Generation
The to_directive/3 callback allows strategies to dispatch nodes polymorphically
without pattern-matching on concrete struct types. Each node knows how to produce
the appropriate directive(s) for execution given a flat context and keyword opts.
Opts carry strategy-specific metadata (e.g. :result_action, :tag, :meta)
so the node remains strategy-agnostic.
The to_tool_spec/1 callback lets nodes describe themselves as LLM tool definitions
for orchestrator contexts. Nodes that cannot act as tools return nil.
Summary
Functions
Returns true if module is a compiled Jido.Agent module.
Returns true if module is a Jido.AI agent (exports ask_sync/3).
Extracts the name from a Node struct.
Runs a child agent module synchronously.
Returns true if module declares the Jido.Composer.Node behaviour.
Types
Callbacks
Functions
Returns true if module is a compiled Jido.Agent module.
Returns true if module is a Jido.AI agent (exports ask_sync/3).
Jido.AI agents require a running AgentServer process and communicate
via ask_sync(pid, query, opts) rather than struct-based run_sync/2.
Extracts the name from a Node struct.
Validates that the struct's module implements the Node behaviour before
calling name/1. Raises ArgumentError if it does not.
Used by AgentTool, Configure, and Strategy to handle custom Node
structs without duplicating the dispatch + validation logic.
Runs a child agent module synchronously.
Supports three agent types:
- Composer Workflow agents (
run_sync/2) - Composer Orchestrator agents (
query_sync/3) - Jido.AI agents (
ask_sync/3via a temporary AgentServer process)
Returns true if module declares the Jido.Composer.Node behaviour.