Architecture
Duna separates a visual operational interface from a state-machine core and the adapters that perform external work.
States · transitions · actions · durable waits · SignalR updates
Engine and host
ProcessFlow.Core owns models, JSONC loading, validation, stepping and abstractions. ProcessFlow.Api hosts HTTP and SignalR endpoints, background services, health checks and dependency wiring.
ProcessFlow.Actions dispatches the documented executors. The JavaScript expression runtime uses Jint. Named connections resolve supported provider settings; persistence uses Npgsql and Dapper with versioned PostgreSQL migrations.
Agents
ProcessFlow.Agents holds agent definitions, the run processor, the limits and the validation of every output. The model runtime is an adapter behind Duna-owned interfaces, ProcessFlow.Agents.Maf on Microsoft Agent Framework, and no engine project refers to an AI package. An agent action parks its instance; a worker inside the API makes the model call and the engine applies the outcome. See Agents and the agent action.
Waiting and resumption
Human tasks, external events, broker messages and timers can park an instance. Schedulers and listeners coordinate later resumption. Subprocess reconciliation and parallel branch handling are part of the runtime’s operational model.
Separate services
RabbitMQ and Kafka support broker integration. OPA provides authorization decisions. S3-compatible storage holds file bytes while the database stores their catalogue. SMTP supports email actions. Redis supports its action executor and the configured SignalR backplane.
The optional container runner is a separate service. The API does not need direct Docker access for ordinary orchestration.
Three different experiences
- Operational application: React + Vite authoring, execution and operations UI.
- Engine simulation: throwaway draft execution with configured stubs and in-memory state.
- Public website: this Next.js marketing and documentation application, with illustrated process patterns.
The website requires no database or engine credentials. Its future sandbox adapter is intentionally separate from production infrastructure.