Example 1: Hello World
The simplest possible Step Workflow: a single step with instructions and no data collection.
Objective
In this example, you'll learn:
- The basic structure of a Step Workflow definition
- How workflows initialize automatically
- What a terminal step is and how it completes a workflow
- How the submit tool works
The Scenario
You want to create a simple greeting workflow. When users interact with your agent, it should deliver a friendly welcome message and then complete.
This forms the foundation for everything that follows—once you understand this pattern, you can build increasingly complex workflows.
Implementation
Here's the complete tool definition:
{
"type": "context",
"context": {
"task": {
"type": "steps",
"version": "v1alpha",
"id": "hello-world",
"tool": {
"name": "complete_greeting",
"description": "Complete the greeting workflow"
},
"steps": [
{
"id": "GREET",
"goal": "Greet the user",
"instructions": [
"Say: 'Hello! This is a simple one-step workflow.'",
"Then call the complete_greeting tool to finish."
]
}
]
}
},
"tool": {
"type": "function",
"function": {
"name": "hello_world_workflow",
"description": "A simple greeting workflow",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
}
}
Key Concepts
Tool Definition Structure
Every Step Workflow has two main parts:
context.task: The workflow definition itselftype: "steps"— Identifies this as a Step Workflowtool.name— The submit tool name the agent will callsteps— Array of steps in the workflow
tool: The external tool definition- This is how the tool appears in the Syllable Console
- The
function.nameis used for tool management (not by the agent)
The Submit Tool
The tool.name field (complete_greeting in this example) defines the submit tool—a special tool the agent calls to advance the workflow. The workflow engine:
- Generates the tool's schema based on the current step
- Uses the step's
goalas the tool description - Adds input parameters from the step's
inputsfield (none in this example)
Terminal Steps
A step is terminal when it has no next field. The GREET step in this example is terminal—when the agent calls complete_greeting, the workflow completes.
After completion:
- The submit tool is removed from the agent's available tools
- The workflow state is preserved for reference
- The agent can respond freely to the user
Workflow Initialization
When the workflow starts, the platform automatically:
- Creates workflow state tracking the current step
- Presents the first step's instructions to the agent
- Makes the submit tool available with the appropriate schema
The agent receives the step instructions and knows exactly what to do.
How It Works
Here's the conversation flow:
User: "Hello"
[Platform initializes workflow]
→ Current step: GREET
→ Agent receives instructions:
"Say: 'Hello! This is a simple one-step workflow.'
Then call the complete_greeting tool to finish."
Agent: "Hello! This is a simple one-step workflow."
User: "Okay"
[Agent calls complete_greeting tool]
→ No inputs to validate (step has no inputs)
→ No next step defined (terminal)
→ Workflow completes
Agent: "If there's anything else you need, feel free to ask!"
State Changes
After initialization:
{
"current_step_id": "GREET",
"current_step_inputs": {},
"completed_steps": [],
"workflow_completed": false
}
After agent submits:
{
"current_step_id": "GREET",
"current_step_inputs": {},
"completed_steps": ["GREET"],
"workflow_completed": true
}
Try It
To test this workflow in the Syllable Console:
- Create a new tool with the JSON above
- Assign it to an agent
- Start a conversation and say "hello"
- Observe the agent delivering the greeting
- Say "okay" and watch the workflow complete
What's Next
This example showed a workflow with no data collection. In Example 2: Collect Input, you'll learn how to:
- Define input parameters for a step
- Validate that required information is collected
- Access collected inputs in your workflow

