{"uid":"cap_Wci3XWouJo1-rE0aDnTdL","slug":"writerslogic-workflow-transition-validator-a4ef0835","name":"WritersLogic Workflow Transition Validator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/workflow-transition?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"facts":{"type":"array","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","maxLength":200,"minLength":1},"value":{"type":"boolean"}},"additionalProperties":false},"maxItems":200},"current":{"type":"string","maxLength":200,"minLength":1},"request":{"type":"object","properties":{"to":{"type":"string","maxLength":200,"minLength":1},"event":{"type":"string","maxLength":200,"minLength":1}},"description":"Give event, to, or both.","additionalProperties":false},"terminal":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":100,"description":"States with no outgoing transitions allowed even if listed."},"transitions":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"to":{"type":"string","maxLength":200,"minLength":1},"from":{"type":"string","maxLength":200,"minLength":1},"event":{"type":"string","maxLength":200,"minLength":1},"requires":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":20,"description":"Names of facts that must be true."}},"additionalProperties":false},"maxItems":300,"minItems":1}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4nkVqCaXWEUSXE5NR0Uey","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates whether a requested state machine transition is allowed given current state, defined transitions, required facts, and terminal states, without storing any workflow state.","exampleAgentPrompt":"Before I move this support ticket from 'in-review' to 'approved', check if the transition is allowed — the workflow has transitions from 'in-review' to 'approved' (event: 'approve', requires facts: 'manager_signed' and 'budget_cleared'), and right now 'manager_signed' is true but 'budget_cleared' is false.","exampleUseCases":[{"title":"Order fulfillment state gate","prompt":"I need to advance this order from 'payment_received' to 'shipped' using the 'ship' event. The workflow has transitions: payment_received→shipped (event: ship, requires: inventory_reserved, label_printed), shipped→delivered (event: deliver). Right now inventory_reserved is true and label_printed is false. Can this transition happen, and if not, what's blocking it?"},{"title":"Deployment pipeline approval check","prompt":"Before my agent triggers a production deployment, check whether the transition from 'staging_passed' to 'deploying' is allowed. The workflow requires facts: tests_green, security_scan_clean, and change_ticket_approved. Tests are green, security scan is clean, but the change ticket is not yet approved. Also list what other transitions are available from 'staging_passed'."},{"title":"Approval workflow ambiguity detection","prompt":"My workflow has an event called 'escalate' that can lead to either 'manager_review' or 'legal_review' from the current state 'pending'. The current state is 'pending'. Can you tell me if requesting the 'escalate' event is ambiguous, and if so, which states it could lead to?"}],"resultDescription":"Returns whether the requested transition is permitted, identifies which required facts are false or unknown (blocking the transition), lists all valid transitions available from the current state, and flags any ambiguity when a single event name maps to multiple possible target states. Terminal states are enforced as having no outgoing transitions.","failureModes":["Transition denied because one or more required facts are false or not provided","Ambiguity error when a single event name leads to multiple target states — not resolved automatically","Current state not found in any transition's 'from' field — returns no available transitions","Terminal state declared — all transitions blocked regardless of facts","Malformed input (missing required fields like 'current' or 'transitions') causes validation error","Request specifies both 'event' and 'to' that are inconsistent with each other"],"whenToPreferThis":"Use this endpoint when an AI agent needs to enforce workflow rules before executing a state change — particularly for orders, tickets, deployments, or approvals — and you want stateless, deterministic validation of your own workflow definition. Prefer this over hard-coding transition logic in agent code, or when you need to surface blocking conditions and available alternatives in a structured way. It is especially valuable when workflows have conditional transitions (required facts) that must all be true before proceeding.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:40:55.504Z","isFirstParty":false,"canonicalSlug":"writerslogic-workflow-transition-validator-a4ef0835"}