Temporal Engine
A Rust implementation of the StateSet deterministic workflow engine (v2), built on Temporal. A single data-driven ResponseAutomationV2 workflow serves every brand — replacing per-brand workflow code — backed by LLM tool-use, knowledge base search, and connector integrations. This is the engine that Workflow Studio configures.System overview
What the engine does
Given a customer support ticket, it orchestrates an end-to-end automated response:- Loads brand-specific automation rules from the control plane database.
- Fetches the full ticket with message history.
- Evaluates skip rules — business hours, ticket age, intent filters — to decide whether automation should run at all.
- Checks escalation patterns to detect sensitive topics.
- Gathers context — customer data from Shopify, subscriptions from Recharge, articles from the knowledge base.
- Runs an LLM with tool-use, calling tools in a loop.
- Classifies intent and confidence via configured classification phases.
- Optionally pauses for human review when confidence is below threshold.
- Dispatches the response, applies tags, sets ticket status.
- Triggers follow-up actions such as snooze workflows for automated check-ins.
Every step is an idempotent Temporal activity. The workflow itself is deterministic
orchestration — all side effects live in activities. This is what makes a run replayable and
lets a worker crash mid-flight without duplicating external calls.
Workspace crates
Binaries
Mission Control
The React dashboard indashboard/ is the operator mission control for the engine. It defaults
to the production engine API; override with VITE_ENGINE_API_BASE to point it elsewhere. In
local development Vite proxies API calls to the production host unless ENGINE_API_PROXY_TARGET
is set.
Next
ResponseAutomationV2
The workflow phases, signals, and tool-use loop.
Control plane
Multi-tenancy, outbox/DLQ, progressive migration.
Configuration
AutomationConfig, skip rules, escalation, environment.
Operations
Deployment, metrics, health probes, security.