Browse the docs

Agent setup guide

Samsara HOS Hours Watch

Every hour, the drivers about to run out of drive or shift time (from Samsara's HOS clocks) are posted to dispatch before they do.

Available About 8 min to set up

What it does

Every hour, the drivers about to run out of drive or shift time (from Samsara's HOS clocks) are posted to dispatch before they do.

  • Every hour, reads every driver's duty status and drive, shift and cycle time left from Samsara's HOS clocks.
  • Code lists the drivers on duty or driving with 60 minutes or less of drive or shift time, or in violation.
  • When anyone is on the list, AI writes a one-line heads-up with the first step from your rules, without typing any times.
  • Posts the list to your Slack dispatch channel; quiet hours post nothing.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Samsara (Read ELD Compliance Settings (US) scope; HOS needs Telematics Essential Plus) and Slack, connected in Settings → Integrations.

What it doesn't do

  • It doesn't change logs or duty status.
  • It doesn't know your loads or appointments: it lists drivers, you plan the relief.
  • Up to 2,560 drivers per run.

Availability and plans

Available

Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: Samsara and Slack.
  • Nothing to send: the agent runs on a schedule.
  • About 8 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect Samsara

Connect Samsara with your own API token (Settings → Integrations → Samsara lists the read scopes each step needs).

3. Connect Slack

Connect the Slack workspace for the alerts (Settings → Integrations → Slack).

4. Pick the Samsara account

Open “Read the HOS clocks” and pick your Samsara connection.

SettingWhat to enterIn step
Samsara accountYour Samsara connection. Pick your connected Samsara account.“Read the HOS clocks”

5. Describe your dispatch rules

Open “Write the heads-up” and replace the placeholder.

SettingWhat to enterIn step
Your dispatch rulesReplace the placeholder with your fleet, dispatchers and what to do when a driver is about to run out of hours. It starts as “[YOUR FLEET, WHO YOUR DISPATCHERS ARE, WHAT A DISPATCHER SHOULD DO WHEN A DRIVER IS IN OR NEAR AN HOS VIOLATION (E.G. CALL THE DRIVER, FIND RELIEF, TELL THE CUSTOMER) AND WHO HANDLES SAFETY / COMPLIANCE]” until you replace it.“Write the heads-up”

6. Pick the Slack channel

Open “Post to dispatch” and pick the workspace and channel.

SettingWhat to enterIn step
Slack accountThe Slack workspace for the heads-up. Pick your connected Slack account.“Post to dispatch”
Slack channelWhere dispatch sees it, e.g. #dispatch.“Post to dispatch”

7. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

8. Switch the trigger on

Open the trigger, set your time zone (and hours if you like) and switch the schedule on.

How it works

The agent is a normal workflow with 7 steps (1 AI step). You can open, edit and monitor it like any other workflow.

  • Every hour — Runs on a schedule (cron 0 * * * *, UTC — change it in the trigger's settings). Runs at the top of every hour. Set your time zone on the trigger (and the hours you want, e.g. 5:00–21:00).
  • Read the HOS clocks — Samsara: Get HOS clocks. Reads every driver's duty status and drive, shift and cycle time left from Samsara; drivers on duty with 60 minutes or less of drive or shift time (or in violation) are listed in code.
  • Anyone low on hours? — Decision: picks the branch to follow. In code: posts only when at least one driver is at or under 60 minutes left.
  • Nobody low on hours — Kept in the run history. Branch: Nobody. Nothing is posted when every driver has more than an hour left.
  • Write the heads-up — AI step (runs on your AI provider key). Branch: Low on hours. AI writes one line for dispatch from the list (computed in code), without typing any times.
  • Post to dispatch — Slack: Post a message. Posts the list (from Samsara, computed in code) and the heads-up to your dispatch channel.
  • Heads-up posted — Kept in the run history. The run history keeps every heads-up.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.

Go live

  • Open the trigger, set your time zone (and hours if you like) and switch the schedule on.
  • Scheduled runs start only once the schedule is activated, and can't repeat faster than your plan's minimum interval.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

Where do the hours come from?

From Samsara's HOS clocks (drive, shift and cycle time left). Code decides who is low; the AI never calculates hours.

Can I change the 60 minutes?

Yes: change “Alert at (minutes left)” in “Read the HOS clocks”.

Which Samsara plan do I need?

HOS clocks need Samsara's Telematics Essential Plus license and the Read ELD Compliance Settings (US) scope on your token.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • Slack says the app isn't in the channel: in Slack, type /invite @Fluxo Flow in that channel (always needed for private channels).
  • It didn't run at the expected time: the schedule must be activated, and its time is in the trigger's timezone.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .