"Running an AI agent in the cloud" means very different things depending on who you ask. For one team it means a sandbox where their own agent can execute code safely. For another it means an agent that fixes a ticket while they're in a meeting. For a third it means an agent that wakes up at 3 AM, does a job, and asks a question on Slack when it's stuck. And for a growing number of small teams it means handing whole jobs of the company to agents that run them on their own.
This guide sorts the tools into the four kinds you'll actually run into, says what each is good at, and ends with a checklist for picking one. Product details change quickly, so check each vendor's own docs for the current limits and prices.
The four kinds of tools
| Kind | What you get | Examples | You still build | |---|---|---|---| | Code sandboxes | An isolated machine your own agent can run code in, through an SDK | E2B, Daytona, Modal Sandboxes | The agent, its loop, prompts, tools, scheduling and memory | | Serverless compute | Functions, containers and GPUs on demand | Modal, cloud functions | The agent and everything around it | | Cloud coding agents | An agent that works on your repository and opens a pull request | Devin, OpenAI Codex (cloud), Claude Code on the web, Cursor background agents | Nothing for coding tasks; they're built for code | | Agent platforms with their own computer | A finished agent with a long-lived machine, browser, schedules, webhooks, tools and approvals | Lark | Only the instructions: what the job is and what "done" looks like |
Code sandboxes: for teams building their own agent
Sandboxes like E2B and Daytona give your application a fresh, isolated machine to run code in, usually started from an SDK in a fraction of a second. They're the right choice when you're building an AI product and need a safe place to execute what the model writes: a data-analysis feature, a code interpreter, an agent of your own design.
What they don't give you is the agent. You write the loop that calls the model, decides which tool to run, handles errors, stores memory, schedules the next run and asks a human when something is unclear.
Serverless compute: for running your own code at scale
Modal and the cloud providers' function and container services run your code on demand, including on GPUs. They're excellent for model inference, batch jobs and pipelines you've written yourself. Like sandboxes, they're building blocks: the agent's behaviour is yours to write.
Cloud coding agents: for tickets and pull requests
Devin, OpenAI's Codex in the cloud, Claude Code on the web and Cursor's background agents take a coding task, work on your repository in a cloud environment, and hand back a pull request. If your work is code and the output is a PR, these are built for it.
They're less suited to work that isn't a repository: researching leads, watching a competitor's pricing page every 30 minutes, editing a video every night, or a morning brief from your dashboards.
Agent platforms where every agent has its own computer
On Lark, you describe a job and the agent does it on its own Linux machine with a terminal, files and a real browser. The machine can stay with the agent between tasks, so its installs, files, browser logins and notes carry over. Agents start when you ask, on a schedule in your time zone, or from a webhook (GitHub, Stripe, Linear, Sentry, Jira or anything that can send one), and they ask you by Slack, email or text when they need a decision.
It's the right fit when the job is the product: "fix CI when it breaks", "make a Short every night", "brief me at 7 AM on what changed", "research every new lead". It runs coding agents too (Claude Code, Codex, Gemini CLI, Aider, OpenCode, Pi) as the agent's engine, and Claude Code, Codex or Cursor can hand tasks to Lark agents over MCP.
How to choose
Ask these questions about the work you want done:
- Are you building an AI product, or getting work done? Building a product that runs model-written code: a sandbox. Getting a job done: an agent.
- Is every output a pull request? Then a cloud coding agent fits. If the output is a report, a video, an email draft, a spreadsheet or a Slack message, you want a general agent.
- Does it need to start by itself? Schedules and webhooks are where most of the value of background agents comes from. Check that the tool has them built in, in your time zone.
- How long does one task take? Some tools cap a task at minutes. Research, renders and big refactors can take hours.
- Does it need a real browser? Logging in to a dashboard, filling a form or checking a page as a user sees it needs a browser the agent can drive, ideally one you can watch and take over.
- What happens when it's stuck? Good agents ask instead of guessing, and let you answer from your phone.
- What does a run cost, and can you cap it? Look for a live cost per run, a per-run cap and a monthly budget. See How much do AI agents cost to run?.
Quick picks
- You're building an agent into your own product: a code sandbox (E2B, Daytona) or serverless compute (Modal).
- Your backlog is tickets and you want pull requests: a cloud coding agent, or a Lark ticket-to-PR agent if you want it to start itself from Linear or Jira.
- You want recurring jobs done while you're away, with a browser and your tools: an agent platform with its own computer, like Lark. Start with a ready-made agent: a CI fixer, a morning brief, a lead researcher or the overnight video editor.
New to the idea? Start with What is a cloud AI agent?.
FAQ
What's the difference between an AI agent sandbox and an AI agent platform?
A sandbox (like E2B or Daytona) is an isolated machine your own code starts and runs commands in; you build the agent around it. An agent platform (like Lark) is the agent itself, with its machine, schedules, webhooks, tools and a way to ask you questions, so you only write what the job is.
Can an AI agent run on a schedule in the cloud?
Yes. On Lark an agent can start on a schedule in your time zone or when a webhook arrives, work on its own cloud computer for as long as the task takes, and message you when it needs a decision.
Do I need my own model API keys?
For sandboxes and serverless compute you bring your own. On Lark, Claude, GPT, GLM, DeepSeek and Kimi are included and paid from your agent credit.