Weekly E2B sandbox cost and usage brief to Slack and Notion

By General Input

Every Monday morning, Geni reviews last week's E2B sandbox usage, finds where you are overpaying for idle compute, and posts a brief to Slack and Notion.

Integrations

  • E2B
  • Slack
  • Notion

Type

Agentic Task

Categories

  • Operations
  • Engineering

Build me an agent workflow that produces a weekly E2B sandbox utilization and cost optimization brief. It should run on a cron every Monday at 9am team time.

When it runs, the agent should pull data from E2B for the previous 7 days using these operations:

1. List Sandboxes to enumerate every sandbox that is currently running or paused, including their template, metadata (team, project, agent name), state, start time, and resource allocation.

2. List Sandboxes Metrics to batch-fetch CPU, memory, and disk usage for those sandboxes so we can compute average and peak utilization per sandbox.

3. Get Team Metrics to retrieve the aggregated team-wide CPU, memory, and disk picture over the last 7 days.

4. Get Team Maximum Metrics with metric=concurrent_sandboxes to read our concurrency limit, so the brief can call out how close we ran to the cap and whether we are paying for headroom we never use.

Then the agent should analyze the data and produce a brief that does three things:

- Groups usage by template and by sandbox metadata (team, project, agent name) so a reader can see which templates and which projects are driving cost.

- Identifies sandboxes that consumed compute but stayed mostly idle. Default rule: average CPU under 5 percent across the sandbox's lifetime is a right-sizing or pause candidate. Make the threshold easy to tweak.

- Drafts concrete right-sizing recommendations: templates that look oversized and could be shrunk, sandboxes that should be paused instead of left running long, and headroom against the concurrency cap that we never approach.

Output two versions of the brief in the same run:

Slack version (tight): post to a designated Slack channel using Send a Message. It should be short: the top 3 findings and a one-line trend versus the prior week. The channel name should be a parameter I can set during setup.

Notion version (detailed): append a new dated entry to a Notion ops journal page using Append Block Children. Include a one-paragraph executive summary, a per-template usage table (avg CPU, avg memory, peak concurrency, sandbox count, idle count), a per-project breakdown, the list of right-sizing recommendations with the sandbox or template IDs, and the team concurrency picture (peak concurrency vs cap).

The Notion page ID should be a parameter I can set during setup. Make it append as a new section under a date heading like "E2B weekly brief, week of <date>" so the page becomes a running history I can scroll back through.

Other expectations:

- This is read-only. Do not kill, pause, or modify any sandboxes. The brief surfaces recommendations only.

- If E2B returns zero sandboxes for the week (quiet week), still post both the Slack and Notion entries so the history is unbroken; just say no activity this week and skip the recommendations section.

- Tone is operational and direct. No marketing language. Numbers first, recommendations second.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionScreen chartered vessels for AIS gaps and sanctions red flags