Skip to main content

Workflow Orchestration

OpRelay includes built-in event-driven automation — trigger chains, external system sync, and agent pipeline wiring. No need to bolt on a separate workflow tool.

Event-driven architecture

The orchestration layer runs on Server-Sent Events (SSE). When state changes in OpRelay — a task transitions, a fact updates, a run completes — events fire and listeners react.

Event types

EventTriggerUse case
task.createdNew task enters the queueAuto-assign to available worker
task.transitionedStatus change (e.g., todoin_progress)Notify supervisor, update dashboard
task.completedTask reaches doneTrigger reviewer, sync to Linear
run.failedExecution failsRecord failure context, retry or escalate
fact.updatedFact value changesCascade to dependent configurations

Wake notifications

When a task becomes available, the SSE system sends a wake notification to idle agents:

{
"task_id": "uuid",
"project_key": "myproject",
"message_id": "msg-uuid"
}

The agent receives the nudge, calls list_task_messages to get scoped context, and picks up work — all without polling.

External system sync

OpRelay can sync state with external systems:

  • Linear — task creation and status sync
  • GitHub — PR events trigger reviewer wakeup
  • Custom webhooks — any HTTP endpoint

Why not a separate tool?

Traditional workflow tools (n8n, Temporal, Inngest) are designed for human-triggered automation. OpRelay's orchestration is designed for agent-triggered coordination — the events, the state model, and the execution context are all native to the agent runtime. No translation layer, no external dependency, no separate deploy.