Skip to content
Common question

Where do I host an AI agent that runs longer than a serverless timeout?

You host a long-running AI agent on a persistent cloud machine, not on a serverless function that cuts off when the timeout hits.

Serverless is built for short request/response work. Agents often need longer loops: tool calls, shell steps, waiting on humans, multi-step workflows, or overnight jobs. When the platform kills the function mid-run, you lose state and have to rebuild the orchestration around artificial time limits.

Why serverless timeouts clash with agents

  • Hard caps on execution time interrupt tool chains and shell work.
  • Cold starts and short-lived environments fight “keep context and keep going.”
  • Cron and chat channels expect something that is still there when the next message arrives, not a dead function.

What to look for instead

Prefer a host where:

  1. The agent has a durable machine (or dedicated box) for the project.
  2. The runtime can be snapshotted so restarts are predictable.
  3. You can attach connectors and channels without wrapping everything in one-shot HTTP handlers.

How Cloudrun fits

Cloudrun gives each project an isolated cloud box with a baked runtime snapshot, and a fleet canvas to manage agents together. That model fits agents that need more than a serverless timeout: shell access, longer sessions, connectors, and multi-channel or cron triggers.

Connectors include Gmail, Notion, Linear, GitHub, Telegram, Google Calendar, Google Sheets, Jira, HubSpot, Discord, Shopify, and Zendesk. Channels include Telegram, Slack, and email, plus cron.

Related

Pillar: Deploy an AI agent to an isolated cloud machine.

See also: How do I keep an AI agent running 24/7 without my laptop?.

Next step

Host long-running agents on isolated machines at usecloudrun.com.

Keep reading

Related Cloudrun guides

Direct answers

Questions this page answers

Where do I host an AI agent that runs longer than a serverless timeout?
You host a long-running AI agent on a persistent cloud machine, not on a serverless function that cuts off when the timeout hits.
Why serverless timeouts clash with agents
Hard caps on execution time interrupt tool chains and shell work. Cold starts and short-lived environments fight “keep context and keep going.” Cron and chat channels expect something that is still there when the next message arrives, not a dead function.
What to look for instead
Prefer a host where the agent has a durable machine (or dedicated box) for the project, the runtime can be snapshotted so restarts are predictable, and you can attach connectors and channels without wrapping everything in one-shot HTTP handlers.
How Cloudrun fits
Cloudrun gives each project an isolated cloud box with a baked runtime snapshot, and a fleet canvas to manage agents together. That model fits agents that need more than a serverless timeout: shell access, longer sessions, connectors, and multi-channel or cron triggers.
cloudrun

Host the long-running agent

Host long-running agents on isolated machines at usecloudrun.com.