Free Hosting for AI Agents: What Actually Runs 24/7

Quick answer: For an agent that wakes on a schedule, GitHub Actions is the best free host — 2,000 minutes a month, 6-hour jobs, no card. For an agent that answers webhooks or chat, Cloudflare Workers free is better than it looks: the 10 ms CPU cap does not count time spent waiting on LLM API calls, which is nearly all of an agent's runtime. For a real always-on container, Northflank's free Sandbox is the only one here that never sleeps — but every Northflank account must add a payment method first.

Hosting an AI agent is not hosting a website. An agent runs a loop, not a request: it waits minutes on model calls, needs outbound network access, often needs to remember something between runs, and it should keep working when nobody is watching. Almost every free tier is tuned for the opposite shape — short HTTP responses, traffic-driven wake-ups, no background process. Here is what the free plans actually allow in 2026, every figure taken from the provider's own docs.

Why Most Free Tiers Break Agents

Two of the platforms people reach for first no longer do the job:

  • Render's free tier has no background workers and no cron jobs. Its docs list free instances for static sites, web services, Postgres and Key Value only — "Other service types don't support Free instances." The free web service also spins down after 15 minutes without inbound traffic and takes about a minute to come back, against 750 free instance hours a month per workspace. A polling agent has nothing to poll it awake.
  • Hugging Face Spaces now charges to create a compute Space. The Hub docs are explicit: "Gradio and Docker Spaces run on compute and require a paid plan to create: PRO for personal accounts, Team or Enterprise for organizations." Static Spaces stay free, and free personal accounts in good standing may still host up to 2 Gradio Spaces on ZeroGPU. Free hardware sleeps after 48 hours idle, and Spaces allow outbound requests only on ports 80, 443 and 8080.

What is left is a smaller, more specific set — and the right pick depends on whether your agent is scheduled, event-driven, or genuinely always on.

Free Hosting for AI Agents Compared

PlatformFree computeLong / background work?Sleeps or expires?RegionsCard?
GitHub Actions2,000 min/month on a free account; standard runners free without limit on public reposYes — up to 6 h per jobRuns then exits; public-repo schedules auto-disable after 60 days of no activityNot selectableNo
Cloudflare Workers100,000 requests/day, 128 MB per isolate, 10 ms CPU per request, 5 cron triggersPartly — I/O wait is free, but cron, queue and alarm runs cap at 15 minNo idle state to wake fromGlobal anycast, no region to pickNo
Northflank Sandbox2 services, 2 jobs, 1 addon (database)Yes — persistent containers and jobsNo sleeping; free plan is framed for hobby use, not productionSelectable per projectYes — required for every account
Beam$30/month credits, 30 concurrent CPU / 5 GPU containersYes, but scale-to-zero between requestsCredits reset monthly; apps spin down after each requestNot selectable on freeNo
Google Cloud Run2M requests, 180,000 vCPU-sec, 360,000 GiB-sec, 1 GB North America egress per monthYes, but pinning always-on instances leaves the free tierScales to zero; allowance resets monthlyFull region choiceYes — billing account required
Free ARM VPSOracle Always Free, halved to 2 OCPU / 12 GB in June 2026Yes — it is a real root serverNo sleep; idle instances can be reclaimedHome region onlyYes (verification)

Cloudflare Workers: the 10 ms Rule Doesn't Mean What You Think

The Workers free plan gives 10 ms of CPU per request against 5 minutes on paid, and that number scares people away from running agents on it. It shouldn't, because of one line in the limits docs: "Waiting on network requests (such as fetch() calls, KV reads, or database queries) does not count toward CPU time."

An LLM agent is almost entirely network wait. A 20-second reasoning call burns close to zero CPU milliseconds — you spend CPU only on parsing JSON and branching. There is also no general duration limit on HTTP-triggered Workers while the client stays connected. The caps that do bite: 100,000 requests a day, 128 MB per isolate, 5 cron triggers per account, and a 15-minute ceiling on cron, queue-consumer and Durable Object alarm runs.

// worker.js — a scheduled agent, entirely on the free plan
export default {
  async scheduled(event, env, ctx) {
    const r = await fetch("https://api.groq.com/openai/v1/chat/completions", {
      method: "POST",
      headers: {
        "Authorization": "Bearer " + env.GROQ_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        model: "llama-3.3-70b-versatile",
        messages: [{ role: "user", content: "Summarise today's queue." }],
      }),
    });
    const data = await r.json();          // network wait costs 0 CPU ms
    await env.AGENT_KV.put("last-run", data.choices[0].message.content);
  },
};
# wrangler.toml
name = "my-agent"
main = "worker.js"
[triggers]
crons = ["0 */6 * * *"]

State survives between runs too. Durable Objects landed on the Workers Free plan in April 2025, SQLite backend only: 100,000 requests a day, 13,000 GB-s of duration, 5 GB of SQL storage, 5 million rows read and 100,000 written per day. That is persistent per-agent memory with built-in alarms at no cost — the same substrate Cloudflare's Agents SDK is built on. Pair it with Workers AI and the whole stack sits on one free account.

GitHub Actions: Free Cron for Scheduled Agents

If your agent does not answer requests — it scrapes, summarises, posts, then sleeps — GitHub Actions is the strongest free option nobody markets as hosting. Free accounts get 2,000 minutes a month plus 500 MB of artifact storage, and standard GitHub-hosted runners are free without limit on public repositories.

# .github/workflows/agent.yml
name: agent
on:
  schedule:
    - cron: "17 */6 * * *"   # not :00 — the top of the hour is congested
  workflow_dispatch:
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with: { python-version: "3.12" }
      - run: pip install -r requirements.txt
      - run: python agent.py
        env:
          GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}

The limits worth knowing first: a job on a GitHub-hosted runner is capped at 6 hours (a whole workflow run at 35 days), the minimum schedule interval is 5 minutes, scheduled runs "can be delayed during periods of high loads" and queued jobs may be dropped, and in a public repository scheduled workflows are automatically disabled after 60 days without repository activity. Commit something monthly or your agent quietly stops. There is no persistent disk either — commit results back to the repo, or push them to free object storage.

When You Actually Need an Always-On Container

Discord bots, WebSocket listeners and agents holding an in-memory queue need a process that never stops. Northflank's free Sandbox is the cleanest fit: 2 services, 2 jobs and 1 addon, always-on, no sleeping. Two honest caveats — its docs state that "all users must add a payment method to start creating resources on Northflank, regardless of plan selection," and the free plan is positioned for exploration and hobby projects rather than production. Northflank also does not publish per-resource vCPU and RAM figures for the free plan; you see the compute size when you create the service. The alternative is another free host without cold starts or a free ARM VPS, where you own the box and nothing is metered.

GPU Agents: Beam and Modal

If a step in your loop needs a GPU — local Whisper, an embedding model, a small open-weights LLM — two platforms hand out recurring credits rather than a free machine. Beam gives $30 a month with 30 concurrent CPU and 5 GPU containers, and apps spin down automatically after each request. Modal gives $30 a month on the same scale-to-zero model. Both fit bursty agent work and neither fits anything that must stay resident. If your agent executes code it wrote itself, run that in a dedicated sandbox, not on your host.

Regions and Latency

No first-hand latency benchmarks appear here — none of these platforms were speed-tested for this article, and everything below comes from the providers' own docs. Cloudflare Workers run on a global anycast network, so there is no region to choose and code executes near the requester. Google Cloud Run offers full region selection, and its free allowance covers 1 GB of monthly egress from North America specifically. Northflank lets you pick a region per project. GitHub Actions runners have no user-selectable location, which is fine because nothing serves traffic from them. For an agent, region matters far less than for a website: latency is dominated by the model API you call, not by where the loop runs.

Frequently Asked Questions

Can I run an AI agent 24/7 for free?

Yes, in two shapes. A container that literally never stops means Northflank's free Sandbox (payment method required) or a free ARM VPS. Otherwise the practical answer is an agent that wakes up — Workers cron triggers or a GitHub Actions schedule — which covers most real workloads at a fraction of the resource cost.

Do these free tiers allow commercial use?

The compute generally does, but check the layer above it. Northflank frames its free plan as exploration and hobby use rather than production, and free model APIs are where commercial restrictions usually hide. The host is rarely the licence problem; the model is.

Which free host works for a Discord or Telegram bot?

Anything that does not sleep. Render's free web service spins down after 15 minutes without inbound traffic, which breaks a bot's gateway connection. Northflank, a free VPS, or a webhook-style bot on Cloudflare Workers all work — the last is cheapest, because a webhook bot has no idle state to keep alive.

What about tasks that run for hours?

GitHub Actions is the only free option here giving multi-hour execution outright: 6 hours per job. Cloudflare's cron and queue runs cap at 15 minutes on the free plan, and Cloud Run's allowance is measured in vCPU-seconds, so hours of compute drain it fast.

The Verdict

No free tier in 2026 hands you an always-on container with no card and no catch — that era ended when Fly.io retired its free allowance and Koyeb closed its Starter plan. What replaced it fits how agents actually run. Put scheduled agents on GitHub Actions, event-driven and webhook agents on Cloudflare Workers with Durable Objects for state, and reach for Northflank or a free VPS only when you truly need a resident process. Choose by the shape of your loop, not the size of the free tier.

Related Reads