You can edit nodes in either the visual node editor or the JSON editor. To create a node in the visual editor, click Add Node in the lower-left corner. For how the global role instruction fits with each node’s task instruction, see Role and task instructions.Documentation Index
Fetch the complete documentation index at: https://docs.akapulu.com/llms.txt
Use this file to discover all available pages before exploring further.
Name
Each node name must be unique within the scenario. The node name is used as the identifier for:initial_node(the scenario start node)- any function
transition_totargets
initial_nodeif that node is currently the start node- any function transitions that point to that node
Global role instruction
Scenarios use one globalrole_instruction at the top level.
Use role_instruction for long-lived identity, tone, boundaries, and behavior that should apply across the full conversation.
JSON
Task instruction
task_instruction defines what the assistant should do in the current node.
Each node must include one non-empty task_instruction.
Recommended pattern:
- Put long-lived persona and behavior rules in the global
role_instruction - Use
task_instructionin each node for node-specific goals and instructions
Runtime variables in instructions
You can embed{{runtime.*}} placeholders in the global role_instruction and in any node’s task_instruction. Akapulu substitutes them from the runtime_vars your server sends on connect, so the model sees session-specific text without you duplicating scenarios per customer.
secret and llm template variables are not supported in role_instruction or task_instruction. Use {{runtime.*}} for per-session variables; keep sensitive variables in endpoint headers with {{secret.*}}, and use {{llm.*}} only in HTTP endpoint templates. See Templates and Variables.runtime_vars, for example company_name, user_id, and display_name.
Web SDK: If using the Akapulu Web SDK, in your connect route, call
akapulu.connectConversation from @akapulu/server with a runtime_vars object whose keys match your {{runtime.*}} placeholders. See Customize Conversation UI for a complete server-side example.Functions
Functions are tool calls available to the assistant while the node is active. Allowed function types:transitionhttpragvision
- function name is required and must be unique within the node
- function name can only use letters, numbers, underscores, and hyphens
- function description is required
transitionrequirestransition_tohttprequiresendpoint_idragrequiresknowledge_base_idvisionhas no additional required ID field
- this is the instruction shown to the model for when and why to call the tool
- be explicit about the trigger, expected use, and what the tool does
- enter a function
name - enter a function
description - select type-specific targets from the dropdowns (saved HTTP endpoint for
http, knowledge base forrag)
transition_to in the UI for any function, drag the probe on the right side of the function to the desired node.
Require function call
require_function_call makes the assistant call at least one function on the next model turn in this node instead of answering with only plain text.
Constraint: When
require_function_call is true, the node must define at least one function in functions.Respond immediately
respond_immediately controls whether the assistant speaks immediately after entering the node.
true(default): the assistant responds right awayfalse: the assistant waits for user input before responding
End after bot response
end_after_bot_response controls whether the conversation ends after the bot finishes its first utterance in that node.
Use this for terminal nodes like wrap-up, goodbye, or confirmation nodes where the assistant should speak once and then end the conversation.
When end_after_bot_response is true, interruptions are disabled for that node so the bot can finish its closing response before the conversation ends.
JSON

