Workers
Workers run jobs in the background. A worker can run your own Python code, run a workflow or a graph on a schedule, or react to an incoming event. On the page they are called Worker Services.
The five kinds
| Kind | What it does |
|---|---|
| Code | "Custom Python built into a Docker image and run on a schedule, trigger, or manually." |
| Background | "A long-running / generic background processing service written in Python." |
| Workflow Scheduler | "Runs an existing visual Workflow on a schedule or trigger." |
| Graph Task | "Runs an existing Graph (multi-agent) on a schedule or trigger." |
| Event Worker | "Fires on an inbound webhook / external event." |
Open Workers
Click Workers under Builder (/builder/workers). The page is titled Worker Services: "Background jobs, scheduled code, workflow & graph schedulers, and event-driven workers." It needs the Workers permission.
The dashboard
The top of the page shows cards for Total, Deployed, Running, Scheduled, Failed (24h) and Stopped, plus:
- Overall health: the success rate of the last 100 runs.
- Status breakdown: how many are deployed, draft, disabled or in error.
- Runs (14 days): a chart.
- Last execution and Next scheduled execution.
The page refreshes itself every 5 seconds.
The list
All workers is searchable (Search workers…, by name or description) and shows 20 per page. Each row has the name, a status badge (deployed, draft, disabled or error) and a line such as "Workflow Scheduler · last run 5m ago".
Row buttons (some only appear when they apply):
| Button | What it does |
|---|---|
| Run now | Queues a run (only for active workers). Toast "Run queued" |
| Stop running | Stops it. Toast "Worker stopped" |
| Deploy | Builds and starts a code, background or event worker. Toast "Deployed" |
| Disable / Enable | Toasts "Worker disabled" and "Worker enabled" |
| Configure | Opens the worker's page |
| Delete | Asks "Delete worker?" ("(name) and its run history will be removed."). Toast "Worker deleted" |
Empty: "No workers yet — Create a worker to run code, schedule workflows, or react to events." With a search: "No workers match".
Create a worker
Click New Worker and pick a kind
The window New Worker Service says "Choose what kind of worker service to create." Click one of the five cards.
Screenshot placeholderScreenshot to add: The New Worker Service wizard showing the five kinds. Name it
Enter a Name (required, for example "My code worker") and an optional Description.
Choose a target (workflow or graph only)
For Workflow Scheduler choose a Target Workflow. For Graph Task choose a Target Graph. Only the first 100 are listed. If none exist you see "No workflows found — create one first."
Create
Click Create. A toast says
Worker "(name)" created, and the worker's page opens. It starts as a draft.
A new code worker comes with a starter file:
def handler(payload: dict) -> dict:
"""Worker entrypoint. Receives the trigger payload, returns a JSON-able dict."""
return {"result": "ok", "input": payload}
The default timeout is 60 seconds.
A worker's page
The header shows the name, a status badge and the description. Buttons: Run and Stop (when active), Enable or Disable, and Deploy. Deploying needs the extra Deploy permission and shows a Deploy log that streams the build ("build started", "pushed …", "activated").
There are five tabs. Code is only shown for code, background and event workers.
Overview
Shows the kind, Status, Last run, Deployed, Timeout, the Image tag, the Target (the workflow or graph) and any Last deploy error.
Code
- A Python editor for
handler.py. The hint says "Define handler(payload: dict) -> dict". - A
requirements.txtbox for packages (for examplerequests==2.31.0). - Environment variables: add a key and a value.
- Secret bindings: connect a stored credential to an environment variable name. The value is only supplied when the worker runs.
- Save shows "Saving…" then "Saved". The toast says "Saved — deploy to apply changes". Changes take effect only after you Deploy.
Triggers
Triggers & schedules controls when the worker runs. Click Add trigger and choose a type.
| Type | Fields |
|---|---|
| Cron schedule | A cron expression (default 0 * * * * for hourly; */30 * * * * is every 30 minutes) |
| Fixed interval | Run every (minutes), default 15 |
| One-time | Run at a date and time |
| Event / webhook | A secret token is generated, and the trigger row shows the address to POST to: (address)/api/v1/workers/(id)/events/(trigger id)?token=… |
| Manual | Run only on demand |
| File watch (object storage) | Container (default apex-data), Prefix (folder path), and Auto-ingest into DocIntel. "Worker runs once per new file uploaded to this path." |
Each trigger row shows its type, a description, an active or paused pill, and the next and last run times. Hover for Pause / Resume and Delete (no confirmation). Toast "Trigger added". Empty: "No triggers yet. Add a schedule, interval, or webhook to automate this worker." The scheduler checks about every 30 seconds. The form has no timezone setting.
Runs
Execution history lists the last 50 runs and refreshes every 5 seconds. Search the logs and errors, or filter by All statuses, success, failed, running, queued, timeout or cancelled. Each row shows a status badge, a short ID, the trigger, the duration and the time. Open a row to see Started, Finished, Duration, Exit code, any Error, a live log viewer and the Output JSON. Empty: "No runs yet."
Settings
Timeout (seconds) (5 to 3600), Memory (MB) (minimum 64, default 512) and Max concurrency (1 to 50). Click Save settings ("Settings saved"). A Danger zone has Delete worker.
How each kind runs
- Code and Background workers run in their own container.
- A Workflow Scheduler runs your workflow as the workflow's own owner.
- A Graph Task runs your graph as the person who created the worker.