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
| Event | Trigger | Use case |
|---|---|---|
task.created | New task enters the queue | Auto-assign to available worker |
task.transitioned | Status change (e.g., todo → in_progress) | Notify supervisor, update dashboard |
task.completed | Task reaches done | Trigger reviewer, sync to Linear |
run.failed | Execution fails | Record failure context, retry or escalate |
fact.updated | Fact value changes | Cascade 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.