Skip to main content
Pipelines let you chain multiple agent steps into a workflow. Each step runs an agent with its own prompt, tools, and model — and the output of one step feeds into the next.
Pipelines run inside the daemon. Start the daemon with lukan daemon start -d before creating pipelines.

Key Features

  • Visual DAG editor — drag-and-drop flow editor in the Web/Desktop UI
  • Parallel execution — steps at the same topological level run concurrently
  • Approval gates — pause the pipeline and wait for human approval before continuing
  • Per-step configuration — each step can use a different provider, model, and tool set
  • Multiple triggers — manual, schedule, webhook, event, or file-watch
  • Live progress — real-time status updates in the UI
  • Export/Import — share pipelines as JSON files

Creating a Pipeline

  1. Open the Web or Desktop UI
  2. Go to Pipelines in the sidebar
  3. Click + to create a new pipeline
  4. Set a name, description, and trigger type
  5. In the flow editor, click + step to add agent steps
  6. Drag handles between steps to create connections
  7. Click the 3-dot menu on each step to configure prompt, model, and tools

Step Types

Agent Step

The default step type. Runs an agent with a prompt and optional tool restrictions.
FieldDescription
NameDisplay name for the step
PromptInstructions for the agent. Use {{input}} to reference upstream output
ProviderLLM provider override (optional)
ModelModel override (optional)
ToolsRestrict which tools the agent can use (optional)
TimeoutMax execution time in seconds (default: 120)
Max TurnsMax LLM turns (default: 10)
On Errorstop (default), skip, or retry:N

Approval Gate

A special step that pauses execution and waits for human approval. See Approval Gates below.

Connections & Conditions

Connections define the flow between steps. Each connection can have an optional condition:
ConditionDescription
AlwaysAlways follow this connection (default)
ContainsFollow if the previous step’s output contains a string
MatchesFollow if the previous step’s output matches a regex
StatusFollow based on the previous step’s status (success/error)

Triggers

TriggerDescription
ManualRun from the UI or API
ScheduleCron expression or interval (every:5m, every:1h, */10 * * * *)
WebhookPOST /api/pipelines/{id}/webhook?secret=TOKEN
EventTriggered when a matching system event arrives
File WatchTriggered when a file or directory changes

Approval Gates

Approval gates add human-in-the-loop control to your pipelines. When execution reaches an approval step, the pipeline pauses and waits for someone to approve or reject before continuing.

How It Works

  1. Pipeline executes agent steps normally
  2. When an approval gate is reached, the step turns purple in the UI
  3. A notification is sent to the configured channel (optional)
  4. The pipeline polls every 2 seconds waiting for a decision
  5. On approve — the pipeline continues with the next step, passing through the original context
  6. On reject — the pipeline stops with an error
  7. On timeout — the pipeline stops with a timeout error

Approval Sources

You can approve or reject from multiple sources:
SourceHow
UIClick the Approve/Reject buttons on the purple node
Web PageOpen http://your-server/approve/{id} in a browser
WhatsAppReply “yes” or “no” to the notification message
TelegramReply “yes” or “no” to the notification message
SlackReply “yes” or “no” in the DM or channel
DiscordReply “yes” or “no” in the DM or channel
GmailClick the approval link in the email
APIPOST /api/pipelines/approvals/{id}/approve or /reject

Configuring an Approval Gate

In the flow editor, edit a step and change Step Type to Approval Gate:
FieldDescription
Approval MessageMessage shown to the approver. Use {{input}} for upstream context
Notification ChannelPlugin to notify (WhatsApp, Telegram, Slack, Discord, Gmail, or none)
Channel/User IDWhere to send the notification
TimeoutSeconds to wait before timing out (default: 3600 = 1 hour)

Approval Keywords

When responding via a messaging channel, these keywords are recognized:
ApproveReject
yes, y, approve, approved, ok, sino, n, reject, rejected, deny, denied

Channel ID Reference

PluginID FormatHow to Find
WhatsApp5491155551234@s.whatsapp.net or group JIDCheck plugin logs for channelId
Telegram-1001234567890 (groups) or 123456789 (DM)Send a message, check logs
SlackC01ABC123 (channel) or U01XYZ789 (user DM)Right-click channel → View Details
Discord1234567890123456 (channel or user)Right-click → Copy ID (enable Developer Mode)
Gmailuser@example.comEmail address of the approver

REST API

Trigger a Pipeline

curl -X POST http://localhost:3000/api/pipelines/{id}/trigger \
  -H "Content-Type: application/json" \
  -d '{"input": "optional trigger input"}'

Cancel a Running Pipeline

curl -X POST http://localhost:3000/api/pipelines/{id}/cancel

List Pending Approvals

curl http://localhost:3000/api/pipelines/approvals/pending

Approve / Reject

# Approve
curl -X POST http://localhost:3000/api/pipelines/approvals/{id}/approve \
  -H "Content-Type: application/json" \
  -d '{"comment": "Looks good"}'

# Reject
curl -X POST http://localhost:3000/api/pipelines/approvals/{id}/reject \
  -H "Content-Type: application/json" \
  -d '{"comment": "Not ready"}'

Get Pipeline Runs

curl http://localhost:3000/api/pipelines/{id}

Export & Import

Export a pipeline as JSON from the flow editor toolbar (download icon). Import by clicking the upload icon in the pipelines sidebar. The exported JSON includes steps, connections, trigger configuration, and per-step settings — but not run history.