Quickstart
Viewer first: look at what is already there. No graph required. The canvas steps below are optional and live in the Workflows addon.
Prerequisite: viewer at http://127.0.0.1:4570 (threadle). For canvas steps, also start threadle-workflows on http://127.0.0.1:4571. See Install · Workflows addon.
0. See what already ran
Section titled “0. See what already ran”Open Sessions in the viewer. Every Claude Code, opencode, Cursor Agent, Antigravity, Codex, GitHub Copilot, Grok Build, and Muse Code conversation on this machine should be listed. Tokens, status, cost. Without importing anything.
- Click a session with real history.
- Open its blueprint: tools, files, subagents, spend.
- Optionally check Statistics for provider and project totals.
That is the product before you learn a graph model. When you want handoff or a repeatable job, continue below in the addon.
1. Wire two nodes
Section titled “1. Wire two nodes”Open the Workflows addon (threadle-workflows, or viewer sidebar Addons → Workflows). Paths live under /addon/workflows. Create a new workflow. You get an empty canvas.
- Double-click empty canvas. The add-node menu opens.
- Add a ✎ Prompt node. Type anything into it:
Say hello in three words. - Drag from the prompt’s right-hand handle and drop on empty canvas. The wire-drop menu opens, filtered to nodes that can accept text.
- Pick ⇤ Output.
- Press ▶ Run.
The output node fills with the prompt text. That run is a server job. You can close the tab and reopen the workflow to see the result. Nothing called a model: a wire moves text, and Run walks the graph in dependency order.
2. Put an agent in the middle
Section titled “2. Put an agent in the middle”Now make it do real work.
- Delete the wire (click it, press Delete).
- From the palette’s Agents tab, drag an agent definition onto the canvas. Any Claude, opencode, Cursor, Antigravity, or Codex agent threadle discovered.
- Select the agent node and pick a model in the inspector. This is required: a run refuses to start without one.
- Wire
prompt → agent → output. - ▶ Run.
threadle spawns a real session through that provider’s CLI. Watch the Run log at the bottom. When it finishes, the output node holds the agent’s reply, and a session node appears wired to the agent. That conversation now exists on disk like any other, and the next run continues it.
3. Add a human checkpoint
Section titled “3. Add a human checkpoint”Insert a gate so you see the text before it moves on.
- Add a ✓ Approval node between the agent and the output.
- ▶ Run again.
The run parks. The dock shows the agent’s text in an editable box. Fix a word, delete a paragraph, whatever you like. Approve · continue forwards your edited version. That edit-in-place is a splice.
4. Make it reusable with a param
Section titled “4. Make it reusable with a param”Hard-coded prompts age badly.
- Open ≔ params in the topbar and add a param named
task, typetext. - In the prompt node, replace your text with:
Review this and list three risks: {{param:task}} - ▶ Run. threadle asks for
taskbefore starting.
The same graph now runs against anything. Params are also how the CLI drives a workflow:
threadle run <graphId> --param task="the auth refactor" --approve-all5. Protect the run
Section titled “5. Protect the run”Before you let a graph loose unattended, give it a limit.
- In ≔ params, set a spend ceiling. The whole run aborts if tracked cost crosses your limit.
- Or drop a ‡ circuit breaker node on a wire for a per-branch rule: trip on an empty or too-short result, on a regex match like
ERROR, on elapsed time, or on tokens. Choose what happens when it trips: abort, skip the branch, or park for a human. - To route by match instead (pass / fail / unsure), use a ? Judge. See Judge.
See Circuit breakers.
What you just learned
Section titled “What you just learned”| Step | Concept |
|---|---|
| 0 | Sessions and blueprints. Value with no graph |
| 1 | Nodes, wires, topological run order |
| 2 | Agent nodes, models, result sessions |
| 3 | Gates and splice |
| 4 | Params and CLI reuse |
| 5 | Circuit breakers and spend ceilings |
- Sessions · Tour of the app
- Workflows addon · Getting started · Patterns
- Recipes. Job graphs (diff review, handover, repo brief)