role_instruction(one per scenario): stable persona, tone, and rules that should hold for the whole conversation.task_instruction(one per node): what the assistant should focus on in that stage of the flow, including how to use the tools attached to that node.
Where you edit them
Visual editor
- Role instruction: Open the Scenario Menu on the left → Settings tab → edit Role instruction in the text area.
- Task instruction: Click a node on the canvas → edit Task instruction in that node’s side panel.
JSON mode
Set the following keys in the scenario JSON objectrole_instructionat the top level of the scenario object.task_instructioninside each node
How Akapulu builds context
As the conversation runs, Akapulu builds LLM context in this order:- The scenario’s global
role_instruction. - The current node’s
task_instruction. - Each user and assistant turn, in order.
- After a transition, the new node’s
task_instruction(previous stage instructions remain in the transcript history).
role_instruction. Put stage-specific goals, discovery questions, and “what to do next” guidance in each node’s task_instruction.
Variables in instructions
You can embed{{runtime.*}} placeholders in role_instruction and in each task_instruction.
At connect time, Akapulu substitutes them from the runtime_vars object in your request, or from the Testing Mode runtime JSON when you run a simulation in the editor.
Example
Scenario excerpt{{runtime.**}}
company_namedisplay_nameaccount_id
Passing runtime_vars into connectConversation
See Customize conversation UI.
role_instruction and each node’s task_instruction fully expanded):
{{runtime.*}} name used in those strings is missing from runtime_vars, Akapulu returns an error and the session does not start.
HTTP tool endpoint headers and body string values use the same
{{runtime.*}} syntax; they are substituted at connect from runtime_vars similar to role_instruction and task_instruction.HTTP templates may also use {{llm.*}} (filled when the model invokes the tool) and {{secret.*}}. {{secret.*}} is only allowed in HTTP headers, not in the request body.See Templates and variables for full rules and examples.See also
- Scenarios overview — scenarios, nodes, and tools at a high level
- Connect conversation —
runtime_varsin the connect payload - Templates and variables —
{{runtime.*}},{{secret.*}}, and{{llm.*}}rules - Using JSON — scenario JSON schema and editing in JSON mode
- Node basics — node structure, tools, and transitions
- Testing Mode — text-only simulation and
runtime_varsin the editor

