So here's the thing : building AI apps is the fun part. Deploying them? That's where your soul goes to die.
You've got two options and they both suck:
Self-host on a VPS → congrats, you're now a DevOps engineer. What's "kubirnites"?
Go serverless → hit execution limits when your AI agent is mid-thought
Vercel caps functions at ~500 seconds even with fluid compute. Cool, except my LangGraph agents take more than 500 seconds depending on the workflow.
So here is my 0$ stack to run my ai agents SaaS:
I realized GitHub Actions workflows can run for free, up to 2,000 minutes/month on the free tier (6 hours for private repos). So I just... moved all my long-running AI stuff there.
Load LangGraph script → trigger via .yml → dispatch through an endpoint → webhook the results back. Async, stable, and GitHub's problem now, not mine.
The rest of my $0 stack:
Frontend: SvelteKit (a JS framework that doesn't make me want to cry or go into wrapper hell)
Backend: Django for auth (Learned it and stuck with it)
DB: Neon serverless Postgres (the best postgres db in the world. practically free)
AI: Gemini with Google Cloud free credits
Storage: S3 free tier
Analytics: PostHog free tier
Hosting: Vercel (just frontend + lightweight APIs)
The heavy lifting: GitHub Actions
This powers my SaaS my SEO automation tool. Been running for months. Total monthly cost: $0. and i am pretty happy with it overall
So is this the best way to run Ai agents for free? Is anyone else doing cursed infrastructure hacks like this, or am I the only one?
For those running production AI products what's your deployment look like? Are you just eating the compute costs or is there a better way I'm missing?
Running AI agents on GitHub Actions to avoid compute costs is clever for hacking together a prototype, but you’re ignoring reliability and user experience. If your product depends on free CI minutes and long-running jobs, what happens when GitHub throttles or changes terms? Also, bragging about a $0 stack hides the fact that you’re externalizing costs onto someone else’s infrastructure. A sustainable business needs predictable hosting and support; find a model that scales with usage rather than hoping your beta doesn’t get shut down.