Workflows & Workflow Runs
When an assignment spans multiple data sources, calculations, and downstream updates, Nunc executes it as a durable Workflow Run powered by AgentWorkflow. Runs execute on the server even if you close your browser tab, pause cleanly at human approval gates, enforce strict token and cost guardrails, and promote into reusable Saved Workflows in Console → Build → Workflows.
Five AgentWorkflow execution modes
tasks_md). Inspects progress after each step, checks off verified items, and adapts until the objective is met or a guardrail triggers.Workflow Runs API (/api/workflows/runs)
Manage workflow runs programmatically via @nunc/sdk (nunc.workflows.runs.*) or direct HTTPS requests:
| Method & Path | Purpose |
|---|---|
| POST /api/workflows/runs | Start a new AgentWorkflow run (direct, goal_loop with tasks_md, subagents, saved, or sandbox). |
| GET /api/workflows/runs · GET /api/workflows/runs/:id?waitMs=... | List runs or inspect live run status, steps, findings, and tasks_md progress with optional long-polling. |
| POST /api/workflows/runs/:id/approve · /reject POST /api/workflows/runs/:id/steps/:stepId/approve · /reject | Approve or reject a paused run or a specific human-gated mutating step with reviewer attribution. |
| POST /api/workflows/runs/:id/terminate | Immediately cancel an active or paused workflow run. |
| POST /api/workflows/runs/:id/save-as-workflow | Promote a completed workflow run into a reusable Saved Workflow runbook for cron scheduling or webhook triggers. |
| GET / PUT /api/workflows/runs/guardrails | Read or configure tenant-wide per-run token, cost, step, wall-clock, and concurrency limits. |
Scheduled and autonomous workflow runs never bypass governance. Whenever a step proposes mutating Salesforce, Sage Intacct, Jira, or Slack records, execution pauses at that step and notifies designated reviewers in Data Studio, Console, or Slack / Microsoft Teams.
Approvers inspect the exact target system and parameter diff before approving or rejecting, and every decision is recorded in the tamper-evident audit trail.
Every run enforces configurable ceilings across maxTokensPerRun, maxCostUsdPerRun, maxStepsPerRun, maxWallClockSec, and maxConcurrentRuns.
Long-horizon goal_loop runs can optionally hand off remaining tasks_md checklist items across bounded continuations (autoRespawnOnLimit) while respecting overall tenant spend caps.