Tutorial: Hello World
Build, deploy, and call the simplest possible ScaiFlow flow — an API trigger that echoes its input back via a flexible LLM step.
What you'll end up with#
A two-node flow:
Deployed as a Core; callable via POST /v1/modules/scaicore/cores/{id}/invoke.
Steps#
1. New flow#
In the canvas toolbar, click New. Name it Echo Agent in the input.
2. Drag the entry#
From the left palette Entry points section, drag API Entry onto the canvas. Click it. In the property panel, leave the defaults: method: POST, path: /.
3. Drag the LLM block#
From LLM blocks, drag Flexible Prompt to the right of the entry node.
4. Wire them#
Drag from the entry's out_request port (right edge) to the Flexible Prompt's in_message port (left edge). The canvas creates a sequential edge.
5. Configure the prompt#
Click the Flexible Prompt node. In the property panel:
- Label:
Echo(optional, makes the node easier to read). - Goal:
Echo the user's message back verbatim. - Model role:
primary(default). - Output schema: leave
{}.
6. Configure the model registry#
If you haven't already, click empty canvas to deselect, then in the Flow properties panel under Models, the registry has one row (primary). The model picker reads from your tenant's ScaiGrid catalog. Pick a chat-capable model (e.g. openai/gpt-4o) or accept the default.
7. Save#
Click Save in the toolbar. The flow is persisted to your tenant; it now appears in the My Flows sidebar.
8. Deploy#
Click Deploy. A toast confirms Deployed core_id=core_<id>. Copy that ID.
9. Invoke#
1 2 3 4 5 6 7 | |
Response:
1 2 3 4 5 | |
What you have now#
A deployed Core named echo-agent under your tenant slug. Its compiled YAML is shown in the canvas's Live Preview pane (right sidebar, bottom) — you can see the api trigger declaration and the single llm_turn step.
In the canvas's Live Runs panel you should see one invocation.completed event corresponding to your curl.
Variations#
Make it a chat model#
In the Flow properties panel, check Publish as chat model. Save + Deploy. The Core is now reachable via /v1/chat/completions:
1 2 3 4 5 6 7 | |
Make it deterministic#
Replace the Flexible Prompt with a Strict Prompt (Rigid). Set its template to Echo: {{message}}. Same shape; no LLM call. Faster, cheaper, deterministic.
Next#
- Customer support flow — adds branching, plugins, and HITL.
- Multi-model flow — different roles per LLM block.