Cloud agent time to live

If we create a cloud agent using the REST API, What is its time to live ?

Does it costs if we are not using it, and its just lying there ?

Hey, in order.

Cost / idle. Cloud Agents are billed based on actual usage (tokens at API pricing) plus environment setup runs, not for just sitting there. If the agent finished the task and isn’t processing anything, it won’t spend new tokens, and you’re not charged for idle wall clock time. Cost only happens when the agent is actually working (your run or a follow-up).

A few important Cloud Agents billing notes:

  • You need to enable on-demand usage, otherwise the run won’t start.
  • Your plan’s included usage is used first, then on-demand.
  • Keep enough headroom under your hard limit, otherwise the spend-rate limiter won’t let a run start. Don’t set the limit too close to current spend.
  • The first few environment creations include free setup runs (promo).

More details in this team breakdown thread: What is the pricing structure for using Cloud Agents?

TTL / lifetime. An agent created via the REST API lives within its task. The VM spins up for the run and doesn’t keep running forever in the background. The conversation/agent stays available afterward so you can send a follow-up. For the exact VM lifetime, check the latest Cloud Agents API docs: Cloud Agents API | Cursor Docs

If you have a specific setup in mind (for example, keeping a pool of agents ready), describe it and I’ll suggest the best approach.