SandboxWorkflow templates

Workflow templates

A template gives you a complete, working workflow to start from. You pick one, fill in its parameters, and get an ordinary YAML definition you can read, edit and run. Templates are also the quickest way to learn the format; the YAML reference explains every field they use.

Create a workflow from a template

tangle workflows templates
tangle workflows init pr-review --param lens=security --file pr-review.yml

templates lists each template’s id, name, category, the providers it uses and a summary.

init creates a workflow from the template with your --param key=value values (repeat the flag for each one) and prints its YAML, or writes it to --file. Every template starts disabled, so nothing runs until you turn it on.

If the template needs a provider you have not connected, init creates nothing, lists each connection it needs with its link, and exits with code 1. Connect them, for example with tangle hub connect github, and run the same command again.

Edit it and turn it on

tangle workflows get <id> --yaml > wf.yml
tangle workflows validate wf.yml
tangle workflows update <id> wf.yml
tangle workflows enable <id>

get --yaml prints the current definition. Edit the file, check it with validate, then save it as a new revision with update. Review the trigger, connections and steps before you enable it. A manual tangle workflows run <id> --wait works whether or not the trigger has fired.

You can also create a workflow from a template in the Platform app, which shows the same parameters as a form.

The templates

Template idNameTriggerNeeds
pr-reviewPR ReviewPull request opened or marked readyGitHub
issue-triageIssue TriageIssue openedGitHub
email-security-digestDaily digestDaily scheduleGmail; GitHub to post to an issue
ralph-loopRalph loopWeekday scheduleNothing
fanout-reviewFanout reviewManual run or webhookNothing
code-mode-supervisorCode-mode supervisorWebhookNothing
engineering-auditSenior engineering auditManual run or webhookGitHub
design-auditSenior design auditManual run or webhookNothing; GitHub to file an issue

PR Review (pr-review)

Reviews each pull request that is opened or marked ready, and skips drafts until they are ready.

Four reviewers work in parallel, each in its own sandbox on the pull request head: correctness, security, tests and design. Each reviewer is followed by a verifier that re-reads the code behind every finding and marks it confirmed or refuted. A final step joins the four verified lists and posts one review with only the confirmed findings, as the Tangle Hub GitHub App.

ParameterValues
lensall (default), correctness, security, tests or design. One lens runs that reviewer and its verifier only
modelThe Router model every reviewer, verifier and the final step use; the template sets a default

It starts up to four sandboxes at once, so your plan must allow that many concurrent sandboxes; on a plan that allows fewer, the extra sandboxes are refused with CONCURRENT_LIMIT and those steps fail.

Issue Triage (issue-triage)

Each newly opened GitHub issue is read by an agent with access to your GitHub connection. The agent triages it and posts a short assessment back as a comment, deciding and acting in one step. It has no parameters.

Daily digest (email-security-digest)

Every day an agent reads your recent email, writes one digest with a security or operations focus, and delivers it to a GitHub issue, a webhook, or both. With neither, the digest stays in the run’s output.

ParameterValues
scheduleA cron expression in UTC; the default runs daily at 08:00
focussecurity (default) or operations
queryThe Gmail search; default newer_than:1d
owner, repo, issueNumberOptional. Set all three to post the digest as a comment on that issue
notifyUrlOptional. An HTTPS endpoint that receives the digest

Ralph loop (ralph-loop)

A draft, review and steer loop with no connections. A drafter writes release notes from your changes, a reviewer answers VERDICT: approve or VERDICT: revise, and a steering editor turns each revise into notes for the next draft. The loop repeats through a guarded back-edge until the reviewer approves, then posts the final draft to notifyUrl if you set one. It shows needs[].when, if routing and maxNodeVisits in one short file.

ParameterValues
changesThe changes the notes are written from, on one line, up to 2048 characters. The default is a sample to replace
notifyUrlOptional. An HTTPS endpoint the approved draft is posted to, such as a Slack or Discord incoming webhook

Fanout review (fanout-review)

One builder drafts a short report on a topic, accuracy, clarity and tone reviewers score it in parallel, and a final step returns the report with a SHIP or REVISE verdict. Every step is a single model call with no sandbox. It shows a graph that fans out with needs and joins again.

ParameterValues
topicWhat the report is about. A manual run uses it; a webhook call can pass its own topic in the body
modelThe Router model the builder, reviewers and final step use; the template sets a default

Code-mode supervisor (code-mode-supervisor)

Post a brief to the workflow’s webhook URL. One script.run step sends it to three sandbox workers with the bundled sandbox SDK and agent-runtime loop functions, scores their answers and returns the best one. Use it when your orchestration is easier to write as code than as YAML. It has no parameters; the posted body’s brief field is the input.

Senior engineering audit (engineering-audit)

Audits a repository when you run it. Five reviewers work in parallel, each in its own sandbox: architecture, reliability, security, performance, and tests and operability. Each is followed by a verifier that re-checks its findings against the code. A final step ranks the confirmed findings, each with a number to beat, and files them as one GitHub issue on the repository.

ParameterValues
ownerThe organization or user that owns the repository
repoThe repository name, without the owner
modelThe Router model every reviewer, verifier and the final step use; the template sets a default

It starts several sandboxes at once, with the same plan requirement as PR Review.

Senior design audit (design-audit)

Audits a public web page when you run it. One fetch step captures the page’s HTML, its stylesheets from the same host and its asset details, as both a desktop and an iPhone browser; it is the only step with network access, and it may reach only the domain you name. Five reviewers then audit that capture in parallel: hierarchy and typography, interaction, accessibility, responsive layout, and copy. Each is followed by a verifier, and a final step writes one ranked report. Findings cite HTML, CSS and copy, not screenshots.

ParameterValues
urlThe public https:// page to audit
domainThe page’s exact host, such as example.com; it must match url
modelThe Router model the reviewers, verifiers and final step use; the template sets a default
notifyUrlOptional. An HTTPS endpoint the report is posted to
owner, repoOptional. Set both to also file the report as one issue on that repository

It starts several sandboxes at once, with the same plan requirement as PR Review.

Run a manual-run template with tangle workflows run <id> --wait, or with Run now on its page in the Platform app. A template with a webhook trigger also gets its own URL and token when it is created; see Run, inspect and trace workflows.

Next