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-wire
threadle run detached-delay --detach # ~60s, no agents — then threadle jobs / logs
threadle run examples/workflows/knot-concat.json

Wiring, running, gating, parameterizing. Only one needs an agent.

ExampleCLI idTeachesAgent
Hello wirehello-wirePrompt → output. Wiring with nothing else in the way
Splice gatesplice-gateAn approval gate with an editable splice before continue
One-shot agentone-shot-agentPrompt → agent → output; the result session appears wiredagent
Workflow paramsparam-prompt{{param:topic}} expanding before the prompt runs
Text → Promptprompt-convertWrapping inbound text with a converter template

Companion reading: 1 · Beginner


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
Knot concatknot-concatTwo branches into a ⋈ knot
Knot first-winsknot-firstThe first strategy across two branches
Iterator linesiterator-linesiterator splitting a checklist into items
Mute & bypassmute-bypassMute skips a node; bypass passes its input straight through
Content tripwirecontent-tripwireParking when a regex like ERROR matches
Min-chars tripwiremin-chars-tripwireParking when a draft comes back too short
Spend tripwirespend-tripwireA branch breaker plus the graph-wide ceiling
Terminal window
# 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 content-tripwire --approve-all

Companion reading: 2 · Intermediate · Detached runs · CLI


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

ExampleCLI idTeachesAgent
Iterator → agentiterator-agentOne agent run per item, sequentially in one sessionagent
Token tripwiretoken-tripwireSkipping a branch whose payload grew too large
Starter workflowplan-implement-reviewThe full plan → implement → review spine, with a skill node and approvalsagent
Ply fan + majority knotply-fan-knotPly = 2 parallel asks, merged by majority, with a duration fuseagent
Terminal window
threadle run plan-implement-review \
--param task="fix the flaky auth test" --approve-all

Companion reading: 3 · Advanced


ExampleCLI idTeachesAgent
Guarded parallelexpert-guarded-fanEverything at once: ply fan-out → two asks → concat knot → content tripwire that skips on ERROR → approval splice → output, under a $1 graph spend ceilingagent
Complex delay pipelinecomplex-delay-pipelineFive linked subgraphs, delays only: Intake → Normalize → Fast∥Deep → Assemble → tripwire → approval. ~20s wall with ply=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: 4 · Expert


LevelCLI idPortable file
beginnerhello-wireexamples/workflows/hello-wire.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
intermediateknot-concatexamples/workflows/knot-concat.json
intermediateknot-firstexamples/workflows/knot-first.json
intermediateiterator-linesexamples/workflows/iterator-lines.json
intermediatemute-bypassexamples/workflows/mute-bypass.json
intermediatecontent-tripwireexamples/workflows/content-tripwire.json
intermediatemin-chars-tripwireexamples/workflows/min-chars-tripwire.json
intermediatespend-tripwireexamples/workflows/spend-tripwire.json
advancediterator-agentexamples/workflows/iterator-agent.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.json5 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 tripwire thresholds to your budget.
  5. Save — it’s yours now, and exports as portable JSON.