Start a run of a task from Studio, the CLI or the API, then read its status and output.
Before you start
You need a task. See Write a task.
Start a run
- Sign in to the CLI.
- Set
PROJECT_IDto your project's ID (Find your IDs):export PROJECT_ID=<id>. - Start the run. The
--idempotency-keymakes a retry return the same run:Shellnpx veryfront project runs create --idempotency-key word-count-1 --json --body '{ "project_id": "'$PROJECT_ID'", "target": { "type": "task", "id": "word-count" }, "input": { "text": "Veryfront runs agents, tasks and workflows" }}' - Set
RUN_IDtodata.run_idin the answer:export RUN_ID=<run_id>. - Read the run until its
statusiscompleted. You should now see"words": 6in itsoutput:Shellnpx veryfront project runs get --run-id $RUN_ID --json
Try it in a sandbox
Add the word-count task
Set PROJECT_ID
Start the run
Set RUN_ID
Wait until it is completed
Check it