Skip to main content

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:
  1. Loads brand-specific automation rules from the control plane database.
  2. Fetches the full ticket with message history.
  3. Evaluates skip rules — business hours, ticket age, intent filters — to decide whether automation should run at all.
  4. Checks escalation patterns to detect sensitive topics.
  5. Gathers context — customer data from Shopify, subscriptions from Recharge, articles from the knowledge base.
  6. Runs an LLM with tool-use, calling tools in a loop.
  7. Classifies intent and confidence via configured classification phases.
  8. Optionally pauses for human review when confidence is below threshold.
  9. Dispatches the response, applies tags, sets ticket status.
  10. 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 in dashboard/ 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.
That local-development default means a dashboard running on your machine talks to production unless you set ENGINE_API_PROXY_TARGET. Set it before doing anything destructive.

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.