Make every transition explicit.
goto, terminate, fail, retry, and pauseUntilSignal describe the complete result of a step.
@sapiom/agentgototerminatefailretrypauseUntilSignalsapiom runtime
Deploy typed agents that pause for signals, resume at named steps, and stay inspectable from local test to cloud run.
$ npx @sapiom/cli agents run
sapiom_dev_agents_checksapiom_dev_agents_run_localsapiom_dev_agents_deploysapiom_dev_agents_runsapiom_dev_agents_inspectsapiom_dev_agents_schedulecompletedcompletedwaitingresume stepEach step names its allowed destinations, and its returned directive chooses the next action. Unexpected errors and explicit retries share a bounded attempt budget.
goto, terminate, fail, retry, and pauseUntilSignal describe the complete result of a step.
@sapiom/agentgototerminatefailretrypauseUntilSignalThe attempt count is zero-based. Unexpected errors and explicit retry directives share the runtime cap; return fail for a known terminal case.
canFail: true, async run(_input, ctx) { if (ctx.attempts + 1 < 3) { return retry({ delayMs: 1000 }) } return fail("too many attempts") }
A step declares the signal and its resume step. The runtime suspends the execution, then delivers the result payload to the declared step when the signal fires.
Read pause and resumereturn pauseUntilSignal({ signal: "my.approval", resumeStep: "finalize", correlationId: ctx.executionId })
Run real step bodies with Sapiom capability calls served by local stubs, then link, deploy, run, inspect, and schedule the deployed agent with the developer tools.
Follow the lifecyclesapiom-dev MCPsapiom_dev_agents_checksapiom_dev_agents_run_localsapiom_dev_agents_deploysapiom_dev_agents_runsapiom_dev_agents_inspectsapiom_dev_agents_scheduleExport one defineAgent with an entry step and the complete map of typed steps.
Bundle and validate the graph, then execute real step bodies with Sapiom capability calls served by stubs.
Start or schedule a cloud run, deliver signals when needed, and inspect steps or errors.
Start with a typed graph, validate it locally, and keep every transition explicit.