Workflows

Automation graphs.

14 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

workflows.list

GET

List workflows. Pass isTemplate=true to get the library; false (or omit) for instances.

When the agent calls it: Call with isTemplate=true to discover reusable workflows the workspace has built. The seeded library includes: content-creation (draft → human review → schedule), engagement-reply (inbound comment/DM → classify → draft response), knowledge-ingest (URL/file → extract → embed), mission-launch (subject + goal → strategy → first content), performance-review, cross-platform-amplify, crisis-response. Prefer running a workflow over chaining tools by hand when the user describes a repeatable end-to-end process.

  • AI tool: workflows_list
  • API: GET /api/invoke/workflows.list

Input

Field Type Required Description
isTemplate boolean
status "draft" | "active" | "paused" | "archived"
scope "workspace" | "project" | "mission" | "subject"
kind "content" | "engagement" | "knowledge" | "monitoring" | "launch" | "support" | "analysis" | "manual"
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "isTemplate": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "active",
        "paused",
        "archived"
      ]
    },
    "scope": {
      "type": "string",
      "enum": [
        "workspace",
        "project",
        "mission",
        "subject"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "content",
        "engagement",
        "knowledge",
        "monitoring",
        "launch",
        "support",
        "analysis",
        "manual"
      ]
    }
  }
}

workflows.get

GET

Get one workflow by id (includes its full node + edge graph).

  • AI tool: workflows_get
  • API: GET /api/invoke/workflows.get

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

workflows.create

POST · mutating

Create a new workflow from scratch. Each agent-task/output node's data.tool (alias data.action) MUST be the exact name of an action that EXISTS in the registry — e.g. "content.drafts.generate", "knowledge.search", "posts.publish", "engagements.respond". There is no "github." or "llm." namespace. A node whose tool is not a registered action is SKIPPED at runtime (it does nothing), so never invent tool names — use a real one or omit the tool.

  • AI tool: workflows_create
  • API: POST /api/invoke/workflows.create

Input

Field Type Required Description
name string yes
slug string
description string
kind "content" | "engagement" | "knowledge" | "monitoring" | "launch" | "support" | "analysis" | "manual"
status "draft" | "active" | "paused" | "archived"
isTemplate boolean
scope "workspace" | "project" | "mission" | "subject"
projectId string
missionId string
subjectId string
triggerKind "manual" | "event" | "schedule" | "webhook"
triggerConfig object
inputs object[]
nodes object[]
edges object[]
tags string[]
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "content",
        "engagement",
        "knowledge",
        "monitoring",
        "launch",
        "support",
        "analysis",
        "manual"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "active",
        "paused",
        "archived"
      ]
    },
    "isTemplate": {
      "type": "boolean"
    },
    "scope": {
      "type": "string",
      "enum": [
        "workspace",
        "project",
        "mission",
        "subject"
      ]
    },
    "projectId": {
      "type": "string",
      "minLength": 1
    },
    "missionId": {
      "type": "string",
      "minLength": 1
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "triggerKind": {
      "type": "string",
      "enum": [
        "manual",
        "event",
        "schedule",
        "webhook"
      ]
    },
    "triggerConfig": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "default": "text",
            "type": "string",
            "enum": [
              "text",
              "number",
              "boolean",
              "select",
              "subject",
              "mission",
              "url"
            ]
          },
          "required": {
            "default": false,
            "type": "boolean"
          },
          "default": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "label"
        ]
      }
    },
    "nodes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "position": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "data": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "id",
          "type",
          "position",
          "data"
        ]
      }
    },
    "edges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "target": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "animated": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "source",
          "target"
        ]
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "name"
  ]
}

workflows.update

PATCH · mutating

Update a workflow (rename, change status, replace nodes/edges). When replacing nodes, each agent-task/output node's data.tool (alias data.action) must be a real registered action name — invented names (e.g. "github."/"llm.") are skipped at runtime and do nothing.

  • AI tool: workflows_update
  • API: PATCH /api/invoke/workflows.update

Input

Field Type Required Description
id string yes
patch object yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "patch": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "id",
    "patch"
  ]
}

workflows.delete

DELETE · mutating

Soft-delete a workflow (sets deleted_at). The row and its run history are preserved and it is hidden from workflows.list; restore with workflows.restore.

  • AI tool: workflows_delete
  • API: DELETE /api/invoke/workflows.delete

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

workflows.restore

POST · mutating

Restore a soft-deleted workflow by clearing its deleted_at — it reappears in workflows.list.

  • AI tool: workflows_restore
  • API: POST /api/invoke/workflows.restore

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

workflows.instantiate

POST · mutating

Fork a template into a new workspace/project/mission-scoped workflow. Clones nodes + edges + the template trigger config. Starts in draft unless active:true — pass active:true to immediately turn on an event/schedule workflow so it fires on its trigger.

When the agent calls it: Use this once per scope (mission / project) — you only need to instantiate a template the first time. After that, call workflows.list (isTemplate=false) to find your existing instance and run it. Pass the workflow scope and the relevant id (missionId for a mission-scoped run, etc.) so the instance is tied to the right context. For event/schedule templates (engagement-reply, cross-platform-amplify, performance-review, etc.) pass active:true to turn the automation on — a draft instance will not fire.

  • AI tool: workflows_instantiate
  • API: POST /api/invoke/workflows.instantiate

Input

Field Type Required Description
templateId string
templateSlug string
name string
scope "workspace" | "project" | "mission" | "subject"
projectId string
missionId string
subjectId string
active boolean
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "templateId": {
      "type": "string",
      "minLength": 1
    },
    "templateSlug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "scope": {
      "type": "string",
      "enum": [
        "workspace",
        "project",
        "mission",
        "subject"
      ]
    },
    "projectId": {
      "type": "string",
      "minLength": 1
    },
    "missionId": {
      "type": "string",
      "minLength": 1
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "active": {
      "type": "boolean"
    }
  }
}

workflows.seed_templates

POST · mutating

Idempotently insert/update the built-in workflow templates (Content Creation, Engagement Reply, Knowledge Ingest, Mission Launch, Performance Review, Cross-Platform Amplify, Crisis Response).

  • AI tool: workflows_seed_templates
  • API: POST /api/invoke/workflows.seed_templates

Input

No parameters.

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": {}
}

workflows.run

POST · mutating

Execute a workflow by id. The executor walks the DAG: agent-task/output nodes call their registered tool, human-review nodes create a WorkItem ticket and pause execution. Returns a run record with status, per-node outputs, and an execution log.

When the agent calls it: Pass context with all relevant ids (missionId, subjectId, url, prompt, platform, etc.) so agent-task nodes have the data they need to call their tool. status=paused means a human-review node was reached — a ticket has been created in the WorkItems inbox. The run will resume when the ticket is approved. status=completed means every node executed successfully. Check nodeOutputs for per-step results.

  • AI tool: workflows_run
  • API: POST /api/invoke/workflows.run

Input

Field Type Required Description
id string yes
context object
triggeredBy string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "context": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "triggeredBy": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ]
}

workflows.run_get

GET

Get the current state of a workflow run (status, log, per-node outputs).

  • AI tool: workflows_run_get
  • API: GET /api/invoke/workflows.run_get

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

workflows.run_list

GET

List recent workflow runs, optionally filtered by workflow id or status.

  • AI tool: workflows_run_list
  • API: GET /api/invoke/workflows.run_list

Input

Field Type Required Description
workflowId string
status "queued" | "running" | "paused" | "completed" | "failed" | "cancelled"
limit integer
offset integer
orderBy string
orderDir "asc" | "desc"
q string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workflowId": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "paused",
        "completed",
        "failed",
        "cancelled"
      ]
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "orderBy": {
      "type": "string"
    },
    "orderDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "q": {
      "type": "string"
    }
  }
}

workflows.run_review

GET

List the open human-review ticket(s) created by a paused run, for approval.

  • AI tool: workflows_run_review
  • API: GET /api/invoke/workflows.run_review

Input

Field Type Required Description
runId string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "runId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "runId"
  ]
}

workflows.run_resume

POST · mutating

Resolve a paused human-review gate. decision="approve" resumes the run from the gate node and continues the DAG (it may pause again at a later gate); "reject" fails the run; "cancel" cancels it. Also flips the linked review ticket(s) to done/rejected/cancelled. Returns the updated run.

  • AI tool: workflows_run_resume
  • API: POST /api/invoke/workflows.run_resume

Input

Field Type Required Description
runId string yes
decision "approve" | "reject" | "cancel" yes
ticketId string
comment string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "runId": {
      "type": "string",
      "minLength": 1
    },
    "decision": {
      "type": "string",
      "enum": [
        "approve",
        "reject",
        "cancel"
      ]
    },
    "ticketId": {
      "type": "string",
      "minLength": 1
    },
    "comment": {
      "type": "string"
    }
  },
  "required": [
    "runId",
    "decision"
  ]
}

workflows.run_retry

POST · mutating

Re-run a workflow from a prior run. mode="all" starts a fresh run with the same context (new run row). mode="failed" re-enters the existing run, clears the failed state, and resumes execution from the failed step forward — prior successful node outputs are preserved so {{...}} interpolation downstream still resolves. Returns the run that will execute (either the new one or the same id, depending on mode).

  • AI tool: workflows_run_retry
  • API: POST /api/invoke/workflows.run_retry

Input

Field Type Required Description
runId string yes
mode "all" | "failed" yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "runId": {
      "type": "string",
      "minLength": 1
    },
    "mode": {
      "type": "string",
      "enum": [
        "all",
        "failed"
      ]
    }
  },
  "required": [
    "runId",
    "mode"
  ]
}