Your first workflow
A hands-on tutorial. Build a text pipeline, then an LLM app, then a cited RAG chatbot, learning the canvas, ports, runs, run targets and Chat along the way.
This tutorial builds three small apps by hand. Each one adds one idea. It takes about 20 minutes and assumes you finished the Quick start and have OPENROUTER_API_KEY in .env (or in Settings → Secrets).
Part 1: A text pipeline (no AI yet)
Goal: learn the canvas, typed ports, saving and running.
- Click New, choose Blank canvas and name the project Greeter.
- In the Node library on the left, search for Manual Input and drag it onto the canvas (or click it to add). In the Inspector on the right, set
keytoname,value_typetoString, anddefaulttoworld. - Add a Text Template. Set
templatetoHello, {{ text }}!. - Drag from the Manual Input’s
valueport (right side) to the Text Template’stextport (left side). Ports are coloured by type; the IDE refuses a connection the runtime would reject. - Add an Output node with
keyset togreeting, and connect Text Template’stextto Output’svalue. - Press Ctrl+S (or Save). Every save creates a new, numbered revision.
- Open Run inputs, type
Ada, and click Run. The Output tab shows{"greeting": "Hello, Ada!"}.
What happened: the IDE saved the graph as IR, the API ran the validation pipeline, compiled an execution plan, and the runtime executed the nodes in dependency order, streaming trace events to the IDE over SSE.
Read the Problems tab
If a node shows a red badge, open the Problems tab. Every diagnostic has a stable code (for example PORT_MISSING_REQUIRED_INPUT), a message and usually a hint. See Error codes.
Part 2: An LLM app
Goal: call a real model, use secrets and Chat.
- Create another blank project, Explainer.
- Add Manual Input with
key=question. - Add an LLM node. Leave
provider=openrouterandmodel=google/gemini-3.8-flash. Inapi_key, choose the secret nameOPENROUTER_API_KEY(the form shows whether it is set). Setsystem_promptto Explain like I am twelve, in at most three sentences. - Connect
question.value→LLM.prompt. - Add Output with
key=answer, and connectLLM.text→Output.value. - Save, then open the Chat tab and ask Why is the sky blue? The answer types out live (streaming), with latency, tokens and cost underneath.
Chat is simply another way to start a run: it fills the input named question (or the first text input) and reads the output named answer (or the first output).
Reasoning models need room
Models such as Gemini 3.x think before answering, and thinking tokens come out of max_tokens. If you get MODEL_EMPTY_RESPONSE or MODEL_OUTPUT_TRUNCATED, raise max_tokens (1024 or more) or lower reasoning_effort.
Part 3: A RAG chatbot with citations
Goal: answer from your own documents, with sources. This introduces handles and run targets.
A RAG app has two flows that share an embedding model and a vector store:
flowchart LR L[Document Loader] --> CL[Document Cleaner] --> CH[Chunker] --> IX[Index Documents] --> O1[Output: Index report] EM[Embedding Model] -. handle .-> IX VS[Vector Store] -. handle .-> IX Q[Manual Input: question] --> RT[Retriever] --> CB[Context Builder] --> LLM --> CI[Citation Builder] --> O2[Output: answer] EM -. handle .-> RT VS -. handle .-> RT Q --> CB CB -- sources --> CI
The fastest way is New → RAG answers with citations, which wires exactly this. To understand it, inspect each node:
- Document Loader: click it, then Upload files in the Inspector and pick
examples/data/employee-handbook.md(or any PDF, Word, Excel, PowerPoint, HTML, CSV… file). - Chunker: splits documents into ~300-token chunks, keeping exact character offsets so citations can point to the source span.
- Embedding Model: local
BAAI/bge-small-en-v1.5via fastembed. No key needed; downloaded once. - Vector Store: embedded Qdrant on your disk. The collection is prefixed with the project ID so projects never share data.
- Index Documents: embeds chunks and also builds a BM25 keyword index. Re-running skips unchanged chunks.
Now run only the ingestion flow: open the toolbar’s Run menu and pick Run → Index report. That is a run target: only the chosen Output and everything it depends on runs. The Output tab shows how many chunks were indexed.
Then ask in Chat: What is the hotel limit per night? The question flow runs (Retriever → Context Builder → LLM → Citation Builder) and the answer cites its sources like [1]. Click a citation number to open the source chunk in the document viewer.
What each RAG node contributed
| Node | Why it matters |
|---|---|
| Retriever | Embeds the question and finds the most similar chunks (cosine similarity). |
| Context Builder | Numbers chunks [1]..[n], removes duplicates, fits a token budget and writes the prompt telling the model to cite. |
| LLM | Writes the answer from the numbered sources only. |
| Citation Builder | Maps [n] markers to real sources and removes citations that point nowhere. |
What you learned
- Graphs are made of nodes with typed ports; connections are checked as you draw.
- Save creates an immutable revision; Run executes the saved revision.
- Secrets are referenced by name and resolved at run time.
- Handles (Embedding Model, Vector Store) let two flows share resources.
- Run targets run only part of a graph.
- Chat is a run with a question input and an answer output.
Where to go next
- Make retrieval better: Advanced RAG.
- Give a model tools: Agents and tools.
- Measure quality before and after a change: Evaluation Lab.
- Understand the theory: Retrieval-augmented generation in the handbook.

