Prompt Chain Visual Builder
Design prompt chains with typed variable edges, extractors and conditionals — then export plain JS or a JSON graph.
Node palette
click to add a nodeCanvas
1.00× · pan 0,0Connect nodes
typed edges onlyStructure (screen-reader view)
same graph, keyboard editable- → raw_text → Extract email
- → output → Email variable
- → email → Draft reply
- → no outgoing edges
Validation
1 issues1 finding(s) — exports still available.
- [warning] AMBIGUOUS_PROVIDER: "output" is produced by two nodes; last writer wins.
Inspector — Source text
inputPreview
Contact jane@example.com about order 42.
Import / export
no execution — code is the deliverableExamples
Email extraction
Source text → prompt → regex → draftFour-node DAGEvery edge is a string variable with a matching placeholder.
Score-based branch
score > 0.8Escalate or standard-reply promptsThe conditional emits true and false branches with no output variable.
JSON path
{"user":{"email":"…"}}email string from user.emailThe extractor test pane shows the captured value before export.
About this tool
Prompt Chain Visual Builder is a local designer for multi-step LLM pipelines. Input, Prompt, Extractor and Conditional nodes sit on a pan-and-zoom canvas, and edges carry typed variables — string, number, json or list — between them. Placeholders use {{variable}} or {{variable:type}} syntax.
Connections are validated at edit time: unknown source variables, type mismatches, missing target placeholders and cycles are rejected with an explicit reason and cycle path. Extractors support regex captures, dotted JSON paths and line ranges with a live test pane; conditionals emit labelled true and false branches.
The JS export is a dependency-free skeleton of topologically ordered async functions with escaped templates and regex patterns. The JSON spec round-trips through import with a validation report. A structural list mirrors the graph for keyboard and screen-reader users. Nothing is executed: no API calls, no keys, no network.
What this tool does not do
- The exported JavaScript is a skeleton with marked model-call placeholders, not a complete SDK integration.
- Graphs are designed for a few hundred nodes; very large graphs are better split into subchains.
- No runtime, credentials or network calls are included; persistence is local to the current session.
How to use this tool
Load a starter chain
Begin with extract → draft, support triage with a branch, or JSON path extraction from the gallery.
Add and edit nodes
Add nodes from the palette, select one on the canvas or in the structural list, and edit its fields in the inspector.
Wire typed variables
Choose a source node, variable and target in the connect panel. Invalid edges are rejected with the reason inline.
Validate and export
Resolve validation findings, then copy the generated JavaScript or export the JSON graph for a teammate.
Use cases
Sketch before coding
Design the dataflow visually, then export a JS skeleton as the starting point for implementation.
Explain variable flow
Use the structural list and typed edge labels to teach how prompts pass values to each other.
Share a graph spec
Export JSON, send it to a teammate and import it to continue editing with a validation report.
Node kinds
| Node | Role |
|---|---|
| Input | Declares a typed starting variable and a sample value. |
| Prompt | Template with {{variable:type}} placeholders; produces a string output. |
| Extractor | Regex, JSON path or line range that produces one typed variable. |
| Conditional | Predicate with true/false branches; produces no variable. |
Exports never include SDK imports or API keys — replace the marked model-call comments in your own harness.
Common mistakes
Mistake:Expecting the canvas to run the chain.
Fix:There is deliberately no execution engine. Export the JS and wire it to your own model client.
Mistake:Connecting a number variable to a string placeholder.
Fix:The builder blocks the edge; use an extractor that produces the declared type or change the placeholder annotation.
Mistake:Renaming an extractor output without updating consumers.
Fix:Validation reports unresolved variables; update the placeholders and re-check the graph.
Frequently asked questions
Can it run my chain?
No. The builder has deliberately no execution engine: no API calls, no keys and no network. Its deliverables are a plain JavaScript skeleton and a JSON graph spec that you paste into your own harness. Marked comments show where to call your model client.
How are variables typed and validated?
Each edge carries a string, number, json or list type. A connection is allowed only if the source node actually produces that variable, the types match and the target declares a compatible placeholder or predicate. The validation panel also flags unresolved placeholders, ambiguous providers and malformed annotations.
What does the exported JS look like?
It is one file of topologically ordered async functions, one per node, operating on a shared vars object. Prompt text becomes an escaped template literal, extractor patterns become new RegExp calls with explicit flags, and conditionals become if/else blocks. There are no imports, so it compiles anywhere JavaScript runs.
Can two prompts use the same variable?
Yes — fan-out is a normal DAG. If two different nodes declare the same output variable name, that is ambiguous and the validator warns about last-wins behavior rather than silently choosing one.
How do conditionals export?
A conditional node has no output variable. Its true and false branches each carry a branch label on the edge, and the generated code renders as if (predicate(...)) { await trueBranch(vars); } else { await falseBranch(vars); }. Both branches may point to the same node.
What happens if I try to create a cycle?
The edge is rejected and the builder lists the cycle path, for example A → B → C → A. Graph validation also reports cycles from imported files, while ordinary unresolved variables remain warnings so you can still export a skeleton with TODO comments.
Related tools
Agent Tool Flowchart Builder
Design agentic tool-call DAGs with decision branches and bounded loops. Validates reachability, cycle handling, and emits clean Mermaid flowcharts — fully in your browser.
AI Agent Memory & Buffer Simulator
Compare sliding window, summary buffer, and vector memory strategies
AI API Client SDK Generator
Generate typed API client SDK files from OpenAPI specifications or cURL requests
AI Code Explainer
Explain code snippets with grounded cloud AI
AI Code Security Auditor
Scan source code for high-confidence OWASP Top 10 vulnerabilities
AI Code Translator
Translate code into idiomatic implementations in another language