Appearance
Run your first workflow
Reading about a signed trail is not the same as checking one yourself. On this page you run a small workflow, approve it and verify its evidence trail, in about ten minutes. After each command, the page names the records Daggry sealed. Read it if you have a running Daggry. If you do not, start with Install Daggry.
The workflow has no agent step, so you need no model credential. You write one file and run four commands. The example is software: the workspace is a Git repository and the work item is an issue. The commands and outputs on this page are illustrative. Placeholders in angle brackets, such as <owner>, stand for values you choose.
Before you start
You need the daggry CLI and two environment variables that point it at your Daggry. Install Daggry sets both.
You also need a scratch repository on GitHub with one open issue, with the Daggry GitHub App installed on it. A run pushes a branch named daggry/<run-id> to it, so do not use a repository you care about.
Check that the CLI is ready.
sh
daggry --helpStart a run
A run needs three things: a workflow, a workspace and an objective, which says what the run is asked to do. Here the objective is an issue.
Save this workflow as
first.yaml. It runs a command, waits for your approval, and runs a second command.yamlformat: daggry/workflow@1 steps: - id: build kind: command scope: anywhere run: [sh, -c, "echo hello > hello.txt"] - id: review kind: human of: build - id: finish kind: command scope: anywhere run: [sh, -c, "echo done > done.txt"]runis the command: a program and its arguments, as a list.scopeis the paths a step can write.anywhereallows every path except a protected path.WARNING
This page shows the design. The built binary differs in a few places, such as the
formatheader, which it does not read yet, and arunthat it reads as one shell line. See Build status and Names the binary still uses.Start the run. Name the repository as
<owner>/<name>and the issue by its URL.shdaggry run --workflow first.yaml --workspace <owner>/<name> --item https://github.com/<owner>/<name>/issues/<n>The command prints the run ID. Daggry has already sealed the first two records of the run: a run lock, which pins what the run started under, and the work item, which holds the objective: the title and the body of your issue.
textrun-0123456789abcdefRead the state of the run.
shdaggry status run-0123456789abcdef --jsonjson{"state":"waiting","attempts":[{"job":"main","n":1,"state":"waiting"}],"waiting_for":"approval"}
If daggry run fails with refused: ..., the text after the colon names the cause. See the CLI reference.
Approve it
The run has stopped because the workflow asks for your approval at the review step.
List what Daggry sealed so far.
shdaggry logs run-0123456789abcdeftextdaggry/run-lock@1 run-lock control 7d3b0c91a4e2 daggry/work-item@1 work-item control c94c24f1751a daggry/change@1 change-1 control 2019b48c668eEach line is one record, and the last column starts its digest. The first two records open every run. When the
buildstep ended, Daggry sealedchange-1: the commit the step made and the paths it changed.Approve the run.
shdaggry approve run-0123456789abcdefThe command prints nothing and exits with 0. Daggry seals your approval, bound to the digest of
change-1, and the job continues in a new runner. Thefinishstep then seals a second change. Rundaggry statusagain, andstatebecomessucceeded. The run also pushed its commits to the branchdaggry/run-0123456789abcdef.
Verify the trail
You do not have to trust the run: check its trail.
Verify everything Daggry sealed for your tenant.
shdaggry verifytextverified 9 entries, 1 blobsAn entry is a record. The command computes every digest and signature again on your machine. If anything does not match, it exits with 1 and prints a reason. To read a failure, see Verify a run.
You have started a run, approved it and verified its trail. To put an agent to work, add an agent step that names a persona: see Write a workflow.
Next: Configure Daggry