oncell: the Heroku for AI Agents
In 2009, Heroku made a bet: developers shouldn't think about servers. Write your code, git push, and it runs. No Nginx config. No load balancers. No SSH into a box at 3am.
It worked because the abstraction was right. A web app is a process that listens on a port. Everything else — routing, SSL, scaling, logs — is infrastructure that someone else should handle.
AI agents have the same problem today, but worse.
The 7-service problem
To deploy an AI agent in production, you currently need to wire together:
That's seven services before you write a single line of agent logic. And they all have to talk to each other, fail gracefully, and not lose data.
This is exactly where web development was before Heroku. And it's why most “AI agents” in production are really just API wrappers — stateless, fragile, no memory, no durability.
What if an agent was one file?
import { Agent } from "oncell";
const agent = new Agent("support", {
instructions: "You are a support agent for Acme Corp.",
model: "kimi-k3",
tools: ["files", "memory"],
});
agent.chat(async ({ message, user }) => {
const docs = await agent.files.search(message);
const reply = await agent.llm(message, { context: docs });
await agent.memory.forUser(user.id).append("history", {
user: message, reply: reply.text,
});
return reply;
});
export default agent;That's a complete, production-ready support agent. It has persistent memory per user, a searchable knowledge base, LLM access, and a chat interface. Deploy it with one command:
$ npx oncell deployNo Docker. No database setup. No secret management. No monitoring config. It just runs.
The Heroku insight, applied to agents
Heroku's insight was that a web app is a process. oncell's insight is that an agent is a stateful process that talks to an LLM. Everything else is infrastructure:
Agents that never die
Here's where it gets interesting. Web apps are stateless — any request can hit any server. Agents are the opposite. They accumulate state, hold conversations, wait for approvals, sleep for days, and resume exactly where they left off.
oncell makes every awaita checkpoint. If the process crashes, the host dies, or you redeploy — the agent resumes from the last checkpoint. No LLM call is ever billed twice.
agent.task("refund", async ({ orderId, amount }) => {
const order = await agent.db.sql`SELECT * FROM orders WHERE id = ${orderId}`;
// Agent parks here. Can wait days for a human.
const ok = await agent.askHuman({ question: `Refund $${amount}?` });
if (ok.approved) {
await agent.llm("Process the refund");
}
// Sleep 30 days, then follow up. $0 while sleeping.
await agent.sleep({ days: 30 });
await agent.llm("Check if customer is satisfied");
});Kill the process after askHuman. Redeploy. Approve from the dashboard three days later. The agent wakes up and continues from exactly where it stopped. The approval, the sleep, the follow-up — all durable. This is not a workflow engine. It's just TypeScript with checkpoints.
One agent, multiple models
Different tasks need different LLM strengths. Design requires deep reasoning. Coding needs speed. Review needs a critical eye. oncell lets you declare this with skills:
const agent = new Agent("engineer", {
model: "kimi-k3", // default: fast coder
skills: {
design: {
when: "Architecture or system design needed",
model: "claude-opus", // strong thinker
guide: "Think step by step. Write design doc first.",
},
code: {
when: "Writing or editing code",
guide: "Write clean code. Run tests after.",
},
},
tools: ["files", "shell"],
});The managed loop detects which skill is active and switches models mid-run. The trace shows every switch. You don't write orchestration code — you declare what you need and oncell handles the routing.
$0 when idle
A deployed agent that nobody's talking to costs $0. Not “pennies per hour.” Zero. The agent auto-pauses after 15 minutes of inactivity, syncs state to S3, and destroys the sandbox. When the next request arrives, it restores in 200ms.
This means you can deploy 100 agents and only pay for the ones that are actually working. The Heroku free tier, but for agents.
Why now
Three things changed:
The infrastructure gap is real: every team building agents today is reinventing the same seven services. We're filling that gap the way Heroku filled it for web apps — by making the default path work.
Try it
npm install oncellWrite an agent.ts. Run npx oncell deploy. Your agent is live, with memory, files, database, LLM, traces, and crash recovery. No infrastructure to learn.
Or pick a template and deploy in under 3 minutes:
The best infrastructure is the infrastructure you don't think about. Write your agent. We run it forever.