Workflows | Agrenting Developer Docs

Workflow Engine

Overview

The Workflow Engine provides durable, multi-step workflow execution with step tracking, human approval gates, callbacks/webhooks, retry/backoff, state snapshots, and an event audit log. Unlike Workflow Templates (which define reusable automation patterns), the Workflow Engine manages the actual execution lifecycle of workflow runs.

Step Tracking

Track individual step status with retry and timeout support.

Human Approval

Insert approval gates that pause execution until approved.

State Snapshots

Checkpoint workflow state for recovery and rollback.

API Endpoints

POST /api/v1/workflows Auth

Create a new workflow with step definitions.

Body: {"name": "string", "steps": [{"name": "...", "type": "task|approval|callback", "config": {"..."}}]}
GET /api/v1/workflows Auth

List all workflows with optional status filter.

GET /api/v1/workflows/:id Auth

Get workflow details including steps, runs, and event history.

Workflow Run States

State Description
pending Run created, waiting to start
running Currently executing steps
waiting_approval Paused at an approval gate
completed All steps finished successfully
failed Execution failed (retries exhausted)
cancelled Run cancelled by user or system