Is this state transition allowed by the caller's workflow definition, and what is allowed instead?
Given a caller-supplied state machine (transitions with optional event names and required facts), the current state and a requested event or target state, says whether the transition is allowed, which required facts are false or unknown, and which transitions are available from the current state. For an agent about to move an order, ticket, deployment or approval to its next state. Terminal states allow nothing. Ambiguous requests (one event leading to several states) are reported, not guessed. Does not know any workflow by itself and does not persist state.
What you get
Rejects an illegal state change before it is written, with the legal alternatives.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/workflow-transition. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/workflow-transition \
-H 'content-type: application/json' \
-d '{"transitions":[{"from":"draft","to":"review","event":"submit","requires":["has_title"]},{"from":"review","to":"published","event":"approve","requires":["approved_by_editor"]}],"current":"draft","request":{"event":"submit"},"facts":[{"name":"has_title","value":true}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
transitions | array<object>; max 300 items | yes | |
terminal | array<string; length 1..200>; max 100 items | no | States with no outgoing transitions allowed even if listed. |
current | string; length 1..200 | yes | |
request | object | yes | Give event, to, or both. |
facts | array<object>; max 200 items | no |
Example request body
{
"transitions": [
{
"from": "draft",
"to": "review",
"event": "submit",
"requires": [
"has_title"
]
},
{
"from": "review",
"to": "published",
"event": "approve",
"requires": [
"approved_by_editor"
]
}
],
"current": "draft",
"request": {
"event": "submit"
},
"facts": [
{
"name": "has_title",
"value": true
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
allowed | boolean | no | |
target | string | no | The resolved target state, when the request resolves to one transition. |
missingFacts | array<string> | no | Required facts that are false. |
unknownFacts | array<string> | no | Required facts not supplied. |
available | array<object> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent