All jobs

Which Loads Have Gone Quiet? A Freight Broker's Hourly Tracking Check in Axiom

A freight broker's agent queries its tracking events in Axiom every hour and lists in-transit loads with no recent location update, split by driver or carrier API.

Run this on RushOpens the console with this prompt ready to send. Connect Axiom there first.

What the agent does

This is for a freight broker that built its own tracking service. For every load in transit it pulls location updates from each carrier's tracking provider and from the driver app, and writes each update as an event into an Axiom dataset: the load id, the carrier, the load's status, the last city, the HTTP status the carrier's tracking API answered, and the delivery appointment. The track-and-trace team's job is to notice when a load goes quiet and call before the customer does. The agent finds those loads every hour. Someone connects Axiom once with POST /me/connections {"type": "mcp", "name": "axiom", "url": "https://mcp.axiom.co/mcp", "auth": {"mode": "oauth"}} and signs in on Axiom's page.

The run calls listDatasets and then getDatasetFields on the tracking dataset, so a field renamed in the tracking service shows up as a clear message instead of an empty result. It then runs an APL query with queryDataset that takes each load's latest event with summarize arg_max(_time, *) by load_id, keeps the loads whose latest status is in transit, and keeps only those whose latest update is older than the threshold the team set.

A second query counts, per carrier, the tracking calls in the last six hours that the carrier's API answered with an error. That separates two very different problems. A single quiet load on a carrier whose API answers normally usually means a driver whose phone or device stopped reporting, and the rep calls the driver or dispatch. Many quiet loads on one carrier whose API has been failing since early morning is one problem, and one call to that carrier. The agent also calls checkMonitors to see whether an Axiom monitor is already alerting on that carrier, so the team does not chase something engineering is already fixing.

It writes nothing back. Axiom's server has tools that create and delete monitors and dashboards and delete dataset fields; the prompt forbids them all, and the agent never contacts a carrier or a driver.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Check the Axiom dataset tracking-events. Call getDatasetFields on it first and map these names if they differ: load_id, carrier, status, last_city, provider_status (the HTTP status from the carrier's tracking API), delivery_appointment. With queryDataset, take the latest event per load_id over the last 48 hours (summarize arg_max(_time, *) by load_id) and keep loads whose latest status is in_transit and whose latest event is more than 90 minutes old. Then count, per carrier, events in the last 6 hours whose provider_status is not 2xx. Call checkMonitors and note any monitor alerting about a carrier. Return only JSON: {quiet_loads: [{load_id, carrier, last_city, minutes_quiet, delivery_appointment, likely_cause}], carriers_failing: [{carrier, failed_calls, monitor}]}, with likely_cause carrier_api when that carrier has failed calls and driver otherwise, longest quiet first. Do not create, change or delete anything in Axiom.",
  "connections": [
    "axiom"
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

The answer is JSON in the session's result: the quiet loads with how long each has been silent and its delivery appointment, and the carriers whose tracking calls are failing. When the broker's backend starts the run, its own dashboard can show the list from the key's webhook; when an automation starts it, the person it runs as reads it where Rush notifies them.

The rep works the list from the top. Before calling, they check the load in the broker's transportation management system, because a load already delivered but never marked delivered looks exactly like a quiet one in the tracking data. A load whose appointment is two days away can wait an hour more; one due this afternoon cannot. The carriers_failing lines go to whoever owns the tracking integration.

The session's transcript holds the exact APL queries the agent ran, so a rep or an engineer can paste one into Axiom and see the same rows.

Run it on every hour of the dispatch day

In the console, a Project automation with a schedule trigger (0 6-20 * * 1-6 in the broker's timezone) can run a saved agent that names the Axiom connection and holds the field names and thresholds. A schedule fires at most hourly, which fits a check whose threshold is 90 minutes. Its notify_each_run set to true sends each hour's result on its own instead of in one daily message.

A broker that wants the list inside its own tools can start the same request from its backend every hour and read the answer from the key's webhook, matching the execution_id it saved at start.

The use case this job follows, with its automation and trigger: Produce a report or file, no repo.

Why run it on Rush?

An Axiom monitor can fire when a carrier's error count crosses a line, but the team's real question joins several things: which loads, how long, which carrier, whether the carrier's API is the cause, and whether someone is already on it. The agent asks Axiom each of those every hour and writes one list in the team's own terms. Axiom's sign-in stays in Rush's connection rather than a personal access token pasted into a cron job.

Each run has its own computer, a record of every query and its cost, and nothing carries over between hours except what is in Axiom. When a rep asks why a load was or was not on the list, the run for that hour shows the query and the rows it returned.

Frequently asked questions

Does the agent call carriers or drivers?

No. It reads tracking events and returns a list. A person makes every call and updates the load in the broker's own system, which Rush is not connected to here.

Our Axiom data is in the EU region. Does that change anything?

Axiom runs a separate EU server at https://mcp.eu.axiom.co/mcp, which keeps query results in EU data centres. Connect it as an MCP server with that URL and name the connection on the request instead of axiom. Axiom's docs note that both servers send requests other than queries, such as listing datasets and monitors, to its US API.

Why not check every ten minutes?

A Rush schedule fires at most once an hour. A broker that needs a faster check can start runs from its own scheduler with the same request, keeping in mind that each run is billed.

What if our tracking events have different field names?

The prompt lists the names it expects and asks the agent to map them from getDatasetFields. If a field is missing altogether, such as no delivery appointment, the agent leaves that column out and says so rather than inventing a value.

More Axiom jobs

More jobs like this: Produce a report or file, no repo

Keep reading