Agent setup guide
Samsara Safety Event Coaching
After each Samsara safety event, a short, respectful coaching message to the driver is drafted; your safety manager approves it before it's sent.
What it does
After each Samsara safety event, a short, respectful coaching message to the driver is drafted; your safety manager approves it before it's sent.
- Starts on each new Samsara safety event (checked every few minutes).
- AI drafts a short, supportive message to the driver from your safety program; events without a driver are skipped.
- A safety manager approves every message, with Samsara's link to watch the event first.
- Code checks the text, then it's sent to the driver in the Samsara Driver app.
What it needs
- A paid plan (agents run live on paid plans).
- An AI provider key (Settings → AI Providers).
- Samsara (Read Safety Events & Scores and Write Messages scopes; messages need Telematics Essential), connected in Settings → Integrations.
What it doesn't do
- It never messages a driver without your approval.
- It doesn't change the event's review or coaching status in Samsara.
- It doesn't judge fault or mention discipline.
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.
- The app it watches, connected in Settings → Integrations (the agent starts from an app event).
- About 7 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. Pick the Samsara account
Open the trigger and “Message the driver” and pick your Samsara connection.
| Setting | What to enter | In step |
|---|---|---|
| Samsara account | Your Samsara connection. Pick your connected Samsara account. | “New safety event in Samsara” |
| Samsara account (same one) | The same Samsara connection (the token needs Write Messages). Pick your connected Samsara account. | “Message the driver” |
4. Describe your safety program
Open “Draft the coaching message” and replace the placeholder.
| Setting | What to enter | In step |
|---|---|---|
| Your safety program | Replace the placeholder with your fleet, safety program, tone with drivers, what drivers should do after an event and your sign-off. It starts as “[YOUR FLEET, YOUR SAFETY PROGRAM, THE TONE YOU USE WITH DRIVERS (E.G. SUPPORTIVE, BRIEF), WHAT YOU WANT DRIVERS TO DO AFTER AN EVENT (E.G. WATCH THE CLIP, CALL THEIR SAFETY MANAGER) AND HOW YOU SIGN MESSAGES]” until you replace it. | “Draft the coaching message” |
5. Test it with Dry Run
Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.
6. Switch the trigger on
Open the trigger and click “Activate app trigger”: Samsara is checked every few minutes.
How it works
The agent is a normal workflow with 11 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.
- New safety event in Samsara — Starts on “New safety event” in Samsara (an app event). Starts a run for each new safety event Samsara creates (harsh braking, speeding, distraction…; checked every few minutes).
- Draft the coaching message — AI step (runs on your AI provider key). AI drafts a short, respectful message to the driver about the event, from your safety rules. A safety manager approves every message.
- A driver to coach? — Step. In code: the AI said to send and the event has a driver.
- Coach? — Decision: picks the branch to follow. Events without a driver (or that your rules don't coach) are kept in the run history only.
- Skipped: nobody to message — Kept in the run history. Branch: Skip. No driver on the event, or your rules don't coach this kind of event.
- Approve the message — A person approves or rejects it in Reviews (the run waits). Branch: Coach. The message waits in Reviews with Samsara's review link; edit it or reject it.
- Check before sending — Step. Branch: Approved. In code: a message under 2,500 characters with no leftover placeholders.
- Passed the checks? — Decision: picks the branch to follow. Passed: the message is sent. Otherwise nothing is sent.
- Held: nothing sent — Kept in the run history. Branch: Held. The message was blank, too long or still had a placeholder.
- Message the driver — Samsara: Message drivers. Branch: Send. Sends the approved message to the driver in the Samsara Driver app.
- Coaching message sent — Kept in the run history. The run history keeps every message that was sent.
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. The sample has the same shape as a real event from the app.
Sample data fields
id, created_at, detected_at, driver_id, driver_name, vehicle_id, vehicle_name, behaviors, state, max_g_force, address, latitude, longitude, review_url.
- Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
- Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.
Go live
- Open the trigger and click “Activate app trigger”: Samsara is checked every few minutes.
- Activating the app trigger needs the trigger's connected account. The first check only remembers what's already there, so older items don't start runs; the same item never starts two runs.
- 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
Does anything go to a driver without a person?
No. Every message waits for your approval in Reviews, with the link to watch the event in Samsara first.
Does it change the event in Samsara?
No. Coaching status and the event's review stay in Samsara; this only sends a Driver app message.
Which Samsara scopes?
Read Safety Events & Scores and Write Messages. Driver messages need Samsara's Telematics Essential license.
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.
- No runs start: activate the app trigger with a connected account. Only items created after activation start runs.
- A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
- 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 .