Major

AI Workflow Builder: Build Workflows That Keep Running

An AI workflow builder can turn a plain-language process into working automation. The production challenge is designing state, retries, approvals, observability, and permissions before moving repeatable steps into deterministic apps.

Rahul RamakrishnanUpdated
Operations lead in a warehouse checking a workflow approval on a tablet

Can AI create workflows?

Yes. An AI workflow builder turns a written goal into steps, picks tools, and drafts branching logic. What it cannot do by itself is make the result safe to run unattended. That takes durable state, idempotent execution, bounded retries, approval gates and a run record an operator can read afterward. Major covers both halves: agents build deterministic apps for the repeatable stretches of a workflow, and those apps carry the state, permissions and audit log while the model handles only the judgment calls.

This piece is for platform and IT leaders and operations owners deciding how to let teams build AI workflows without creating ungoverned shadow automation.

An AI workflow engine pairs a workflow runtime with a model. The runtime receives an event, stores progress, calls services and enforces rules. The model reads unstructured input, classifies it, makes a bounded recommendation or drafts an artifact. A workflow outlives any single model call, so its state has to outlive the response too.

Write the contract before the canvas

Define the trigger, versioned inputs, expected output, accountable owner and terminal states before a builder generates anything. Include failure states next to the happy path.

Then add a run ID and an idempotency key. Webhooks fire twice, users double-click, and queues redeliver after a lost acknowledgement. Without a key, the second delivery sends a second message or updates a record twice. Stripe documents the durable pattern in its idempotent requests guide: save the first result for a key and return it for every repeat.

State is what lets an operator resume a stalled run, correct one classification without rerunning the chain, and explain a decision months later.

Give the model judgment, keep memory elsewhere

Use the model where a fixed schema cannot describe the input: extracting intent from an email, classifying a support request, summarizing a claim file, drafting a reply. Give each of those steps an output schema, a confidence threshold and a fallback path. If you route across several models, the fallback belongs in that same contract.

The model should never be the only place that remembers whether a step already ran. Store the prompt, input, model output and resulting action in the run record. The model handles the current decision. The workflow record knows what already happened.

Treat retries as a design decision

Retries are safe only when they are bounded and state-aware. Randomized delay on top of exponential backoff stops synchronized retry bursts, as the AWS Architecture Blog explains.

Sort failures first. Timeouts, rate limits and connection resets may be transient. Invalid input, schema violations and denied permissions stay broken until something changes. Record every attempt with its number and error class, and send exhausted runs to a review queue with a named owner. Never retry a side effect blindly: check the idempotency key or read the destination record first.

Put approvals and audit logs where consequences begin

Place a person in front of money movement, commitments made in the company's name, sensitive-data disclosure and irreversible changes. A usable approval shows the proposed action, the evidence, the policy context, the named approver and the decision time, and lets the approver reject, edit or ask for more.

OWASP lists excessive functionality, permissions and autonomy as the root causes of harmful actions from ambiguous or manipulated model output, and its Excessive Agency guidance recommends human approval for high-impact actions plus downstream authorization checks. Low-consequence steps can run unattended. Higher-consequence steps wait.

Operators need a timeline, not a success badge. Log the trigger and payload version, every state transition, tool calls with arguments and results, model outputs with prompts, retries, approval decisions and the terminal state. The OpenTelemetry GenAI conventions define spans for agent invocation and tool calls, and the NIST AI Risk Management Framework ties accountability to records of what the system did. There is no universal baseline for a healthy retry rate in agentic workflows, so measure your own for a month and treat drift as the signal.

Scope permissions to the action

Give each step only the access it needs and make every action attributable to a defined identity. Apply role-based access to operator controls and approval queues, and write the audit record where the action lands.

A prompt that says "only update records for the current customer" asks a probabilistic system to police itself. Put that check in the database role or API scope.

Build this AI workflow on Major

Take a support escalation workflow that crosses Zendesk, Salesforce, Postgres and Slack. Here is how it maps onto Major.

  • Connectors: Zendesk for tickets, Salesforce for account and contract data, Slack for the approval message. Each connector uses scoped credentials, so the agent only reaches what the workflow needs.
  • The app that holds state: a Postgres-backed escalation app with a runs table, an idempotency key per ticket event, attempt counts and error classes, and an approvals table. It is the control surface a manager opens and the execution layer the agent runs through.
  • The agent and its judgment: the agent reads the ticket, classifies severity, and drafts the customer reply. That is the only reasoning step. Validation, routing by account tier, record updates and Slack notifications run as deterministic app code.
  • The trigger: a workflow fires on new or updated Zendesk tickets. Duplicate deliveries hit the idempotency check and return the stored result.
  • The approval gate: replies to high-tier accounts post to Slack for a named approver, and the decision is written to the approvals table.
  • Governance: RBAC on who can edit the app and who can approve, and an audit log of every action on each run.

The build sequence stays the same on any platform. Pick one narrow workflow with a real owner and map its failure paths. Define the state model and idempotency rule before connecting downstream systems. Add deterministic validation and routing, then one bounded model step with a schema, threshold and fallback. Add approvals, retries and the run timeline, run supervised cases, and promote the stable stretch into an app the team can reuse. Start building on Major and put the first workflow through that sequence.

What this argument does not cover

Model evaluation and quality drift need their own test sets and monitoring. Multi-agent coordination is outside scope too. A single bounded judgment step is manageable, while several agents negotiating with each other need a separate operating model.

Why the five-hundredth run decides the choice

Many builders send the whole process back through the model each time. Cost grows with usage, behavior varies, and the audit trail is a transcript instead of an operational record. Major is the enterprise platform where agents build the software they run on. When an agent works out a repeatable stretch, it builds an app for that stretch and runs the app from then on, with a managed database for state, storage for files, and permissions and audit applied at the platform layer. The model stays involved for judgment. Reason once. Run forever.

This approach requires deciding which parts of a process are truly repeatable. It does not make judgment automatically correct, and it does not remove the need for accountable operators. Its narrower benefit is durable: repeatable work becomes a governed artifact instead of the same reasoning repeated on every run.

More use cases by tool: More Slack use cases.

Start building on Major

Build your first governed AI workflow on Major: an agent that reasons through the judgment step once, and an app that runs the rest with state, approvals and audit built in.

Related articles

Frequently asked questions

Can AI create workflows?
Yes. AI can turn a written goal into steps, choose connectors, and generate branching logic. Production workflows also need durable state, an idempotency rule, bounded retries, approval gates for consequential actions, scoped credentials, and a run record an operator can inspect afterward.
What makes an AI workflow reliable?
Durable state survives a crash. Idempotent execution prevents duplicate delivery from repeating a side effect. Bounded retries separate transient failures from permanent ones, while approvals protect consequential actions. Scoped credentials and a run timeline make each action attributable and auditable.
When should a workflow use deterministic code?
Move a step into code once its inputs, policy, and output are stable enough to write down. Validation, record updates, explicit routing, approved document templates, and notifications to known recipients belong there. Keep the model on classification, extraction, summarization, and drafting.