Skip to main content

Documentation Index

Fetch the complete documentation index at: https://operativusai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Workflows let you chain agent actions into repeatable, multi-step pipelines. Each step in a workflow triggers an agent run, passing input forward through the sequence. Workflows execute asynchronously — you receive a job ID immediately and poll for progress — making them suitable for long-running automation tasks like content pipelines, research flows, and multi-stage data processing.

What is a workflow?

A workflow is a named, ordered sequence of steps. Each step references an agent ID and optional configuration. When you execute a workflow, Agent Manager runs each step in order, feeding the output of one step as the input to the next. The state of every run is persisted to the database, so workflows survive restarts and can be resumed after a human approval pause.

Content pipelines

Research a topic with web_agent, summarize with procurator_assistant, then draft a post.

Research flows

Gather data across multiple sources, analyze findings, and produce a structured report.

Data processing

Extract, transform, and validate data across agents with different tool sets.

Creating a workflow

POST /api/v1/workflows
Request body (WorkflowDTO):
name
string
required
A human-readable name for the workflow.
description
string
Optional description of what the workflow does.
Example:
{
  "name": "Tech News Briefing",
  "description": "Searches for tech news, summarizes it, and drafts a newsletter section."
}
Response — the created workflow with its generated ID:
{
  "id": "wf-3a7bc9",
  "name": "Tech News Briefing",
  "description": "Searches for tech news, summarizes it, and drafts a newsletter section."
}

Adding steps

After creating a workflow, add steps to define what each agent should do. Steps execute in the order they are added (by stepOrder).
POST /api/v1/workflows/{id}/steps
Request body (WorkflowStepDTO):
agentId
string
required
The ID of the agent to invoke for this step.
action
string
required
The prompt or instruction sent to the agent for this step.
stepOrder
number
The position of this step in the sequence, starting from 1. Steps execute in ascending order.
Example — three-step content pipeline:
1

Step 1: Search

{
  "agentId": "web_agent",
  "action": "Search for the latest news about artificial intelligence in healthcare",
  "stepOrder": 1
}
2

Step 2: Summarize

{
  "agentId": "procurator_assistant",
  "action": "Summarize the search results into 3 bullet points",
  "stepOrder": 2
}
3

Step 3: Draft

{
  "agentId": "procurator_assistant",
  "action": "Turn these bullet points into a 2-paragraph newsletter section",
  "stepOrder": 3
}

Executing a workflow

Trigger an asynchronous run of the workflow:
POST /api/v1/workflows/{id}/run
Request body:
input
string
required
The initial input passed to the first step.
sessionId
string
Optional session ID for context continuity. A new session is created if omitted.
Example:
{
  "input": "artificial intelligence in healthcare 2025",
  "sessionId": "session-news-001"
}
Response — returned immediately with 202 Accepted:
{
  "jobId": "job-f9a44e",
  "workflowId": "wf-3a7bc9",
  "sessionId": "session-news-001"
}
The workflow runs asynchronously. The jobId in the response is an internal queue job identifier. Use the workflow runs endpoint (below) to track execution progress by workflowId.

Checking run status

List all historical runs for a workflow, newest first:
GET /api/v1/workflows/{workflowId}/runs
Supports pagination via ?page=0&size=20. Run response fields:
id
string
Unique identifier for this workflow run.
workflowId
string
ID of the parent workflow.
sessionId
string
The session used for this run.
status
string
Current run status: RUNNING, COMPLETED, FAILED, or PAUSED.
currentStepOrder
number
The step number currently being executed (or last executed if the run is paused or complete).
durationMs
number
Total elapsed time in milliseconds (computed from createdAt to updatedAt).
createdAt
string
ISO 8601 timestamp when the run was created.
updatedAt
string
ISO 8601 timestamp of the last status change.
Example response:
{
  "content": [
    {
      "id": "wr-55cd12",
      "workflowId": "wf-3a7bc9",
      "sessionId": "session-news-001",
      "status": "COMPLETED",
      "currentStepOrder": 3,
      "durationMs": 14320,
      "createdAt": "2026-05-06T10:00:00Z",
      "updatedAt": "2026-05-06T10:00:14Z"
    }
  ],
  "totalElements": 1,
  "totalPages": 1
}

Resuming a paused workflow

If a step involves an agent tool that requires human approval, the workflow pauses at that step and the run enters PAUSED status. Resume it with the approved output:
POST /api/v1/workflows/runs/{runId}/resume
Request body:
output
string
required
The human-approved content to inject as the output of the paused step. This value is passed as input to the next step in the sequence.
Example:
{
  "output": "Approved summary: AI is transforming diagnostics and drug discovery."
}
Response — returned immediately with 202 Accepted:
{
  "jobId": "job-cc8812",
  "runId": "wr-55cd12"
}
A paused workflow run does not time out automatically. Ensure your application monitors for PAUSED runs and provides a mechanism for operators to review and resume them.

Cloning a workflow

Create an independent copy of an existing workflow with all its steps:
POST /api/v1/workflows/{id}/clone
No request body is required. The cloned workflow is created with the suffix (Copy) appended to its name and a new unique ID. Example response:
{
  "id": "wf-7d1ee2",
  "name": "Tech News Briefing (Copy)",
  "description": "Searches for tech news, summarizes it, and drafts a newsletter section."
}
Use cloning to create environment-specific variants of a workflow (e.g., staging vs. production) without rebuilding steps from scratch.

Workflow management endpoints

MethodEndpointDescription
GET/api/v1/workflowsList all workflows (paginated).
GET/api/v1/workflows/{id}Get workflow by ID.
POST/api/v1/workflowsCreate a new workflow.
PATCH/api/v1/workflows/{id}Update workflow name or description.
DELETE/api/v1/workflows/{id}Delete a workflow and its steps.
GET/api/v1/workflows/{id}/stepsList steps for a workflow.
POST/api/v1/workflows/{id}/stepsAdd a step to a workflow.
DELETE/api/v1/workflows/{id}/steps/{stepId}Remove a step.
POST/api/v1/workflows/{id}/cloneClone a workflow with all its steps.
POST/api/v1/workflows/{id}/runExecute a workflow asynchronously.
GET/api/v1/workflows/{workflowId}/runsList run history for a workflow.
POST/api/v1/workflows/runs/{runId}/resumeResume a paused workflow run.