DEVOPS

Hugging Face Spaces idle-runtime sweep with auto-pause

On a schedule, scans all Hugging Face Spaces for ones running idle past a threshold, pauses them to stop billing, and posts a Slack summary with the estimated monthly savings.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNightly schedule fires the idle sweep
  • ActionList org Spaces with hardware tier and last activityHugging FaceHugging Face
  • LogicKeep paid-hardware Spaces idle past threshold
  • ActionPause each idle Space runtimeHugging FaceHugging Face
  • LogicEstimate monthly savings from paused tiers
  • OutputPost Slack digest of pauses and savingsSlack

What it does

Walks your Hugging Face organization's Spaces, finds upgraded-hardware Spaces (GPU/CPU-upgrade tiers) that have been running with no recent traffic, and pauses them so you stop paying for idle compute. It then posts a Slack digest naming each paused Space and the rough monthly cost it was burning.

When to use it

When your team spins up demo Spaces on paid hardware and forgets to pause them. Run it nightly to keep the bill honest without hunting through the dashboard.

How it works

  1. 1A nightly schedule fires the sweep.
  2. 2List all Spaces in the org via the Hugging Face API, with hardware tier and last-activity timestamp.
  3. 3A filter keeps only Spaces on paid hardware whose idle time exceeds the threshold (e.g. 6 hours) and are not flagged keep-alive.
  4. 4For each match, call the Hugging Face API to pause the Space runtime.
  5. 5Compute the per-Space hourly rate and sum the projected monthly savings.
  6. 6Post a Slack summary listing paused Spaces and total savings.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect Hugging FaceModels, datasets, spaces — the open-source hub.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.