← Receivers

workflow:run

workflow family

mcp

Start a run — spawns the WorkflowRun DO, executes each step, marks path strength on traversed edges

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_workflows
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
variable
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
yes
Safe to retry as-is.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/workflow:run \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workflowId": "wf_abc" }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • workflowId string required
  • triggerPayload object optional
  • idempotencyKey string optional

Response

What comes back from the call.

  • runId string
  • status string
  • error string

Traffic

Every call to workflow:run, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names workflow:run, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 1
  • one.ie/web/src/components/insight/InsightHeader.tsx:126
API route 6
  • one.ie/web/src/lib/chat/ad-context.ts:45
  • one.ie/web/src/lib/resolvers/campaigns.ts:108
  • one.ie/web/src/lib/resolvers/funnel.ts:100
  • one.ie/web/src/lib/resolvers/id.ts:18
  • one.ie/web/src/lib/resolvers/pages.ts:477
  • one.ie/web/src/pages/api/chat.ts:1105
Agent runtime 2
  • channels/src/tools/lifecycles.ts:21
  • channels/src/tools/workflows.ts:183
Workflow 4
  • one.ie/web/src/components/factory/WorkTab.tsx:34
  • one.ie/web/src/components/workflows/WorkflowFlow.tsx:624
  • one.ie/web/src/lib/factory/flow.ts:791
  • one.ie/web/src/pages/api/workflows/[id]/retry.ts:60
MCP 1
  • workflow_run · packages/mcp/src/tools/workflow.ts:46
CLI 1
  • packages/cli/src/workflow.ts:93
Docs 2
  • one.ie/web/src/content/blog/the-workflow-engine-was-teaching-itself-the-wrong-lessons.md:17
  • one.ie/web/src/content/docs/workflows.md:120

Answered by

workflow:run one.ie/web/src/lib/workflow-receivers.ts:1820 Dispatched through POST /api/ask/workflow:run, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workflowId": {
      "type": "string"
    },
    "triggerPayload": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "idempotencyKey": {
      "type": "string"
    }
  },
  "required": [
    "workflowId"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "runId": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "runId",
    "status"
  ]
}