In-worker Mastra runtime
Agents and workflows execute inside the dashboard API Worker.
Loading...A technical deep dive into durable Mastra workflows running inside a Cloudflare Worker with D1 state, queues, model routing, telemetry, and Payload publication.
Agents and workflows execute inside the dashboard API Worker.
D1 records workflow state and snapshots beyond a single request.
Consumers, retries, and dead-letter paths separate request handling from long-running work.
Every workflow step emits telemetry; Mastra and Langfuse turn it into a readable trace.
Each part is a working dashboard or worker surface in Smicolon's own stack.
Agents and workflows execute inside the dashboard API Worker.
D1 records workflow state and snapshots beyond a single request.
Consumers, retries, and dead-letter paths separate request handling from long-running work.
Every workflow step emits telemetry; Mastra and Langfuse turn it into a readable trace.
Inputs, decisions, bounded automation, human authority, and state that survives a restart — the whole loop, not one clever step.
Persist the requested operation and hand execution to a queue boundary.
Select the bounded workflow, tools, and model configuration for the task.
Record stage progress, outputs, errors, and reconciliation state in D1.
Publish approved results into Payload or another explicit downstream surface.
Durable AI workflows run at the edge, inside the Worker itself — state in D1, queues for the long-running work, traces on every step. The models come from managed routing today; because routing is a boundary in the architecture rather than a dependency, the same workflows move to a dedicated or private runtime the moment your data boundary requires it.
Smicolon designed this workflow, ships changes to it, and operates it as part of daily delivery.
Data boundaries, model routing, approval depth, and integrations are decided against your constraints — not inherited from ours.
We will map the shortest safe path to a production workflow — through the systems, approvals, data boundaries, and exceptions you already live with.