What the agent does
This is for an online store that sells furniture and home goods direct to customers, with an in-house e-commerce manager, a marketing team that adds apps and tracking scripts to the site, and an outside developer on a monthly retainer. The store has Datadog Real User Monitoring on its storefront, so every shopper's page loads, clicks and JavaScript errors are recorded. Nobody reads the RUM dashboards in a normal week, and a review widget that slows every product page, or a checkout script that fails in Safari, is found only when sales dip. The agent reads the week's RUM data every Monday and writes the e-commerce manager a one-page report of what got worse.
The e-commerce manager connects Datadog once with POST /me/connections {"type": "mcp", "name": "datadog", "url": "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp", "auth": {"mode": "oauth"}} and signs in with their Datadog account. Datadog's docs say the MCP server forwards the signed-in user's own credentials, so the agent sees only what that person may, and its tools reference lists search_datadog_rum_events and aggregate_rum_events in the default core toolset, each needing the RUM Apps Read permission.
On a run the agent calls aggregate_rum_events for the storefront application, which Datadog describes as computing counts, averages and percentiles with grouping, for statistical and trend data rather than single events. It asks for the 75th-percentile loading time of views grouped by page (the product page, the collection page, the cart, each checkout step), by device type and by browser, once for the last seven days and once for the seven before. It then counts JavaScript errors grouped by page and error message for both weeks, and the number of sessions that reached the checkout's payment step, so the report can show errors in proportion to traffic.
For each page where loading time rose by more than 20 percent, or where a new error appears in more than one percent of views, it calls search_datadog_rum_events for a handful of example events: the error's message and source file, the browser and version, the country. That is usually enough to tell a third-party script (a review widget, a chat bubble, a tag manager) from the store's own code. It writes no monitors, dashboards or notebooks, and changes nothing in Datadog.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Weekly storefront report for the RUM application 'storefront' for the 7 days ending 2026-11-23T00:00:00Z, compared with the 7 days before. Use the datadog connection, and only search_datadog_rum_events and aggregate_rum_events. 1) With aggregate_rum_events, get p75 view loading time grouped by view name (product, collection, cart, checkout-information, checkout-shipping, checkout-payment, order-confirmation), device type and browser, for both weeks, with view counts. 2) Count JavaScript errors grouped by view name and error message for both weeks. 3) Count sessions that reached checkout-payment and order-confirmation in both weeks. 4) For each view whose p75 rose by over 20%, and each error in over 1% of a view's loads this week that was rare or absent last week, use search_datadog_rum_events to read up to 5 example events and note the error source file or script host, browser and version, and country. Write storefront.md: a 5-line summary first, then tables for loading time, errors and the checkout funnel, then one paragraph per problem with the likely source, marked as the store's own code or a third-party script by its host. Read only: create or change no monitor, dashboard, notebook or setting.",
"connections": [
"datadog"
]
}- 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.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
- 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
storefront.md compares this week's store page loading times and errors with last week's, and shows the checkout funnel for both weeks. It is one of the session's artifacts: a five-line summary at the top, then loading times by page, device and browser, the JavaScript errors by page with their share of page loads, and the funnel from payment step to order confirmation. Under that comes one paragraph per problem, with example errors, the browser they occur in, and whether the source is the store's own code or a third-party script, judged by the host the script loads from.
What the e-commerce manager checks before acting: whether the week had a promotion or a traffic source that changes the mix of devices, which can move the 75th percentile without anything getting slower; whether a new marketing app was installed that week, which is a likely source of a new third-party error; and the error examples themselves, which the outside developer reads before quoting a fix. The report says where to look; fixing it is a person's job.
Run it on every Monday morning
In the console, a Project automation with a schedule trigger at 0 7 * * 1 and the store's timezone runs a saved agent whose connections name datadog, with the application name, page names and thresholds above in its instructions. A schedule fills no dates into the prompt, so the instructions say "the seven days before this run, and the seven before those".
Around a big sale the store can add a daily run of the same agent for the week, with the comparison set to the same day a week earlier. Each run writes its own report, and the Monday one still compares whole weeks.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
The Datadog sign-in stays in Rush's connection, acting with the e-commerce manager's own permissions, rather than in an API key and application key pair stored in a script that can read the whole account. Each run has its own computer and a record of every RUM query it ran, so when the outside developer asks how a number was measured, the store can show them the exact grouping and time range.
The report is a few aggregate queries and some judgement about which changes matter, which is easy for an agent and easy for a busy person to skip. The session records its total_cost_usd, which the store can set against the sales of one week with a broken checkout step.
Frequently asked questions
Does this need any Datadog setup beyond RUM?
Only Real User Monitoring on the storefront and a Datadog user with the RUM Apps Read permission. Datadog's tools reference lists both RUM tools in the core toolset, which its docs say is the one available by default, so the connection needs no toolsets parameter.
Why the 75th percentile and not the average?
An average hides the slow loads that lose sales, and the slowest few percent are often bots or broken connections. The 75th percentile is the figure Google uses for Core Web Vitals, and it moves when a real share of shoppers gets a slower page. The prompt can ask for the 95th too.
Can the agent fix the slow page?
Not from Datadog. The store's theme or code is not a connection in this job, and a third-party script is usually removed or changed in that app's own settings. The report names the likely source so the person who owns it can act, and a developer with the store's code can start a separate run on the repository.
Are there limits on how many queries the agent can make?
Datadog's docs describe a fair-use burst limit of 50 tool calls per 10 seconds and no monthly limit, and say long responses are truncated. The prompt keeps the run to a few grouped queries and a handful of example events, well inside that.
More Datadog jobs
More jobs like this: Produce a report or file, no repo
- Which Launch Tasks Are Blocked by Something That's Already Late? A Snack Brand's Weekly Asana Dependency Check (Asana)
- Which Translation Jobs Due This Week Still Have No Translator? A Translation Agency's Daily ClickUp Check (ClickUp)
- Find the Free Trials That Never Activated, Straight From Your PlanetScale Database (PlanetScale)