nodes to Create a Workflow or Update a Workflow, each node carries three fields that must agree with one another:
type— what kind of step this is (agent,code,human,integration, …)handler_class— which variety of that stepprocess— the step’s configuration, whose shape is determined byhandler_class
process object has no type tag of its own. Opus reads handler_class to decide which shape to validate process against, so sending the right fields under the wrong handler_class fails validation.
Which Process Goes With Which Node
input and output nodes take no process — they carry only schemas. Opus adds one of each automatically when you create a workflow without supplying nodes.
sub_workflow, meta_node, obfuscate and deobfuscate nodes are not currently supported through the API. Build them in the Builder instead.Rules That Apply To Every Node
1
The map key must equal the node's own id
nodes and edges are objects keyed by ID, not arrays. Each key must be identical to the id inside the object it holds.2
Node fields are snake_case
The top-level body of the create and update requests is camelCase (
activeStatus, orgUnitIds), but everything inside a node or edge is snake_case (input_schema, from_node_id, handler_class).This is deliberate: nodes and edges are forwarded to the Opus workflow executor exactly as you send them.3
The executor re-validates your process
Opus checks the node’s outer fields, then the executor validates
process against the model named by handler_class. A malformed process is rejected there, so a 400 can describe a field you sent inside process rather than one at the top level.Schemas Are Separate From Process
Every step node also carriesinput_schema and output_schema, which describe the variables flowing in and out. Those are the same shape on every node type regardless of handler_class — see Variable Schemas.
process says how the step does its work. The schemas say what it takes in and hands on. A node needs both.
Choosing An Agent Class
Agent is the only node type with more than one class, and the choice is the most consequential one you’ll make:Basic
You describe the goal; Opus writes the agent. Best when you want the outcome specified and the prompting handled for you.
Custom
You supply the system and user prompts verbatim. Best when you need exact control over wording.
Advanced
A Basic agent that can call other agents and code utilities as tools. Best for multi-step work.