Skip to content

Examples

threadle ships working graphs for every concept. Find them under Workflows → examples.

Clicking one clones it into your library. Your own editable copy, not a read-only demo. Take it apart, rewire it, break it.

Every example is also a CLI template id and a portable JSON file under examples/workflows/ in the repo:

Terminal window
threadle --list-templates
threadle run hello
threadle run detached-delay --detach # ~60s, no agents — then threadle jobs / logs
threadle run examples/workflows/knot-concat.json

Wiring, running, gating, parameterizing in the addon. Only one needs an agent. Pair with Getting started on the canvas.

ExampleCLI idTeachesAgent
HellohelloPrompt → output. Wiring with nothing else in the way
Approval gatesplice-gateAn approval gate with editable text before continue
One-shot agentone-shot-agentPrompt → agent → output. The result session appears wiredagent
Workflow paramsparam-prompt{{param:topic}} expanding before the prompt runs
MCP briefexamples/workflows/mcp-brief.jsonParam + output shaped for threadle mcp / wf_*. MCP
Text → Promptprompt-convertWrapping inbound text with a converter template
Terminal window
threadle run examples/workflows/mcp-brief.json
# then add threadle to.mcp.json — see MCP manual

Companion reading: Getting started on the canvas · MCP


Branching, merging, iterating, guard rails, and detached server jobs. All agent-free.

ExampleCLI idTeachesAgent
Detached delaydetached-delayPrompt → ◷ Delay (~60s) → output. Watch threadle jobs / logs while it runs. Close the browser and reopen later
Hello MCPhello-mcpPrompt → ◈ MCP tool (echo) → output. Needs examples/mcp echo config as repo-root .mcp.json. MCP
Merge concatmerge-concatTwo branches into a ⋈ merge
Merge first-winsmerge-firstThe first strategy across two branches
Iterator linesiterator-lines∀ iterator splitting a checklist into items
Mute & bypassmute-bypassMute skips a node. Bypass passes its input straight through
Content breakercontent-tripwireParking when a regex like ERROR matches
Judge branchjudge-branch? Judge routes text to pass / fail / unsure outs
Until re-entryuntil-reenter↻ Until counted loop body then exhausted out
Wait for idlewait-idle-gate◌ Wait for idle until session not generating
Min-chars breakermin-chars-tripwireParking when a draft comes back too short
Spend ceilingspend-tripwireA branch breaker plus the graph-wide ceiling
Terminal window
# copy examples/mcp/mcp.json.echo.example → repo-root.mcp.json
threadle run hello-mcp
# terminal A
threadle --no-open
# terminal B — agent-free long run
threadle run detached-delay --detach
threadle jobs
threadle attach <jobId>
threadle run knot-concat
threadle run iterator-lines
threadle run judge-branch
threadle run until-reenter
threadle run wait-idle-gate
threadle run content-tripwire --approve-all

Companion reading: Patterns · Until · Wait for idle · Detached runs · CLI


Real pipelines: parallelism, per-item agent loops, multi-stage work.

ExampleCLI idTeachesAgent
Agent err fallbackagent-err-fallbackRed error connector (out:err) vs happy-path out → fallback convert. Agentsagent
Skill invoke + Judgeskill-invoke-judge✦ Skill mode: invoke (/{name} on Claude/Cursor/…) → ? Judge. Skillsagent
Iterator → agentiterator-agentOne agent run per item, sequentially in one sessionagent
Iterator parallel mapiterator-parallel∀ mode: parallel. Fresh sessions under ply, then ⋈ Mergeagent
Token breakertoken-circuit breakerSkipping a branch whose payload grew too large
Starter workflowplan-implement-reviewThe full plan → implement → review spine, with a skill node and approvalsagent
Parallel fan + majority mergeply-fan-mergeParallelism = 2 parallel asks, merged by majority, with a duration fuseagent
Terminal window
threadle run agent-err-fallback
threadle run iterator-parallel
threadle run plan-implement-review \
--param task="fix the flaky auth test" --approve-all

Companion reading: Patterns · Errors & retries


ExampleCLI idTeachesAgent
Guarded parallelexpert-guarded-fanEverything at once: parallel fan-out → two asks → concat merge → content breaker that skips on ERROR → approval edit → output, under a $1 graph spend ceilingagent
Complex delay pipelinecomplex-delay-pipelineFive linked subgraphs, delays only: Intake → Normalize → Fast∥Deep → Assemble → circuit breaker → approval. ~20s wall with parallelism=2. use in the app seeds editable subgraphs
Terminal window
threadle run expert-guarded-fan --param task="…" --approve-all
threadle run complex-delay-pipeline --approve-all

Read this one before you build anything unattended. It’s the shape most production workflows converge on.

Companion reading: Patterns · Custom nodes


LevelCLI idPortable file
beginnerhelloexamples/workflows/hello.json
beginnersplice-gateexamples/workflows/splice-gate.json
beginnerone-shot-agentexamples/workflows/one-shot-agent.json
beginnerparam-promptexamples/workflows/param-prompt.json
beginnerprompt-convertexamples/workflows/prompt-convert.json
intermediatedetached-delayexamples/workflows/detached-delay.json
intermediatehello-mcpexamples/workflows/hello-mcp.json
intermediatemerge-concatexamples/workflows/merge-concat.json
intermediatemerge-firstexamples/workflows/merge-first.json
intermediateiterator-linesexamples/workflows/iterator-lines.json
intermediatemute-bypassexamples/workflows/mute-bypass.json
intermediatecontent-tripwireexamples/workflows/content-tripwire.json
intermediatejudge-branchexamples/workflows/judge-branch.json
intermediateuntil-reenterexamples/workflows/until-reenter.json
intermediatewait-idle-gateexamples/workflows/wait-idle-gate.json
intermediatemin-chars-tripwireexamples/workflows/min-chars-tripwire.json
intermediatespend-tripwireexamples/workflows/spend-tripwire.json
advancedagent-err-fallbackexamples/workflows/agent-err-fallback.json
advancediterator-agentexamples/workflows/iterator-agent.json
advancediterator-parallelexamples/workflows/iterator-parallel.json
advancedtoken-tripwireexamples/workflows/token-tripwire.json
advancedplan-implement-reviewexamples/workflows/plan-implement-review.json
advancedply-fan-knotexamples/workflows/ply-fan-knot.json
expertexpert-guarded-fanexamples/workflows/expert-guarded-fan.json
expertcomplex-delay-pipelineexamples/workflows/complex-delay-pipeline.json. 5 subgraphs, delays only

  1. Clone it from the Examples table, or threadle run <id> / import the JSON.
  2. Swap the demo agent for the one you actually use, and set a model.
  3. Replace the hard-coded prompt with a param.
  4. Adjust the circuit breaker thresholds to your budget.
  5. Save. It’s yours now, and exports as portable JSON.

  • Patterns. When to reach for which control node
  • Running. What happens when you press ▶
  • CLI. --list-templates and headless runs
  • Portable graphs. Sharing a .json file