workflow_data
JSON structureworkflow_data
: The complete JSON from your visual builder (Step 1)inputs
: The actual data you want to process (overrides default values)https://lao.studio.lyzr.ai/run-dag/
workflow_data
= Your workflow template (same every time)inputs
= The specific data for THIS execution (changes each time)workflow_data
JSON structuretask_id
to track the executionflow_name
and run_name
to monitor progresshttps://lao.studio.lyzr.ai/task-status/{task_id}
processing
status while the workflow is still running. You’ll need to poll periodically or use WebSocket for real-time updates.
status
: Either “processing” or “completed”results
: Object containing output from each node (keyed by node name)Method | Best For | Pros | Cons |
---|---|---|---|
WebSocket | Real-time monitoring | Instant updates, progress tracking | Requires persistent connection |
Task Status API | Batch processing | Simple HTTP, works everywhere | Requires polling, no progress updates |
wss://lao-socket.studio.lyzr.ai/ws/{flow_name}/{run_name}
Why You Need This: Instead of waiting for the entire workflow to finish, you get instant notifications as each step completes, fails, or progresses. Critical for enterprise applications where users need immediate feedback.
How It Works:
Event Type | When It Fires | What You Should Do | Why It Matters |
---|---|---|---|
flow_started | Workflow begins | Update UI: “Processing…” | User knows their request is being handled |
task_started | Node begins execution | Show progress: “Step 1 of 3” | Real-time progress indication |
task_completed | Node finishes | Update progress: “Step 2 of 3” | User sees continuous progress |
flow_completed | Workflow done | Process results, notify user | Handle final results immediately |
task_failed | Node fails | Handle error, maybe retry | Immediate error response, no waiting |
flow_error | Workflow fails | Show error, log for debugging | Critical failure handling |
Error | Cause | Solution |
---|---|---|
TIMEOUT | Node took too long | Retry or increase timeout |
INVALID_CONFIG | Wrong parameters | Check node configuration |
API_RATE_LIMIT | Too many requests | Implement backoff |
AUTH_ERROR | Invalid credentials | Check API keys |
NETWORK_ERROR | Connection issues | Retry with exponential backoff |