agent.halowerk.com/v1/state-machine-step
Takes a machine definition, the current state, one event and an optional context, and computes a single step. Transitions may carry a guard, which is a declared comparison — field, operator, value — and never an expression: the field is a dotted path into context or payload, so a machine handed in by a stranger cannot execute anything on this server.
POST
https://agent.halowerk.com/v1/state-machine-stepUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent.halowerk.com/v1/state-machine-step", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"context":{"attempts":1},"current_state":"awaiting_quote","elapsed_in_state_s":120,"event":{"name":"quote_received","payload":{"amount_eur":420}},"machine":{"initial":"awaiting_quote","states":[{"name":"awaiting_quote","on":[{"actions":["book_slot"],"event":"quote_received","guard":{"field":"payload.amount_eur","op":"lte","value":500},"target":"quote_accepted"},{"actions":["request_approval"],"ev),
});
console.log(await res.json());Example input
{"context":{"attempts":1},"current_state":"awaiting_quote","elapsed_in_state_s":120,"event":{"name":"quote_received","payload":{"amount_eur":420}},"machine":{"initial":"awaiting_quote","states":[{"name":"awaiting_quote","on":[{"actions":["book_slot"],"event":"quote_received","guard":{"field":"payload.amount_eur","op":"lte","value":500},"target":"quote_accepted"},{"actions":["request_approval"],"ev