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:
threadle --list-templatesthreadle run hello-wirethreadle run detached-delay --detach # ~60s, no agents — then threadle jobs / logsthreadle run examples/workflows/knot-concat.jsonBeginner
Section titled “Beginner”Wiring, running, gating, parameterizing. Only one needs an agent.
| Example | CLI id | Teaches | Agent |
|---|---|---|---|
| Hello wire | hello-wire | Prompt → output. Wiring with nothing else in the way | — |
| Splice gate | splice-gate | An approval gate with an editable splice before continue | — |
| One-shot agent | one-shot-agent | Prompt → agent → output; the result session appears wired | agent |
| Workflow params | param-prompt | {{param:topic}} expanding before the prompt runs | — |
| Text → Prompt | prompt-convert | Wrapping inbound text with a converter template | — |
Companion reading: 1 · Beginner
Intermediate
Section titled “Intermediate”Branching, merging, iterating, guard rails, and detached server jobs. All agent-free.
| Example | CLI id | Teaches | Agent |
|---|---|---|---|
| Detached delay | detached-delay | Prompt → ◷ Delay (~60s) → output. Watch threadle jobs / logs while it runs; close the browser and reopen later | — |
| Knot concat | knot-concat | Two branches into a ⋈ knot | — |
| Knot first-wins | knot-first | The first strategy across two branches | — |
| Iterator lines | iterator-lines | ∀ iterator splitting a checklist into items | — |
| Mute & bypass | mute-bypass | Mute skips a node; bypass passes its input straight through | — |
| Content tripwire | content-tripwire | Parking when a regex like ERROR matches | — |
| Min-chars tripwire | min-chars-tripwire | Parking when a draft comes back too short | — |
| Spend tripwire | spend-tripwire | A branch breaker plus the graph-wide ceiling | — |
# terminal Athreadle --no-open
# terminal B — agent-free long runthreadle run detached-delay --detachthreadle jobsthreadle attach <jobId>
threadle run knot-concatthreadle run iterator-linesthreadle run content-tripwire --approve-allCompanion reading: 2 · Intermediate · Detached runs · CLI
Advanced
Section titled “Advanced”Real pipelines: parallelism, per-item agent loops, multi-stage work.
| Example | CLI id | Teaches | Agent |
|---|---|---|---|
| Iterator → agent | iterator-agent | One agent run per item, sequentially in one session | agent |
| Token tripwire | token-tripwire | Skipping a branch whose payload grew too large | — |
| Starter workflow | plan-implement-review | The full plan → implement → review spine, with a skill node and approvals | agent |
| Ply fan + majority knot | ply-fan-knot | Ply = 2 parallel asks, merged by majority, with a duration fuse | agent |
threadle run plan-implement-review \ --param task="fix the flaky auth test" --approve-allCompanion reading: 3 · Advanced
Expert
Section titled “Expert”| Example | CLI id | Teaches | Agent |
|---|---|---|---|
| Guarded parallel | expert-guarded-fan | Everything at once: ply fan-out → two asks → concat knot → content tripwire that skips on ERROR → approval splice → output, under a $1 graph spend ceiling | agent |
| Complex delay pipeline | complex-delay-pipeline | Five linked subgraphs, delays only: Intake → Normalize → Fast∥Deep → Assemble → tripwire → approval. ~20s wall with ply=2. use in the app seeds editable subgraphs | — |
threadle run expert-guarded-fan --param task="…" --approve-allthreadle run complex-delay-pipeline --approve-allRead this one before you build anything unattended — it’s the shape most production workflows converge on.
Companion reading: 4 · Expert
Full catalog (18)
Section titled “Full catalog (18)”| Level | CLI id | Portable file |
|---|---|---|
| beginner | hello-wire | examples/workflows/hello-wire.json |
| beginner | splice-gate | examples/workflows/splice-gate.json |
| beginner | one-shot-agent | examples/workflows/one-shot-agent.json |
| beginner | param-prompt | examples/workflows/param-prompt.json |
| beginner | prompt-convert | examples/workflows/prompt-convert.json |
| intermediate | detached-delay | examples/workflows/detached-delay.json |
| intermediate | knot-concat | examples/workflows/knot-concat.json |
| intermediate | knot-first | examples/workflows/knot-first.json |
| intermediate | iterator-lines | examples/workflows/iterator-lines.json |
| intermediate | mute-bypass | examples/workflows/mute-bypass.json |
| intermediate | content-tripwire | examples/workflows/content-tripwire.json |
| intermediate | min-chars-tripwire | examples/workflows/min-chars-tripwire.json |
| intermediate | spend-tripwire | examples/workflows/spend-tripwire.json |
| advanced | iterator-agent | examples/workflows/iterator-agent.json |
| advanced | token-tripwire | examples/workflows/token-tripwire.json |
| advanced | plan-implement-review | examples/workflows/plan-implement-review.json |
| advanced | ply-fan-knot | examples/workflows/ply-fan-knot.json |
| expert | expert-guarded-fan | examples/workflows/expert-guarded-fan.json |
| expert | complex-delay-pipeline | examples/workflows/complex-delay-pipeline.json — 5 subgraphs, delays only |
Using an example as a starting point
Section titled “Using an example as a starting point”- Clone it from the Examples table, or
threadle run <id>/ import the JSON. - Swap the demo agent for the one you actually use, and set a model.
- Replace the hard-coded prompt with a param.
- Adjust the tripwire thresholds to your budget.
- Save — it’s yours now, and exports as portable JSON.
Related
Section titled “Related”- Learning path — the ordered route through these
- Running — what happens when you press ▶
- CLI —
--list-templatesand headless runs - Portable graphs — sharing a
.jsonfile