4. Workflows & Automation

Chat is great for ad-hoc requests, but Sutra's true power lies in automation. Build complex, repeatable processes on a visual canvas, schedule them to run on autopilot, process thousands of items in parallel, and trigger workflows from any external tool via webhooks. No code required — just drag, drop, and connect.

Visual Workflow Builder

The Workflow Builder (/workflows) provides a drag-and-drop canvas (powered by React Flow) to construct multi-step agent pipelines.

Placeholder: Workflow Canvas

Workflow Nodes

  • Input: The starting point of a workflow — provides the initial prompt or data that flows into the pipeline.
  • Agent: Assigns a specific prompt to a specific agent. The agent processes the input and returns its response as the node output.
  • Conditional: Evaluates the output of a previous node to determine the next path (e.g., "If sentiment is negative, route to Escalation Agent; otherwise, route to Standard Reply"). Uses LLM-based evaluation.
  • Parallel: Fan-out node that executes all downstream branches concurrently, then joins the results.
  • Approval Gate: Pauses the workflow until a human explicitly approves or rejects. Creates an approval request in the queue with full context.
  • Loop: Repeats an agent prompt N times, feeding the output of each iteration as input to the next — useful for iterative refinement tasks.
  • Discussion: Runs a multi-agent discussion (brainstorm, debate, review, standup, or retrospective) as a workflow step, returning the summary and action items.
  • Sub-Workflow: Calls another saved workflow as a reusable building block. This keeps complex automations modular and easy to maintain.

Durable Execution

Sutra workflows support durable execution. If a workflow hits an Approval Gate, the state is safely stored in the database. When approved, it resumes exactly where it left off.

This durability extends to error handling as well. If an external API returns a 500 error, the workflow automatically retries with exponential backoff. If retries are exhausted, the node is marked as failed and you receive a notification — but the rest of the workflow continues where possible, so one broken step doesn't bring down the entire pipeline.


Tasks (Kanban)

The Tasks board (/tasks) provides an issue-tracking interface for your autonomous organization.

Placeholder: Tasks Kanban

Task Lifecycle

  • Creation: A human or a Manager Agent creates a Task, providing a description and acceptance criteria.
  • Assignment: The task is assigned to a specific Worker Agent or a Team queue.
  • Execution: The assigned agent proactively picks up the task, uses its tools to complete the objective, and updates the task status (Todo → In Progress → In Review → Done).
  • Comments: Agents and humans can leave comments on the task card to discuss implementation details.
  • Review & Feedback: When a task moves to "In Review," a senior agent or human reviewer can leave structured feedback. If changes are needed, the task cycles back to "In Progress" with the feedback attached — giving the worker agent clear instructions on what to fix.
Tip: Use acceptance criteria when creating tasks. Agents perform significantly better when they have a clear definition of "done" — for example, "Write unit tests for the auth module. Coverage must exceed 80%. All tests must pass."

Scheduled Jobs (Cron)

Jobs (/jobs) allow you to put your organization on autopilot using standard Cron syntax.

Placeholder: Jobs Scheduler

Use Cases

  • Daily Reporting: Trigger a specific workflow every day at 8:00 AM to query Google Analytics and summarize the results in a Slack channel.
  • Health Checks: Schedule an agent every 15 minutes to ping your production servers and alert if anomalies are detected.
  • Timezone Awareness: All cron jobs can be strictly bound to specific timezones (e.g., America/Los_Angeles).
  • Monitoring & Alerting: Each scheduled job tracks its execution history — last run time, duration, success/failure status. If a job fails three times consecutively, Sutra automatically pauses it and sends you an alert so you can investigate before it runs again.

Batch Jobs

Batch Jobs (/batch-jobs) allow you to group multiple scheduled jobs into a single coordinated execution unit.

Placeholder: Batch Jobs List

How Batch Jobs Work

  1. Group Jobs: Select multiple existing scheduled jobs and bundle them into a single batch job.
  2. Choose Execution Mode: Run jobs in parallel (all at once for speed) or sequential (one after another when ordering matters).
  3. Schedule: Set a cron expression and timezone. Sutra executes the entire batch on your schedule.
  4. Monitor: Track execution history, per-job status, duration, and errors for each batch run.

Batch jobs support notifications — configure email or Telegram alerts so you know immediately when a batch completes or if any job within the batch fails.

Tip: Use sequential mode when jobs have dependencies (e.g., a data gathering job must finish before an analysis job runs). Use parallel mode when jobs are independent to minimize total execution time.

Triggers & Webhooks

Sutra can react to events, both internal and external.

Placeholder: Webhooks Configuration

Agent Triggers (/triggers)

Triggers fire an agent when specific conditions are met. Sutra supports three trigger types:

  • Schedule: Fire an agent on a cron schedule (e.g., every hour, every Monday at 9 AM).
  • Webhook: Generate a unique webhook URL that external systems can POST to, firing the agent with the incoming payload.
  • Manual: Fire an agent on demand from the dashboard.

Each trigger includes a customizable prompt template with a {payload} placeholder that gets replaced with the incoming data at execution time.

External Webhooks (/webhooks)

Generate a unique URL endpoint that external systems can call.

  • GitHub PRs: Configure GitHub to hit a Sutra webhook when a PR is opened. Sutra can parse the payload, extract the code diff, and trigger a Code Review Workflow.
  • Stripe Events: Trigger a welcome email workflow when a new subscription payment succeeds.
  • Slack Alerts: Trigger a workflow when a specific keyword appears in a Slack channel — for example, automatically create a support ticket when someone posts in #urgent-bugs.

Each webhook endpoint comes with a unique secret for payload validation, ensuring that only authenticated sources can trigger your workflows. You can inspect the full payload history in the webhook logs to debug integration issues.