Use the toggle to switch between node-based edit mode and the JSON editor (shown at 2x speed).
JSON shape
Every scenario JSON must include:initial_node: the name of the start nodenodes: an object keyed by node name
Node fields
Each node can include:role_messages(optional): role/persona instructionstask_messages(required): stage instructions for the nodepre_actions(optional): execute when entering the node, before response generationpost_actions(optional): execute after the bot finishes its first utterance in that nodefunctions(optional): tools available in this noderespond_immediately(optional boolean): whether the assistant responds immediately after entering node
pre_actions and post_actions:
httpend_conversation
Function shape
Functions are defined under a node’sfunctions list:
type values:
transitionhttpragvision
Function type schemas
transition
name: unique function name in the node.description: when the assistant should call this function.type: must betransition.transition_to: target node name to move to.
http
name: unique function name in the node.description: what the endpoint does and when to call it.type: must behttp.endpoint_id: ID of a saved HTTP endpoint in your account.
rag
name: unique function name in the node.description: what knowledge this tool retrieves.type: must berag.corpus_id: knowledge base (corpus) ID to query.
vision
name: unique function name in the node.description: when the assistant should inspect user video/screen context.type: must bevision.
transition_to is optional for non-transition tools. If set, it must point to an existing node name.
Action type schemas
Actions can be used in bothpre_actions and post_actions.
http
end_conversation
Validation rules
Core structure
nodes_jsonmax size is20000characters.nodesmust be a non-empty object.initial_nodeis required and must match an existing node name.- Every node must include at least one non-empty
task_messagesentry. respond_immediately, if provided, must be a boolean.
Message rules
task_messages[*].contentmax length:4000characters.role_messages[*].contentmax length:4000characters.task_messagesandrole_messagescannot usesecretorllmtemplate variables.
Function rules
functionsmust be a list of wrappers:{ "function": { ... } }.function.nameis required, must be unique per node, and only allows letters, numbers,_,-.function.namecannot include leading/trailing whitespace.function.descriptionis required.function.typemust be one oftransition,http,rag,vision(defaults totransitionif omitted).transitionfunctions must definetransition_to.- If
transition_tois set, it must target an existing node. httpfunctions must defineendpoint_id(existing endpoint).ragfunctions must definecorpus_id(existing knowledge base).
Action rules
pre_actionsandpost_actionsmust be lists.- Allowed action types:
http,end_conversation. httpactions must defineendpoint_id(existing endpoint).
HTTP template rules
- Endpoint
headersandbodymust be JSON objects with string values. - Secret variables are not allowed in endpoint body templates (put secrets in headers).
- Action endpoint templates cannot use
llmvariables.
Editor guardrails
- Duplicate function names in the same node are blocked.
- Duplicate HTTP actions in one list are blocked.
- Duplicate
end_conversationactions in one list are blocked. - The initial node cannot be deleted.
Example scenarios
Replace placeholder IDs like<KNOWLEDGE_BASE_ID> and <HTTP_ENDPOINT_ID> with values from your Akapulu account.

