ONE workflow:price
← Receivers

workflow:price

workflow family

mcp

The path builder's read (text/path-builder.md): every step of a saved workflow you can view (workflowId), or of an imported path definition (an inline WorkflowDiff, priced without saving), in edge order, with its routed owner and its cost — BEFORE it runs. Owner from the run's own binding, an unbound agent's from world:route decide (zero tokens), an agent's model from world:pick-model seeded per step, a tool's cost from its receiver's declared cost. Nothing dispatches. A step that cannot be priced answers usd null, never 0, and the total counts it

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
view_workflows
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
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:price \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "workflowId": <string>, "diff": <object>, "name": <string>, "triggerSource": <string> }}'

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 optional A saved workflow to price
  • diff object optional An imported path definition — the same WorkflowDiff workflow:apply-diff saves — priced WITHOUT saving. Used when workflowId is absent
  • name string optional The imported path's name, echoed back
  • triggerSource string optional The imported path's trigger source, the trigger step's owner
  • slug string optional Workspace a service caller acts in. Ignored for a session or key caller — their attested workspace is used.

Response

What comes back from the call.

  • ok boolean
  • workflowId string
  • name string
  • status string The saved workflow's status, or 'unsaved' for an imported definition
  • prices string The model price table read, source@asOf
  • steps object[]
  • total object
  • error string

Traffic

Every call to workflow:price, 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:price, 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

API route 1
  • one.ie/web/src/lib/path-price.ts:6
Workflow 1
  • one.ie/web/src/components/workflows/WorkflowFlow.tsx:393
CLI 1
  • packages/cli/src/workflow.ts:107
→
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workflowId": {
      "description": "A saved workflow to price",
      "type": "string"
    },
    "diff": {
      "description": "An imported path definition — the same WorkflowDiff workflow:apply-diff saves — priced WITHOUT saving. Used when workflowId is absent",
      "type": "object",
      "properties": {
        "add": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tempId": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "trigger",
                  "tool",
                  "skill",
                  "agent",
                  "condition",
                  "human",
                  "delay",
                  "sell"
                ]
              },
              "name": {
                "type": "string"
              },
              "config": {
                "type": "string"
              },
              "position": {
                "type": "string"
              }
            },
            "required": [
              "tempId",
              "kind",
              "name",
              "config"
            ]
          }
        },
        "remove": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "connect": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "target": {
                "type": "string"
              },
              "condition": {
                "type": "string"
              }
            },
            "required": [
              "source",
              "target"
            ]
          }
        },
        "disconnect": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string"
              },
              "target": {
                "type": "string"
              }
            },
            "required": [
              "source",
              "target"
            ]
          }
        },
        "update": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "stepId": {
                "type": "string"
              },
              "field": {
                "type": "string",
                "enum": [
                  "name",
                  "config",
                  "position",
                  "exit-condition",
                  "owner"
                ]
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "stepId",
              "field",
              "value"
            ]
          }
        }
      }
    },
    "name": {
      "description": "The imported path's name, echoed back",
      "type": "string"
    },
    "triggerSource": {
      "description": "The imported path's trigger source, the trigger step's owner",
      "type": "string"
    },
    "slug": {
      "description": "Workspace a service caller acts in. Ignored for a session or key caller — their attested workspace is used.",
      "type": "string"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workflowId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "description": "The saved workflow's status, or 'unsaved' for an imported definition",
      "type": "string"
    },
    "prices": {
      "description": "The model price table read, source@asOf",
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "via": {
            "type": "string",
            "description": "source | receiver | actor | skill | sub-path | route:highway | route:classified | route:ceo | unbound | inline | person | clock | buyer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "cost": {
            "type": "object",
            "properties": {
              "usd": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "USD per run of this step; null = not priced, never zero"
              },
              "basis": {
                "type": "string",
                "description": "zero | declared-free | pinned | router-pick | variable | fixed | undeclared | skill-model | sub-path | unbound"
              },
              "model": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              }
            },
            "required": [
              "usd",
              "basis"
            ]
          },
          "time": {
            "type": "object",
            "properties": {
              "ms": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "basis": {
                "type": "string",
                "description": "runs | configured | waits | none"
              }
            },
            "required": [
              "ms",
              "basis"
            ]
          },
          "suggested": {
            "description": "A bound agent whose tags world:route would hand to someone else — the router's suggestion beside the named actor",
            "type": "object",
            "properties": {
              "owner": {
                "type": "string"
              },
              "via": {
                "type": "string"
              }
            },
            "required": [
              "owner",
              "via"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "owner",
          "via",
          "tags",
          "cost",
          "time"
        ]
      }
    },
    "total": {
      "type": "object",
      "properties": {
        "steps": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "usd": {
          "type": "number"
        },
        "priced": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "unpriced": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "picks": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Priced steps whose model is the router's pick, not pinned"
        }
      },
      "required": [
        "steps",
        "usd",
        "priced",
        "unpriced",
        "picks"
      ]
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}